Skip to content
Snippets Groups Projects
Commit 95cbe90e authored by Adriel Santiago's avatar Adriel Santiago Committed by Kushal Pandya
Browse files

Remove auto-appended units

Remove duplicate units from metrics dashboard graphs
parent a40bb1e8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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: {
Loading
Loading
---
title: Remove duplicate units from metrics graph
merge_request: 25485
author:
type: fixed
Loading
Loading
@@ -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');
});
});
 
Loading
Loading
@@ -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');
});
});
});
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment