Baptiste Devessier
2025-04-04 11:20:57 +02:00
committed by GitHub
parent bb40bc9929
commit 9353e777ea
10 changed files with 91 additions and 3 deletions

View File

@ -2,9 +2,10 @@ import { SettingsAdminIndicatorHealthContext } from '@/settings/admin-panel/heal
import styled from '@emotion/styled';
import { useLingui } from '@lingui/react/macro';
import { useContext } from 'react';
import { AdminPanelHealthServiceStatus } from '~/generated/graphql';
import { JsonTree } from 'twenty-ui/json-visualizer';
import { Section } from 'twenty-ui/layout';
import { AdminPanelHealthServiceStatus } from '~/generated/graphql';
import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';
const StyledDetailsContainer = styled.div`
background-color: ${({ theme }) => theme.background.secondary};
@ -23,6 +24,7 @@ const StyledErrorMessage = styled.div`
export const JsonDataIndicatorHealthStatus = () => {
const { t } = useLingui();
const { copyToClipboard } = useCopyToClipboard();
const { indicatorHealth } = useContext(SettingsAdminIndicatorHealthContext);
@ -54,6 +56,7 @@ export const JsonDataIndicatorHealthStatus = () => {
emptyStringLabel={t`[empty string]`}
arrowButtonCollapsedLabel={t`Expand`}
arrowButtonExpandedLabel={t`Collapse`}
onNodeValueClick={copyToClipboard}
/>
</StyledDetailsContainer>
)}