Commit 38524f51 authored by Dietmar Maurer's avatar Dietmar Maurer

add icons for snapshots

parent 8304868e
......@@ -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
......
......@@ -19,6 +19,8 @@ GNOME_IMAGES = \
computer.png
IMAGES = ${GNOME_IMAGES} \
snapshot.png \
now.png \
computer-on.png \
memory.png \
processor.png \
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment