2020-04-08 14:13:33 +05:30
|
|
|
import {
|
|
|
|
DEPLOYING,
|
|
|
|
REDEPLOYING,
|
|
|
|
SUCCESS,
|
|
|
|
STOPPING,
|
|
|
|
} from '~/vue_merge_request_widget/components/deployment/constants';
|
|
|
|
|
|
|
|
const actionButtonMocks = {
|
|
|
|
[STOPPING]: {
|
|
|
|
actionName: STOPPING,
|
|
|
|
buttonText: 'Stop environment',
|
|
|
|
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',
|
|
|
|
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',
|
|
|
|
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.',
|
|
|
|
},
|
|
|
|
};
|
2020-01-01 13:55:28 +05:30
|
|
|
|
|
|
|
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',
|
2021-06-08 01:23:25 +05:30
|
|
|
external_url: 'http://root-main-patch-91341.volatile-watch.surge.sh/index.html',
|
2020-01-01 13:55:28 +05:30
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'imgs/gallery.html',
|
2021-06-08 01:23:25 +05:30
|
|
|
external_url: 'http://root-main-patch-91341.volatile-watch.surge.sh/imgs/gallery.html',
|
2020-01-01 13:55:28 +05:30
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'about/',
|
2021-06-08 01:23:25 +05:30
|
|
|
external_url: 'http://root-main-patch-91341.volatile-watch.surge.sh/about/',
|
2020-01-01 13:55:28 +05:30
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
|
2020-04-08 14:13:33 +05:30
|
|
|
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 };
|