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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-03-02 18:16:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-02 18:16:07 +0300
commitf38683df1f619b2a1960e1415b9326354a4b5327 (patch)
tree23d469a81d3d1866a2ab71ba406aa84cd954f99a /app/assets/javascripts/google_cloud
parent5bc7c18ad37cde0ffdf1aa4ba2cee27c92ec69f6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/google_cloud')
-rw-r--r--app/assets/javascripts/google_cloud/components/gcp_regions_form.vue20
-rw-r--r--app/assets/javascripts/google_cloud/components/service_accounts_form.vue47
-rw-r--r--app/assets/javascripts/google_cloud/components/service_accounts_list.vue18
3 files changed, 40 insertions, 45 deletions
diff --git a/app/assets/javascripts/google_cloud/components/gcp_regions_form.vue b/app/assets/javascripts/google_cloud/components/gcp_regions_form.vue
index 9db3af4452b..23011e5a5b0 100644
--- a/app/assets/javascripts/google_cloud/components/gcp_regions_form.vue
+++ b/app/assets/javascripts/google_cloud/components/gcp_regions_form.vue
@@ -1,20 +1,20 @@
<script>
import { GlButton, GlFormGroup, GlFormSelect } from '@gitlab/ui';
-import { __ } from '~/locale';
+import { __, s__ } from '~/locale';
export default {
components: { GlButton, GlFormGroup, GlFormSelect },
props: {
availableRegions: { required: true, type: Array },
- environments: { required: true, type: Array },
+ refs: { required: true, type: Array },
cancelPath: { required: true, type: String },
},
i18n: {
title: __('Configure region for environment'),
gcpRegionLabel: __('Region'),
gcpRegionDescription: __('List of suitable GCP locations'),
- environmentLabel: __('Environment'),
- environmentDescription: __('List of environments for this project'),
+ refsLabel: s__('GoogleCloud|Refs'),
+ refsDescription: s__('GoogleCloud|Configured region is linked to the selected branch or tag'),
submitLabel: __('Configure region'),
cancelLabel: __('Cancel'),
},
@@ -28,14 +28,14 @@ export default {
</header>
<gl-form-group
- label-for="environment"
- :label="$options.i18n.environmentLabel"
- :description="$options.i18n.environmentDescription"
+ label-for="ref"
+ :label="$options.i18n.refsLabel"
+ :description="$options.i18n.refsDescription"
>
- <gl-form-select id="environment" name="environment" required>
+ <gl-form-select id="ref" name="ref" required>
<option value="*">{{ __('All') }}</option>
- <option v-for="environment in environments" :key="environment.id" :value="environment.name">
- {{ environment.name }}
+ <option v-for="ref in refs" :key="ref" :value="ref">
+ {{ ref }}
</option>
</gl-form-select>
</gl-form-group>
diff --git a/app/assets/javascripts/google_cloud/components/service_accounts_form.vue b/app/assets/javascripts/google_cloud/components/service_accounts_form.vue
index 551783e6c50..faec94e735b 100644
--- a/app/assets/javascripts/google_cloud/components/service_accounts_form.vue
+++ b/app/assets/javascripts/google_cloud/components/service_accounts_form.vue
@@ -1,26 +1,29 @@
<script>
-import { GlButton, GlFormGroup, GlFormSelect, GlFormCheckbox } from '@gitlab/ui';
-import { __ } from '~/locale';
+import { GlButton, GlFormCheckbox, GlFormGroup, GlFormSelect } from '@gitlab/ui';
+import { s__ } from '~/locale';
export default {
+ ALL_REFS: '*',
components: { GlButton, GlFormGroup, GlFormSelect, GlFormCheckbox },
props: {
gcpProjects: { required: true, type: Array },
- environments: { required: true, type: Array },
+ refs: { required: true, type: Array },
cancelPath: { required: true, type: String },
},
i18n: {
- title: __('Create service account'),
- gcpProjectLabel: __('Google Cloud project'),
- gcpProjectDescription: __(
- 'New service account is generated for the selected Google Cloud project',
+ title: s__('GoogleCloud|Create service account'),
+ gcpProjectLabel: s__('GoogleCloud|Google Cloud project'),
+ gcpProjectDescription: s__(
+ 'GoogleCloud|New service account is generated for the selected Google Cloud project',
),
- environmentLabel: __('Environment'),
- environmentDescription: __('Generated service account is linked to the selected environment'),
- submitLabel: __('Create service account'),
- cancelLabel: __('Cancel'),
- checkboxLabel: __(
- 'I understand the responsibilities involved with managing service account keys',
+ refsLabel: s__('GoogleCloud|Refs'),
+ refsDescription: s__(
+ 'GoogleCloud|Generated service account is linked to the selected branch or tag',
+ ),
+ submitLabel: s__('GoogleCloud|Create service account'),
+ cancelLabel: s__('GoogleCloud|Cancel'),
+ checkboxLabel: s__(
+ 'GoogleCloud|I understand the responsibilities involved with managing service account keys',
),
},
};
@@ -47,18 +50,14 @@ export default {
</gl-form-select>
</gl-form-group>
<gl-form-group
- label-for="environment"
- :label="$options.i18n.environmentLabel"
- :description="$options.i18n.environmentDescription"
+ label-for="ref"
+ :label="$options.i18n.refsLabel"
+ :description="$options.i18n.refsDescription"
>
- <gl-form-select id="environment" name="environment" required>
- <option value="*">{{ __('All') }}</option>
- <option
- v-for="environment in environments"
- :key="environment.name"
- :value="environment.name"
- >
- {{ environment.name }}
+ <gl-form-select id="ref" name="ref" required>
+ <option :value="$options.ALL_REFS">{{ __('All') }}</option>
+ <option v-for="ref in refs" :key="ref" :value="ref">
+ {{ ref }}
</option>
</gl-form-select>
</gl-form-group>
diff --git a/app/assets/javascripts/google_cloud/components/service_accounts_list.vue b/app/assets/javascripts/google_cloud/components/service_accounts_list.vue
index 4db84746482..37b716d7be5 100644
--- a/app/assets/javascripts/google_cloud/components/service_accounts_list.vue
+++ b/app/assets/javascripts/google_cloud/components/service_accounts_list.vue
@@ -18,16 +18,12 @@ export default {
required: true,
},
},
- data() {
- return {
- tableFields: [
- { key: 'environment', label: __('Environment'), sortable: true },
- { key: 'gcp_project', label: __('Google Cloud Project'), sortable: true },
- { key: 'service_account_exists', label: __('Service Account'), sortable: true },
- { key: 'service_account_key_exists', label: __('Service Account Key'), sortable: true },
- ],
- };
- },
+ tableFields: [
+ { key: 'ref', label: __('Environment'), sortable: true },
+ { key: 'gcp_project', label: __('Google Cloud Project'), sortable: true },
+ { key: 'service_account_exists', label: __('Service Account'), sortable: true },
+ { key: 'service_account_key_exists', label: __('Service Account Key'), sortable: true },
+ ],
i18n: {
createServiceAccount: __('Create service account'),
found: __('✔'),
@@ -62,7 +58,7 @@ export default {
<h2 class="gl-font-size-h2">{{ $options.i18n.serviceAccountsTitle }}</h2>
<p>{{ $options.i18n.serviceAccountsDescription }}</p>
- <gl-table :items="list" :fields="tableFields">
+ <gl-table :items="list" :fields="$options.tableFields">
<template #cell(service_account_exists)="{ value }">
{{ value ? $options.i18n.found : $options.i18n.notFound }}
</template>