Skip to content

Commit

Permalink
EVEREST-881 Added monitoring name to db detail (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipmikes1 authored Mar 12, 2024
1 parent ed90412 commit d97d2e6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type DatabaseDetailsOverviewCardProps = {
memory: number | string;
disk: number | string;
externalAccess: boolean;
monitoring: boolean;
monitoring?: string;
backup?: Backup;
} & OverviewCardProps;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const DatabaseDetails = ({
monitoring,
}: DatabaseDetailsOverviewCardProps) => {
const schedules = backup?.schedules;

return (
<Card
title={Messages.titles.dbDetails}
Expand Down Expand Up @@ -115,6 +116,11 @@ export const DatabaseDetails = ({
<OverviewSectionText>
{monitoring ? Messages.fields.enabled : Messages.fields.disabled}
</OverviewSectionText>
{monitoring && (
<OverviewSectionText>
{Messages.fields.monitoring(monitoring)}
</OverviewSectionText>
)}
</OverviewSection>
</Grid>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const Messages = {
disk: (disk: string | number) => `Disk: ${disk}`,
enabled: `Enabled`,
disabled: `Disabled`,
monitoring: (name: string) => `Name: ${name}`,
pitr: (isEnabled: string) =>
`${Messages.titles.pitr} ${isEnabled.toLocaleLowerCase()}`,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Stack } from '@mui/material';
import { useParams } from 'react-router-dom';
import { dbEngineToDbType } from '@percona/utils';
import { useDbClusterCredentials } from 'hooks/api/db-cluster/useCreateDbCluster';
import { useDbCluster } from 'hooks/api/db-cluster/useDbCluster';
import { useDbClusters } from 'hooks/api/db-clusters/useDbClusters';
import { useParams } from 'react-router-dom';
import { ProxyExposeType } from 'shared-types/dbCluster.types';
import { dbEngineToDbType } from '@percona/utils';
import { ConnectionDetails, DatabaseDetails } from './cards';

export const ClusterOverview = () => {
Expand Down Expand Up @@ -52,7 +52,7 @@ export const ClusterOverview = () => {
externalAccess={
dbCluster?.spec.proxy.expose.type === ProxyExposeType.external
}
monitoring={!!dbCluster?.spec.monitoring.monitoringConfigName}
monitoring={dbCluster?.spec.monitoring.monitoringConfigName}
/>
<ConnectionDetails
loading={fetchingCluster}
Expand Down

0 comments on commit d97d2e6

Please sign in to comment.