blob: 2ea5b4e01b179328b6513dcaefd0a5017aecc31f (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<script>
import { GlFormGroup, GlFormInput } from '@gitlab/ui';
import { mapState, mapActions } from 'vuex';
export default {
components: {
GlFormGroup,
GlFormInput,
},
computed: {
...mapState(['externalDashboard']),
userDashboardUrl: {
get() {
return this.externalDashboard.url;
},
set(url) {
this.setExternalDashboardUrl(url);
},
},
},
methods: {
...mapActions(['setExternalDashboardUrl']),
},
};
</script>
<template>
<gl-form-group
:label="s__('MetricsSettings|External dashboard URL')"
label-for="external-dashboard-url"
>
<template #description>
{{
s__(
'MetricsSettings|Add a button to the metrics dashboard linking directly to your existing external dashboard.',
)
}}
</template>
<!-- placeholder with a url is a false positive -->
<!-- eslint-disable @gitlab/vue-require-i18n-attribute-strings -->
<gl-form-input
id="external-dashboard-url"
v-model="userDashboardUrl"
placeholder="https://my-org.gitlab.io/my-dashboards"
/>
<!-- eslint-enable @gitlab/vue-require-i18n-attribute-strings -->
</gl-form-group>
</template>
|