diff --git a/www/DataStoreContent.js b/www/DataStoreContent.js index 8c9d24af..f14b40ea 100644 --- a/www/DataStoreContent.js +++ b/www/DataStoreContent.js @@ -80,13 +80,32 @@ Ext.define('PBS.DataStoreContent', { }; }); + let backup_time_to_string = function(backup_time) { + let pad = function(number) { + if (number < 10) { + return '0' + number; + } + return number; + }; + return backup_time.getUTCFullYear() + + '-' + pad(backup_time.getUTCMonth() + 1) + + '-' + pad(backup_time.getUTCDate()) + + 'T' + pad(backup_time.getUTCHours()) + + ':' + pad(backup_time.getUTCMinutes()) + + ':' + pad(backup_time.getUTCSeconds()) + + 'Z'; + }; + records.forEach(function(item) { let group = item.data["backup-type"] + "/" + item.data["backup-id"]; let children = groups[group].children; let data = item.data; + data.text = Ext.Date.format(data["backup-time"], 'Y-m-d H:i:s'); + data.text = group + '/' + backup_time_to_string(data["backup-time"]); data.leaf = true; + data.cls = 'no-leaf-icons'; children.push(data); }); @@ -182,7 +201,7 @@ Ext.define('PBS.DataStoreContent', { header: gettext("Files"), sortable: false, dataIndex: 'files', - flex: 4 + flex: 2 } ], diff --git a/www/css/ext6-pbs.css b/www/css/ext6-pbs.css index e9533c56..d165b265 100644 --- a/www/css/ext6-pbs.css +++ b/www/css/ext6-pbs.css @@ -180,3 +180,8 @@ p.logs { color: #555; margin-right: 5px; } + +.no-leaf-icons .x-tree-icon-leaf { + visibility: hidden; + width: 5px; +}