2017-10-24 00:56:39 -04:00
|
|
|
import {
|
|
|
|
APPLICATION_INSTALLABLE,
|
|
|
|
APPLICATION_INSTALLING,
|
|
|
|
APPLICATION_ERROR,
|
|
|
|
} from '~/clusters/constants';
|
|
|
|
|
|
|
|
const CLUSTERS_MOCK_DATA = {
|
|
|
|
GET: {
|
|
|
|
'/gitlab-org/gitlab-shell/clusters/1/status.json': {
|
|
|
|
data: {
|
|
|
|
status: 'errored',
|
|
|
|
status_reason: 'Failed to request to CloudPlatform.',
|
|
|
|
applications: [{
|
|
|
|
name: 'helm',
|
|
|
|
status: APPLICATION_INSTALLABLE,
|
|
|
|
status_reason: null,
|
|
|
|
}, {
|
|
|
|
name: 'ingress',
|
|
|
|
status: APPLICATION_ERROR,
|
|
|
|
status_reason: 'Cannot connect',
|
2018-02-20 07:44:20 -05:00
|
|
|
external_ip: null,
|
2017-10-24 00:56:39 -04:00
|
|
|
}, {
|
|
|
|
name: 'runner',
|
|
|
|
status: APPLICATION_INSTALLING,
|
|
|
|
status_reason: null,
|
2017-12-22 12:23:43 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'prometheus',
|
|
|
|
status: APPLICATION_ERROR,
|
|
|
|
status_reason: 'Cannot connect',
|
2017-10-24 00:56:39 -04:00
|
|
|
}],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
POST: {
|
|
|
|
'/gitlab-org/gitlab-shell/clusters/1/applications/helm': { },
|
|
|
|
'/gitlab-org/gitlab-shell/clusters/1/applications/ingress': { },
|
|
|
|
'/gitlab-org/gitlab-shell/clusters/1/applications/runner': { },
|
2017-12-22 12:23:43 -05:00
|
|
|
'/gitlab-org/gitlab-shell/clusters/1/applications/prometheus': { },
|
2017-10-24 00:56:39 -04:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
const DEFAULT_APPLICATION_STATE = {
|
|
|
|
id: 'some-app',
|
|
|
|
title: 'My App',
|
|
|
|
titleLink: 'https://about.gitlab.com/',
|
|
|
|
description: 'Some description about this interesting application!',
|
|
|
|
status: null,
|
|
|
|
statusReason: null,
|
|
|
|
requestStatus: null,
|
|
|
|
requestReason: null,
|
|
|
|
};
|
|
|
|
|
|
|
|
export {
|
|
|
|
CLUSTERS_MOCK_DATA,
|
|
|
|
DEFAULT_APPLICATION_STATE,
|
|
|
|
};
|