odlux bugfixes 61/112161/1
authorAijana Schumann <aijana.schumann@highstreet-technologies.com>
Fri, 4 Sep 2020 12:11:52 +0000 (14:11 +0200)
committerAijana Schumann <aijana.schumann@highstreet-technologies.com>
Fri, 4 Sep 2020 12:12:54 +0000 (14:12 +0200)
fix info, guiguttrough not working

fix aria-labels placed wrong

Issue-ID: CCSDK-2732
Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com>
Change-Id: Ic2aafa796fd2471160fa269974aef7767dad6a5c

sdnr/wt/odlux/apps/connectApp/src/models/topologyNetconf.ts
sdnr/wt/odlux/apps/connectApp/src/services/connectService.ts
sdnr/wt/odlux/framework/pom.xml
sdnr/wt/odlux/framework/src/assets/version.json [new file with mode: 0644]
sdnr/wt/odlux/framework/src/components/material-ui/listItemLink.tsx

index 694009d..ef22aab 100644 (file)
@@ -32,5 +32,5 @@ export interface TopologyNode {
 
 export interface Topology {
   "topology-id": string;
-  node: TopologyNode[];
+  "network-topology:node": TopologyNode[];
 }
index 2aa9e39..fbbfa68 100644 (file)
@@ -126,11 +126,11 @@ class ConnectService {
 
   /** Yang capabilities of the selected network elements. */
   public async infoNetworkElement(nodeId: string): Promise<TopologyNode | null> {
-    const path = '/rests/operational/network-topology:network-topology/topology=topology-netconf/node=' + nodeId;
+    const path = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=' + nodeId;
     const topologyRequestPomise = requestRest<Topology>(path, { method: "GET" });
 
     return topologyRequestPomise && topologyRequestPomise.then(result => {
-      return result && result.node && result.node[0] || null;
+      return result && result["network-topology:node"] && result["network-topology:node"][0] || null;
     });
   }
 
@@ -157,25 +157,6 @@ class ConnectService {
     })) || null;
   }
 
-  public async getWebUriExtensionForNetworkElementAsync(ne: string) {
-    const path = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=' + ne + '/yang-ext:mount/core-model:network-element';
-    try {
-      const result = await requestRest<any>(path, { method: "GET" });
-
-      if (result['network-element'].extension) {
-        const webUri = result['network-element'].extension.find((item: any) => item['value-name'] === "webUri")
-        if (webUri) {
-          return webUri.value as string;
-        }
-      }
-    } catch (error) {
-      console.log(ne + ' unrechable: ' + error)
-    }
-
-    return undefined;
-
-  }
-
   public getAllWebUriExtensionsForNetworkElementListAsync(ne: string[]) {
 
     let promises: any[] = [];
@@ -187,9 +168,8 @@ class ConnectService {
       // add search request to array
       promises.push(requestRest<any>(path, { method: "GET" })
         .then(result => {
-
-          if (result != null && result['network-element'] && result['network-element'].extension) {
-            const webUri = result['network-element'].extension.find((item: any) => item['value-name'] === "webUri")
+          if (result != null && result['core-model:network-element'] && result['core-model:network-element'].extension) {
+            const webUri = result['core-model:network-element'].extension.find((item: any) => item['value-name'] === "webUri")
             if (webUri) {
               webUris.push({ webUri: webUri.value, nodeId: nodeId });
             } else {
index a8630ae..5239b2b 100644 (file)
@@ -46,7 +46,7 @@
     <properties>
         <buildtime>${maven.build.timestamp}</buildtime>
         <distversion>ONAP Frankfurt (Neon, mdsal ${odl.mdsal.version})</distversion>
-        <buildno>66.be51a7d(20/09/03)</buildno>
+        <buildno>68.d7886ce(20/09/04)</buildno>
         <odlux.version>ONAP SDN-R | ONF Wireless for ${distversion} - Build: ${buildtime} ${buildno} ${project.version}</odlux.version>
     </properties>
 
diff --git a/sdnr/wt/odlux/framework/src/assets/version.json b/sdnr/wt/odlux/framework/src/assets/version.json
new file mode 100644 (file)
index 0000000..6311e10
--- /dev/null
@@ -0,0 +1,4 @@
+{
+    "version":"68.d7886ce(20/09/04)",
+    "build":"2020-09-04T12:31:19Z"
+}
\ No newline at end of file
index 23bad66..8c4b740 100644 (file)
@@ -42,15 +42,16 @@ export const ListItemLink = withStyles(styles)((props: IListItemLinkProps) => {
   const { icon, primary: Primary, secondary: Secondary, classes, to, exact = false } = props;\r
   const renderLink = (itemProps: any): JSX.Element => (<NavLink exact={ exact } to={ to } activeClassName={ classes.active } { ...itemProps } />);\r
 \r
+  const ariaLabel = typeof Primary === 'string' ? "link-to-"+Primary.toLowerCase().replace(/\s/g, "-") : "link-to-"+Primary.displayName?.toLowerCase();\r
   return (\r
        <>\r
-        <ListItem button component={ renderLink }>\r
+        <ListItem button component={ renderLink } aria-label={ariaLabel}>\r
           { icon\r
             ? <ListItemIcon>{ icon }</ListItemIcon>\r
             : null\r
           }\r
         { typeof Primary === 'string'\r
-          ? <ListItemText aria-label={"link-to-"+Primary.toLowerCase()} primary={ Primary } style={{ padding: 0 }} /> \r
+          ? <ListItemText primary={ Primary } style={{ padding: 0 }} /> \r
           : <Primary />\r
           }\r
         </ListItem>\r