mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-14 07:03:23 +00:00
ui: ceph/StatusDetail: cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
e25dda254c
commit
45221aae94
@ -145,8 +145,8 @@ __PACKAGE__->register_method ({
|
|||||||
$repolist = "deb http://download.proxmox.com/debian/ceph-luminous buster main\n";
|
$repolist = "deb http://download.proxmox.com/debian/ceph-luminous buster main\n";
|
||||||
} elsif ($cephver eq 'octopus') {
|
} elsif ($cephver eq 'octopus') {
|
||||||
die "Not allowed to select version '$cephver'\n" if !$param->{'allow-experimental'};
|
die "Not allowed to select version '$cephver'\n" if !$param->{'allow-experimental'};
|
||||||
$repolist = "deb http://repo.proxmox.com/staging/ceph-octopus buster ceph-15\n";
|
$repolist = "deb http://download.proxmox.com/debian/ceph-octopus buster test\n";
|
||||||
# FIXME: use public mirror once available
|
# FIXME: use production component once available
|
||||||
#$repolist = "deb http://download.proxmox.com/debian/ceph-octopus buster main\n";
|
#$repolist = "deb http://download.proxmox.com/debian/ceph-octopus buster main\n";
|
||||||
} else {
|
} else {
|
||||||
die "not implemented ceph version: $cephver";
|
die "not implemented ceph version: $cephver";
|
||||||
|
@ -212,15 +212,8 @@ Ext.define('PVE.ceph.StatusDetail', {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update PGs sorted
|
||||||
var pgmap = status.pgmap || {};
|
var pgmap = status.pgmap || {};
|
||||||
var health = status.health || {};
|
|
||||||
var osdmap = status.osdmap || {};
|
|
||||||
|
|
||||||
if (typeof osdmap.osdmap != "undefined") {
|
|
||||||
osdmap = osdmap.osdmap;
|
|
||||||
}
|
|
||||||
|
|
||||||
// update pgs sorted
|
|
||||||
var pgs_by_state = pgmap.pgs_by_state || [];
|
var pgs_by_state = pgmap.pgs_by_state || [];
|
||||||
pgs_by_state.sort(function(a,b){
|
pgs_by_state.sort(function(a,b){
|
||||||
return (a.state_name < b.state_name)?-1:(a.state_name === b.state_name)?0:1;
|
return (a.state_name < b.state_name)?-1:(a.state_name === b.state_name)?0:1;
|
||||||
@ -253,6 +246,7 @@ Ext.define('PVE.ceph.StatusDetail', {
|
|||||||
var downinregex = /(\d+) osds down/;
|
var downinregex = /(\d+) osds down/;
|
||||||
var downin_osds = 0;
|
var downin_osds = 0;
|
||||||
|
|
||||||
|
var health = status.health || {};
|
||||||
// we collect monitor/osd information from the checks
|
// we collect monitor/osd information from the checks
|
||||||
Ext.Object.each(health.checks, function(key, value, obj) {
|
Ext.Object.each(health.checks, function(key, value, obj) {
|
||||||
var found = null;
|
var found = null;
|
||||||
@ -264,9 +258,11 @@ Ext.define('PVE.ceph.StatusDetail', {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var osdmap = status.osdmap || {};
|
||||||
|
if (typeof osdmap.osdmap != "undefined") {
|
||||||
|
osdmap = osdmap.osdmap;
|
||||||
|
}
|
||||||
// update osds counts
|
// update osds counts
|
||||||
|
|
||||||
// pre-octopus || octopus || 0
|
|
||||||
var total_osds = osdmap.num_osds || 0;
|
var total_osds = osdmap.num_osds || 0;
|
||||||
var in_osds = osdmap.num_in_osds || 0;
|
var in_osds = osdmap.num_in_osds || 0;
|
||||||
var up_osds = osdmap.num_up_osds || 0;
|
var up_osds = osdmap.num_up_osds || 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user