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

174 lines
5.4 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.',
2018-12-13 13:39:08 +05:30
applications: [
{
name: 'helm',
status: APPLICATION_STATUS.INSTALLABLE,
status_reason: null,
2019-07-31 22:56:46 +05:30
can_uninstall: false,
2018-12-13 13:39:08 +05:30
},
{
name: 'ingress',
status: APPLICATION_STATUS.ERROR,
status_reason: 'Cannot connect',
external_ip: null,
2019-07-07 11:18:12 +05:30
external_hostname: null,
2019-07-31 22:56:46 +05:30
can_uninstall: false,
2020-04-08 14:13:33 +05:30
modsecurity_enabled: false,
2018-12-13 13:39:08 +05:30
},
{
name: 'runner',
status: APPLICATION_STATUS.INSTALLING,
status_reason: null,
2019-07-31 22:56:46 +05:30
can_uninstall: false,
2018-12-13 13:39:08 +05:30
},
{
name: 'prometheus',
status: APPLICATION_STATUS.ERROR,
status_reason: 'Cannot connect',
2019-07-31 22:56:46 +05:30
can_uninstall: false,
2018-12-13 13:39:08 +05:30
},
{
name: 'jupyter',
status: APPLICATION_STATUS.INSTALLING,
status_reason: 'Cannot connect',
2019-07-31 22:56:46 +05:30
can_uninstall: false,
2018-12-13 13:39:08 +05:30
},
{
name: 'knative',
status: APPLICATION_STATUS.INSTALLING,
status_reason: 'Cannot connect',
2019-07-31 22:56:46 +05:30
can_uninstall: false,
2018-12-13 13:39:08 +05:30
},
2019-02-15 15:39:39 +05:30
{
name: 'cert_manager',
status: APPLICATION_STATUS.ERROR,
status_reason: 'Cannot connect',
email: 'test@example.com',
2019-07-31 22:56:46 +05:30
can_uninstall: false,
2019-02-15 15:39:39 +05:30
},
2019-12-26 22:10:19 +05:30
{
name: 'crossplane',
status: APPLICATION_STATUS.ERROR,
status_reason: 'Cannot connect',
can_uninstall: false,
},
{
name: 'elastic_stack',
status: APPLICATION_STATUS.ERROR,
status_reason: 'Cannot connect',
can_uninstall: false,
},
2018-12-13 13:39:08 +05:30
],
2018-11-08 19:23:39 +05:30
},
},
'/gitlab-org/gitlab-shell/clusters/2/status.json': {
data: {
status: 'errored',
status_reason: 'Failed to request to CloudPlatform.',
2018-12-13 13:39:08 +05:30
applications: [
{
name: 'helm',
status: APPLICATION_STATUS.INSTALLED,
status_reason: null,
},
{
name: 'ingress',
status: APPLICATION_STATUS.INSTALLED,
status_reason: 'Cannot connect',
external_ip: '1.1.1.1',
2019-07-07 11:18:12 +05:30
external_hostname: null,
2018-12-13 13:39:08 +05:30
},
{
name: 'runner',
status: APPLICATION_STATUS.INSTALLING,
status_reason: null,
},
{
name: 'prometheus',
status: APPLICATION_STATUS.ERROR,
status_reason: 'Cannot connect',
},
{
name: 'jupyter',
status: APPLICATION_STATUS.INSTALLABLE,
status_reason: 'Cannot connect',
},
{
name: 'knative',
status: APPLICATION_STATUS.INSTALLABLE,
status_reason: 'Cannot connect',
},
2019-02-15 15:39:39 +05:30
{
name: 'cert_manager',
status: APPLICATION_STATUS.ERROR,
status_reason: 'Cannot connect',
email: 'test@example.com',
},
2019-12-26 22:10:19 +05:30
{
name: 'crossplane',
status: APPLICATION_STATUS.ERROR,
status_reason: 'Cannot connect',
stack: 'gcp',
},
{
name: 'elastic_stack',
status: APPLICATION_STATUS.ERROR,
status_reason: 'Cannot connect',
},
2018-12-13 13:39:08 +05:30
],
2018-03-17 18:26:18 +05:30
},
},
},
POST: {
2018-12-13 13:39:08 +05:30
'/gitlab-org/gitlab-shell/clusters/1/applications/helm': {},
'/gitlab-org/gitlab-shell/clusters/1/applications/ingress': {},
2019-12-26 22:10:19 +05:30
'/gitlab-org/gitlab-shell/clusters/1/applications/crossplane': {},
2019-02-15 15:39:39 +05:30
'/gitlab-org/gitlab-shell/clusters/1/applications/cert_manager': {},
2018-12-13 13:39:08 +05:30
'/gitlab-org/gitlab-shell/clusters/1/applications/runner': {},
'/gitlab-org/gitlab-shell/clusters/1/applications/prometheus': {},
'/gitlab-org/gitlab-shell/clusters/1/applications/jupyter': {},
'/gitlab-org/gitlab-shell/clusters/1/applications/knative': {},
2019-12-26 22:10:19 +05:30
'/gitlab-org/gitlab-shell/clusters/1/applications/elastic_stack': {},
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,
requestReason: null,
};
2019-07-07 11:18:12 +05:30
const APPLICATIONS_MOCK_STATE = {
helm: { title: 'Helm Tiller', status: 'installable' },
2020-10-24 23:57:45 +05:30
ingress: {
title: 'Ingress',
status: 'installable',
modsecurity_enabled: false,
},
2019-12-26 22:10:19 +05:30
crossplane: { title: 'Crossplane', status: 'installable', stack: '' },
2019-07-07 11:18:12 +05:30
cert_manager: { title: 'Cert-Manager', status: 'installable' },
runner: { title: 'GitLab Runner' },
prometheus: { title: 'Prometheus' },
jupyter: { title: 'JupyterHub', status: 'installable', hostname: '' },
knative: { title: 'Knative ', status: 'installable', hostname: '' },
2020-03-13 15:44:24 +05:30
elastic_stack: { title: 'Elastic Stack', status: 'installable' },
2020-05-24 23:13:21 +05:30
fluentd: { title: 'Fluentd', status: 'installable' },
2020-10-24 23:57:45 +05:30
cilium: {
title: 'GitLab Container Network Policies',
status: 'not_installable',
},
2019-07-07 11:18:12 +05:30
};
export { CLUSTERS_MOCK_DATA, DEFAULT_APPLICATION_STATE, APPLICATIONS_MOCK_STATE };