debian-mirror-gitlab/app/assets/javascripts/pipelines/constants.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

113 lines
3 KiB
JavaScript
Raw Normal View History

2020-05-24 23:13:21 +05:30
import { s__, __ } from '~/locale';
2018-10-15 14:42:47 +05:30
export const CANCEL_REQUEST = 'CANCEL_REQUEST';
2020-05-24 23:13:21 +05:30
export const FILTER_PIPELINES_SEARCH_DELAY = 200;
export const ANY_TRIGGER_AUTHOR = 'Any';
2021-10-27 15:23:28 +05:30
export const SUPPORTED_FILTER_PARAMETERS = ['username', 'ref', 'status', 'source'];
2020-06-23 00:09:42 +05:30
export const FILTER_TAG_IDENTIFIER = 'tag';
2020-07-28 23:09:34 +05:30
export const SCHEDULE_ORIGIN = 'schedule';
2022-03-02 08:16:31 +05:30
export const NEEDS_PROPERTY = 'needs';
export const EXPLICIT_NEEDS_PROPERTY = 'previousStageJobsOrNeeds';
2019-12-26 22:10:19 +05:30
2022-04-04 11:22:00 +05:30
export const ICONS = {
TAG: 'tag',
MR: 'git-merge',
BRANCH: 'branch',
};
2019-12-26 22:10:19 +05:30
export const TestStatus = {
FAILED: 'failed',
SKIPPED: 'skipped',
SUCCESS: 'success',
2021-01-03 14:25:43 +05:30
ERROR: 'error',
UNKNOWN: 'unknown',
2019-12-26 22:10:19 +05:30
};
2020-05-24 23:13:21 +05:30
export const FETCH_AUTHOR_ERROR_MESSAGE = __('There was a problem fetching project users.');
export const FETCH_BRANCH_ERROR_MESSAGE = __('There was a problem fetching project branches.');
2020-06-23 00:09:42 +05:30
export const FETCH_TAG_ERROR_MESSAGE = __('There was a problem fetching project tags.');
2020-05-24 23:13:21 +05:30
export const RAW_TEXT_WARNING = s__(
'Pipeline|Raw text search is not currently supported. Please use the available search tokens.',
);
2021-01-03 14:25:43 +05:30
/* Error constants shared across graphs */
export const DEFAULT = 'default';
export const DELETE_FAILURE = 'delete_pipeline_failure';
export const DRAW_FAILURE = 'draw_failure';
export const LOAD_FAILURE = 'load_failure';
export const PARSE_FAILURE = 'parse_failure';
export const POST_FAILURE = 'post_failure';
export const UNSUPPORTED_DATA = 'unsupported_data';
2021-04-17 20:07:23 +05:30
export const CHILD_VIEW = 'child';
2021-10-27 15:23:28 +05:30
2022-07-16 23:28:13 +05:30
// Pipeline tabs
2023-01-13 00:05:48 +05:30
export const pipelineTabName = 'graph';
2022-07-16 23:28:13 +05:30
export const needsTabName = 'dag';
export const jobsTabName = 'builds';
export const failedJobsTabName = 'failures';
export const testReportTabName = 'test_report';
export const securityTabName = 'security';
export const licensesTabName = 'licenses';
export const codeQualityTabName = 'codequality_report';
export const validPipelineTabNames = [
needsTabName,
jobsTabName,
failedJobsTabName,
testReportTabName,
securityTabName,
licensesTabName,
codeQualityTabName,
];
2021-10-27 15:23:28 +05:30
// Constants for the ID and IID selection dropdown
export const PipelineKeyOptions = [
{
text: __('Show Pipeline ID'),
label: __('Pipeline ID'),
2023-03-17 16:20:25 +05:30
value: 'id',
2021-10-27 15:23:28 +05:30
},
{
text: __('Show Pipeline IID'),
label: __('Pipeline IID'),
2023-03-17 16:20:25 +05:30
value: 'iid',
2021-10-27 15:23:28 +05:30
},
];
2021-12-11 22:18:48 +05:30
export const TOAST_MESSAGE = s__('Pipeline|Creating pipeline.');
2022-04-04 11:22:00 +05:30
2022-08-27 11:52:29 +05:30
export const BUTTON_TOOLTIP_RETRY = __('Retry all failed or cancelled jobs');
2023-07-09 08:55:56 +05:30
export const BUTTON_TOOLTIP_CANCEL = __('Cancel the running pipeline');
2022-07-16 23:28:13 +05:30
export const DEFAULT_FIELDS = [
{
key: 'name',
label: __('Name'),
columnClass: 'gl-w-20p',
},
{
key: 'stage',
label: __('Stage'),
columnClass: 'gl-w-20p',
},
{
2023-07-09 08:55:56 +05:30
key: 'failureMessage',
2022-07-16 23:28:13 +05:30
label: __('Failure'),
columnClass: 'gl-w-40p',
},
{
key: 'actions',
label: '',
tdClass: 'gl-text-right',
columnClass: 'gl-w-20p',
},
];
2022-08-13 15:12:31 +05:30
2022-10-11 01:57:18 +05:30
export const TRACKING_CATEGORIES = {
table: 'pipelines_table_component',
tabs: 'pipelines_filter_tabs',
search: 'pipelines_filtered_search',
};