Fix zuul status hours display.
* modules/openstack_project/files/zuul/status.js: The hours field in the zuul status was always '00'. This was a result of calculating the minutes to be displayed rather than the total number of minutes before calculating the number of hours from the number of minutes. Since minutes was always less than 60 hours was always 0. Determine the total number of minutes, calculate the hours, then determine the number of minutes to display. Change-Id: I3643282247d21fdd1b56c0baa00380bfdc7ae2e2 Fixes-Bug: #1215659
This commit is contained in:
parent
467c388553
commit
e176e35a48
@ -20,9 +20,10 @@ function format_time(ms, words) {
|
||||
return "unknown";
|
||||
}
|
||||
var seconds = (+ms)/1000;
|
||||
var minutes = Math.floor((seconds/60)%60);
|
||||
var minutes = Math.floor(seconds/60);
|
||||
var hours = Math.floor(minutes/60);
|
||||
seconds = Math.floor(seconds % 60);
|
||||
minutes = Math.floor(minutes % 60);
|
||||
r = '';
|
||||
if (words) {
|
||||
if (hours) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user