diff options
Diffstat (limited to 'app/assets/javascripts/google_cloud/service_accounts/list.vue')
-rw-r--r-- | app/assets/javascripts/google_cloud/service_accounts/list.vue | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/assets/javascripts/google_cloud/service_accounts/list.vue b/app/assets/javascripts/google_cloud/service_accounts/list.vue index 4b580c594f5..c9d9a9a3e8c 100644 --- a/app/assets/javascripts/google_cloud/service_accounts/list.vue +++ b/app/assets/javascripts/google_cloud/service_accounts/list.vue @@ -1,7 +1,10 @@ <script> import { GlAlert, GlButton, GlEmptyState, GlLink, GlSprintf, GlTable } from '@gitlab/ui'; +import { setUrlParams } from '~/lib/utils/url_utility'; import { __ } from '~/locale'; +const GOOGLE_CONSOLE_URL = 'https://console.cloud.google.com/iam-admin/serviceaccounts'; + export default { components: { GlAlert, GlButton, GlEmptyState, GlLink, GlSprintf, GlTable }, props: { @@ -40,6 +43,12 @@ export default { 'Enhance security by storing service account keys in secret managers - learn more about %{docLinkStart}secret management with GitLab%{docLinkEnd}', ), }, + methods: { + gcpProjectUrl(id) { + return setUrlParams({ project: id }, GOOGLE_CONSOLE_URL); + }, + }, + GOOGLE_CONSOLE_URL, }; </script> @@ -59,6 +68,9 @@ export default { <p>{{ $options.i18n.serviceAccountsDescription }}</p> <gl-table :items="list" :fields="$options.tableFields"> + <template #cell(gcp_project)="{ value }"> + <gl-link :href="gcpProjectUrl(value)">{{ value }}</gl-link> + </template> <template #cell(service_account_exists)="{ value }"> {{ value ? $options.i18n.found : $options.i18n.notFound }} </template> |