Welcome to mirror list, hosted at ThFree Co, Russian Federation.

deployment_mock_data.js « deployment « vue_mr_widget « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e98b1160ae48ae51997cc4e56428a0a3414c30a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import {
  DEPLOYING,
  REDEPLOYING,
  SUCCESS,
  STOPPING,
} from '~/vue_merge_request_widget/components/deployment/constants';

const actionButtonMocks = {
  [STOPPING]: {
    actionName: STOPPING,
    buttonText: 'Stop environment',
    buttonVariant: 'danger',
    busyText: 'This environment is being deployed',
    confirmMessage: 'Are you sure you want to stop this environment?',
    errorMessage: 'Something went wrong while stopping this environment. Please try again.',
  },
  [DEPLOYING]: {
    actionName: DEPLOYING,
    buttonText: 'Deploy',
    buttonVariant: 'confirm',
    busyText: 'This environment is being deployed',
    confirmMessage: 'Are you sure you want to deploy this environment?',
    errorMessage: 'Something went wrong while deploying this environment. Please try again.',
  },
  [REDEPLOYING]: {
    actionName: REDEPLOYING,
    buttonText: 'Re-deploy',
    buttonVariant: 'confirm',
    busyText: 'This environment is being re-deployed',
    confirmMessage: 'Are you sure you want to re-deploy this environment?',
    errorMessage: 'Something went wrong while deploying this environment. Please try again.',
  },
};

const deploymentMockData = {
  id: 15,
  name: 'review/diplo',
  url: '/root/review-apps/environments/15',
  stop_url: '/root/review-apps/environments/15/stop',
  metrics_url: '/root/review-apps/environments/15/deployments/1/metrics',
  metrics_monitoring_url: '/root/review-apps/environments/15/metrics',
  external_url: 'http://gitlab.com.',
  external_url_formatted: 'gitlab',
  deployed_at: '2017-03-22T22:44:42.258Z',
  deployed_at_formatted: 'Mar 22, 2017 10:44pm',
  details: {},
  status: SUCCESS,
  changes: [
    {
      path: 'index.html',
      external_url: 'http://root-main-patch-91341.volatile-watch.surge.sh/index.html',
    },
    {
      path: 'imgs/gallery.html',
      external_url: 'http://root-main-patch-91341.volatile-watch.surge.sh/imgs/gallery.html',
    },
    {
      path: 'about/',
      external_url: 'http://root-main-patch-91341.volatile-watch.surge.sh/about/',
    },
  ],
};

const playDetails = {
  playable_build: {
    play_path: '/root/test-deployments/-/jobs/1131/play',
  },
};

const retryDetails = {
  playable_build: {
    retry_path: '/root/test-deployments/-/jobs/1131/retry',
  },
};

export { actionButtonMocks, deploymentMockData, playDetails, retryDetails };