Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2afc284b
Commit
2afc284b
authored
Feb 12, 2019
by
Jose Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use gitlab-ui's GlFormRadioGroup component
parent
a0e0f440
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
25 deletions
+14
-25
ee/app/assets/javascripts/custom_metrics/components/custom_metrics_form.vue
...scripts/custom_metrics/components/custom_metrics_form.vue
+11
-22
locale/gitlab.pot
locale/gitlab.pot
+3
-3
No files found.
ee/app/assets/javascripts/custom_metrics/components/custom_metrics_form.vue
View file @
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
...
...
locale/gitlab.pot
View file @
2afc284b
...
@@ -6181,9 +6181,6 @@ msgstr ""
...
@@ -6181,9 +6181,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 ""
...
@@ -9396,6 +9393,9 @@ msgstr ""
...
@@ -9396,6 +9393,9 @@ msgstr ""
msgid "Sync information"
msgid "Sync information"
msgstr ""
msgstr ""
msgid "System"
msgstr ""
msgid "System Hooks"
msgid "System Hooks"
msgstr ""
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment