Files
twenty/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminHealthStatus.tsx
nitin d2ddd6f473 Separate system operations from core objects in GraphQL endpoints (#12977)
Moves system-level operations (auth, billing, admin) to use the
/metadata endpoint instead of /graphql.

This cleans up the endpoint separation so /graphql is purely for core
objects (Company, People, etc.) and /metadata handles all system
operations.

Part of prep work for webhook/API key core migration.
2025-07-01 18:29:32 +02:00

34 lines
1.0 KiB
TypeScript

import { SettingsAdminTabSkeletonLoader } from '@/settings/admin-panel/components/SettingsAdminTabSkeletonLoader';
import { SettingsHealthStatusListCard } from '@/settings/admin-panel/health-status/components/SettingsHealthStatusListCard';
import { t } from '@lingui/core/macro';
import { H2Title } from 'twenty-ui/display';
import { Section } from 'twenty-ui/layout';
import { useGetSystemHealthStatusQuery } from '~/generated-metadata/graphql';
export const SettingsAdminHealthStatus = () => {
const { data, loading: loadingHealthStatus } = useGetSystemHealthStatusQuery({
fetchPolicy: 'network-only',
});
const services = data?.getSystemHealthStatus.services ?? [];
if (loadingHealthStatus) {
return <SettingsAdminTabSkeletonLoader />;
}
return (
<>
<Section>
<H2Title
title={t`Health Status`}
description={t`How your system is doing`}
/>
<SettingsHealthStatusListCard
services={services}
loading={loadingHealthStatus}
/>
</Section>
</>
);
};