Commit 82f58d3b authored by Dietmar Maurer's avatar Dietmar Maurer

use predefined model pve-storage-content

Else ExtJS ignores the idProperty setting.
parent 9ce4c970
......@@ -41,19 +41,7 @@ Ext.define('PVE.form.FileSelector', {
var me = this;
var store = Ext.create('Ext.data.Store', {
fields: [
'volid', 'format', 'size', 'used', 'vmid',
'channel', 'id', 'lun',
{
name: 'text',
convert: function(value, record) {
if (value) {
return value;
}
return PVE.Utils.render_storage_content(value, {}, record);
}
}
]
model: 'pve-storage-content'
});
Ext.apply(me, {
......
......@@ -295,7 +295,7 @@ Ext.define('PVE.storage.ContentView', {
flex: 1,
sortable: true,
renderer: PVE.Utils.render_storage_content,
dataIndex: 'volid'
dataIndex: 'text'
},
{
header: 'Format',
......@@ -322,7 +322,16 @@ Ext.define('PVE.storage.ContentView', {
extend: 'Ext.data.Model',
fields: [
'volid', 'content', 'format', 'size', 'used', 'vmid',
'channel', 'id', 'lun'
'channel', 'id', 'lun',
{
name: 'text',
convert: function(value, record) {
if (value) {
return value;
}
return PVE.Utils.render_storage_content(value, {}, record);
}
}
],
idProperty: 'volid'
});
......
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