Skip to content
Snippets Groups Projects
Commit 8dbaaf51 authored by Max Frederiksen's avatar Max Frederiksen
Browse files

CE-3453: Move host link

parent 20d04295
No related branches found
No related tags found
2 merge requests!612Release 5.0.0,!595CE-3453: Move host link
Pipeline #212631 passed
import { Grid, Box, Stack, Typography } from "@mui/material"; 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 { IOCStatus } from "../IOCStatus";
import { AccessControl } from "../../auth/AccessControl"; import { AccessControl } from "../../auth/AccessControl";
import { IocDetails, useFetchIocAlertsQuery } from "../../../store/deployApi"; import { IocDetails, useFetchIocAlertsQuery } from "../../../store/deployApi";
...@@ -82,13 +86,12 @@ export function IOCDetails({ ioc, getSubset, buttons }: IOCDetailsProps) { ...@@ -82,13 +86,12 @@ export function IOCDetails({ ioc, getSubset, buttons }: IOCDetailsProps) {
> >
{ioc.namingName} {ioc.namingName}
</Typography> </Typography>
<Typography <InternalLink
noWrap to={`/hosts/${ioc?.activeDeployment?.host?.hostId}`}
component="p" label={`Host details, ${ioc?.activeDeployment?.host?.fqdn}`}
variant="subtitle2"
> >
{ioc.activeDeployment?.host?.fqdn || "---"} {ioc.activeDeployment?.host?.fqdn || "---"}
</Typography> </InternalLink>
</Box> </Box>
</Stack> </Stack>
......
import { useCallback, useState, ChangeEvent } from "react"; import { useCallback, useState, ChangeEvent } from "react";
import { Typography } from "@mui/material"; import { Typography } from "@mui/material";
import { import { SimpleAccordion, EmptyValue } from "@ess-ics/ce-ui-common";
SimpleAccordion,
InternalLink,
EmptyValue
} from "@ess-ics/ce-ui-common";
import { useSearchParams } from "react-router-dom"; import { useSearchParams } from "react-router-dom";
import { IOCDetails } from "../IOCDetails"; import { IOCDetails } from "../IOCDetails";
import { LokiPanel } from "../../common/Loki/LokiPanel"; import { LokiPanel } from "../../common/Loki/LokiPanel";
...@@ -34,25 +30,7 @@ export function IOCLiveStatus({ ioc }: { ioc: IocDetails }) { ...@@ -34,25 +30,7 @@ export function IOCLiveStatus({ ioc }: { ioc: IocDetails }) {
/> />
) : ( ) : (
<EmptyValue /> <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; return subset;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment