Tweaks
This commit is contained in:
@ -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;
|
||||||
})
|
})
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user