From: Dietmar Maurer Date: Tue, 11 Sep 2012 09:27:40 +0000 (+0200) Subject: add icons for snapshots X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=6ec2c38b76adff4f515d854eca090f09998b7c47;p=pve-manager.git add icons for snapshots --- diff --git a/www/css/ext-pve.css b/www/css/ext-pve.css index a2507b6f..7322bd4a 100644 --- a/www/css/ext-pve.css +++ b/www/css/ext-pve.css @@ -84,6 +84,18 @@ background-image:url(../images/drive-harddisk.png); } +.x-tree-node-snapshot, +.x-grid-tree-node-expanded .x-tree-node-snapshot +{ + background-image:url(../images/snapshot.png); +} + +.x-tree-node-now, +.x-grid-tree-node-expanded .x-tree-node-now +{ + background-image:url(../images/now.png); +} + .pve-itype-icon-pool, .x-tree-node-pool, .x-grid-tree-pool-expanded .x-tree-node-pool diff --git a/www/images/Makefile b/www/images/Makefile index 2011ba64..6873d20b 100644 --- a/www/images/Makefile +++ b/www/images/Makefile @@ -19,6 +19,8 @@ GNOME_IMAGES = \ computer.png IMAGES = ${GNOME_IMAGES} \ + snapshot.png \ + now.png \ computer-on.png \ memory.png \ processor.png \ diff --git a/www/images/now.png b/www/images/now.png new file mode 100644 index 00000000..31d86246 Binary files /dev/null and b/www/images/now.png differ diff --git a/www/images/snapshot.png b/www/images/snapshot.png new file mode 100644 index 00000000..96a167a4 Binary files /dev/null and b/www/images/snapshot.png differ diff --git a/www/manager/qemu/SnapshotTree.js b/www/manager/qemu/SnapshotTree.js index 46169dbf..14e82f98 100644 --- a/www/manager/qemu/SnapshotTree.js +++ b/www/manager/qemu/SnapshotTree.js @@ -19,6 +19,11 @@ Ext.define('PVE.qemu.SnapshotTree', { Ext.Array.each(response.result.data, function(item) { item.leaf = true; item.children = []; + if (item.name === '__current') { + item.iconCls = 'x-tree-node-now'; + } else { + item.iconCls = 'x-tree-node-snapshot'; + } idhash[item.name] = item; }); @@ -118,7 +123,10 @@ Ext.define('PVE.qemu.SnapshotTree', { animate: false, selModel: sm, tbar: [ me.rollbackBtn, me.deleteBtn ], - fields: ['name', 'description' ], + fields: [ + 'name', 'description', + { name: 'snaptime', type: 'date', dateFormat: 'timestamp' } + ], columns: [ { xtype: 'treecolumn', @@ -127,12 +135,19 @@ Ext.define('PVE.qemu.SnapshotTree', { width: 200, renderer: function(value, metaData, record) { if (value === '__current') { - return "CWD"; + return "NOW"; } else { return value; } } }, + { + xtype: 'datecolumn', + text: gettext('Date'), + dataIndex: 'snaptime', + format: 'Y-m-d H:i:s', + width: 120 + }, { text: gettext('Description'), dataIndex: 'description', @@ -148,7 +163,7 @@ Ext.define('PVE.qemu.SnapshotTree', { ] }); - me.callParent(); + me.callParent(); me.on('show', me.reload); }