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.
34 lines
1.0 KiB
TypeScript
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>
|
|
</>
|
|
);
|
|
};
|