diff options
Diffstat (limited to 'src/main/resources/META-INF')
6 files changed, 8 insertions, 118 deletions
diff --git a/src/main/resources/META-INF/resources/designer/invalid_login.html b/src/main/resources/META-INF/resources/designer/invalid_login.html index 5d6e955b7..eb7d828a9 100644 --- a/src/main/resources/META-INF/resources/designer/invalid_login.html +++ b/src/main/resources/META-INF/resources/designer/invalid_login.html @@ -32,9 +32,9 @@ <head> <title>CLDS</title> </head> -<div> +<div id='main'> <div class="divRow"><b>Login Failed!</b></div> - <div class="divRow"><b>You are not authorized to access CLAMP UI, please contact CLAMP administrator.</b></div> - - <div class="divRow">To login again, please click <a href="/designer/index.html"/>Login</a></div> + <div class="divRow">You are not authorized to access CLAMP UI, please contact CLAMP administrator.</div> + <div class="divRow">Please <a href="/designer/index.html"/>Login</a> again.</div> +</div> </div> diff --git a/src/main/resources/META-INF/resources/designer/logout.html b/src/main/resources/META-INF/resources/designer/logout.html deleted file mode 100644 index e17592868..000000000 --- a/src/main/resources/META-INF/resources/designer/logout.html +++ /dev/null @@ -1,40 +0,0 @@ -<!-- - ============LICENSE_START======================================================= - ONAP CLAMP - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights - reserved. - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ============LICENSE_END============================================ - =================================================================== - - --> -<style> -.divRow { - margin-left: 5px; - font-size: 13px; - font-weight: normal; - margin-top:10px; -} -</style> - -<head> - <title>CLDS</title> -</head> -<div ng-controller="AuthenticateCtrl" ng-init="logout()"> - <div id='main'> - <div class="divRow"><b>You have been Logged Out successfully!</b></div> - <div class="divRow">To login again, please click <a href="/designer/index.html"/>Login</a></div> - </div> -</div> diff --git a/src/main/resources/META-INF/resources/designer/partials/menu.html b/src/main/resources/META-INF/resources/designer/partials/menu.html index 2aea31672..036402caf 100644 --- a/src/main/resources/META-INF/resources/designer/partials/menu.html +++ b/src/main/resources/META-INF/resources/designer/partials/menu.html @@ -141,12 +141,6 @@ id="{{section.name}}" role="presentation" ng-click="emptyMenuClick(section.link,section.name)">{{section.name}}</a> </li> - - <li ng-repeat="section in tabs[dropDownName]" - ng-if="section.name==='Log Out'"><a - id="{{section.name}}" role="presentation" - ng-click="emptyMenuClick(section.link,section.name)">{{section.name}}</a> - </li> <li ng-repeat="section in tabs[dropDownName]" ng-if="section.name != 'Create CL' && section.name != 'Open CL' && section.name != 'ECOMP User Guide - Design Overview' && section.name != 'ECOMP User Guide - Closed Loop Design' && section.name != 'ECOMP User Guide - CLAMP' && section.name != 'User Info'"><a diff --git a/src/main/resources/META-INF/resources/designer/scripts/app.js b/src/main/resources/META-INF/resources/designer/scripts/app.js index 63d44d551..7953ccc6e 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/app.js +++ b/src/main/resources/META-INF/resources/designer/scripts/app.js @@ -325,8 +325,6 @@ var app = angular.module('clds-app', ['ngRoute', window.open(value); } else if (name == "Contact Us") { $rootScope.contactUs(); - } else if (name == "Log Out") { - $scope.logout(); } else if (name == "Revert Model Changes") { $scope.cldsRevertModel(); } else if (name == "Close Model") { @@ -446,10 +444,6 @@ var app = angular.module('clds-app', ['ngRoute', }, { link: "/extraUserInfo", name: "User Info" - }], - "Log Out": [{ - link: "/log_out.html", - name: "Log Out" }] }; @@ -1416,4 +1410,5 @@ function updateDecisionLabel(originalLabel, newLabel) { window.onunload = function() { window.localStorage.removeItem("isAuth"); window.localStorage.removeItem("loginuser"); + window.localStorage.removeItem("invalidUser"); }; diff --git a/src/main/resources/META-INF/resources/designer/scripts/authcontroller.js b/src/main/resources/META-INF/resources/designer/scripts/authcontroller.js index c1a52f9b1..5992138bf 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/authcontroller.js +++ b/src/main/resources/META-INF/resources/designer/scripts/authcontroller.js @@ -30,7 +30,7 @@ function AuthenticateCtrl($scope, $rootScope, $window, $resource, $http, $locati var invalidUser = $window.localStorage.getItem("invalidUser"); var isAuth = $window.localStorage.getItem("isAuth"); if (invalidUser == 'true') - return "invalid_login.html"; + return "invalid_login.html"; else if (isAuth == null || isAuth == 'false') { return "authenticate.html"; } @@ -44,17 +44,13 @@ function AuthenticateCtrl($scope, $rootScope, $window, $resource, $http, $locati if (data) { $window.localStorage.setItem("isAuth", true); $rootScope.loginuser = data; - } + } + window.localStorage.removeItem("invalidUser"); callback && callback(); }).error(function() { $window.localStorage.setItem("invalidUser", true); callback && callback(); }); }; - - $scope.logout = function() { - window.localStorage.removeItem("isAuth"); - window.localStorage.removeItem("loginuser"); - }; } diff --git a/src/main/resources/META-INF/resources/designer/timeout.html b/src/main/resources/META-INF/resources/designer/timeout.html deleted file mode 100644 index ce3002b22..000000000 --- a/src/main/resources/META-INF/resources/designer/timeout.html +++ /dev/null @@ -1,55 +0,0 @@ -<!-- - ============LICENSE_START======================================================= - ONAP CLAMP - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights - reserved. - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ============LICENSE_END============================================ - =================================================================== - - --> -<style> -.divRow { - margin-left: 5px; - font-size: 13px; - font-weight: normal; - margin-top:10px; -} -</style> - -<head> - <title>CLDS</title> - <script language="javascript"> - function buttonVilibility() - { - if (window.opener && window.opener !== window) { - document.getElementById("boton1").style.visibility="visible"; - } else { - document.getElementById("boton1").style.visibility="hidden"; - } - } - </script> -</head> -<body onload='buttonVilibility()'> -<div ng-controller="AuthenticateCtrl" ng-init="logout()"> - <div id='main'> - <div class="divRow"><b>Your session is timeout.</b></div> - <div class="divRow">Please <a href="/designer/index.html"/>Login</a> again.</div> - </div> - <div> - <button id="boton1" ng-click="close(true)" class="btn btn-primary">Close</button> - </div> -</div> -</body> |