import { Box, Database, FileCode, Layers, Lock, Shuffle } from 'lucide-react'; import { useQueryClient } from 'react-query'; import { useEnvironmentId } from '@/react/hooks/useEnvironmentId'; import Route from '@/assets/ico/route.svg?c'; import { DashboardGrid } from '@@/DashboardItem/DashboardGrid'; import { DashboardItem } from '@@/DashboardItem/DashboardItem'; import { PageHeader } from '@@/PageHeader'; import { useNamespaces } from '../namespaces/queries'; import { useApplicationsForCluster } from '../applications/application.queries'; import { usePVCsForCluster } from '../volumes/queries'; import { useServicesForCluster } from '../services/service'; import { useIngresses } from '../ingresses/queries'; import { useConfigMapsForCluster } from '../configs/configmap.service'; import { useSecretsForCluster } from '../configs/secret.service'; import { EnvironmentInfo } from './EnvironmentInfo'; export function DashboardView() { const queryClient = useQueryClient(); const environmentId = useEnvironmentId(); const { data: namespaces, ...namespacesQuery } = useNamespaces(environmentId); const namespaceNames = namespaces && Object.keys(namespaces); const { data: applications, ...applicationsQuery } = useApplicationsForCluster(environmentId, namespaceNames); const { data: pvcs, ...pvcsQuery } = usePVCsForCluster( environmentId, namespaceNames ); const { data: services, ...servicesQuery } = useServicesForCluster( environmentId, namespaceNames ); const { data: ingresses, ...ingressesQuery } = useIngresses( environmentId, namespaceNames ); const { data: configMaps, ...configMapsQuery } = useConfigMapsForCluster( environmentId, namespaceNames ); const { data: secrets, ...secretsQuery } = useSecretsForCluster( environmentId, namespaceNames ); return ( <> queryClient.invalidateQueries(['environments', environmentId]) } />
); }