Update ODLUX 84/135884/1
authorsai-neetha <sai-neetha.phulmali@highstreet-technologies.com>
Thu, 31 Aug 2023 10:27:17 +0000 (12:27 +0200)
committersai-neetha <sai-neetha.phulmali@highstreet-technologies.com>
Thu, 31 Aug 2023 10:30:00 +0000 (12:30 +0200)
Update odlux to latest

Issue-ID: CCSDK-3933
Change-Id: I40ed806955c46295c5f2c36d74964a6045576662
Signed-off-by: sai-neetha <sai-neetha.phulmali@highstreet-technologies.com>
sdnr/wt/odlux/apps/configurationApp/src/actions/deviceActions.ts
sdnr/wt/odlux/framework/pom.xml
sdnr/wt/odlux/framework/src/services/authenticationService.ts
sdnr/wt/odlux/odlux.properties

index 5213713..d8ec4bf 100644 (file)
@@ -193,29 +193,36 @@ export const updateViewActionAsyncCreator = (vPath: string) => async (dispatch:
             }));
           } else {
             // Found a list at root level of a module w/o a reference key.
-            dataPath += `?content=config&fields=${encodeURIComponent(viewElement.id)}(${encodeURIComponent(viewElement.key || '')})`; 
+            dataPath += `?&fields=${encodeURIComponent(viewElement.id)}(${encodeURIComponent(viewElement.key || '')})`; 
             const restResult = (await restService.getConfigData(dataPath));
             if (restResult && restResult.status === 200 && restResult.data && restResult.data[viewElement.id] ) {
               // spoof the not existing view here
               const refData = restResult.data[viewElement.id];
-              const refView : ViewSpecification  = {
-                id: '-1',
-                canEdit: false,
-                config: false,
-                language: 'en-US',
-                elements: {
-                  [viewElement.key!] : { 
-                    uiType: 'string',
-                    config: false,
-                    id: viewElement.key,
-                    label: viewElement.key,
-                    isList: true,
-                  } as ViewElementString,
-                },
-              };
-              dispatch(new EnableValueSelector(refView, refData, viewElement.key!, (refKey) => {
-                window.setTimeout(() => dispatch(new PushAction(`${vPath}[${refKey.replace(/\//ig, '%2F')}]`))); 
-              }));
+              if (!Array.isArray(refData) || !refData.length) {
+                throw new Error('Found a list at root level of a module containing no keys.');
+              }
+              if (refData.length > 1) {
+                const refView : ViewSpecification  = {
+                  id: '-1',
+                  canEdit: false,
+                  config: false,
+                  language: 'en-US',
+                  elements: {
+                    [viewElement.key!] : { 
+                      uiType: 'string',
+                      config: false,
+                      id: viewElement.key,
+                      label: viewElement.key,
+                      isList: true,
+                    } as ViewElementString,
+                  },
+                };
+                dispatch(new EnableValueSelector(refView, refData, viewElement.key!, (refKey) => {
+                  window.setTimeout(() => dispatch(new PushAction(`${vPath}[${refKey.replace(/\//ig, '%2F')}]`))); 
+                }));
+              } else {
+                window.setTimeout(() => dispatch(new PushAction(`${vPath}[${refData[0]?.id.replace(/\//ig, '%2F')}]`))); 
+              }
             } else {
               throw new Error('Found a list at root level of a module and could not determine the keys.');
             }
index d0dee60..1146f59 100644 (file)
@@ -45,7 +45,7 @@
     <properties>
         <buildtime>${maven.build.timestamp}</buildtime>
         <distversion>ONAP Frankfurt (Neon, mdsal ${odl.mdsal.version})</distversion>
-        <buildno>188.1b12eac8(23/06/30)</buildno>
+        <buildno>190.d02fb971(23/08/31)</buildno>
         <odlux.version>ONAP SDN-R | ONF Wireless for ${distversion} - Build: ${buildtime} ${buildno} ${project.version}</odlux.version>
     </properties>
 
index 39f407e..b9c1a5a 100644 (file)
@@ -87,8 +87,7 @@ class AuthenticationService {
   }
 
   public async getServerReadyState(){
-
-    const result = await fetch("/ready", {method: "GET"});
+    const result = await requestRestExt(`/ready`, { method: "GET" }, false);
     return result.status == (200 || 304) ? true : false;
   }
 }
index 2291f6b..b9b3ac3 100644 (file)
@@ -1,5 +1,5 @@
-odlux.framework.buildno=188.1b12eac8(23/06/30)
-odlux.apps.configurationApp.buildno=188.1b12eac8(23/06/30)
+odlux.framework.buildno=190.d02fb971(23/08/31)
+odlux.apps.configurationApp.buildno=189.430945bc(23/08/04)
 odlux.apps.connectApp.buildno=172.52348b7c(23/02/16)
 odlux.apps.eventLogApp.buildno=172.52348b7c(23/02/16)
 odlux.apps.faultApp.buildno=188.1b12eac8(23/06/30)