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.

591 B
Raw Blame
import { Accessor, createMemo } from 'solid-js';
import { isStoragePoolLoading } from '@/features/storageBackups/storagePageStatus';
import type { StorageView } from './storagePageState';

type UseStoragePageStatusOptions = {
  loading: Accessor<boolean>;
  filteredRecordCount: Accessor<number>;
  view: Accessor<StorageView>;
};

export const useStoragePageStatus = (options: UseStoragePageStatusOptions) => {
  const isLoadingPools = createMemo(() =>
    isStoragePoolLoading(options.loading(), options.view(), options.filteredRecordCount()),
  );

  return {
    isLoadingPools,
  };
};