From 52ef94725081dff105d9c96c60985f1334f39e96 Mon Sep 17 00:00:00 2001 From: "Christopher Lott (cl778h)" Date: Wed, 30 Aug 2017 16:09:59 -0400 Subject: Configure sonar code coverage; use EPSDK 1.3.0 Also use this commit to mark delivery of many feature issues Issue: PORTAL-26, PORTAL-28, PORTAL-29, PORTAL-50, PORTAL-69, PORTAL-76, PORTAL-82, PORTAL-89 Change-Id: Ib3e8487c5eb3d39dcdae1450deac6d255449debc Signed-off-by: Christopher Lott (cl778h) --- ecomp-portal-FE-common/client/app/router.js | 2 +- .../client/app/views/errors/error.controller.js | 20 ++++++++++++++ .../client/app/views/errors/error.tpl.html | 31 ++++++++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 ecomp-portal-FE-common/client/app/views/errors/error.controller.js create mode 100644 ecomp-portal-FE-common/client/app/views/errors/error.tpl.html (limited to 'ecomp-portal-FE-common') 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 @@ + +
+
+
+

{{errorTitle}}

+
+
+

{{errorMsg}}

+
+ +
+ +
-- cgit 1.2.3-korg