and use the cluster wide api call if no nodename is given Signed-off-by: Dominik Csapak <d.csa...@proxmox.com> --- www/manager6/ceph/Status.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/www/manager6/ceph/Status.js b/www/manager6/ceph/Status.js index 78b6c925..8ab74ab3 100644 --- a/www/manager6/ceph/Status.js +++ b/www/manager6/ceph/Status.js @@ -278,17 +278,15 @@ Ext.define('PVE.node.CephStatus', { var me = this; var nodename = me.pveSelNode.data.node; - if (!nodename) { - throw "no node name specified"; - } me.callParent(); + var baseurl = '/api2/json' + (nodename ? '/nodes/' + nodename : '/cluster') + '/ceph/'; me.store = Ext.create('Proxmox.data.UpdateStore', { - storeid: 'ceph-status-' + nodename, + storeid: 'ceph-status-' + (nodename || 'cluster'), interval: 5000, proxy: { type: 'proxmox', - url: '/api2/json/nodes/' + nodename + '/ceph/status' + url: baseurl + '/status' } }); @@ -307,7 +305,7 @@ Ext.define('PVE.node.CephStatus', { var regex = new RegExp("not (installed|initialized)", "i"); PVE.Utils.handleStoreErrorOrMask(me, me.store, regex, function(me, error){ me.store.stopUpdate(); - PVE.Utils.showCephInstallOrMask(me, error.statusText, nodename, + PVE.Utils.showCephInstallOrMask(me, error.statusText, (nodename || 'localhost'), function(win){ me.mon(win, 'cephInstallWindowClosed', function(){ me.store.startUpdate(); -- 2.11.0 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel