From e4a4b56799d773d033ae2ef57a19891cd384de32 Mon Sep 17 00:00:00 2001 From: statta Date: Thu, 16 Jul 2020 14:23:01 -0400 Subject: Dynamic context determination via basehref Issue-ID: PORTAL-949 Change-Id: Ia30876f51edd4a48633769c5a01f3646ca7fb9b2 Signed-off-by: statta --- ecomp-sdk/epsdk-app-os/ngappsrc/angular.json | 1 - ecomp-sdk/epsdk-app-os/ngappsrc/src/ngwelcome.html | 28 +++++++++++++++++++++- .../onboarding/listener/PortalTimeoutHandler.java | 10 ++++---- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/ecomp-sdk/epsdk-app-os/ngappsrc/angular.json b/ecomp-sdk/epsdk-app-os/ngappsrc/angular.json index 02ce9452..64b13511 100644 --- a/ecomp-sdk/epsdk-app-os/ngappsrc/angular.json +++ b/ecomp-sdk/epsdk-app-os/ngappsrc/angular.json @@ -12,7 +12,6 @@ "build": { "builder": "@angular-devkit/build-angular:browser", "options": { - "baseHref": "/ONAPPORTALSDK/", "outputPath": "dist", "index": "src/ngwelcome.html", "main": "src/main.ts", diff --git a/ecomp-sdk/epsdk-app-os/ngappsrc/src/ngwelcome.html b/ecomp-sdk/epsdk-app-os/ngappsrc/src/ngwelcome.html index d290b96f..b85e25d2 100644 --- a/ecomp-sdk/epsdk-app-os/ngappsrc/src/ngwelcome.html +++ b/ecomp-sdk/epsdk-app-os/ngappsrc/src/ngwelcome.html @@ -39,9 +39,35 @@ + + Portal SDK - diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/listener/PortalTimeoutHandler.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/listener/PortalTimeoutHandler.java index 1b3c79c0..90c39b52 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/listener/PortalTimeoutHandler.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/listener/PortalTimeoutHandler.java @@ -84,7 +84,8 @@ public class PortalTimeoutHandler { String sessionSlot = SessionCommunicationService.getSessionSlotCheckInterval(ecompRestURL, userName, pwd, uebKey); if (sessionSlot == null) - return null; + sessionSlot = "30000"; // default to 5 minutes + return Integer.parseInt(sessionSlot); } @@ -341,18 +342,19 @@ public class PortalTimeoutHandler { Object portalSessionSlotCheckObj = session.getServletContext() .getAttribute(PortalApiConstants.PORTAL_SESSION_SLOT_CHECK); - Integer portalSessionSlotCheckinMilliSec = 5 * 60 * 1000; // (5 minutes) + Integer portalSessionSlotCheckinMilliSec = 0; if (portalSessionSlotCheckObj != null) { portalSessionSlotCheckinMilliSec = Integer.valueOf(portalSessionSlotCheckObj.toString()); } else { portalSessionSlotCheckObj = _sessionComm .fetchSessionSlotCheckInterval(new String[] { ecompRestURL, userName, pwd, uebKey }); - logger.debug("Fetching Portal Session Slot Object: " + portalSessionSlotCheckObj); + logger.debug("Fetched Portal Session Slot Object: " + portalSessionSlotCheckObj); + if (portalSessionSlotCheckObj != null) { portalSessionSlotCheckinMilliSec = Integer.valueOf(portalSessionSlotCheckObj.toString()); session.getServletContext().setAttribute(PortalApiConstants.PORTAL_SESSION_SLOT_CHECK, portalSessionSlotCheckinMilliSec); - } + } } Object previousToLastAccessTimeObj = session.getAttribute(PortalApiConstants.SESSION_PREVIOUS_ACCESS_TIME); -- cgit 1.2.3-korg