This commit is contained in:
Eden Kirin
2024-01-29 08:10:11 +01:00
parent 664c4906e3
commit b5c3a9e046
2 changed files with 13 additions and 2 deletions

View File

@ -29,7 +29,7 @@ export default function Dashboard() {
setLoadingEnv(true); setLoadingEnv(true);
dashboardApi dashboardApi
.getFake(envTab.dashboardEndpoint) .get(envTab.dashboardEndpoint)
.then((response) => { .then((response) => {
return response.data.content; return response.data.content;
}) })

View File

@ -78,11 +78,22 @@ function ServiceNode({ node }: ServiceNodePropps) {
const nodeUrl = node.url.replace("http://", "").replace("https://", ""); const nodeUrl = node.url.replace("http://", "").replace("https://", "");
const statusOk = node.health_check_status?.status_ok; const statusOk = node.health_check_status?.status_ok;
const version = <Typography className="version">{node.app_details?.app_version || "no version"}</Typography>;
let templateName = null;
if (node.app_details?.template_name && node.app_details?.template_version) {
templateName = (
<Typography className="template">
{node.app_details?.template_name} {node.app_details?.template_version}
</Typography>
);
}
return ( return (
<Stack direction="row" className={`service-node ${statusOk ? "status-ok" : "status-error"}`}> <Stack direction="row" className={`service-node ${statusOk ? "status-ok" : "status-error"}`}>
<Box>{getNodeNameElement(node)}</Box> <Box>{getNodeNameElement(node)}</Box>
<Box className="node-details"> <Box className="node-details">
<Typography className="version">{node.app_details?.app_version || "no version"}</Typography> {version}
{templateName}
<Link href={node.url} target="_blank"> <Link href={node.url} target="_blank">
{nodeUrl} {nodeUrl}
</Link> </Link>