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.

482 B
Raw Blame
import type { StorageGroupKey } from './useStorageModel';

const normalizeStorageSummaryGroupKey = (value: string): string => value.trim();

export const buildStorageSummaryGroupId = (
  groupBy: StorageGroupKey,
  groupKey: string,
): string | null => {
  if (groupBy === 'none') {
    return null;
  }
  const normalizedGroupKey = normalizeStorageSummaryGroupKey(groupKey);
  if (!normalizedGroupKey) {
    return null;
  }
  return `storage:${groupBy}:${normalizedGroupKey}`;
};