From f3f8b0bf9a2b252773452ac0d712cfbd64bedb64 Mon Sep 17 00:00:00 2001 From: Zoltan Runyo <zoltan.runyo@ess.eu> Date: Tue, 11 Jan 2022 12:02:47 +0100 Subject: [PATCH] Update FE according to current BE API response objects --- src/components/IOC/IOCBadge.js | 2 +- src/components/IOC/IOCLiveStatus.js | 1 - src/components/IOC/IOCManage.js | 5 ++--- src/components/IOC/IOCUndeployDialog.js | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/IOC/IOCBadge.js b/src/components/IOC/IOCBadge.js index 227dfdf9..e61be588 100644 --- a/src/components/IOC/IOCBadge.js +++ b/src/components/IOC/IOCBadge.js @@ -4,6 +4,6 @@ import { IOCStatusIcon } from "./IOCIcons"; export function IOCBadge({ ioc }) { return ( - <IconBadge icon={<IOCStatusIcon ioc={ioc} />} title={ioc.namingName ?? ioc.name} subheader={ioc.activeDeployment?.host?.host || "---"} /> + <IconBadge icon={<IOCStatusIcon ioc={ioc} />} title={ioc.namingName ?? ioc.name} subheader={ioc.activeDeployment?.host?.fqdn || "---"} /> ) } \ No newline at end of file diff --git a/src/components/IOC/IOCLiveStatus.js b/src/components/IOC/IOCLiveStatus.js index 71c482d2..02ee70a7 100644 --- a/src/components/IOC/IOCLiveStatus.js +++ b/src/components/IOC/IOCLiveStatus.js @@ -13,7 +13,6 @@ import { IOCCommandTable } from "./IOCCommandTable"; export function IOCLiveStatus({ ioc, ongoingCommand, commands, getCommands, buttonDisabled, setOperationQueued }) { const liveIOC = { ...ioc }; - liveIOC.host = ioc.activeDeployment?.host.host; liveIOC.name = ioc.namingName; const getSubset = (ioc) => { diff --git a/src/components/IOC/IOCManage.js b/src/components/IOC/IOCManage.js index 8b828426..b8cbb341 100644 --- a/src/components/IOC/IOCManage.js +++ b/src/components/IOC/IOCManage.js @@ -37,7 +37,6 @@ export function IOCManage({ ioc, getIOC, buttonDisabled }) { if (ioc) { console.log({ ...ioc }); const managedIOC = { ...ioc }; - managedIOC.host = ioc.activeDeployment?.host.host; const getSubset = (ioc) => { ioc = { ...ioc }; @@ -46,7 +45,7 @@ export function IOCManage({ ioc, getIOC, buttonDisabled }) { // active, } = ioc; const { sourceUrl: git } = ioc; - let host = ioc.activeDeployment?.host.host; + let host = ioc.activeDeployment?.host.fqdn; //create link if host is set if (ioc.activeDeployment) { @@ -73,7 +72,7 @@ export function IOCManage({ ioc, getIOC, buttonDisabled }) { if (ioc.activeDeployment) { formInit.csEntryHost = { - fqdn: ioc.activeDeployment.host.host, + fqdn: ioc.activeDeployment.host.fqdn, id: ioc.activeDeployment.host.csEntryId, } } diff --git a/src/components/IOC/IOCUndeployDialog.js b/src/components/IOC/IOCUndeployDialog.js index a94486ac..fac3db25 100644 --- a/src/components/IOC/IOCUndeployDialog.js +++ b/src/components/IOC/IOCUndeployDialog.js @@ -30,7 +30,7 @@ export function IOCUndeployDialog({ open, setOpen, submitCallback, ioc , error } <DialogTitle id="form-dialog-title">Undeploy</DialogTitle> <DialogContent> <DialogContentText> - Do you really want to undeploy {ioc.namingName} from {ioc.activeDeployment.host.host}? + Do you really want to undeploy {ioc.namingName} from {ioc.activeDeployment.host.fqdn}? </DialogContentText> <TextField autoComplete="off" className={classes.textField} id="comment" label="Undeployment comment" variant="outlined" fullWidth/> {error ? -- GitLab