mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-08 01:28:20 +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 me = this;
|
||||||
|
|
||||||
var nodename = me.pveSelNode.data.node;
|
var nodename = me.pveSelNode.data.node;
|
||||||
if (!nodename) {
|
|
||||||
throw "no node name specified";
|
|
||||||
}
|
|
||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
|
var baseurl = '/api2/json' + (nodename ? '/nodes/' + nodename : '/cluster') + '/ceph/';
|
||||||
me.store = Ext.create('Proxmox.data.UpdateStore', {
|
me.store = Ext.create('Proxmox.data.UpdateStore', {
|
||||||
storeid: 'ceph-status-' + nodename,
|
storeid: 'ceph-status-' + (nodename || 'cluster'),
|
||||||
interval: 5000,
|
interval: 5000,
|
||||||
proxy: {
|
proxy: {
|
||||||
type: 'proxmox',
|
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");
|
var regex = new RegExp("not (installed|initialized)", "i");
|
||||||
PVE.Utils.handleStoreErrorOrMask(me, me.store, regex, function(me, error){
|
PVE.Utils.handleStoreErrorOrMask(me, me.store, regex, function(me, error){
|
||||||
me.store.stopUpdate();
|
me.store.stopUpdate();
|
||||||
PVE.Utils.showCephInstallOrMask(me, error.statusText, nodename,
|
PVE.Utils.showCephInstallOrMask(me, error.statusText, (nodename || 'localhost'),
|
||||||
function(win){
|
function(win){
|
||||||
me.mon(win, 'cephInstallWindowClosed', function(){
|
me.mon(win, 'cephInstallWindowClosed', function(){
|
||||||
me.store.startUpdate();
|
me.store.startUpdate();
|
||||||
|
Loading…
Reference in New Issue
Block a user