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
Hide 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
>
import
{
GlFormInput
,
GlButton
,
GlLink
,
GlFormGroup
}
from
'
@gitlab/ui
'
;
import
{
GlFormInput
,
GlButton
,
GlLink
,
GlFormGroup
,
GlFormRadioGroup
}
from
'
@gitlab/ui
'
;
import
_
from
'
underscore
'
;
import
{
__
,
s__
}
from
'
~/locale
'
;
import
csrf
from
'
~/lib/utils/csrf
'
;
...
...
@@ -15,6 +15,7 @@ export default {
GlButton
,
GlLink
,
GlFormGroup
,
GlFormRadioGroup
,
Icon
,
},
props
:
{
...
...
@@ -50,6 +51,11 @@ export default {
return
{
validCustomQuery
:
null
,
errorMessage
:
''
,
formGroupOptions
:
[
{
text
:
__
(
'
Business
'
),
value
:
QueryTypes
.
business
},
{
text
:
__
(
'
Response
'
),
value
:
QueryTypes
.
response
},
{
text
:
__
(
'
System
'
),
value
:
QueryTypes
.
system
},
],
};
},
computed
:
{
...
...
@@ -139,30 +145,13 @@ export default {
label-for=
"prometheus_metric_group"
label-class=
"label-bold"
>
<
input
id=
"
group-business
"
<
gl-form-radio-group
id=
"
metric-group
"
v-model=
"formData.group"
type=
"radio"
:options=
"formGroupOptions"
:checked=
"formData.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>
</gl-form-group>
<gl-form-group
...
...
locale/gitlab.pot
View file @
2afc284b
...
...
@@ -6181,9 +6181,6 @@ msgstr ""
msgid "Metrics|Prometheus Query Documentation"
msgstr ""
msgid "Metrics|System"
msgstr ""
msgid "Metrics|There was an error fetching the environments data, please try again"
msgstr ""
...
...
@@ -9396,6 +9393,9 @@ msgstr ""
msgid "Sync information"
msgstr ""
msgid "System"
msgstr ""
msgid "System Hooks"
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