No functional change for existing users is intended.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
// journal_disk: all disks with gpt
diskType: undefined,
// journal_disk: all disks with gpt
diskType: undefined,
+ // use include-partitions=1 as a parameter
+ includePartitions: false,
+
// the property the backend wnats for the type ('type' by default)
typeProperty: 'type',
// the property the backend wnats for the type ('type' by default)
typeProperty: 'type',
extraParams[me.typeProperty] = me.diskType;
}
extraParams[me.typeProperty] = me.diskType;
}
+ if (me.includePartitions) {
+ extraParams['include-partitions'] = 1;
+ }
+
var store = Ext.create('Ext.data.Store', {
filterOnLoad: true,
model: 'pmx-disk-list',
var store = Ext.create('Ext.data.Store', {
filterOnLoad: true,
model: 'pmx-disk-list',
// the type of disks to show
diskType: 'unused',
// the type of disks to show
diskType: 'unused',
+ // add include-partitions=1 as a request parameter
+ includePartitions: false,
+
disks: [],
allowBlank: false,
disks: [],
allowBlank: false,
initComponent: function() {
let me = this;
initComponent: function() {
let me = this;
+ let extraParams = {};
+
if (!me.url) {
if (!me.nodename) {
throw "no url or nodename given";
}
if (!me.url) {
if (!me.nodename) {
throw "no url or nodename given";
}
- let node = me.nodename;
- let param = me.typeParameter;
- let type = me.diskType;
- me.url = `/api2/json/nodes/${node}/disks/list?${param}=${type}`;
+ me.url = `/api2/json/nodes/${me.nodename}/disks/list`;
+
+ extraParams[me.typeParameter] = me.diskType;
+
+ if (me.includePartitions) {
+ extraParams['include-partitions'] = 1;
+ }
}
me.disks = [];
me.callParent();
let store = me.getStore();
}
me.disks = [];
me.callParent();
let store = me.getStore();
- store.getProxy().setUrl(me.url);
+ store.setProxy({
+ type: 'proxmox',
+ url: me.url,
+ extraParams,
+ });
store.load();
store.sort({ property: me.valueField });
},
store.load();
store.sort({ property: me.valueField });
},