2022-03-02 08:16:31 +05:30
|
|
|
<script>
|
|
|
|
import { GlButton, GlTable } from '@gitlab/ui';
|
|
|
|
import { __ } from '~/locale';
|
|
|
|
|
2022-04-04 11:22:00 +05:30
|
|
|
const cloudRun = 'cloudRun';
|
|
|
|
const cloudStorage = 'cloudStorage';
|
|
|
|
|
2022-03-02 08:16:31 +05:30
|
|
|
const i18n = {
|
|
|
|
cloudRun: __('Cloud Run'),
|
|
|
|
cloudRunDescription: __('Deploy container based web apps on Google managed clusters'),
|
|
|
|
cloudStorage: __('Cloud Storage'),
|
|
|
|
cloudStorageDescription: __('Deploy static assets and resources to Google managed CDN'),
|
|
|
|
deployments: __('Deployments'),
|
|
|
|
deploymentsDescription: __(
|
|
|
|
'Configure pipelines to deploy web apps, backend services, APIs and static resources to Google Cloud',
|
|
|
|
),
|
|
|
|
configureViaMergeRequest: __('Configure via Merge Request'),
|
|
|
|
service: __('Service'),
|
|
|
|
description: __('Description'),
|
|
|
|
};
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: { GlButton, GlTable },
|
|
|
|
props: {
|
|
|
|
cloudRunUrl: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
cloudStorageUrl: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
},
|
2022-04-04 11:22:00 +05:30
|
|
|
methods: {
|
|
|
|
actionUrl(key) {
|
|
|
|
if (key === cloudRun) return this.cloudRunUrl;
|
|
|
|
else if (key === cloudStorage) return this.cloudStorageUrl;
|
|
|
|
return '#';
|
|
|
|
},
|
|
|
|
},
|
2022-03-02 08:16:31 +05:30
|
|
|
fields: [
|
|
|
|
{ key: 'title', label: i18n.service },
|
|
|
|
{ key: 'description', label: i18n.description },
|
|
|
|
{ key: 'action', label: '' },
|
|
|
|
],
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
title: i18n.cloudRun,
|
|
|
|
description: i18n.cloudRunDescription,
|
2022-04-04 11:22:00 +05:30
|
|
|
action: {
|
|
|
|
key: cloudRun,
|
|
|
|
title: i18n.configureViaMergeRequest,
|
|
|
|
},
|
2022-03-02 08:16:31 +05:30
|
|
|
},
|
|
|
|
{
|
|
|
|
title: i18n.cloudStorage,
|
|
|
|
description: i18n.cloudStorageDescription,
|
2022-04-04 11:22:00 +05:30
|
|
|
action: {
|
|
|
|
key: cloudStorage,
|
|
|
|
title: i18n.configureViaMergeRequest,
|
|
|
|
disabled: true,
|
|
|
|
},
|
2022-03-02 08:16:31 +05:30
|
|
|
},
|
|
|
|
],
|
|
|
|
i18n,
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<div class="gl-mx-3">
|
|
|
|
<h2 class="gl-font-size-h2">{{ $options.i18n.deployments }}</h2>
|
|
|
|
<p>{{ $options.i18n.deploymentsDescription }}</p>
|
|
|
|
<gl-table :fields="$options.fields" :items="$options.items">
|
|
|
|
<template #cell(action)="{ value }">
|
2022-04-04 11:22:00 +05:30
|
|
|
<gl-button :disabled="value.disabled" :href="actionUrl(value.key)">
|
|
|
|
{{ value.title }}
|
|
|
|
</gl-button>
|
2022-03-02 08:16:31 +05:30
|
|
|
</template>
|
|
|
|
</gl-table>
|
|
|
|
</div>
|
|
|
|
</template>
|