Welcome to mirror list, hosted at ThFree Co, Russian Federation.

status_token_config.js « search_tokens « components « runner « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 03dff5e61a5d8d87d4aeb86e0a209f2ffcbfe3ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { __, s__ } from '~/locale';
import { OPERATOR_IS_ONLY } from '~/vue_shared/components/filtered_search_bar/constants';
import BaseToken from '~/vue_shared/components/filtered_search_bar/tokens/base_token.vue';
import {
  STATUS_ACTIVE,
  STATUS_PAUSED,
  STATUS_ONLINE,
  STATUS_OFFLINE,
  STATUS_NOT_CONNECTED,
  PARAM_KEY_STATUS,
} from '../../constants';

export const statusTokenConfig = {
  icon: 'status',
  title: __('Status'),
  type: PARAM_KEY_STATUS,
  token: BaseToken,
  unique: true,
  options: [
    { value: STATUS_ACTIVE, title: s__('Runners|Active') },
    { value: STATUS_PAUSED, title: s__('Runners|Paused') },
    { value: STATUS_ONLINE, title: s__('Runners|Online') },
    { value: STATUS_OFFLINE, title: s__('Runners|Offline') },

    // Added extra quotes in this title to avoid splitting this value:
    // see: https://gitlab.com/gitlab-org/gitlab-ui/-/issues/1438
    { value: STATUS_NOT_CONNECTED, title: `"${s__('Runners|Not connected')}"` },
  ],
  // TODO In principle we could support more complex search rules,
  // this can be added to a separate issue.
  operators: OPERATOR_IS_ONLY,
};