www/DataStoreStatus.js: define Model for datastorte list

We want to use the admin/datastore api (instead of config/datastore),
to get the restricted list of datastores.
This commit is contained in:
Dietmar Maurer 2020-04-30 06:50:45 +02:00
parent f9e3b1104e
commit ebe556d0e7
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,13 @@
Ext.define('pbs-datastore-list', {
extend: 'Ext.data.Model',
fields: [ 'name', 'comment' ],
proxy: {
type: 'proxmox',
url: "/api2/json/admin/datastore"
},
idProperty: 'store'
});
Ext.define('PBS.DataStoreStatus', {
extend: 'Ext.panel.Panel',
alias: 'widget.pbsDataStoreStatus',

View File

@ -55,7 +55,7 @@ Ext.define('PBS.view.main.NavigationTree', {
autoStart: true,
interval: 15 * 1000,
storeid: 'pbs-datastore-list',
model: 'pbs-data-store-config'
model: 'pbs-datastore-list'
});
view.rstore.on('load', this.onLoad, this);