debian-mirror-gitlab/spec/javascripts/clusters/services/mock_data.js

88 lines
2.5 KiB
JavaScript
Raw Normal View History

2018-11-18 11:00:15 +05:30
import { APPLICATION_STATUS } from '~/clusters/constants';
2018-03-17 18:26:18 +05:30
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',
2018-11-18 11:00:15 +05:30
status: APPLICATION_STATUS.INSTALLABLE,
2018-03-17 18:26:18 +05:30
status_reason: null,
}, {
name: 'ingress',
2018-11-18 11:00:15 +05:30
status: APPLICATION_STATUS.ERROR,
2018-03-17 18:26:18 +05:30
status_reason: 'Cannot connect',
2018-03-27 19:54:05 +05:30
external_ip: null,
2018-03-17 18:26:18 +05:30
}, {
name: 'runner',
2018-11-18 11:00:15 +05:30
status: APPLICATION_STATUS.INSTALLING,
2018-03-17 18:26:18 +05:30
status_reason: null,
},
{
name: 'prometheus',
2018-11-18 11:00:15 +05:30
status: APPLICATION_STATUS.ERROR,
2018-03-17 18:26:18 +05:30
status_reason: 'Cannot connect',
2018-11-08 19:23:39 +05:30
}, {
name: 'jupyter',
2018-11-18 11:00:15 +05:30
status: APPLICATION_STATUS.INSTALLING,
2018-11-08 19:23:39 +05:30
status_reason: 'Cannot connect',
}],
},
},
'/gitlab-org/gitlab-shell/clusters/2/status.json': {
data: {
status: 'errored',
status_reason: 'Failed to request to CloudPlatform.',
applications: [{
name: 'helm',
2018-11-18 11:00:15 +05:30
status: APPLICATION_STATUS.INSTALLED,
2018-11-08 19:23:39 +05:30
status_reason: null,
}, {
name: 'ingress',
2018-11-18 11:00:15 +05:30
status: APPLICATION_STATUS.INSTALLED,
2018-11-08 19:23:39 +05:30
status_reason: 'Cannot connect',
external_ip: '1.1.1.1',
}, {
name: 'runner',
2018-11-18 11:00:15 +05:30
status: APPLICATION_STATUS.INSTALLING,
2018-11-08 19:23:39 +05:30
status_reason: null,
},
{
name: 'prometheus',
2018-11-18 11:00:15 +05:30
status: APPLICATION_STATUS.ERROR,
2018-11-08 19:23:39 +05:30
status_reason: 'Cannot connect',
}, {
name: 'jupyter',
2018-11-18 11:00:15 +05:30
status: APPLICATION_STATUS.INSTALLABLE,
2018-11-08 19:23:39 +05:30
status_reason: 'Cannot connect',
2018-03-17 18:26:18 +05:30
}],
},
},
},
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': { },
'/gitlab-org/gitlab-shell/clusters/1/applications/prometheus': { },
2018-11-08 19:23:39 +05:30
'/gitlab-org/gitlab-shell/clusters/1/applications/jupyter': { },
2018-03-17 18:26:18 +05:30
},
};
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,
};