Barre disque des nodes = local-lvm (configurable via DISK_STORAGE)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
Unverified
parent
5096bc51d1
commit
f9c185cf8a
@@ -30,6 +30,7 @@ const VERIFY_TLS = String(env.PVE_VERIFY_TLS || 'false').toLowerCase() === 'true
|
||||
const NE_PORT = Number(env.NODE_EXPORTER_PORT || 9100);
|
||||
const POLL_MS = Math.max(3, Number(env.POLL_INTERVAL || 10)) * 1000;
|
||||
const PASSWORD = env.DASHBOARD_PASSWORD || '';
|
||||
const DISK_STORAGE = env.DISK_STORAGE || 'local-lvm';
|
||||
const NODE_ADDRS = Object.fromEntries(
|
||||
(env.NODE_ADDRS || '').split(',').map((s) => s.trim().split('=')).filter((p) => p.length === 2)
|
||||
);
|
||||
@@ -139,6 +140,13 @@ async function poll() {
|
||||
uptime: r.uptime ?? 0,
|
||||
temp: null, load: null, swap: null, swapMax: null, cpuModel: null, kernel: null, pveVersion: null,
|
||||
};
|
||||
// Barre "Disque" = stockage choisi (local-lvm par défaut), sinon disque système
|
||||
const sto = resources.find((x) => x.type === 'storage' && x.storage === DISK_STORAGE && x.node === ni.name);
|
||||
n.diskLabel = 'Disque';
|
||||
if (sto && sto.maxdisk) {
|
||||
n.diskLabel = DISK_STORAGE;
|
||||
n.disk = sto.disk; n.maxdisk = sto.maxdisk;
|
||||
}
|
||||
if (!online) return n;
|
||||
const [st, temp] = await Promise.all([
|
||||
pve(`/nodes/${encodeURIComponent(ni.name)}/status`).catch(() => null),
|
||||
|
||||
Reference in New Issue
Block a user