YARN-10469. YARN-UI2 The accuracy of the percentage values in the same chart on the YARN 'Cluster OverView' page are inconsistent (#2401)

This commit is contained in:
neko 2020-11-02 17:52:58 +08:00 committed by GitHub
parent 4890b855ec
commit deea5d8f2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@ export default BaseUsageDonutChart.extend({
usageByApps.push({
label: "Available",
value: avail.toFixed(4)
value: avail.toFixed(2)
});
this.colors = ColorUtils.getColors(usageByApps.length, ["others", "good"], true);
@ -56,4 +56,4 @@ export default BaseUsageDonutChart.extend({
this.renderDonutChart(usageByApps, this.get("title"), this.get("showLabels"),
this.get("middleLabel"), "100%", "%");
},
});
});

View File

@ -51,7 +51,7 @@ export default BaseUsageDonutChart.extend({
usageByQueues.push({
label: "Available",
value: avail.toFixed(4)
value: avail.toFixed(2)
});
this.colors = ColorUtils.getColors(usageByQueues.length, ["others", "good"], true);
@ -64,4 +64,4 @@ export default BaseUsageDonutChart.extend({
this.initChart();
this.draw();
},
});
});