[PORTAL-7] Rebase
[portal.git] / ecomp-portal-BE-common / src / main / webapp / WEB-INF / jsp / login.jsp
1 <%--\r
2   ================================================================================\r
3   ECOMP Portal\r
4   ================================================================================\r
5   Copyright (C) 2017 AT&T Intellectual Property\r
6   ================================================================================\r
7   Licensed under the Apache License, Version 2.0 (the "License");\r
8   you may not use this file except in compliance with the License.\r
9   You may obtain a copy of the License at\r
10   \r
11        http://www.apache.org/licenses/LICENSE-2.0\r
12   \r
13   Unless required by applicable law or agreed to in writing, software\r
14   distributed under the License is distributed on an "AS IS" BASIS,\r
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16   See the License for the specific language governing permissions and\r
17   limitations under the License.\r
18   ================================================================================\r
19   --%>\r
20 <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>\r
21 <%@ taglib prefix="c"      uri="http://java.sun.com/jsp/jstl/core" %>\r
22 <%@ page import="java.net.URLEncoder" %>\r
23 <%@ page import="org.openecomp.portalsdk.core.util.SystemProperties" %>\r
24 <!DOCTYPE html>\r
25 <html ng-app="abs">\r
26         <head>\r
27                 <meta charset="utf-8">\r
28                 <meta http-equiv="X-UA-Compatible" content="IE=edge">\r
29                 <meta name="viewport" content="width=device-width, initial-scale=1"> \r
30         <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->\r
31                 <link rel="stylesheet" type="text/css" href="static/ebz/fn-ebz.css" >\r
32                 <link rel="stylesheet" type="text/css" href="static/ebz/sandbox/styles/style.css" >\r
33                 <script src="static/js/jquery-1.10.2.js" type="text/javascript"></script>\r
34                 <script src= "static/ebz/angular_js/angular.js"></script> \r
35                 <script src= "static/ebz/angular_js/angular-sanitize.js"></script>\r
36                 <script src= "static/ebz/angular_js/att_abs_tpls.js"></script>\r
37                 <script src= "static/ebz/angular_js/app.js"></script>\r
38                 <script src= "static/ebz/angular_js/gestures.js"></script>\r
39                 <script src="static/js/modalService.js"></script>\r
40                 <style>\r
41                         .terms {\r
42                                 font-family: Verdana,Arial,Helvetica, sans-serif;\r
43                                 font-size: 12px;\r
44                         }\r
45                 </style>\r
46         </head>\r
47         <body style="padding-top: 15px;display: none;">\r
48         <% \r
49        String returnUrl = request.getParameter("returnUrl");\r
50            String redirectUrl = request.getParameter("redirectUrl");\r
51        returnUrl = ((returnUrl == null) ? (request.isSecure() ?"https://":"http://") + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/process_csp" + "?redirectUrl=" + redirectUrl: URLEncoder.encode(returnUrl));\r
52      %>\r
53      <c:set var="returnUrl"       value="<%=returnUrl%>"/>\r
54      <c:set var="cspLoginUrl"     value="<%=SystemProperties.getProperty(SystemProperties.CSP_LOGIN_URL)%>"/>\r
55         <div ng-controller="loginController">\r
56                 <!-- AT&T Logo -->\r
57                 <div style="position: fixed; left:15px; top:15px; ">\r
58                 <img src="static/fusion/images/logo_att_header.jpg" alt="AT&T" />\r
59         </div>\r
60                 <div class="centered style="-webkit-transform: translateZ(0);background:white, z-index:0;">\r
61                         <div class="centered" style="height:15px">\r
62                                 <div class="centered">\r
63                                 <div align="center" style="display: block;margin-left: auto;margin-right: auto;width: 100%;">\r
64                                         <img src="static/fusion/images/ecomp-login.jpg" height="250"/>\r
65                                         <br>\r
66                                         <font class="headerText">\r
67                                 <a id="goUrl" href="${cspLoginUrl}"><b>Click here to login</b></a>\r
68                             </font>             \r
69                                 </div>\r
70                                 <br />\r
71                                 <br />\r
72                         </div>\r
73                 </div>\r
74                                 <br/><br/><br/><br/><br/><br/><br/><br/>\r
75                 <div id="footer" style="margin-top:300px">\r
76                         <div style="margin-left:auto;margin-right:auto;text-align: center;">\r
77                                 <p><font class="terms">\r
78                                         <b>Warning:</b> This system is restricted to AT&T authorized users for business purposes. \r
79                                         Unauthorized access is a violation of the law. \r
80                                         <br>\r
81                                         This service may be monitored for administrative and security reasons. \r
82                                         By proceeding, you consent to this monitoring.\r
83                                 </font></p>\r
84                         </div>  \r
85                         <div class="terms" style="text-align: center;">\r
86                                 <a target="_top" href="http://www.att.com/terms/">Terms and Conditions</a> | \r
87                                 <a target="_top" href="http://www.att.com/privacy/">Privacy Policy</a>.\r
88                                 <br><span>&#169; 2017 AT&amp;T.  All rights reserved.</span>\r
89                     </div>\r
90                 </div>\r
91     </div>\r
92     </body>\r
93 <script>\r
94                 function getParameterByName(name, url) {\r
95                     if (!url) url = window.location.href;\r
96                     name = name.replace(/[\[\]]/g, "\\$&");\r
97                     var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),\r
98                         results = regex.exec(url);\r
99                     if (!results) return '';\r
100                     if (!results[2]) return '';\r
101                     return (results[2].replace(/\+/g, " "));\r
102                 }\r
103                 \r
104                 var winHref = window.location.href;\r
105                 var appPathIndex = winHref.substring(0,winHref.lastIndexOf(".htm")).lastIndexOf("/");\r
106                 var goUrl =winHref.substring(0,appPathIndex+1) + "process_csp" + "?redirectUrl=" + getParameterByName('redirectUrl') ;\r
107                 document.getElementById("goUrl").href = document.getElementById("goUrl").href + goUrl; \r
108                 if(getParameterByName('skipClick')=="Yes"){\r
109                         document.getElementById("goUrl").click();\r
110                 }else{\r
111                         $("body").show();\r
112                 }\r
113                 \r
114 </script>\r
115 <script>\r
116 app.controller("loginController", function ($scope) { \r
117         \r
118 });\r
119 </script>\r
120 </html>\r