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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
95cbe90e
Commit
95cbe90e
authored
Feb 22, 2019
by
Adriel Santiago
Committed by
Kushal Pandya
Feb 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove auto-appended units
Remove duplicate units from metrics dashboard graphs
parent
a40bb1e8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
app/assets/javascripts/monitoring/components/charts/area.vue
app/assets/javascripts/monitoring/components/charts/area.vue
+1
-2
changelogs/unreleased/56477-units-are-appended-to-y-axis-label-on-metrics-dashboard.yml
...its-are-appended-to-y-axis-label-on-metrics-dashboard.yml
+5
-0
spec/javascripts/monitoring/charts/area_spec.js
spec/javascripts/monitoring/charts/area_spec.js
+2
-2
No files found.
app/assets/javascripts/monitoring/components/charts/area.vue
View file @
95cbe90e
...
...
@@ -139,8 +139,7 @@ export default {
return
this
.
graphData
.
queries
.
map
(
query
=>
query
.
label
).
join
(
'
,
'
);
},
yAxisLabel
()
{
const
[
query
]
=
this
.
graphData
.
queries
;
return
`
${
this
.
graphData
.
y_label
}
(
${
query
.
unit
}
)`
;
return
`
${
this
.
graphData
.
y_label
}
`
;
},
},
watch
:
{
...
...
changelogs/unreleased/56477-units-are-appended-to-y-axis-label-on-metrics-dashboard.yml
0 → 100644
View file @
95cbe90e
---
title
:
Remove duplicate units from metrics graph
merge_request
:
25485
author
:
type
:
fixed
spec/javascripts/monitoring/charts/area_spec.js
View file @
95cbe90e
...
...
@@ -127,7 +127,7 @@ describe('Area component', () => {
});
it
(
'
formats tooltip content
'
,
()
=>
{
expect
(
areaChart
.
vm
.
tooltip
.
content
).
toBe
(
'
CPU
(Cores)
5.556
'
);
expect
(
areaChart
.
vm
.
tooltip
.
content
).
toBe
(
'
CPU 5.556
'
);
});
});
...
...
@@ -213,7 +213,7 @@ describe('Area component', () => {
describe
(
'
yAxisLabel
'
,
()
=>
{
it
(
'
constructs a label for the chart y-axis
'
,
()
=>
{
expect
(
areaChart
.
vm
.
yAxisLabel
).
toBe
(
'
CPU
(Cores)
'
);
expect
(
areaChart
.
vm
.
yAxisLabel
).
toBe
(
'
CPU
'
);
});
});
});
...
...
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