From 59463991b2bb5a8533fe4e56891f8163f34138e3 Mon Sep 17 00:00:00 2001 From: Glauco Oliveira Date: Tue, 10 Nov 2015 14:27:42 -0200 Subject: [PATCH] Update charts to format data correctly Updates each place currently using one of our chart-line directives to make sure we are rendering these charts the same way on the entire project. Change-Id: Ifd640405f2ab28f623ba260d0bafd383a9415ce2 --- app/js/controllers/job.js | 2 +- app/views/grouped-runs.html | 6 ++++-- app/views/home.html | 6 ++++-- app/views/job.html | 6 ++++-- app/views/tests.html | 3 ++- test/unit/controllers/job_spec.js | 2 +- 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/app/js/controllers/job.js b/app/js/controllers/job.js index 4def5fe2..be7c98f2 100644 --- a/app/js/controllers/job.js +++ b/app/js/controllers/job.js @@ -95,7 +95,7 @@ function JobController(healthService, jobName, startDate) { failRateEntries.push({ x: new Date(date).getTime(), - y: (totalFail / (totalFail + totalPass)) * 100 + y: totalFail / (totalFail + totalPass) }); } diff --git a/app/views/grouped-runs.html b/app/views/grouped-runs.html index 3cf69696..1ac59718 100644 --- a/app/views/grouped-runs.html +++ b/app/views/grouped-runs.html @@ -20,7 +20,8 @@

Total Jobs

- +
@@ -28,7 +29,8 @@

Job Failure Rate

- +
diff --git a/app/views/home.html b/app/views/home.html index 06c10ca2..5babcdc6 100644 --- a/app/views/home.html +++ b/app/views/home.html @@ -18,7 +18,8 @@

Total Jobs

- +
@@ -26,7 +27,8 @@

Job Failure Rate

- +
diff --git a/app/views/job.html b/app/views/job.html index 0dccf4ae..ad07845a 100644 --- a/app/views/job.html +++ b/app/views/job.html @@ -20,7 +20,8 @@

Tests

- +
@@ -28,7 +29,8 @@

Tests Failure Rate

- +
diff --git a/app/views/tests.html b/app/views/tests.html index 748669be..f8e12b3a 100644 --- a/app/views/tests.html +++ b/app/views/tests.html @@ -18,7 +18,8 @@

Test failures for {{ key }}

- +
diff --git a/test/unit/controllers/job_spec.js b/test/unit/controllers/job_spec.js index d3ff063d..a77599e9 100644 --- a/test/unit/controllers/job_spec.js +++ b/test/unit/controllers/job_spec.js @@ -97,7 +97,7 @@ describe('JobController', function() { key: '% Failures', values: [{ x: 1416358800000, - y: 1.8867924528301887 + y: 0.018867924528301886 }] }]; expect(jobController.chartDataRate).toEqual(expectedChartDataRate);