debian-mirror-gitlab/app/assets/javascripts/ci/runner/constants.js

191 lines
7 KiB
JavaScript
Raw Normal View History

2022-04-04 11:22:00 +05:30
import { __, s__ } from '~/locale';
2021-06-08 01:23:25 +05:30
2022-08-27 11:52:29 +05:30
export const RUNNER_TYPENAME = 'CiRunner'; // __typename
2021-09-04 01:27:46 +05:30
export const RUNNER_PAGE_SIZE = 20;
2022-01-26 12:08:38 +05:30
export const RUNNER_JOB_COUNT_LIMIT = 1000;
2022-04-04 11:22:00 +05:30
export const RUNNER_DETAILS_PROJECTS_PAGE_SIZE = 5;
export const RUNNER_DETAILS_JOBS_PAGE_SIZE = 30;
2021-09-04 01:27:46 +05:30
2021-09-30 23:02:18 +05:30
export const I18N_FETCH_ERROR = s__('Runners|Something went wrong while fetching runner data.');
2021-06-08 01:23:25 +05:30
export const I18N_DETAILS_TITLE = s__('Runners|Runner #%{runner_id}');
2022-11-25 23:54:43 +05:30
export const FILTER_CSS_CLASSES =
'gl-bg-gray-10 gl-p-5 gl-border-solid gl-border-gray-100 gl-border-0 gl-border-t-1 gl-border-b-1';
2021-12-11 22:18:48 +05:30
// Type
2022-04-04 11:22:00 +05:30
export const I18N_ALL_TYPES = s__('Runners|All');
export const I18N_INSTANCE_TYPE = s__('Runners|Instance');
export const I18N_GROUP_TYPE = s__('Runners|Group');
export const I18N_PROJECT_TYPE = s__('Runners|Project');
2021-11-18 22:05:49 +05:30
export const I18N_INSTANCE_RUNNER_DESCRIPTION = s__('Runners|Available to all projects');
export const I18N_GROUP_RUNNER_DESCRIPTION = s__(
'Runners|Available to all projects and subgroups in the group',
);
export const I18N_PROJECT_RUNNER_DESCRIPTION = s__('Runners|Associated with one or more projects');
2021-12-11 22:18:48 +05:30
2022-10-11 01:57:18 +05:30
// Status
export const I18N_STATUS_ONLINE = s__('Runners|Online');
export const I18N_STATUS_NEVER_CONTACTED = s__('Runners|Never contacted');
export const I18N_STATUS_OFFLINE = s__('Runners|Offline');
export const I18N_STATUS_STALE = s__('Runners|Stale');
2023-03-04 22:38:38 +05:30
// Executor Status
export const I18N_JOB_STATUS_RUNNING = s__('Runners|Running');
export const I18N_JOB_STATUS_IDLE = s__('Runners|Idle');
2022-06-21 17:19:12 +05:30
// Status help popover
export const I18N_STATUS_POPOVER_TITLE = s__('Runners|Runner statuses');
export const I18N_STATUS_POPOVER_NEVER_CONTACTED = s__('Runners|Never contacted:');
export const I18N_STATUS_POPOVER_NEVER_CONTACTED_DESCRIPTION = s__(
'Runners|Runner has never contacted GitLab (when you register a runner, use %{codeStart}gitlab-runner run%{codeEnd} to bring it online)',
);
export const I18N_STATUS_POPOVER_ONLINE = s__('Runners|Online:');
export const I18N_STATUS_POPOVER_ONLINE_DESCRIPTION = s__(
'Runners|Runner has contacted GitLab within the last %{elapsedTime}',
);
export const I18N_STATUS_POPOVER_OFFLINE = s__('Runners|Offline:');
export const I18N_STATUS_POPOVER_OFFLINE_DESCRIPTION = s__(
'Runners|Runner has not contacted GitLab in more than %{elapsedTime}',
);
export const I18N_STATUS_POPOVER_STALE = s__('Runners|Stale:');
export const I18N_STATUS_POPOVER_STALE_DESCRIPTION = s__(
'Runners|Runner has not contacted GitLab in more than %{elapsedTime}',
);
// Status tooltips
export const I18N_ONLINE_TIMEAGO_TOOLTIP = s__(
2021-12-11 22:18:48 +05:30
'Runners|Runner is online; last contact was %{timeAgo}',
);
2022-06-21 17:19:12 +05:30
export const I18N_NEVER_CONTACTED_TOOLTIP = s__('Runners|Runner has never contacted this instance');
export const I18N_OFFLINE_TIMEAGO_TOOLTIP = s__(
'Runners|Runner is offline; last contact was %{timeAgo}',
2021-12-11 22:18:48 +05:30
);
2022-06-21 17:19:12 +05:30
export const I18N_STALE_TIMEAGO_TOOLTIP = s__(
'Runners|Runner is stale; last contact was %{timeAgo}',
2022-01-26 12:08:38 +05:30
);
2022-06-21 17:19:12 +05:30
export const I18N_STALE_NEVER_CONTACTED_TOOLTIP = s__(
'Runners|Runner is stale; it has never contacted this instance',
2022-01-26 12:08:38 +05:30
);
2021-12-11 22:18:48 +05:30
2022-05-07 20:08:51 +05:30
// Actions
export const I18N_EDIT = __('Edit');
2022-04-04 11:22:00 +05:30
export const I18N_PAUSE = __('Pause');
2022-10-11 01:57:18 +05:30
export const I18N_PAUSED = s__('Runners|Paused');
2022-05-07 20:08:51 +05:30
export const I18N_PAUSE_TOOLTIP = s__('Runners|Pause from accepting jobs');
export const I18N_PAUSED_DESCRIPTION = s__('Runners|Not accepting jobs');
2022-04-04 11:22:00 +05:30
export const I18N_RESUME = __('Resume');
2022-05-07 20:08:51 +05:30
export const I18N_RESUME_TOOLTIP = s__('Runners|Resume accepting jobs');
export const I18N_DELETE_RUNNER = s__('Runners|Delete runner');
export const I18N_DELETED_TOAST = s__('Runners|Runner %{name} was deleted');
2022-04-04 11:22:00 +05:30
2022-10-11 01:57:18 +05:30
// List
2023-03-04 22:38:38 +05:30
export const I18N_NO_DESCRIPTION = s__('Runners|No description');
2022-06-21 17:19:12 +05:30
export const I18N_LOCKED_RUNNER_DESCRIPTION = s__(
'Runners|Runner is locked and available for currently assigned projects only. Only administrators can change the assigned projects.',
);
2022-10-11 01:57:18 +05:30
export const I18N_VERSION_LABEL = s__('Runners|Version %{version}');
export const I18N_LAST_CONTACT_LABEL = s__('Runners|Last contact: %{timeAgo}');
export const I18N_CREATED_AT_LABEL = s__('Runners|Created %{timeAgo}');
2022-11-25 23:54:43 +05:30
export const I18N_SHOW_ONLY_INHERITED = s__('Runners|Show only inherited');
export const I18N_ADMIN = s__('Runners|Administrator');
2021-11-18 22:05:49 +05:30
2022-04-04 11:22:00 +05:30
// Runner details
2023-04-23 21:23:45 +05:30
export const JOBS_ROUTE_PATH = '/jobs'; // vue-router route path
2022-08-13 15:12:31 +05:30
export const I18N_DETAILS = s__('Runners|Details');
2023-03-04 22:38:38 +05:30
export const I18N_JOBS = s__('Runners|Jobs');
2022-04-04 11:22:00 +05:30
export const I18N_ASSIGNED_PROJECTS = s__('Runners|Assigned Projects (%{projectCount})');
2022-10-11 01:57:18 +05:30
export const I18N_FILTER_PROJECTS = s__('Runners|Filter projects');
export const I18N_CLEAR_FILTER_PROJECTS = __('Clear');
2022-04-04 11:22:00 +05:30
export const I18N_NONE = __('None');
2022-06-21 17:19:12 +05:30
export const I18N_NO_JOBS_FOUND = s__('Runners|This runner has not run any jobs.');
2022-10-11 01:57:18 +05:30
export const I18N_NO_PROJECTS_FOUND = __('No projects found');
2022-04-04 11:22:00 +05:30
// Styles
2022-10-11 01:57:18 +05:30
export const RUNNER_TAG_BADGE_VARIANT = 'info';
2021-09-30 23:02:18 +05:30
export const RUNNER_TAG_BG_CLASS = 'gl-bg-blue-100';
2021-06-08 01:23:25 +05:30
2021-09-04 01:27:46 +05:30
// Filtered search parameter names
// - Used for URL params names
// - GlFilteredSearch tokens type
export const PARAM_KEY_STATUS = 'status';
2022-06-21 17:19:12 +05:30
export const PARAM_KEY_PAUSED = 'paused';
2021-09-04 01:27:46 +05:30
export const PARAM_KEY_RUNNER_TYPE = 'runner_type';
2021-09-30 23:02:18 +05:30
export const PARAM_KEY_TAG = 'tag';
export const PARAM_KEY_SEARCH = 'search';
2022-11-25 23:54:43 +05:30
export const PARAM_KEY_MEMBERSHIP = 'membership';
2021-09-30 23:02:18 +05:30
2021-09-04 01:27:46 +05:30
export const PARAM_KEY_SORT = 'sort';
export const PARAM_KEY_AFTER = 'after';
export const PARAM_KEY_BEFORE = 'before';
2021-06-08 01:23:25 +05:30
// CiRunnerType
export const INSTANCE_TYPE = 'INSTANCE_TYPE';
export const GROUP_TYPE = 'GROUP_TYPE';
export const PROJECT_TYPE = 'PROJECT_TYPE';
2021-09-04 01:27:46 +05:30
// CiRunnerStatus
export const STATUS_ONLINE = 'ONLINE';
2022-01-26 12:08:38 +05:30
export const STATUS_NEVER_CONTACTED = 'NEVER_CONTACTED';
export const STATUS_OFFLINE = 'OFFLINE';
export const STATUS_STALE = 'STALE';
2021-09-04 01:27:46 +05:30
2023-03-04 22:38:38 +05:30
// CiRunnerJobExecutionStatus
export const JOB_STATUS_RUNNING = 'RUNNING';
export const JOB_STATUS_IDLE = 'IDLE';
2021-09-04 01:27:46 +05:30
// CiRunnerAccessLevel
export const ACCESS_LEVEL_NOT_PROTECTED = 'NOT_PROTECTED';
export const ACCESS_LEVEL_REF_PROTECTED = 'REF_PROTECTED';
2023-04-23 21:23:45 +05:30
export const DEFAULT_ACCESS_LEVEL = ACCESS_LEVEL_NOT_PROTECTED;
2021-09-04 01:27:46 +05:30
// CiRunnerSort
export const CREATED_DESC = 'CREATED_DESC';
2022-05-07 20:08:51 +05:30
export const CREATED_ASC = 'CREATED_ASC';
export const CONTACTED_DESC = 'CONTACTED_DESC';
2021-09-04 01:27:46 +05:30
export const CONTACTED_ASC = 'CONTACTED_ASC';
export const DEFAULT_SORT = CREATED_DESC;
2021-11-11 11:23:49 +05:30
2022-11-25 23:54:43 +05:30
// CiRunnerMembershipFilter
export const MEMBERSHIP_DESCENDANTS = 'DESCENDANTS';
export const MEMBERSHIP_ALL_AVAILABLE = 'ALL_AVAILABLE';
export const DEFAULT_MEMBERSHIP = MEMBERSHIP_DESCENDANTS;
2021-11-11 11:23:49 +05:30
// Local storage namespaces
export const ADMIN_FILTERED_SEARCH_NAMESPACE = 'admin_runners';
export const GROUP_FILTERED_SEARCH_NAMESPACE = 'group_runners';
2023-04-23 21:23:45 +05:30
// Platforms
export const LINUX_PLATFORM = 'linux';
export const MACOS_PLATFORM = 'osx';
export const WINDOWS_PLATFORM = 'windows';
export const AWS_PLATFORM = 'aws';
export const DEFAULT_PLATFORM = LINUX_PLATFORM;
// Runner docs are in a separate repository and are not shipped with GitLab
// they are rendered as external URLs.
export const DOCKER_HELP_URL = 'https://docs.gitlab.com/runner/install/docker.html';
export const KUBERNETES_HELP_URL = 'https://docs.gitlab.com/runner/install/kubernetes.html';