Fix ratio to percent on failure rate graphs
This commit fixes the ratio values to percent on failure rate graphs. We already use percents in many graphs and users are familiar with percents rather than ratio. Change-Id: I056b62b215230b4666401eabace42cac7e68201d Closes-Bug: #1674066
This commit is contained in:
parent
609178cd42
commit
c72ab70202
|
@ -110,7 +110,7 @@ function GroupedRunsController(
|
|||
|
||||
failRateEntries.push({
|
||||
x: new Date(timedelta.datetime).getTime(),
|
||||
y: failRate
|
||||
y: failRate * 100
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ function HomeController(
|
|||
angular.forEach(dateStats, function(stats) {
|
||||
entries.passes.push(generateChartData(stats.date, stats.metrics.passes));
|
||||
entries.failures.push(generateChartData(stats.date, stats.metrics.failures));
|
||||
entries.failRate.push(generateChartData(stats.date, stats.metrics.failRate));
|
||||
entries.failRate.push(generateChartData(stats.date, stats.metrics.failRate * 100));
|
||||
});
|
||||
entries.passes = entries.passes.sort(byDate);
|
||||
entries.failures = entries.failures.sort(byDate);
|
||||
|
|
|
@ -131,7 +131,7 @@ function JobController(
|
|||
failRate = totalFail / (totalFail + totalPass) || DEFAULT_FAIL_RATE;
|
||||
failRateEntries.push({
|
||||
x: new Date(date).getTime(),
|
||||
y: failRate
|
||||
y: failRate * 100
|
||||
});
|
||||
|
||||
skipEntries.push({
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
granular-format="%x %X"></chart-axis>
|
||||
<chart-axis name="y" opposes="x" type="linear"
|
||||
path=".y" align="left" orient="vertical"
|
||||
domain="[0, 1]" draw="true"
|
||||
domain="[0, 100]" draw="true"
|
||||
granular-format=".3f"></chart-axis>
|
||||
|
||||
<chart-dataset name="rate"
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
granular-format="%x %X"></chart-axis>
|
||||
<chart-axis name="y" type="linear" path=".y" opposes="x"
|
||||
align="left" orient="vertical"
|
||||
domain="[0, 1]" draw="true"
|
||||
domain="[0, 100]" draw="true"
|
||||
granular-format=".3f"></chart-axis>
|
||||
|
||||
<chart-dataset name="rate"
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
granular-format="%x %X"></chart-axis>
|
||||
<chart-axis name="y" opposes="x" type="linear"
|
||||
path=".y" align="left" orient="vertical"
|
||||
domain="[0, 1]" draw="true"
|
||||
domain="[0, 100]" draw="true"
|
||||
granular-format=".3f"></chart-axis>
|
||||
|
||||
<chart-dataset name="rate"
|
||||
|
|
|
@ -155,7 +155,7 @@ describe('GroupedRunsController', function() {
|
|||
|
||||
expect(groupedRunsController.failRates).toEqual([{
|
||||
x: 1416355200000,
|
||||
y: 0.023529411764705883
|
||||
y: 2.3529411764705883
|
||||
}]);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -70,7 +70,7 @@ describe('HomeController', function() {
|
|||
beforeEach(function() {
|
||||
var date = new Date('2015-10-01T20:00:00.000Z');
|
||||
timestamp = date.getTime();
|
||||
var metrics = { passes: 3, failures: 4, failRate: 0.57 };
|
||||
var metrics = { passes: 3, failures: 4, failRate: 56.99999999999999 };
|
||||
var stats = [{ date: date, metrics: metrics }];
|
||||
projectService.getStatsByDate = function() { return stats; };
|
||||
homeController.loadData();
|
||||
|
@ -82,7 +82,7 @@ describe('HomeController', function() {
|
|||
});
|
||||
|
||||
it('should contain data for failure rate', function() {
|
||||
expect(homeController.failRate).toEqual([{ x: 1443729600000, y: 0.57 }]);
|
||||
expect(homeController.failRate).toEqual([{ x: 1443729600000, y: 5699.999999999999 }]);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ describe('JobController', function() {
|
|||
|
||||
expect(jobController.failRates).toEqual([{
|
||||
x: 1416358800000,
|
||||
y: 0.018867924528301886
|
||||
y: 1.8867924528301887
|
||||
}]);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue