]> git.proxmox.com Git - proxmox-backup.git/commitdiff
www/DataStoreStatus.js: define Model for datastorte list
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 30 Apr 2020 04:50:45 +0000 (06:50 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 30 Apr 2020 04:50:45 +0000 (06:50 +0200)
We want to use the admin/datastore api (instead of config/datastore),
to get the restricted list of datastores.

www/DataStoreStatus.js
www/NavigationTree.js

index b42c65bf9ec638e391f5d747e79f90389dcbf698..85a90e17981dfd836c244a0689579c4d763ab6a4 100644 (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',
index ad62b54e39903dd1aa853031a4241be1e065b1de..d21867cb4bdd6e5fe86be537affc1acc318467d7 100644 (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);