mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-03 23:46:58 +00:00
gui: ceph: make status panel node independant
and use the cluster wide api call if no nodename is given Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
0bf3c58193
commit
2365c5c18f
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user