Commit 370fe13a authored by Phil Hughes's avatar Phil Hughes

Merge branch 'jivl-utilize-gl-form-radio' into 'master'

Use gitlab-ui's GlFormRadioGroup component

Closes #9656

See merge request gitlab-org/gitlab-ee!9526
parents df4c9b24 2afc284b
<script> <script>
import { GlFormInput, GlButton, GlLink, GlFormGroup } from '@gitlab/ui'; import { GlFormInput, GlButton, GlLink, GlFormGroup, GlFormRadioGroup } from '@gitlab/ui';
import _ from 'underscore'; import _ from 'underscore';
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
import csrf from '~/lib/utils/csrf'; import csrf from '~/lib/utils/csrf';
...@@ -15,6 +15,7 @@ export default { ...@@ -15,6 +15,7 @@ export default {
GlButton, GlButton,
GlLink, GlLink,
GlFormGroup, GlFormGroup,
GlFormRadioGroup,
Icon, Icon,
}, },
props: { props: {
...@@ -50,6 +51,11 @@ export default { ...@@ -50,6 +51,11 @@ export default {
return { return {
validCustomQuery: null, validCustomQuery: null,
errorMessage: '', errorMessage: '',
formGroupOptions: [
{ text: __('Business'), value: QueryTypes.business },
{ text: __('Response'), value: QueryTypes.response },
{ text: __('System'), value: QueryTypes.system },
],
}; };
}, },
computed: { computed: {
...@@ -139,30 +145,13 @@ export default { ...@@ -139,30 +145,13 @@ export default {
label-for="prometheus_metric_group" label-for="prometheus_metric_group"
label-class="label-bold" label-class="label-bold"
> >
<input <gl-form-radio-group
id="group-business" id="metric-group"
v-model="formData.group" v-model="formData.group"
type="radio" :options="formGroupOptions"
:checked="formData.group"
name="prometheus_metric[group]" name="prometheus_metric[group]"
:value="$options.QueryTypes.business"
/> />
<label class="label-bold append-right-10" for="group-business">{{ __('Business') }}</label>
<input
id="group-response"
v-model="formData.group"
type="radio"
name="prometheus_metric[group]"
:value="$options.QueryTypes.response"
/>
<label class="label-bold append-right-10" for="group-response">{{ __('Response') }}</label>
<input
id="group-system"
v-model="formData.group"
type="radio"
name="prometheus_metric[group]"
:value="$options.QueryTypes.system"
/>
<label class="label-bold" for="group-system">{{ s__('Metrics|System') }}</label>
<span class="form-text text-muted">{{ s__('Metrics|For grouping similar metrics') }}</span> <span class="form-text text-muted">{{ s__('Metrics|For grouping similar metrics') }}</span>
</gl-form-group> </gl-form-group>
<gl-form-group <gl-form-group
......
...@@ -6184,9 +6184,6 @@ msgstr "" ...@@ -6184,9 +6184,6 @@ msgstr ""
msgid "Metrics|Prometheus Query Documentation" msgid "Metrics|Prometheus Query Documentation"
msgstr "" msgstr ""
msgid "Metrics|System"
msgstr ""
msgid "Metrics|There was an error fetching the environments data, please try again" msgid "Metrics|There was an error fetching the environments data, please try again"
msgstr "" msgstr ""
...@@ -9399,6 +9396,9 @@ msgstr "" ...@@ -9399,6 +9396,9 @@ msgstr ""
msgid "Sync information" msgid "Sync information"
msgstr "" msgstr ""
msgid "System"
msgstr ""
msgid "System Hooks" msgid "System Hooks"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment