summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKushal Pandya <kushalspandya@gmail.com>2019-02-22 10:07:58 +0000
committerKushal Pandya <kushalspandya@gmail.com>2019-02-22 10:07:58 +0000
commit6fa88ed77e1693cda845efe49bf2c9a77aed2e4f (patch)
treef9052edbc2139a316ec9af56b3d83c22e39af433
parenta40bb1e8ec501d2351604bb1ce3b9ad304f40580 (diff)
parent95cbe90e71799816a59bee4ce8f0a141abb3706b (diff)
downloadgitlab-ce-6fa88ed77e1693cda845efe49bf2c9a77aed2e4f.tar.gz
Merge branch '56477-units-are-appended-to-y-axis-label-on-metrics-dashboard' into 'master'
Resolve "Units are appended to Y axis label on metrics dashboard" Closes #56477 See merge request gitlab-org/gitlab-ce!25485
-rw-r--r--app/assets/javascripts/monitoring/components/charts/area.vue3
-rw-r--r--changelogs/unreleased/56477-units-are-appended-to-y-axis-label-on-metrics-dashboard.yml5
-rw-r--r--spec/javascripts/monitoring/charts/area_spec.js4
3 files changed, 8 insertions, 4 deletions
diff --git a/app/assets/javascripts/monitoring/components/charts/area.vue b/app/assets/javascripts/monitoring/components/charts/area.vue
index 14c02db7bcc..9e031b03579 100644
--- a/app/assets/javascripts/monitoring/components/charts/area.vue
+++ b/app/assets/javascripts/monitoring/components/charts/area.vue
@@ -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: {
diff --git a/changelogs/unreleased/56477-units-are-appended-to-y-axis-label-on-metrics-dashboard.yml b/changelogs/unreleased/56477-units-are-appended-to-y-axis-label-on-metrics-dashboard.yml
new file mode 100644
index 00000000000..7febe175faf
--- /dev/null
+++ b/changelogs/unreleased/56477-units-are-appended-to-y-axis-label-on-metrics-dashboard.yml
@@ -0,0 +1,5 @@
+---
+title: Remove duplicate units from metrics graph
+merge_request: 25485
+author:
+type: fixed
diff --git a/spec/javascripts/monitoring/charts/area_spec.js b/spec/javascripts/monitoring/charts/area_spec.js
index 0b36fc9f5f7..d334ef7ba4f 100644
--- a/spec/javascripts/monitoring/charts/area_spec.js
+++ b/spec/javascripts/monitoring/charts/area_spec.js
@@ -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');
});
});
});