From 8dbaaf514ab208fbe774affb5771e57b6af297b6 Mon Sep 17 00:00:00 2001 From: Max Frederiksen <maxfrederiksen@Maxs-MacBook-Air.local> Date: Mon, 20 Jan 2025 10:48:20 +0100 Subject: [PATCH] CE-3453: Move host link --- src/components/IOC/IOCDetails/IOCDetails.tsx | 15 ++++++----- .../IOC/IOCLiveStatus/IOCLiveStatus.tsx | 26 ++----------------- 2 files changed, 11 insertions(+), 30 deletions(-) diff --git a/src/components/IOC/IOCDetails/IOCDetails.tsx b/src/components/IOC/IOCDetails/IOCDetails.tsx index 6ae05e92..dc834792 100644 --- a/src/components/IOC/IOCDetails/IOCDetails.tsx +++ b/src/components/IOC/IOCDetails/IOCDetails.tsx @@ -1,5 +1,9 @@ import { Grid, Box, Stack, Typography } from "@mui/material"; -import { KeyValueTable, AlertBannerList } from "@ess-ics/ce-ui-common"; +import { + KeyValueTable, + AlertBannerList, + InternalLink +} from "@ess-ics/ce-ui-common"; import { IOCStatus } from "../IOCStatus"; import { AccessControl } from "../../auth/AccessControl"; import { IocDetails, useFetchIocAlertsQuery } from "../../../store/deployApi"; @@ -82,13 +86,12 @@ export function IOCDetails({ ioc, getSubset, buttons }: IOCDetailsProps) { > {ioc.namingName} </Typography> - <Typography - noWrap - component="p" - variant="subtitle2" + <InternalLink + to={`/hosts/${ioc?.activeDeployment?.host?.hostId}`} + label={`Host details, ${ioc?.activeDeployment?.host?.fqdn}`} > {ioc.activeDeployment?.host?.fqdn || "---"} - </Typography> + </InternalLink> </Box> </Stack> diff --git a/src/components/IOC/IOCLiveStatus/IOCLiveStatus.tsx b/src/components/IOC/IOCLiveStatus/IOCLiveStatus.tsx index 3ca87ebf..b1271d2d 100644 --- a/src/components/IOC/IOCLiveStatus/IOCLiveStatus.tsx +++ b/src/components/IOC/IOCLiveStatus/IOCLiveStatus.tsx @@ -1,10 +1,6 @@ import { useCallback, useState, ChangeEvent } from "react"; import { Typography } from "@mui/material"; -import { - SimpleAccordion, - InternalLink, - EmptyValue -} from "@ess-ics/ce-ui-common"; +import { SimpleAccordion, EmptyValue } from "@ess-ics/ce-ui-common"; import { useSearchParams } from "react-router-dom"; import { IOCDetails } from "../IOCDetails"; import { LokiPanel } from "../../common/Loki/LokiPanel"; @@ -34,25 +30,7 @@ export function IOCLiveStatus({ ioc }: { ioc: IocDetails }) { /> ) : ( <EmptyValue /> - ), - "Deployed on": - ioc?.activeDeployment?.host && - ioc?.activeDeployment?.host.externalIdValid ? ( - <Typography> - {ioc.activeDeployment?.host.hostId ? ( - <InternalLink - to={`/hosts/${ioc.activeDeployment?.host.hostId}`} - label={`Host details, ${ioc.activeDeployment?.host.fqdn}`} - > - {ioc.activeDeployment?.host.fqdn} - </InternalLink> - ) : ( - ioc.activeDeployment?.host.fqdn - )} - </Typography> - ) : ( - <EmptyValue /> - ) + ) }; return subset; -- GitLab