summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-common
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-FE-common')
-rw-r--r--ecomp-portal-FE-common/client/app/router.js2
-rw-r--r--ecomp-portal-FE-common/client/app/views/errors/error.controller.js20
-rw-r--r--ecomp-portal-FE-common/client/app/views/errors/error.tpl.html31
3 files changed, 52 insertions, 1 deletions
diff --git a/ecomp-portal-FE-common/client/app/router.js b/ecomp-portal-FE-common/client/app/router.js
index 190ed579..7a3d3a71 100644
--- a/ecomp-portal-FE-common/client/app/router.js
+++ b/ecomp-portal-FE-common/client/app/router.js
@@ -241,7 +241,7 @@ angular.module('ecompApp')
url: '/error404',
views: {
'content@': {
- templateUrl: 'app/views/errors/error.404.tpl.html',
+ templateUrl: 'app/views/errors/error.tpl.html',
controller: 'ErrorCtrl',
controllerAs: 'error'
}
diff --git a/ecomp-portal-FE-common/client/app/views/errors/error.controller.js b/ecomp-portal-FE-common/client/app/views/errors/error.controller.js
new file mode 100644
index 00000000..5f4f410d
--- /dev/null
+++ b/ecomp-portal-FE-common/client/app/views/errors/error.controller.js
@@ -0,0 +1,20 @@
+'use strict';
+(function () {
+ class ErrorCtrl {
+ constructor($log, $scope,$state) {
+ $scope.errorState = $state.current.name;
+ if($scope.errorState=='root.error404'){
+ $scope.errorTitle="Page Not Found";
+ $scope.errorMsg="The page you are looking for cannot be found";
+ }else if($scope.errorState=='noUserError'){
+ $scope.errorTitle="Authorization denied";
+ $scope.errorMsg= "Please Contact Your Administrator for the page access";
+ }else {
+ $scope.errorTitle="Something went wrong";
+ $scope.errorMsg= "Please go back to the previous page";
+ }
+ }
+ }
+ ErrorCtrl.$inject = ['$log','$scope','$state'];
+ angular.module('ecompApp').controller('ErrorCtrl', ErrorCtrl);
+})(); \ No newline at end of file
diff --git a/ecomp-portal-FE-common/client/app/views/errors/error.tpl.html b/ecomp-portal-FE-common/client/app/views/errors/error.tpl.html
new file mode 100644
index 00000000..44b43ce4
--- /dev/null
+++ b/ecomp-portal-FE-common/client/app/views/errors/error.tpl.html
@@ -0,0 +1,31 @@
+<!--
+ ================================================================================
+ ECOMP Portal
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property
+ ================================================================================
+ 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.
+ ================================================================================
+ -->
+<div class="w-ecomp-admins-page-main">
+ <div id="page-content">
+ <div id="title" class="w-ecomp-main-view-title">
+ <h1 class="heading-page">{{errorTitle}}</h1>
+ </div>
+ <div class="errorContent">
+ <p>{{errorMsg}}</p>
+ </div>
+
+ </div>
+
+</div>