summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/odlux/apps')
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/actions/detailsAction.ts13
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/components/denseTable.tsx18
2 files changed, 9 insertions, 22 deletions
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/actions/detailsAction.ts b/sdnr/wt/odlux/apps/networkMapApp/src/actions/detailsAction.ts
index 5288f61d9..afa8ee41e 100644
--- a/sdnr/wt/odlux/apps/networkMapApp/src/actions/detailsAction.ts
+++ b/sdnr/wt/odlux/apps/networkMapApp/src/actions/detailsAction.ts
@@ -102,12 +102,10 @@ running=true;
dispatcher(new IsBusyCheckingDeviceListAction(true));
const promises = list.map((device)=>{
- if(device.simulatorId){
- return requestRest<any>("/rests/operational/network-topology:network-topology/topology/topology-netconf/node/"+device.simulatorId, { method: "GET" })
-
+ if(device.name){
+ return requestRest<any>("/rests/data/network-topology:network-topology/topology=topology-netconf/node="+device.name, { method: "GET" })
}else{
- return requestRest<any>("/rests/operational/network-topology:network-topology/topology/topology-netconf/node/"+device.name, { method: "GET" })
-
+ return device;
}
})
@@ -117,9 +115,8 @@ running=true;
result.forEach((res: any, index)=>{
- if(res !==null && res.node!==null){
-
- list[index].status = res.node[0]["netconf-node-topology:connection-status"];
+ if(res !==null && res["network-topology:node"]){
+ list[index].status = res["network-topology:node"][0]["netconf-node-topology:connection-status"];
}else{
list[index].status = "Not connected";
}
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/components/denseTable.tsx b/sdnr/wt/odlux/apps/networkMapApp/src/components/denseTable.tsx
index 1506df5ab..72fe79ee3 100644
--- a/sdnr/wt/odlux/apps/networkMapApp/src/components/denseTable.tsx
+++ b/sdnr/wt/odlux/apps/networkMapApp/src/components/denseTable.tsx
@@ -71,15 +71,8 @@ const DenseTable: React.FunctionComponent<props> = (props) => {
</TableRow>
</TableHead>
<TableBody>
- {props.data.map((row, index) => {
-
-
- var filteredRows = Object.keys(row).filter(function(e) { if(e!=="simulatorId") return row });
-
- //var filteredRows = Object.keys(row).filter(function(e) { if(e!=="simulatorId") return row[e] });
- var values = Object.keys(row).map(function(e) { if(e!=="simulatorId"){ return row[e];} else return undefined });
-
-
+ {props.data.map((row, index) => {
+ var values = Object.keys(row).map(function(e) { return row[e] });
return (
<TableRow aria-label={props.ariaLabel} key={index} hover={props.hover} onMouseOver={e => handleHover(e,row.name)} onClick={ e => handleClick(e, row.name)}>
@@ -96,14 +89,11 @@ const DenseTable: React.FunctionComponent<props> = (props) => {
props.actions && <TableCell >
<div style={{display:"flex"}}>
- <Tooltip title="Connect">
- <Button className={classes.button} disabled={true} onClick={(e: any) =>{ e.preventDefault(); e.stopPropagation(); props.navigate && props.navigate("connect", row.simulatorId ? row.simulatorId : row.name)}}>C</Button>
- </Tooltip>
<Tooltip title="Configure">
- <Button className={classes.button} disabled={true} onClick={(e: any) =>{ e.preventDefault(); e.stopPropagation(); props.navigate && props.navigate("configuration", row.simulatorId ? row.simulatorId : row.name)}}>C</Button>
+ <Button className={classes.button} disabled={row.status!=="connected"} onClick={(e: any) =>{ e.preventDefault(); e.stopPropagation(); props.navigate && props.navigate("configuration", row.name)}}>C</Button>
</Tooltip>
<Tooltip title="Fault">
- <Button className={classes.button} disabled={true} onClick={(e: any) =>{ e.preventDefault(); e.stopPropagation(); props.navigate && props.navigate("fault", row.simulatorId ? row.simulatorId : row.name)}}>F</Button>
+ <Button className={classes.button} disabled={row.status!=="connected"} onClick={(e: any) =>{ e.preventDefault(); e.stopPropagation(); props.navigate && props.navigate("fault", row.name)}}>F</Button>
</Tooltip>
</div>
</TableCell>