[PORTAL-7] Rebase
[portal.git] / ecomp-portal-BE-common / src / main / webapp / WEB-INF / jsp / login.jsp
diff --git a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/jsp/login.jsp b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/jsp/login.jsp
new file mode 100644 (file)
index 0000000..e10ba62
--- /dev/null
@@ -0,0 +1,120 @@
+<%--\r
+  ================================================================================\r
+  ECOMP Portal\r
+  ================================================================================\r
+  Copyright (C) 2017 AT&T Intellectual Property\r
+  ================================================================================\r
+  Licensed under the Apache License, Version 2.0 (the "License");\r
+  you may not use this file except in compliance with the License.\r
+  You may obtain a copy of the License at\r
+  \r
+       http://www.apache.org/licenses/LICENSE-2.0\r
+  \r
+  Unless required by applicable law or agreed to in writing, software\r
+  distributed under the License is distributed on an "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+  See the License for the specific language governing permissions and\r
+  limitations under the License.\r
+  ================================================================================\r
+  --%>\r
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>\r
+<%@ taglib prefix="c"      uri="http://java.sun.com/jsp/jstl/core" %>\r
+<%@ page import="java.net.URLEncoder" %>\r
+<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties" %>\r
+<!DOCTYPE html>\r
+<html ng-app="abs">\r
+       <head>\r
+               <meta charset="utf-8">\r
+               <meta http-equiv="X-UA-Compatible" content="IE=edge">\r
+               <meta name="viewport" content="width=device-width, initial-scale=1"> \r
+       <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->\r
+               <link rel="stylesheet" type="text/css" href="static/ebz/fn-ebz.css" >\r
+               <link rel="stylesheet" type="text/css" href="static/ebz/sandbox/styles/style.css" >\r
+               <script src="static/js/jquery-1.10.2.js" type="text/javascript"></script>\r
+               <script src= "static/ebz/angular_js/angular.js"></script> \r
+               <script src= "static/ebz/angular_js/angular-sanitize.js"></script>\r
+               <script src= "static/ebz/angular_js/att_abs_tpls.js"></script>\r
+               <script src= "static/ebz/angular_js/app.js"></script>\r
+               <script src= "static/ebz/angular_js/gestures.js"></script>\r
+               <script src="static/js/modalService.js"></script>\r
+               <style>\r
+                       .terms {\r
+                               font-family: Verdana,Arial,Helvetica, sans-serif;\r
+                               font-size: 12px;\r
+                       }\r
+               </style>\r
+       </head>\r
+       <body style="padding-top: 15px;display: none;">\r
+       <% \r
+       String returnUrl = request.getParameter("returnUrl");\r
+          String redirectUrl = request.getParameter("redirectUrl");\r
+       returnUrl = ((returnUrl == null) ? (request.isSecure() ?"https://":"http://") + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/process_csp" + "?redirectUrl=" + redirectUrl: URLEncoder.encode(returnUrl));\r
+     %>\r
+     <c:set var="returnUrl"       value="<%=returnUrl%>"/>\r
+     <c:set var="cspLoginUrl"     value="<%=SystemProperties.getProperty(SystemProperties.CSP_LOGIN_URL)%>"/>\r
+       <div ng-controller="loginController">\r
+               <!-- AT&T Logo -->\r
+               <div style="position: fixed; left:15px; top:15px; ">\r
+               <img src="static/fusion/images/logo_att_header.jpg" alt="AT&T" />\r
+        </div>\r
+               <div class="centered style="-webkit-transform: translateZ(0);background:white, z-index:0;">\r
+                       <div class="centered" style="height:15px">\r
+                               <div class="centered">\r
+                               <div align="center" style="display: block;margin-left: auto;margin-right: auto;width: 100%;">\r
+                                       <img src="static/fusion/images/ecomp-login.jpg" height="250"/>\r
+                                       <br>\r
+                                       <font class="headerText">\r
+                               <a id="goUrl" href="${cspLoginUrl}"><b>Click here to login</b></a>\r
+                           </font>             \r
+                               </div>\r
+                               <br />\r
+                               <br />\r
+                       </div>\r
+               </div>\r
+                               <br/><br/><br/><br/><br/><br/><br/><br/>\r
+               <div id="footer" style="margin-top:300px">\r
+                       <div style="margin-left:auto;margin-right:auto;text-align: center;">\r
+                               <p><font class="terms">\r
+                                       <b>Warning:</b> This system is restricted to AT&T authorized users for business purposes. \r
+                                       Unauthorized access is a violation of the law. \r
+                                       <br>\r
+                                       This service may be monitored for administrative and security reasons. \r
+                                       By proceeding, you consent to this monitoring.\r
+                               </font></p>\r
+                       </div>  \r
+                       <div class="terms" style="text-align: center;">\r
+                               <a target="_top" href="http://www.att.com/terms/">Terms and Conditions</a> | \r
+                               <a target="_top" href="http://www.att.com/privacy/">Privacy Policy</a>.\r
+                               <br><span>&#169; 2017 AT&amp;T.  All rights reserved.</span>\r
+                   </div>\r
+               </div>\r
+    </div>\r
+    </body>\r
+<script>\r
+               function getParameterByName(name, url) {\r
+                   if (!url) url = window.location.href;\r
+                   name = name.replace(/[\[\]]/g, "\\$&");\r
+                   var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),\r
+                       results = regex.exec(url);\r
+                   if (!results) return '';\r
+                   if (!results[2]) return '';\r
+                   return (results[2].replace(/\+/g, " "));\r
+               }\r
+               \r
+               var winHref = window.location.href;\r
+               var appPathIndex = winHref.substring(0,winHref.lastIndexOf(".htm")).lastIndexOf("/");\r
+               var goUrl =winHref.substring(0,appPathIndex+1) + "process_csp" + "?redirectUrl=" + getParameterByName('redirectUrl') ;\r
+               document.getElementById("goUrl").href = document.getElementById("goUrl").href + goUrl; \r
+               if(getParameterByName('skipClick')=="Yes"){\r
+                       document.getElementById("goUrl").click();\r
+               }else{\r
+                       $("body").show();\r
+               }\r
+               \r
+</script>\r
+<script>\r
+app.controller("loginController", function ($scope) { \r
+       \r
+});\r
+</script>\r
+</html>\r