Merge "Update charts to format data correctly"

This commit is contained in:
Jenkins 2015-12-08 20:49:04 +00:00 committed by Gerrit Code Review
commit 2b17af27d1
6 changed files with 16 additions and 9 deletions

View File

@ -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)
});
}

View File

@ -20,7 +20,8 @@
<h3 class="panel-title">Total Jobs</h3>
</div>
<div class="panel-body">
<chart-line data="groupedRuns.chartData" width="100%" height="250"></chart-line>
<chart-line data="groupedRuns.chartData" width="100%" height="250"
tick-format-x="d"></chart-line>
</div>
</div>
<div class="panel panel-default">
@ -28,7 +29,8 @@
<h3 class="panel-title">Job Failure Rate</h3>
</div>
<div class="panel-body">
<chart-line data="groupedRuns.chartDataRate" width="100%" height="250" force-y="[0,1]" tick-format-x="%"></chart-line>
<chart-line data="groupedRuns.chartDataRate" width="100%" height="250"
force-y="[0,1]" tick-format-x="%"></chart-line>
</div>
</div>
</div>

View File

@ -18,7 +18,8 @@
<h3 class="panel-title">Total Jobs</h3>
</div>
<div class="panel-body">
<chart-line data="home.chartData" width="100%" height="250"></chart-line>
<chart-line data="home.chartData" width="100%" height="250"
tick-format-x="d"></chart-line>
</div>
</div>
<div class="panel panel-default">
@ -26,7 +27,8 @@
<h3 class="panel-title">Job Failure Rate</h3>
</div>
<div class="panel-body">
<chart-line data="home.chartDataRate" width="100%" height="250" force-y="[0,1]" tick-format-x="%"></chart-line>
<chart-line data="home.chartDataRate" width="100%" height="250"
force-y="[0,1]" tick-format-x="%"></chart-line>
</div>
</div>
</div>

View File

@ -20,7 +20,8 @@
<h3 class="panel-title">Tests</h3>
</div>
<div class="panel-body">
<chart-line data="job.chartData" width="100%" height="250"></chart-line>
<chart-line data="job.chartData" width="100%" height="250"
tick-format-x="d"></chart-line>
</div>
</div>
<div class="panel panel-default">
@ -28,7 +29,8 @@
<h3 class="panel-title">Tests Failure Rate</h3>
</div>
<div class="panel-body">
<chart-line data="job.chartDataRate" width="100%" height="250" forceY="[0,100]"></chart-line>
<chart-line data="job.chartDataRate" width="100%" height="250"
forceY="[0,1]" tick-format-x="%"></chart-line>
</div>
</div>

View File

@ -18,7 +18,8 @@
<div class="panel-heading">
<h3 class="panel-title">Test failures for {{ key }}</h3>
</div>
<chart-bar data="value" width=100% height="250" show-values="false" show-x-axis="false" force-y="[0,1]" tick-format-x="%"></chart-bar>
<chart-bar data="value" width=100% height="250" show-values="false" show-x-axis="false"
force-y="[0,1]" tick-format-x="%"></chart-bar>
<accordion-group heading="Details for {{ key }}" is-open="acc1open">
<div>
<form>

View File

@ -97,7 +97,7 @@ describe('JobController', function() {
key: '% Failures',
values: [{
x: 1416358800000,
y: 1.8867924528301887
y: 0.018867924528301886
}]
}];
expect(jobController.chartDataRate).toEqual(expectedChartDataRate);