1 /*******************************************************************************
2 * Copyright (c) 2016 AT&T Intellectual Property. All rights reserved.
3 *******************************************************************************/
4 package com.att.authz.gui.pages;
6 import static com.att.xgen.html.HTMLGen.A;
7 import static com.att.xgen.html.HTMLGen.H3;
9 import java.io.IOException;
11 import com.att.authz.gui.AuthGUI;
12 import com.att.authz.gui.NamedCode;
13 import com.att.authz.gui.Page;
14 import com.att.inno.env.APIException;
15 import com.att.xgen.Cache;
16 import com.att.xgen.Mark;
17 import com.att.xgen.html.HTMLGen;
20 public class Home extends Page {
21 public static final String HREF = "/gui/home";
22 public Home(final AuthGUI gui) throws APIException, IOException {
23 super(gui.env,"Home",HREF, NO_FIELDS, new NamedCode(false,"content") {
25 public void code(final Cache<HTMLGen> cache, final HTMLGen xgen) throws APIException, IOException {
27 // JSGen jsg = xgen.js();
28 // jsg.function("httpPost","sURL","sParam")
29 // .text("var oURL = new java.net.URL(sURL)")
30 // .text("var oConn = oURL.openConnection();")
31 // .text("oConn.setDoInput(true);")
32 // .text("oConn.setDoOutpu(true);")
33 // .text("oConn.setUseCaches(false);")
34 // .text("oConn.setRequestProperty(\"Content-Type\",\"application/x-www-form-urlencoded\");")
38 final Mark pages = xgen.divID("Pages");
39 xgen.leaf(H3).text("Choose from the following:").end()
40 .leaf(A,"href=myperms").text("My Permissions").end()
41 .leaf(A,"href=myroles").text("My Roles").end()
42 // TODO: uncomment when on cassandra 2.1.2 for MyNamespace GUI page
43 .leaf(A,"href=mynamespaces").text("My Namespaces").end()
44 .leaf(A,"href=approve").text("My Approvals").end()
45 .leaf(A, "href=myrequests").text("My Pending Requests").end()
47 // .leaf(A, "href=onboard").text("Onboarding").end()
48 // Password Change. If logged in as CSP/GSO, go to their page
49 .leaf(A,"href=passwd").text("Password Management").end()
50 .leaf(A,"href=cui").text("Command Prompt").end()
51 .leaf(A,"href=api").text("AAF API").end()