2022-05-07 20:08:51 +05:30
import { s _ _ } from '~/locale' ;
2021-04-29 21:17:54 +05:30
// Values for CI_CONFIG_STATUS_* comes from lint graphQL
2021-02-22 17:27:13 +05:30
export const CI _CONFIG _STATUS _INVALID = 'INVALID' ;
2021-04-29 21:17:54 +05:30
export const CI _CONFIG _STATUS _VALID = 'VALID' ;
// Values for EDITOR_APP_STATUS_* are frontend specifics and
// represent the global state of the pipeline editor app.
export const EDITOR _APP _STATUS _EMPTY = 'EMPTY' ;
export const EDITOR _APP _STATUS _INVALID = CI _CONFIG _STATUS _INVALID ;
2022-03-02 08:16:31 +05:30
export const EDITOR _APP _STATUS _LINT _UNAVAILABLE = 'LINT_DOWN' ;
2021-04-29 21:17:54 +05:30
export const EDITOR _APP _STATUS _LOADING = 'LOADING' ;
export const EDITOR _APP _STATUS _VALID = CI _CONFIG _STATUS _VALID ;
2021-03-11 19:13:27 +05:30
2021-12-11 22:18:48 +05:30
export const EDITOR _APP _VALID _STATUSES = [
EDITOR _APP _STATUS _EMPTY ,
EDITOR _APP _STATUS _INVALID ,
2022-03-02 08:16:31 +05:30
EDITOR _APP _STATUS _LINT _UNAVAILABLE ,
2021-12-11 22:18:48 +05:30
EDITOR _APP _STATUS _LOADING ,
EDITOR _APP _STATUS _VALID ,
] ;
2021-03-11 19:13:27 +05:30
export const COMMIT _FAILURE = 'COMMIT_FAILURE' ;
export const COMMIT _SUCCESS = 'COMMIT_SUCCESS' ;
2022-04-04 11:22:00 +05:30
export const COMMIT _SUCCESS _WITH _REDIRECT = 'COMMIT_SUCCESS_WITH_REDIRECT' ;
2021-03-11 19:13:27 +05:30
export const DEFAULT _FAILURE = 'DEFAULT_FAILURE' ;
2021-06-08 01:23:25 +05:30
export const DEFAULT _SUCCESS = 'DEFAULT_SUCCESS' ;
2021-03-11 19:13:27 +05:30
export const LOAD _FAILURE _UNKNOWN = 'LOAD_FAILURE_UNKNOWN' ;
2021-12-11 22:18:48 +05:30
export const PIPELINE _FAILURE = 'PIPELINE_FAILURE' ;
2021-03-11 19:13:27 +05:30
export const CREATE _TAB = 'CREATE_TAB' ;
export const MERGED _TAB = 'MERGED_TAB' ;
2022-07-23 23:45:48 +05:30
export const VALIDATE _TAB = 'VALIDATE_TAB' ;
2021-03-11 19:13:27 +05:30
export const VISUALIZE _TAB = 'VISUALIZE_TAB' ;
2021-12-11 22:18:48 +05:30
export const TABS _INDEX = {
[ CREATE _TAB ] : '0' ,
[ VISUALIZE _TAB ] : '1' ,
2022-08-27 11:52:29 +05:30
[ VALIDATE _TAB ] : '2' ,
[ MERGED _TAB ] : '3' ,
2021-12-11 22:18:48 +05:30
} ;
export const TAB _QUERY _PARAM = 'tab' ;
2021-04-17 20:07:23 +05:30
export const COMMIT _ACTION _CREATE = 'CREATE' ;
export const COMMIT _ACTION _UPDATE = 'UPDATE' ;
2021-06-08 01:23:25 +05:30
export const BRANCH _PAGINATION _LIMIT = 20 ;
export const BRANCH _SEARCH _DEBOUNCE = '500' ;
2022-05-07 20:08:51 +05:30
export const SOURCE _EDITOR _DEBOUNCE = 500 ;
2021-09-04 01:27:46 +05:30
2022-07-16 23:28:13 +05:30
export const FILE _TREE _DISPLAY _KEY = 'pipeline_editor_file_tree_display' ;
export const FILE _TREE _POPOVER _DISMISSED _KEY = 'pipeline_editor_file_tree_popover_dismissed' ;
export const FILE _TREE _TIP _DISMISSED _KEY = 'pipeline_editor_file_tree_tip_dismissed' ;
2022-08-13 15:12:31 +05:30
export const VALIDATE _TAB _BADGE _DISMISSED _KEY = 'pipeline_editor_validate_tab_badge_dismissed' ;
2022-07-16 23:28:13 +05:30
2021-09-04 01:27:46 +05:30
export const STARTER _TEMPLATE _NAME = 'Getting-Started' ;
2021-09-30 23:02:18 +05:30
2022-07-23 23:45:48 +05:30
export const CI _EXAMPLES _LINK = 'CI_EXAMPLES_LINK' ;
export const CI _HELP _LINK = 'CI_HELP_LINK' ;
export const CI _NEEDS _LINK = 'CI_NEEDS_LINK' ;
export const CI _RUNNERS _LINK = 'CI_RUNNERS_LINK' ;
export const CI _YAML _LINK = 'CI_YAML_LINK' ;
2021-09-30 23:02:18 +05:30
export const pipelineEditorTrackingOptions = {
label : 'pipeline_editor' ,
actions : {
2022-07-23 23:45:48 +05:30
browseTemplates : 'browse_templates' ,
closeHelpDrawer : 'close_help_drawer' ,
2023-07-09 08:55:56 +05:30
commitCiConfig : 'commit_ci_config' ,
2022-07-23 23:45:48 +05:30
helpDrawerLinks : {
[ CI _EXAMPLES _LINK ] : 'visit_help_drawer_link_ci_examples' ,
[ CI _HELP _LINK ] : 'visit_help_drawer_link_ci_help' ,
[ CI _NEEDS _LINK ] : 'visit_help_drawer_link_needs' ,
[ CI _RUNNERS _LINK ] : 'visit_help_drawer_link_runners' ,
[ CI _YAML _LINK ] : 'visit_help_drawer_link_yaml' ,
} ,
openHelpDrawer : 'open_help_drawer' ,
2022-08-27 11:52:29 +05:30
resimulatePipeline : 'resimulate_pipeline' ,
simulatePipeline : 'simulate_pipeline' ,
2021-09-30 23:02:18 +05:30
} ,
} ;
export const TEMPLATE _REPOSITORY _URL =
'https://gitlab.com/gitlab-org/gitlab-foss/tree/master/lib/gitlab/ci/templates' ;
2022-08-13 15:12:31 +05:30
export const VALIDATE _TAB _FEEDBACK _URL = 'https://gitlab.com/gitlab-org/gitlab/-/issues/346687' ;
2021-11-11 11:23:49 +05:30
export const COMMIT _SHA _POLL _INTERVAL = 1000 ;
2022-05-07 20:08:51 +05:30
export const I18N = {
title : s _ _ ( 'Pipelines|Get started with GitLab CI/CD' ) ,
learnBasics : {
title : s _ _ ( 'Pipelines|Learn the basics of pipelines and .yml files' ) ,
subtitle : s _ _ (
'Pipelines|Use a sample %{codeStart}.gitlab-ci.yml%{codeEnd} template file to explore how CI/CD works.' ,
) ,
gettingStarted : {
title : s _ _ ( 'Pipelines|"Hello world" with GitLab CI' ) ,
description : s _ _ (
'Pipelines|Get familiar with GitLab CI syntax by setting up a simple pipeline running a "Hello world" script to see how it runs, explore how CI/CD works.' ,
) ,
cta : s _ _ ( 'Pipelines|Try test template' ) ,
} ,
} ,
templates : {
title : s _ _ ( 'Pipelines|Ready to set up CI/CD for your project?' ) ,
subtitle : s _ _ (
"Pipelines|Use a template based on your project's language or framework to get started with GitLab CI/CD." ,
) ,
} ,
} ;