X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-gui%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fgui%2Fpages%2FNsDetail.java;h=6b1c61202a098c2cc212f342e87c1aeae369b3ce;hb=2c3cb70208785cf0272eae075206074318ca74cc;hp=faf657e7f5c1f2a59983911d6b80746eaf8859cc;hpb=4b5a7d721d994a49057e9bfb403c7bff1b376660;p=aaf%2Fauthz.git diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsDetail.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsDetail.java index faf657e7..6b1c6120 100644 --- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsDetail.java +++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsDetail.java @@ -65,7 +65,7 @@ public class NsDetail extends Page { private static final String BLANK = ""; private static Slot keySlot; private static Model model; - private static String gw_url; + private static String locate_url; public NsDetail(final AAF_GUI gui, Page ... breadcrumbs) throws APIException, IOException { @@ -75,11 +75,11 @@ public class NsDetail extends Page { ); model.set(this); keySlot = gui.env.slot(NAME+".ns"); - gw_url = gui.env.getProperty(Config.GW_URL); - if(gw_url==null) { - gw_url=""; + locate_url = gui.env.getProperty(Config.AAF_LOCATE_URL); + if (locate_url==null) { + locate_url=""; } else { - gw_url+="/aaf/2.0"; + locate_url+="/aaf/"+Config.AAF_DEFAULT_API_VERSION; } } @@ -101,12 +101,12 @@ public class NsDetail extends Page { final String nsName = trans.get(keySlot, null); Validator v = new Validator(); v.ns(nsName); - if(v.err()) { + if (v.err()) { trans.warn().printf("Error in NsDetail Request: %s", v.errs()); return Cells.EMPTY; } - if(nsName==null) { + if (nsName==null) { return Cells.EMPTY; } final ArrayList rv = new ArrayList<>(); @@ -119,12 +119,12 @@ public class NsDetail extends Page { public Void code(Rcli client) throws CadiException, ConnectException, APIException { Future fn = client.read("/authz/nss/"+nsName,gui.getDF(Nss.class)); - if(fn.get(AAF_GUI.TIMEOUT)) { + if (fn.get(AAF_GUI.TIMEOUT)) { tt.done(); try { // TimeTaken tt = trans.start("Load Data", Env.SUB); - for(Ns n : fn.value.getNs()) { + for (Ns n : fn.value.getNs()) { String desc = (n.getDescription()!=null?n.getDescription():BLANK); rv.add(new AbsCell[]{new TextCell("Description:"),new TextCell(desc)}); @@ -145,7 +145,7 @@ public class NsDetail extends Page { gui.getDF(Roles.class) ); List roles = new ArrayList<>(); - if(fr.get(AAFcli.timeout())) { + if (fr.get(AAFcli.timeout())) { for (Role r : fr.value.getRole()) { roles.add(r.getName()); } @@ -159,7 +159,7 @@ public class NsDetail extends Page { ); List perms = new ArrayList<>(); - if(fp.get(AAFcli.timeout())) { + if (fp.get(AAFcli.timeout())) { for (Perm p : fp.value.getPerm()) { perms.add(p.getType() + "|" + p.getInstance() + "|" + p.getAction()); } @@ -168,7 +168,7 @@ public class NsDetail extends Page { } String historyLink = NsHistory.HREF + "?name=" + nsName; - rv.add(new AbsCell[] {new RefCell("See History",historyLink,false)}); + rv.add(new AbsCell[] {new RefCell("See History",historyLink,false,"class=greenbutton")}); } finally { tt.done(); } @@ -217,7 +217,7 @@ public class NsDetail extends Page { AbsCell label = (i==0?new TextCell(sentenceCase(field)+":","style=width:20%"):AbsCell.Null); String perm = values.get(i); String[] fields = perm.split("\\|"); - String grantLink = gw_url + String grantLink = locate_url + PermGrantForm.HREF + "?type=" + fields[0].trim() + "&instance=" + fields[1].trim()