Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

storage(pools): demote the Source column, fix PBS host labels, tighten rows to 32px

rcourtman0b065f2103a8
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 6da080b973..fbb008d5c2 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -1486,7 +1486,12 @@ not a replacement status card, CTA band, or page-local nested card.
`frontend-modern/src/features/storageBackups/cephRecordPresentation.ts`
(lifting worse health onto the survivor) before shared storage tables
render, instead of each table double-listing the same Ceph storage with
- conflicting raw-pool versus mounted-capacity accounting.
+ conflicting raw-pool versus mounted-capacity accounting. Storage row
+ models built by
+ `frontend-modern/src/features/storageBackups/storagePoolRowPresentation.ts`
+ must only carry fields the row actually renders; per-row source-platform
+ badges and other identical-on-every-row decorations belong in the row
+ expansion, not in `StoragePoolRowModel`.
30. Keep infrastructure settings-shell API alternatives on the shared shell
contract. `frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx`,
`frontend-modern/src/components/Settings/settingsHeaderMeta.ts`, and
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 36180e25a1..79887610af 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -1521,7 +1521,20 @@ storage rows that mount them by
`consolidateCephClusterPoolRecords` in
`frontend-modern/src/features/storageBackups/cephRecordPresentation.ts`,
applied by `frontend-modern/src/components/Storage/useStorageModel.ts` before
-filtering, sorting, and summary. The pool row's worse health is lifted onto
+filtering, sorting, and summary.
+The pools table column set is Storage / State / Type / Host / Protection /
+Usage / Growth at the platform-standard 32px row height
+(`STORAGE_POOL_ROW_HEIGHT_CLASS`). Source platform identity is not a table
+column: every live embedding forces a single platform
+(`forcedSourceFilter`), so a per-row Source badge degenerates into repeated
+noise (the same failure 809e2c900 removed from the disks table). The
+record's source platform lives in the row expansion's Configuration card
+(`buildStoragePoolDetailConfigRows`' `Source` row) and stays filterable
+through the FilterBar source chip on unforced embeddings. Backup-repository
+host labels must resolve through name-bearing candidates (parent name, PBS
+instance name, owning PVE node, storage nodes) before falling back to raw
+parent/platform resource ids, so PVE-configured PBS storage rows show the
+owning node instead of opaque `agent-`/`storage-` identifiers. The pool row's worse health is lifted onto
the surviving mount row (state, status detail, issue summary) so a degraded
cluster stays visible, and pool rows with no mounting sibling are kept so
clusters monitored without PVE storage entries do not lose their only
diff --git a/frontend-modern/src/components/Storage/StoragePoolRow.tsx b/frontend-modern/src/components/Storage/StoragePoolRow.tsx
index 1b9cc989df..d7c6dd5002 100644
--- a/frontend-modern/src/components/Storage/StoragePoolRow.tsx
+++ b/frontend-modern/src/components/Storage/StoragePoolRow.tsx
@@ -16,8 +16,6 @@ import {
STORAGE_POOL_ROW_NAME_TEXT_CLASS,
STORAGE_POOL_ROW_PROTECTION_CELL_CLASS,
STORAGE_POOL_ROW_PROTECTION_TEXT_CLASS,
- STORAGE_POOL_ROW_SOURCE_BADGE_CLASS,
- STORAGE_POOL_ROW_SOURCE_CELL_CLASS,
STORAGE_POOL_ROW_TEXT_TRUNCATE_CLASS,
STORAGE_POOL_ROW_TYPE_CELL_CLASS,
STORAGE_POOL_ROW_USAGE_FALLBACK_CLASS,
@@ -110,12 +108,6 @@ export const StoragePoolRow: Component<StoragePoolRowProps> = (props) => {
</Show>
</td>
- <td class={STORAGE_POOL_ROW_SOURCE_CELL_CLASS}>
- <span class={`${row().platformToneClass} ${STORAGE_POOL_ROW_SOURCE_BADGE_CLASS}`}>
- {row().platformLabel}
- </span>
- </td>
-
<td class={STORAGE_POOL_ROW_TYPE_CELL_CLASS}>
<span class={STORAGE_POOL_ROW_TEXT_TRUNCATE_CLASS} title={row().topologyLabel}>
{row().topologyLabel}
diff --git a/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx b/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx
index 9d027b605c..0bf37826ab 100644
--- a/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx
+++ b/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx
@@ -572,13 +572,12 @@ describe('Storage', () => {
render(() => <Storage />);
expect(screen.getByRole('columnheader', { name: 'Storage' })).toBeInTheDocument();
- expect(screen.getByRole('columnheader', { name: 'Source' })).toBeInTheDocument();
+ expect(screen.queryByRole('columnheader', { name: 'Source' })).not.toBeInTheDocument();
expect(screen.getByRole('columnheader', { name: 'Protection' })).toBeInTheDocument();
expect(screen.getByRole('columnheader', { name: 'Type' })).toBeInTheDocument();
expect(screen.getByRole('columnheader', { name: 'Host' })).toBeInTheDocument();
expect(screen.getByRole('columnheader', { name: 'Usage' })).toBeInTheDocument();
expect(screen.getByRole('columnheader', { name: 'State' })).toBeInTheDocument();
- expect(screen.getAllByText('PVE').length).toBeGreaterThan(0);
expect(screen.getAllByText('pve1').length).toBeGreaterThan(0);
expect(screen.getAllByText('Protection Reduced').length).toBeGreaterThan(0);
expect(
diff --git a/frontend-modern/src/components/Storage/__tests__/storagePageState.test.ts b/frontend-modern/src/components/Storage/__tests__/storagePageState.test.ts
index 2c3344f509..3ca62ba0c9 100644
--- a/frontend-modern/src/components/Storage/__tests__/storagePageState.test.ts
+++ b/frontend-modern/src/components/Storage/__tests__/storagePageState.test.ts
@@ -137,7 +137,6 @@ describe('storagePageState', () => {
'priority',
'name',
'state',
- 'source',
'usage',
'type',
'host',
diff --git a/frontend-modern/src/components/Storage/storagePageState.ts b/frontend-modern/src/components/Storage/storagePageState.ts
index d5c8ce83be..b8c244e4ea 100644
--- a/frontend-modern/src/components/Storage/storagePageState.ts
+++ b/frontend-modern/src/components/Storage/storagePageState.ts
@@ -61,7 +61,6 @@ export const DEFAULT_STORAGE_SORT_OPTIONS: Array<{ value: StorageSortKey; label:
{ value: 'priority', label: 'Priority' },
{ value: 'name', label: 'Storage' },
{ value: 'state', label: 'State' },
- { value: 'source', label: 'Source' },
{ value: 'usage', label: 'Usage %' },
{ value: 'type', label: 'Type' },
{ value: 'host', label: 'Host' },
@@ -123,7 +122,6 @@ export const normalizeStorageSortKey = (value: string): StorageSortKey => {
normalized === 'priority' ||
normalized === 'name' ||
normalized === 'state' ||
- normalized === 'source' ||
normalized === 'usage' ||
normalized === 'type' ||
normalized === 'host' ||
@@ -132,6 +130,8 @@ export const normalizeStorageSortKey = (value: string): StorageSortKey => {
) {
return normalized;
}
+ // 'source' persisted from before the Source column was demoted to the row
+ // expansion folds back to the default here.
return 'priority';
};
diff --git a/frontend-modern/src/features/storageBackups/__tests__/storageAdapters.test.ts b/frontend-modern/src/features/storageBackups/__tests__/storageAdapters.test.ts
index 2642abb95d..3785848efd 100644
--- a/frontend-modern/src/features/storageBackups/__tests__/storageAdapters.test.ts
+++ b/frontend-modern/src/features/storageBackups/__tests__/storageAdapters.test.ts
@@ -386,6 +386,34 @@ describe('storageAdapters', () => {
expect(records[0].details?.protectionReduced).toBe(true);
});
+ it('prefers the owning node over raw resource ids for unnamed backup repositories', () => {
+ const records = buildStorageRecords({
+ state: baseState(),
+ resources: [
+ makeResourceStorage({
+ id: 'pve-pbs-storage',
+ name: 'backup-vault-a',
+ parentId: 'agent-0b42c3198bcaa645',
+ parentName: undefined,
+ platformData: {
+ type: 'pbs',
+ node: 'pve1',
+ instance: 'cluster-a',
+ shared: true,
+ },
+ storage: {
+ type: 'pbs',
+ topology: 'datastore',
+ protection: 'backup',
+ } as Resource['storage'],
+ }),
+ ],
+ });
+
+ expect(records).toHaveLength(1);
+ expect(records[0].hostLabel).toBe('pve1');
+ });
+
it('keeps dependency impact separate from healthy storage primary issues', () => {
const records = buildStorageRecords({
state: baseState(),
diff --git a/frontend-modern/src/features/storageBackups/__tests__/storagePagePresentation.test.ts b/frontend-modern/src/features/storageBackups/__tests__/storagePagePresentation.test.ts
index 117faf7555..325f413044 100644
--- a/frontend-modern/src/features/storageBackups/__tests__/storagePagePresentation.test.ts
+++ b/frontend-modern/src/features/storageBackups/__tests__/storagePagePresentation.test.ts
@@ -19,7 +19,6 @@ describe('storagePagePresentation', () => {
expect(getStoragePoolTableColumns('Growth (24h)').map((column) => column.label)).toEqual([
'Storage',
'State',
- 'Source',
'Type',
'Host',
'Protection',
@@ -27,10 +26,10 @@ describe('storagePagePresentation', () => {
'Growth (24h)',
]);
expect(getStoragePoolTableColumns('Growth (24h)').map((column) => column.compactLabel)).toEqual(
- ['Storage', 'State', 'Src', 'Type', 'Host', 'Prot', 'Used', '24h'],
+ ['Storage', 'State', 'Type', 'Host', 'Prot', 'Used', '24h'],
);
- expect(getStoragePoolTableColumns('Growth (24h)')[0].colClassName).toContain('xl:w-[18%]');
- expect(getStoragePoolTableColumns('Growth (24h)')[3].className).toContain(
+ expect(getStoragePoolTableColumns('Growth (24h)')[0].colClassName).toContain('xl:w-[20%]');
+ expect(getStoragePoolTableColumns('Growth (24h)')[2].className).toContain(
'hidden xl:table-cell',
);
});
diff --git a/frontend-modern/src/features/storageBackups/__tests__/storagePoolRowPresentation.test.ts b/frontend-modern/src/features/storageBackups/__tests__/storagePoolRowPresentation.test.ts
index 191a492b73..dd380ed2cc 100644
--- a/frontend-modern/src/features/storageBackups/__tests__/storagePoolRowPresentation.test.ts
+++ b/frontend-modern/src/features/storageBackups/__tests__/storagePoolRowPresentation.test.ts
@@ -8,7 +8,6 @@ import {
STORAGE_POOL_ROW_HEIGHT_CLASS,
STORAGE_POOL_ROW_NAME_TEXT_CLASS,
STORAGE_POOL_ROW_PLACEHOLDER_CLASS,
- STORAGE_POOL_ROW_SOURCE_BADGE_CLASS,
STORAGE_POOL_ROW_USAGE_FALLBACK_CLASS,
} from '@/features/storageBackups/storagePoolRowPresentation';
@@ -42,9 +41,8 @@ const baseRecord = (overrides: Partial<StorageRecord> = {}): StorageRecord =>
describe('storage pool row presentation', () => {
it('builds canonical row identity and summary fields', () => {
expect(STORAGE_POOL_ROW_CLASS).toContain('cursor-pointer');
- expect(STORAGE_POOL_ROW_HEIGHT_CLASS).toBe('h-[38px]');
+ expect(STORAGE_POOL_ROW_HEIGHT_CLASS).toBe('h-[32px]');
expect(STORAGE_POOL_ROW_NAME_TEXT_CLASS).toContain('font-semibold');
- expect(STORAGE_POOL_ROW_SOURCE_BADGE_CLASS).toContain('text-[9px]');
expect(STORAGE_POOL_ROW_EXPANDED_CLASS).toBe('bg-surface-alt');
expect(STORAGE_POOL_ROW_GROWTH_TEXT_CLASS).toContain('font-mono');
expect(STORAGE_POOL_ROW_PLACEHOLDER_CLASS).toBe('text-muted');
@@ -57,8 +55,6 @@ describe('storage pool row presentation', () => {
toneClass: 'text-amber-600 dark:text-amber-300',
});
- expect(model.platformLabel).toBe('PBS');
- expect(model.platformToneClass).toContain('bg-indigo-100');
expect(model.hostLabel).toBe('pbs01');
expect(model.topologyLabel).toBe('Datastore');
expect(model.stateLabel).toBe('Degraded');
@@ -66,8 +62,6 @@ describe('storage pool row presentation', () => {
expect(model.compactProtection).toBe('Protection Reduced');
expect(model.capacityDeltaLabel).toBe('+40.00 GB');
expect(model.capacityDeltaToneClass).toContain('text-amber-600');
- expect(model.compactIssue).toBe('Capacity Pressure');
- expect(model.compactImpact).toBe('—');
expect(model.freeBytes).toBe(200);
});
});
diff --git a/frontend-modern/src/features/storageBackups/storageAdapters.ts b/frontend-modern/src/features/storageBackups/storageAdapters.ts
index d750277050..773ce5658a 100644
--- a/frontend-modern/src/features/storageBackups/storageAdapters.ts
+++ b/frontend-modern/src/features/storageBackups/storageAdapters.ts
@@ -95,6 +95,9 @@ const mapResourceStorageRecord = (resource: Resource, adapterId: string): Storag
const locationLabel = isBackupRepository
? resource.parentName ||
(platformData.pbsInstanceName as string | undefined) ||
+ proxmoxNode ||
+ (platformData.node as string | undefined) ||
+ storageNodes[0] ||
resource.parentId ||
resource.platformId ||
'Unknown'
diff --git a/frontend-modern/src/features/storageBackups/storagePagePresentation.ts b/frontend-modern/src/features/storageBackups/storagePagePresentation.ts
index 730a657503..0b54395763 100644
--- a/frontend-modern/src/features/storageBackups/storagePagePresentation.ts
+++ b/frontend-modern/src/features/storageBackups/storagePagePresentation.ts
@@ -28,36 +28,29 @@ export const getStoragePoolTableColumns = (
label: 'Storage',
compactLabel: 'Storage',
sortKey: 'name',
- className: `${STORAGE_POOL_TABLE_HEADER_CLASS} w-[34%] sm:w-[26%] md:w-[23%] xl:w-[18%]`,
- colClassName: 'w-[34%] sm:w-[26%] md:w-[23%] xl:w-[18%]',
+ className: `${STORAGE_POOL_TABLE_HEADER_CLASS} w-[39%] sm:w-[29%] md:w-[24%] xl:w-[20%]`,
+ colClassName: 'w-[39%] sm:w-[29%] md:w-[24%] xl:w-[20%]',
},
{
label: 'State',
compactLabel: 'State',
sortKey: 'state',
- className: `${STORAGE_POOL_TABLE_HEADER_CLASS} w-[24%] sm:w-[20%] md:w-[17%] xl:w-[14%]`,
- colClassName: 'w-[24%] sm:w-[20%] md:w-[17%] xl:w-[14%]',
- },
- {
- label: 'Source',
- compactLabel: 'Src',
- sortKey: 'source',
- className: `${STORAGE_POOL_TABLE_HEADER_CLASS} w-[13%] sm:w-[10%] md:w-[8%]`,
- colClassName: 'w-[13%] sm:w-[10%] md:w-[8%]',
+ className: `${STORAGE_POOL_TABLE_HEADER_CLASS} w-[28%] sm:w-[20%] md:w-[18%] xl:w-[14%]`,
+ colClassName: 'w-[28%] sm:w-[20%] md:w-[18%] xl:w-[14%]',
},
{
label: 'Type',
compactLabel: 'Type',
sortKey: 'type',
- className: `${STORAGE_POOL_TABLE_HEADER_CLASS} hidden xl:table-cell xl:w-[8%]`,
- colClassName: 'hidden xl:table-column xl:w-[8%]',
+ className: `${STORAGE_POOL_TABLE_HEADER_CLASS} hidden xl:table-cell xl:w-[10%]`,
+ colClassName: 'hidden xl:table-column xl:w-[10%]',
},
{
label: 'Host',
compactLabel: 'Host',
sortKey: 'host',
- className: `${STORAGE_POOL_TABLE_HEADER_CLASS} hidden sm:table-cell sm:w-[13%] md:w-[12%] xl:w-[10%]`,
- colClassName: 'hidden sm:table-column sm:w-[13%] md:w-[12%] xl:w-[10%]',
+ className: `${STORAGE_POOL_TABLE_HEADER_CLASS} hidden sm:table-cell sm:w-[15%] md:w-[14%] xl:w-[12%]`,
+ colClassName: 'hidden sm:table-column sm:w-[15%] md:w-[14%] xl:w-[12%]',
},
{
label: 'Protection',
@@ -70,8 +63,8 @@ export const getStoragePoolTableColumns = (
label: 'Usage',
compactLabel: 'Used',
sortKey: 'usage',
- className: `${STORAGE_POOL_TABLE_HEADER_CLASS} w-[29%] sm:w-[16%] md:w-[25%] xl:w-[18%]`,
- colClassName: 'w-[29%] sm:w-[16%] md:w-[25%] xl:w-[18%]',
+ className: `${STORAGE_POOL_TABLE_HEADER_CLASS} w-[33%] sm:w-[21%] md:w-[29%] xl:w-[20%]`,
+ colClassName: 'w-[33%] sm:w-[21%] md:w-[29%] xl:w-[20%]',
},
{
label: growthColumnLabel,
diff --git a/frontend-modern/src/features/storageBackups/storagePoolDetailPresentation.ts b/frontend-modern/src/features/storageBackups/storagePoolDetailPresentation.ts
index 9d1e8a181a..f7c0453888 100644
--- a/frontend-modern/src/features/storageBackups/storagePoolDetailPresentation.ts
+++ b/frontend-modern/src/features/storageBackups/storagePoolDetailPresentation.ts
@@ -3,6 +3,7 @@ import type { StorageRecord } from '@/features/storageBackups/models';
import {
getStorageRecordContent,
getStorageRecordNodeLabel,
+ getStorageRecordPlatformLabel,
getStorageRecordShared,
getStorageRecordStatus,
getStorageRecordType,
@@ -103,6 +104,7 @@ export function buildStoragePoolDetailConfigRows(
const content = getStorageRecordContent(record);
const rows: StoragePoolDetailConfigRow[] = [
{ label: 'Node', value: getStorageRecordNodeLabel(record) },
+ { label: 'Source', value: getStorageRecordPlatformLabel(record) },
{ label: 'Type', value: getStorageRecordType(record) },
{ label: 'Status', value: getStorageRecordStatus(record) },
{
@@ -121,7 +123,7 @@ export function buildStoragePoolDetailConfigRows(
];
if (content) {
- rows.splice(2, 0, { label: 'Content', value: content });
+ rows.splice(3, 0, { label: 'Content', value: content });
}
return rows;
diff --git a/frontend-modern/src/features/storageBackups/storagePoolRowPresentation.ts b/frontend-modern/src/features/storageBackups/storagePoolRowPresentation.ts
index 6930145a37..c997ee988a 100644
--- a/frontend-modern/src/features/storageBackups/storagePoolRowPresentation.ts
+++ b/frontend-modern/src/features/storageBackups/storagePoolRowPresentation.ts
@@ -1,16 +1,11 @@
-import { getSourcePlatformPresentation } from '@/utils/sourcePlatforms';
import type { StorageRecord } from './models';
import type { StorageCapacityDeltaPresentation } from './storageCapacityDeltaPresentation';
import {
getStorageRecordHostLabel,
- getStorageRecordPlatformLabel,
getStorageRecordTopologyLabel,
getStorageRecordZfsPool,
} from './recordPresentation';
import {
- getCompactStoragePoolImpactLabel,
- getCompactStoragePoolIssueLabel,
- getCompactStoragePoolIssueSummary,
getCompactStoragePoolProtectionLabel,
getCompactStoragePoolProtectionTitle,
getStoragePoolStateLabel,
@@ -23,8 +18,6 @@ export interface StoragePoolRowModel {
totalBytes: number;
usedBytes: number;
freeBytes: number;
- platformLabel: string;
- platformToneClass: string;
hostLabel: string;
topologyLabel: string;
compactProtection: string;
@@ -35,38 +28,31 @@ export interface StoragePoolRowModel {
capacityDeltaLabel: string;
capacityDeltaTitle: string;
capacityDeltaToneClass: string;
- compactImpact: string;
- compactIssue: string;
- compactIssueSummary: string;
}
export const STORAGE_POOL_ROW_CLASS = 'group cursor-pointer';
-export const STORAGE_POOL_ROW_HEIGHT_CLASS = 'h-[38px]';
+export const STORAGE_POOL_ROW_HEIGHT_CLASS = 'h-[32px]';
export const STORAGE_POOL_ROW_EXPANDED_CLASS = 'bg-surface-alt';
export const STORAGE_POOL_ROW_NAME_CELL_CLASS =
- 'w-[34%] sm:w-[26%] md:w-[23%] xl:w-[18%] overflow-hidden px-1.5 sm:px-2 py-1 align-middle text-base-content';
+ 'w-[39%] sm:w-[29%] md:w-[24%] xl:w-[20%] overflow-hidden px-1.5 sm:px-2 py-1 align-middle text-base-content';
export const STORAGE_POOL_ROW_NAME_TEXT_CLASS = 'block truncate text-[12px] font-semibold';
-export const STORAGE_POOL_ROW_SOURCE_CELL_CLASS =
- 'w-[13%] sm:w-[10%] md:w-[8%] overflow-hidden px-1 sm:px-2 py-1 align-middle text-[11px]';
-export const STORAGE_POOL_ROW_SOURCE_BADGE_CLASS =
- 'inline-flex max-w-full min-w-0 justify-center overflow-hidden text-ellipsis px-1 sm:px-1.5 py-px text-[9px] font-medium';
export const STORAGE_POOL_ROW_TYPE_CELL_CLASS =
- 'hidden xl:table-cell xl:w-[8%] overflow-hidden px-2 py-1 align-middle text-[11px] text-base-content';
+ 'hidden xl:table-cell xl:w-[10%] overflow-hidden px-2 py-1 align-middle text-[11px] text-base-content';
export const STORAGE_POOL_ROW_HOST_CELL_CLASS =
- 'hidden sm:table-cell sm:w-[13%] md:w-[12%] xl:w-[10%] overflow-hidden px-1.5 sm:px-2 py-1 align-middle text-[11px] text-base-content';
+ 'hidden sm:table-cell sm:w-[15%] md:w-[14%] xl:w-[12%] overflow-hidden px-1.5 sm:px-2 py-1 align-middle text-[11px] text-base-content';
export const STORAGE_POOL_ROW_TEXT_TRUNCATE_CLASS = 'block truncate';
export const STORAGE_POOL_ROW_PROTECTION_CELL_CLASS =
'hidden sm:table-cell sm:w-[15%] md:w-[15%] xl:w-[13%] overflow-hidden px-1.5 sm:px-2 py-1 align-middle text-[11px]';
export const STORAGE_POOL_ROW_PROTECTION_TEXT_CLASS = 'block truncate font-semibold';
export const STORAGE_POOL_ROW_USAGE_CELL_CLASS =
- 'w-[29%] sm:w-[16%] md:w-[25%] xl:w-[18%] overflow-hidden px-1.5 sm:px-2 py-1 align-middle';
+ 'w-[33%] sm:w-[21%] md:w-[29%] xl:w-[20%] overflow-hidden px-1.5 sm:px-2 py-1 align-middle';
export const STORAGE_POOL_ROW_USAGE_WRAP_CLASS = 'flex items-center whitespace-nowrap text-[11px]';
export const STORAGE_POOL_ROW_USAGE_BAR_WRAP_CLASS = 'min-w-0 flex-1';
export const STORAGE_POOL_ROW_GROWTH_CELL_CLASS =
'hidden xl:table-cell xl:w-[11%] overflow-hidden px-2 py-1 align-middle text-[11px]';
export const STORAGE_POOL_ROW_GROWTH_TEXT_CLASS = 'block truncate font-mono font-semibold';
export const STORAGE_POOL_ROW_ISSUE_CELL_CLASS =
- 'w-[24%] sm:w-[20%] md:w-[17%] xl:w-[14%] overflow-hidden px-1.5 sm:px-2 py-1 align-middle text-[11px]';
+ 'w-[28%] sm:w-[20%] md:w-[18%] xl:w-[14%] overflow-hidden px-1.5 sm:px-2 py-1 align-middle text-[11px]';
export const STORAGE_POOL_ROW_ISSUE_TEXT_CLASS = 'block truncate text-[11px] font-semibold';
export const STORAGE_POOL_ROW_PLACEHOLDER_CLASS = 'text-muted';
export const STORAGE_POOL_ROW_USAGE_FALLBACK_CLASS = 'text-[11px] text-muted';
@@ -79,15 +65,12 @@ export const buildStoragePoolRowModel = (
const usedBytes = record.capacity.usedBytes || 0;
const freeBytes =
record.capacity.freeBytes ?? (totalBytes > 0 ? Math.max(totalBytes - usedBytes, 0) : 0);
- const platformPresentation = getSourcePlatformPresentation(record.source.platform);
return {
zfsPool: getStorageRecordZfsPool(record),
totalBytes,
usedBytes,
freeBytes,
- platformLabel: platformPresentation?.label || getStorageRecordPlatformLabel(record),
- platformToneClass: platformPresentation?.tone || 'text-base-content',
hostLabel: getStorageRecordHostLabel(record),
topologyLabel: getStorageRecordTopologyLabel(record),
compactProtection: getCompactStoragePoolProtectionLabel(record),
@@ -98,8 +81,5 @@ export const buildStoragePoolRowModel = (
capacityDeltaLabel: capacityDelta?.label ?? '—',
capacityDeltaTitle: capacityDelta?.title ?? 'No used-capacity change history available.',
capacityDeltaToneClass: capacityDelta?.toneClass ?? STORAGE_POOL_ROW_PLACEHOLDER_CLASS,
- compactImpact: getCompactStoragePoolImpactLabel(record),
- compactIssue: getCompactStoragePoolIssueLabel(record),
- compactIssueSummary: getCompactStoragePoolIssueSummary(record),
};
};