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.

596 B
Raw Blame
import { parseWorkloadsLinkSearch } from '@/routing/resourceLinks';
import type { WorkloadGuest } from '@/types/workloads';
import { getCanonicalWorkloadId } from '@/utils/workloads';

/** Resolves the inbound `resource` deep link to the guest whose drawer opens. */
export const resolveWorkloadResourceSelection = (search: string): string | null =>
  parseWorkloadsLinkSearch(search).resource || null;

export const workloadsHasHoveredWorkload = (
  filteredGuests: WorkloadGuest[],
  hoveredId: string,
): boolean => filteredGuests.some((guest) => getCanonicalWorkloadId(guest) === hoveredId);