From f6f44f558ce4f04605269f71a10d6df054295f6a Mon Sep 17 00:00:00 2001 From: Instrumental Date: Thu, 27 Jun 2019 07:48:27 -0500 Subject: SONAR flagged fixes Issue-ID: AAF-857 Change-Id: I0b2d6b985fd7f8abc3d133d6db37865aa300e75f Signed-off-by: Instrumental --- .../src/main/java/org/onap/aaf/auth/gui/Page.java | 19 ++++++++++++++++++- .../main/java/org/onap/aaf/auth/gui/pages/Home.java | 16 ---------------- 2 files changed, 18 insertions(+), 17 deletions(-) (limited to 'auth/auth-gui/src/main') diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java index 243e66b8..9abd5ee0 100644 --- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java +++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java @@ -92,6 +92,23 @@ public class Page extends HTMLCacheGen { // Note: Only access is synchronized in "getPerm" private final static Map> perms = new HashMap<>(); + + /* + * Relative path, Menu Name, Full Path + */ + protected static final String[][] MENU_ITEMS = new String[][] { + {"myperms","My Permissions","/gui/myperms"}, + {"myroles","My Roles","/gui/myroles"}, + {"ns","My Namespaces","/gui/ns"}, + {"approve","My Approvals","/gui/approve"}, + {"myrequests","My Pending Requests","/gui/myrequests"}, + // Enable later + // {"onboard","Onboarding"}, + {"passwd","Password Management","/gui/passwd"}, + {"cui","Command Prompt","/gui/cui"}, + {"api","AAF API","/gui/api"}, + {"clear","Clear Preferences","/gui/clear"} + }; public String name() { return bcName; @@ -426,7 +443,7 @@ public class Page extends HTMLCacheGen { .text("Home") .end(2); boolean noSelection = !selected; - for(String[] mi : Home.MENU_ITEMS) { + for(String[] mi : MENU_ITEMS) { //selected = trans.path().endsWith(mi[0]); if(noSelection) { selected = isSelected(trans.path(),mi[2]); diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/Home.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/Home.java index 463ee11a..73e118a2 100644 --- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/Home.java +++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/Home.java @@ -37,22 +37,6 @@ import org.onap.aaf.misc.xgen.html.HTMLGen; public class Home extends Page { public static final String HREF = "/gui/home"; - /* - * Relative path, Menu Name, Full Path - */ - public static final String[][] MENU_ITEMS = new String[][] { - {"myperms","My Permissions","/gui/myperms"}, - {"myroles","My Roles","/gui/myroles"}, - {"ns","My Namespaces","/gui/ns"}, - {"approve","My Approvals","/gui/approve"}, - {"myrequests","My Pending Requests","/gui/myrequests"}, - // Enable later - // {"onboard","Onboarding"}, - {"passwd","Password Management","/gui/passwd"}, - {"cui","Command Prompt","/gui/cui"}, - {"api","AAF API","/gui/api"}, - {"clear","Clear Preferences","/gui/clear"} - }; public Home(final AAF_GUI gui) throws APIException, IOException { super(gui.env,"Home",HREF, NO_FIELDS, new NamedCode(false,"content") { -- cgit 1.2.3-korg