fix: apply rustfmt and address argus nit (cpu_quota optional chaining)

- rustfmt expanded two inline if-else expressions in lifecycle_ops.rs
  (lines exceeded rustfmt's line width limit)
- core.js: use optional chaining (cv?.cpu_quota || '—') so a null/empty
  cpu_quota/memory_max on ContainerView renders '—' correctly
  (argus review 🟡, PR #2706)
This commit is contained in:
iris 2026-07-26 16:18:35 +02:00
commit 3239526f98
2 changed files with 12 additions and 4 deletions

View file

@ -237,11 +237,11 @@ function renderContainerLoad(rows) {
// values: per-agent override when set, hive-wide default otherwise).
const cpuCap = document.createElement('td'); cpuCap.className = 'num cload-cap';
cpuCap.title = 'configured ceiling — takes effect on next start';
cpuCap.textContent = cv ? cv.cpu_quota : '—';
cpuCap.textContent = cv?.cpu_quota || '—';
tr.append(cpuCap);
const memCap = document.createElement('td'); memCap.className = 'num cload-cap';
memCap.title = 'configured ceiling — takes effect on next start';
memCap.textContent = cv ? cv.memory_max : '—';
memCap.textContent = cv?.memory_max || '—';
tr.append(memCap);
// S3T button toggles the inline edit row for this agent.