[pve-devel] [PATCH manager v2 2/2] Fix #1266: use a renderer when displaying Unix timestamps.
Emmanuel Kasper
e.kasper at proxmox.com
Tue Jan 31 16:48:50 CET 2017
The timestamp is displayed read only in a large window, and not sortable,
hence we use the human readable renderer.
---
www/manager6/qemu/Snapshot.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/www/manager6/qemu/Snapshot.js b/www/manager6/qemu/Snapshot.js
index d438d68..3c12888 100644
--- a/www/manager6/qemu/Snapshot.js
+++ b/www/manager6/qemu/Snapshot.js
@@ -80,6 +80,7 @@ Ext.define('PVE.window.Snapshot', {
items.push({
xtype: 'displayfield',
name: 'snaptime',
+ renderer: PVE.Utils.render_timestamp_human_readable,
fieldLabel: gettext('Timestamp')
});
} else {
@@ -199,7 +200,7 @@ Ext.define('PVE.window.Snapshot', {
summarystore.resumeEvents();
summarystore.fireEvent('refresh', summarystore);
- form.findField('snaptime').setValue(new Date(data.snaptime));
+ form.findField('snaptime').setValue(data.snaptime);
form.findField('description').setValue(data.description);
}
});
--
2.1.4
More information about the pve-devel
mailing list