Remove Tabs, per Jococo
[aaf/authz.git] / auth / auth-gui / src / main / java / org / onap / aaf / auth / gui / pages / Home.java
1 /**
2  * ============LICENSE_START====================================================
3  * org.onap.aaf
4  * ===========================================================================
5  * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
6  * ===========================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END====================================================
19  *
20  */
21
22 package org.onap.aaf.auth.gui.pages;
23
24 import static org.onap.aaf.misc.xgen.html.HTMLGen.A;
25 import static org.onap.aaf.misc.xgen.html.HTMLGen.H3;
26
27 import java.io.IOException;
28
29 import org.onap.aaf.auth.gui.AAF_GUI;
30 import org.onap.aaf.auth.gui.NamedCode;
31 import org.onap.aaf.auth.gui.Page;
32 import org.onap.aaf.misc.env.APIException;
33 import org.onap.aaf.misc.xgen.Cache;
34 import org.onap.aaf.misc.xgen.Mark;
35 import org.onap.aaf.misc.xgen.html.HTMLGen;
36
37
38 public class Home extends Page {
39     public static final String HREF = "/gui/home";
40     
41     public Home(final AAF_GUI gui) throws APIException, IOException {
42         super(gui.env,"Home",HREF, NO_FIELDS, new NamedCode(false,"content") {
43             @Override
44             public void code(final Cache<HTMLGen> cache, final HTMLGen htmlGen) throws APIException, IOException {
45 //                // TEMP
46 //                JSGen jsg = xgen.js();
47 //                jsg.function("httpPost","sURL","sParam")
48 //                    .text("var oURL = new java.net.URL(sURL)")
49 //                    .text("var oConn = oURL.openConnection();")
50 //                    .text("oConn.setDoInput(true);")
51 //                    .text("oConn.setDoOutpu(true);")
52 //                    .text("oConn.setUseCaches(false);")
53 //                    .text("oConn.setRequestProperty(\"Content-Type\",\"application/x-www-form-urlencoded\");")
54 //                    .text(text)
55 //                jsg.done();
56                 // TEMP
57                 final Mark pages = htmlGen.divID("Pages");
58                 htmlGen.leaf(H3).text("Choose from the following:").end();
59                 for(String[] mi : MENU_ITEMS) {
60                     htmlGen.leaf(A,"href="+mi[0]).text(mi[1]).end();
61                 }
62                 htmlGen.end(pages);
63             }
64         });
65     }
66     
67 }