diff --git a/www/DataStoreConfig.js b/www/DataStoreConfig.js index 40c9392c..8aa3076c 100644 --- a/www/DataStoreConfig.js +++ b/www/DataStoreConfig.js @@ -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-data-store-config', { extend: 'Ext.data.Model', fields: [ 'name', 'path', 'comment' ], diff --git a/www/DataStoreStatus.js b/www/DataStoreStatus.js deleted file mode 100644 index 947bd9df..00000000 --- a/www/DataStoreStatus.js +++ /dev/null @@ -1,20 +0,0 @@ -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', - - title: gettext('Data Store Status'), - - scrollable: true, - - html: "fixme: Add Datastore status", -}); diff --git a/www/Makefile b/www/Makefile index 51de6fb2..8aa6f74c 100644 --- a/www/Makefile +++ b/www/Makefile @@ -23,7 +23,6 @@ JSSRC= \ Subscription.js \ DataStorePrune.js \ DataStoreConfig.js \ - DataStoreStatus.js \ DataStoreStatistic.js \ DataStoreContent.js \ DataStorePanel.js \ diff --git a/www/NavigationTree.js b/www/NavigationTree.js index 57b46dae..68831d3c 100644 --- a/www/NavigationTree.js +++ b/www/NavigationTree.js @@ -42,12 +42,6 @@ Ext.define('PBS.store.NavigationStore', { path: 'pbsSyncJobView', leaf: true, }, - { - text: gettext('Data Store'), - iconCls: 'fa fa-archive', - path: 'pbsDataStoreConfig', - leaf: true - }, { text: gettext('Subscription'), iconCls: 'fa fa-support', @@ -61,7 +55,14 @@ Ext.define('PBS.store.NavigationStore', { iconCls: 'fa fa-wrench', path: 'pbsServerAdministration', leaf: true - } + }, + { + text: gettext('Data Store'), + iconCls: 'fa fa-archive', + path: 'pbsDataStoreConfig', + expanded: true, + leaf: false + }, ] } }); @@ -87,20 +88,11 @@ Ext.define('PBS.view.main.NavigationTree', { }, onLoad: function(store, records, success) { + if (!success) return; var view = this.getView(); let root = view.getStore().getRoot(); - if (!root.findChild('path', 'pbsDataStoreStatus', false)) { - root.appendChild({ - text: gettext('Data Store'), - expanded: true, - iconCls: 'fa fa-archive', - path: 'pbsDataStoreStatus', - leaf: false - }); - } - // FIXME: newly added always get appended to the end.. records.sort((a, b) => { if (a.id > b.id) return 1; @@ -108,7 +100,7 @@ Ext.define('PBS.view.main.NavigationTree', { return 0; }); - var list = root.findChild('path', 'pbsDataStoreStatus', false); + var list = root.findChild('path', 'pbsDataStoreConfig', false); var length = records.length; var lookup_hash = {}; for (var i = 0; i < length; i++) {