[pve-devel] [PATCH manager 1/3] change short duration format to x.y
Dominik Csapak
d.csapak at proxmox.com
Mon Jun 19 16:25:48 CEST 2017
so we always show one decimal place
(instead of all with seconds and none with minutes, hours, days)
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
this was only used in the recently introduced replication grid, and nowhere
else, so it should not change any existing diplay of information
www/manager6/Utils.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index a7574834..e9c64d1a 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -727,21 +727,21 @@ Ext.define('PVE.Utils', { utilities: {
format_duration_short: function(ut) {
if (ut < 60) {
- return ut.toString() + 's';
+ return ut.toFixed(1) + 's';
}
if (ut < 3600) {
var mins = ut / 60;
- return mins.toFixed(0) + 'm';
+ return mins.toFixed(1) + 'm';
}
if (ut < 86400) {
var hours = ut / 3600;
- return hours.toFixed(0) + 'h';
+ return hours.toFixed(1) + 'h';
}
var days = ut / 86400;
- return days.toFixed(0) + 'd';
+ return days.toFixed(1) + 'd';
},
yesText: gettext('Yes'),
--
2.11.0
More information about the pve-devel
mailing list