Commit 6fa88ed7 authored by Kushal Pandya's avatar Kushal Pandya

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
parents a40bb1e8 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: {
......
---
title: Remove duplicate units from metrics graph
merge_request: 25485
author:
type: fixed
......@@ -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');
});
});
});
......
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