2022-04-04 11:22:00 +05:30
|
|
|
import { __, s__ } from '~/locale';
|
2021-06-08 01:23:25 +05:30
|
|
|
|
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}');
|
|
|
|
|
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
|
|
|
|
|
|
|
// Status
|
2022-01-26 12:08:38 +05:30
|
|
|
export const I18N_ONLINE_RUNNER_TIMEAGO_DESCRIPTION = s__(
|
2021-12-11 22:18:48 +05:30
|
|
|
'Runners|Runner is online; last contact was %{timeAgo}',
|
|
|
|
);
|
2022-03-02 08:16:31 +05:30
|
|
|
export const I18N_NEVER_CONTACTED_RUNNER_DESCRIPTION = s__(
|
|
|
|
'Runners|This runner has never contacted this instance',
|
2021-12-11 22:18:48 +05:30
|
|
|
);
|
2022-01-26 12:08:38 +05:30
|
|
|
export const I18N_OFFLINE_RUNNER_TIMEAGO_DESCRIPTION = s__(
|
|
|
|
'Runners|No recent contact from this runner; last contact was %{timeAgo}',
|
|
|
|
);
|
|
|
|
export const I18N_STALE_RUNNER_DESCRIPTION = s__(
|
|
|
|
'Runners|No contact from this runner in over 3 months',
|
|
|
|
);
|
2021-12-11 22:18:48 +05:30
|
|
|
|
2022-04-04 11:22:00 +05:30
|
|
|
// Active flag
|
|
|
|
export const I18N_PAUSE = __('Pause');
|
|
|
|
export const I18N_RESUME = __('Resume');
|
|
|
|
|
2021-11-18 22:05:49 +05:30
|
|
|
export const I18N_LOCKED_RUNNER_DESCRIPTION = s__('Runners|You cannot assign to other projects');
|
|
|
|
export const I18N_PAUSED_RUNNER_DESCRIPTION = s__('Runners|Not available to run jobs');
|
|
|
|
|
2022-04-04 11:22:00 +05:30
|
|
|
// Runner details
|
|
|
|
|
|
|
|
export const I18N_ASSIGNED_PROJECTS = s__('Runners|Assigned Projects (%{projectCount})');
|
|
|
|
export const I18N_NONE = __('None');
|
|
|
|
export const I18N_NO_JOBS_FOUND = s__('Runner|This runner has not run any jobs.');
|
|
|
|
|
|
|
|
// Styles
|
|
|
|
|
2021-12-11 22:18:48 +05:30
|
|
|
export const RUNNER_TAG_BADGE_VARIANT = 'neutral';
|
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';
|
|
|
|
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';
|
|
|
|
|
2021-09-04 01:27:46 +05:30
|
|
|
export const PARAM_KEY_SORT = 'sort';
|
|
|
|
export const PARAM_KEY_PAGE = 'page';
|
|
|
|
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_ACTIVE = 'ACTIVE';
|
|
|
|
export const STATUS_PAUSED = 'PAUSED';
|
2022-01-26 12:08:38 +05:30
|
|
|
|
2021-09-04 01:27:46 +05:30
|
|
|
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
|
|
|
|
|
|
|
// CiRunnerAccessLevel
|
|
|
|
|
|
|
|
export const ACCESS_LEVEL_NOT_PROTECTED = 'NOT_PROTECTED';
|
|
|
|
export const ACCESS_LEVEL_REF_PROTECTED = 'REF_PROTECTED';
|
|
|
|
|
|
|
|
// CiRunnerSort
|
|
|
|
|
|
|
|
export const CREATED_DESC = 'CREATED_DESC';
|
|
|
|
export const CREATED_ASC = 'CREATED_ASC'; // TODO Add this to the API
|
|
|
|
export const CONTACTED_DESC = 'CONTACTED_DESC'; // TODO Add this to the API
|
|
|
|
export const CONTACTED_ASC = 'CONTACTED_ASC';
|
|
|
|
|
|
|
|
export const DEFAULT_SORT = CREATED_DESC;
|
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';
|