From b54df0ddd0c6a0372327c5aa3668e5a6458fcd64 Mon Sep 17 00:00:00 2001 From: st782s Date: Thu, 4 May 2017 07:48:42 -0400 Subject: [PORTAL-7] Rebase This rebasing includes common libraries and common overlays projects abstraction of components Change-Id: I9a24a338665c7cd058978e8636bc412d9e2fdce8 Signed-off-by: st782s --- .../contact-us-manage.controller.js | 202 +++++++++++++++++++++ .../contact-us-manage.controller.less | 152 ++++++++++++++++ .../contact-us-manage/contact-us-manage.html | 180 ++++++++++++++++++ .../support/contact-us/contact-us.controller.js | 171 +++++++++++++++++ .../contact-us/contact-us.controller.spec.js | 19 ++ .../app/views/support/contact-us/contact-us.less | 93 ++++++++++ .../views/support/contact-us/contact-us.tpl.html | 126 +++++++++++++ .../support/get-access/get-access.controller.js | 123 +++++++++++++ .../get-access/get-access.controller.spec.js | 19 ++ .../app/views/support/get-access/get-access.less | 55 ++++++ .../views/support/get-access/get-access.tpl.html | 102 +++++++++++ 11 files changed, 1242 insertions(+) create mode 100644 ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.js create mode 100644 ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.less create mode 100644 ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.html create mode 100644 ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.js create mode 100644 ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.spec.js create mode 100644 ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.less create mode 100644 ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.tpl.html create mode 100644 ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.js create mode 100644 ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.spec.js create mode 100644 ecomp-portal-FE-common/client/app/views/support/get-access/get-access.less create mode 100644 ecomp-portal-FE-common/client/app/views/support/get-access/get-access.tpl.html (limited to 'ecomp-portal-FE-common/client/app/views/support') diff --git a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.js b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.js new file mode 100644 index 00000000..8413382e --- /dev/null +++ b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.js @@ -0,0 +1,202 @@ +/*- + * ================================================================================ + * 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. + * ================================================================================ + */ +'use strict'; + +(function () { + class ContactUsManageController { + constructor($scope,$log, message, $q, $http, conf,contactUsService,confirmBoxService) { + $scope.contactUsList=[]; + $scope.contactUsAllAppList=[]; + $scope.errMsg=''; + $scope.newContactUs ={ + app:'', + name:'', + email:'', + url:'', + desc:'' + }; + /*Get the existing contact us first, then based on the existing, filter from all apps*/ + $scope.getContactUsList = function(){ + contactUsService.getContactUs().then(res=> { + // $log.info('getting getContactUs',res.response); + if(res!=null && res.response!=null){ + for(var i=0; i { + var tableData=[]; + $scope.contactUsAllAppListTemp=[]; + // $log.info('contactUsService::getListOfApp: getting res'); + var result = (typeof(res.data) != "undefined" && res.data!=null)?res.data:null; + // $log.info('contactUsService::getListOfApp: result',result); + var res1 = result; + var realAppIndex = 0; + $scope.contactUsAllAppList.length=0; + for (var i = 1; i <= res1.length; i++) { + if (!res1[i - 1].restrictedApp) { + var okToAdd = true; + for(var j =0; j<$scope.contactUsList.length;j++){ + if(res1[i - 1].title==$scope.contactUsList[j].appName) + okToAdd=false; + } + // not allowed to add(duplicate) another entry if the app is already available in the table + if(okToAdd){ + if(res1[i - 1].title){ + $scope.contactUsAllAppList.push({ + index: realAppIndex, + title: res1[i - 1].title, + value: res1[i - 1].index + }); + } + realAppIndex = realAppIndex + 1; + } + } else { + // $log.debug('contactUsService:getAvailableApps:: Restricted/URL only App will not be used = ' + res1[i - 1].title); + } + } + }).catch(err=> { + $log.error('contactUsService:error:: ', err); + + + }).finally(() => { + //this.isLoadingTable = false; + }); + }); + } + + $scope.getContactUsList(); + + $scope.closeDialog = function(){ + $scope.closeThisDialog( $scope.widgetData); + } + + /*Add new Contact Us*/ + $scope.newContactUsFun = function(){ + if($scope.newContactUs.app.title==null || $scope.newContactUs.app.title=='' ){ + confirmBoxService.showInformation('Please select an App to add').then(isConfirmed => { + return; + }); + } + + if($scope.newContactUs.url !=null && $scope.newContactUs.url != '' && !validateUrl($scope.newContactUs.url)){ + var warningMsg = "Please enter a valid URL"; + confirmBoxService.showInformation(warningMsg).then(isConfirmed => {return;}); + return; + } + + contactUsService.addContactUs($scope.newContactUs).then(res=> { + // $log.info('contactUsService: add ContactUs successfully'); + $scope.contactUsList.length=0; + // $log.info('contactUsService: refreshing the Contact US table'); + $scope.getContactUsList(); + $scope.errMsg=''; + /* confirmBoxService.showInformation('You have added a new Contact Us item').then(isConfirmed => { });*/ + var defaultSel={ + index: 0, + title: '', + value: '' + } + $scope.newContactUs ={ + app:defaultSel, + name:'', + email:'', + url:'', + desc:'' + }; + + }).catch(err=> { + $log.error('contactUsService: addContactUs error:: ', err); + // $scope.errMsg=err; + confirmBoxService.showInformation('Add Contact Us list failed: ' + err); + + }).finally(() => { + //this.isLoadingTable = false; + }); + } + /* Edit Contact Us*/ + $scope.editContactUsFun = function(contactObj){ + // $log.info('contactUsService: edit ContactUs save successfully', contactObj); + var contactUsObj={ + appId:contactObj.appId, + appName:contactObj.appName, + description:contactObj.description, + contactName:contactObj.contactName, + contactEmail:contactObj.contactEmail, + url:contactObj.url, + }; + + contactUsService.modifyContactUs(contactUsObj).then(res=> { + // $log.info('contactUsService: edit ContactUs successfully'); + // confirmBoxService.showInformation('You have saved the changes').then(isConfirmed => {}); + $scope.errMsg=''; + + }).catch(err=> { + $log.error('contactUsService: editContactUs error:: ', err); + confirmBoxService.showInformation('Edit Contact Us list failed: ' + err); + // $scope.errMsg=err; + }).finally(() => { + //this.isLoadingTable = false; + }); + + } + + $scope.$watch('newContactUs.app.value', (newVal, oldVal) => { + for(var i=0;i<$scope.contactUsAllAppList.length;i++){ + if($scope.contactUsAllAppList[i].value==newVal){ + $scope.newContactUs.app=angular.copy($scope.contactUsAllAppList[i]);; + } + } + }); + /*del Contact Us*/ + $scope.delContactUsFun = function(appObj){ + var confirmMsg = 'Are you sure you want to delete '+appObj.appName +' from the list?' + ' Press OK to delete.'; + confirmBoxService.confirm(confirmMsg).then(function (confirmed) { + if (confirmed == true) { + contactUsService.removeContactUs(appObj.appId).then(res=> { + // $log.info('delContactUsFun: delete ContactUs successfully',res); + $scope.errMsg=''; + $scope.contactUsList.length=0; + $scope.getContactUsList(); + confirmBoxService.showInformation('Item has been deleted').then(isConfirmed => {}); + }).catch(err=> { + $log.error('contactUsService: addContactUs error:: ', err); + confirmBoxService.showInformation('Deletion failed: ' + err); + // $scope.errMsg=err; + }).finally(() => { + //this.isLoadingTable = false; + }); + } + }); + + } + + } + } + ContactUsManageController.$inject = ['$scope','$log', 'message', '$q', '$http', 'conf','contactUsService','confirmBoxService']; + angular.module('ecompApp').controller('ContactUsManageController', ContactUsManageController); + + +})(); +function validateUrl(value){ + return /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value); + } diff --git a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.less b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.less new file mode 100644 index 00000000..905f9faa --- /dev/null +++ b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.less @@ -0,0 +1,152 @@ +.searchLiHeader { +font-weight: bold; +color: #0574ac; +font-size: 16px; +padding-bottom: 10px; +line-height: 1.5; +font-family: Omnes-ECOMP-W02,Arial; + +} + +.searchLiItems{ +cursor: pointer; +font-weight: normal; +font-size: 12px; +color: #444444; +font-family: Omnes-ECOMP-W02,Arial; +} + +.searchUl { +list-style: none; +border-bottom: 1px solid #bbb; +padding-bottom: 20px; +} + +.manage-contactUs-home-title{ + color: #067ab4; + font-family: "Omnes-ECOMP-W02", Arial;; + font-size: 24px; + margin-left: 78px; + width: 1170px; + } + +.manage-contactUs-home-manageWidgets-title{ + color: #067ab4; + font-family: "Omnes-ECOMP-W02", Arial;; + font-size: 24px; + margin-left: 30px; + width: 1170px; + } + +#editWidgetsContent { + height: 300px; + width: 1250px; + } + +#editWidgetsContent .scroll-viewport { + height: 300px; + width: 1250px; + } + + .add-contact-us-field{ + width:250px; + display: inline-block; + margin:10px; + } + .add-contact-us-field-des{ + width:800px; + margin:10px; + } + +.errMsg{ + color:red; +} +.sucessMsg{ + color:green; +} +.contact-us-margin{ + margin-left: 80px; + margin-right: 120px; +} +.contact-us-manage-table { + + + .delete-contact-us{ + font-size:20px; + } + + .portal-add-button { + width: 160px; + } +} + +.select2-container .select2-chosen, .select2-container .select2-container input{ + line-height:32px; +} +.select2-container .select2-choice{ + -webkit-transition: border-color .2s ease-out; + -moz-transition: border-color .2s ease-out; + transition: border-color .2s ease-out; + background: #fff; + border-radius: 6px; + display: block; + border: 1px solid #888; + box-shadow: none; + filter: none; + height: 32px !important; + padding: 0; + position: relative; + z-index: 5; + cursor: pointer; +} + +.c-ecomp-portal-abs-table .contactUs{ + + height:300px; + +} + +.c-ecomp-portal-abs-table +{ +background-color: transparent; +} +.ngdialog-overlay { + pointer-events: none !important; +} + +.input-text-area { + font-style: italic; + padding: 7px 10px; + width: 250px; + display: inline-block; + position: relative; + margin-bottom: 10px; + border-radius: 6px; + border: 1px solid #d8d8d8; + height: 32px !important; + border-color: slategrey !important; +} +.input-inline-edit-text { + font-style: italic; + padding: 7px 10px; + display: inline-block; + position: relative; + margin-bottom: 10px; + border-radius: 6px; + border: 1px solid #d8d8d8; + height: 32px; + border-color: slategrey !important; + width:100%; + } +.glyphicon { + position: relative !important; + line-height: 0 !important; +} + +#divider-line-bottom , #divider-line +{ + border-bottom-style: solid; + border-bottom-width: 1px; + padding-bottom: 11px; + +} diff --git a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.html b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.html new file mode 100644 index 00000000..c619a18a --- /dev/null +++ b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.html @@ -0,0 +1,180 @@ + +
+
+ +
+
Manage + Contact Us
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
App NameContact NameContact EmailContact URLDescriptionEditDelete
+
+
+
+
+
+
+
+
+
+
+
+ +
Save + +
+
+ +
+
+
+ +
+
+
+

Add Application Contact + Information

+ +
+
+
+
+
App + Name
+ +
+
+
+
Contact + Name
+ +
+
+
Contact + Email
+ +
+
+
Contact + URL
+ +
+
+
Description
+ +
+
+
+ Add + New +
+
+ +
+ Close +
+ +
+ +
+ +
+
+
+
+ + diff --git a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.js b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.js new file mode 100644 index 00000000..0d39a653 --- /dev/null +++ b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.js @@ -0,0 +1,171 @@ +/*- + * ================================================================================ + * 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. + * ================================================================================ + */ +'use strict'; + +(function () { + + class ContactUsCtrl { + constructor($log, contactUsService, applicationsService, $modal, ngDialog, $state,$anchorScroll,$location) { + + contactUsService.getContactUSPortalDetails().then(res => { + // $log.info('ContactUsCtrl:: contactUsService getContactUSPortalDetails res',res); + // $log.info('getting res',res); + var result = (typeof(res.response) != "undefined" && res.response!=null)?res.response:null; + // $log.info('result',result); + // $log.info('done'); + var source = JSON.parse(result); + // $log.info(source); + this.ush_TicketInfoUrl = source.ush_ticket_url; + this.portalInfo_Address = source.feedback_email_address; + this.feedback_Url = source.portal_info_url; + }).catch(err=> { + $log.error('ContactUsCtrl:error:: ', err); + }).finally(() => { + }); + + let init = () => { + // $log.info('ecomp app::contact-us-controller::initializing...'); + this.appTable=[]; + this.functionalTableData=[]; + }; + init(); + + let updateContactUsTable = () => { + contactUsService.getAppsAndContacts().then(res=> { + // $log.info('ContactUsCtrl:: contactUsService getAppsAndContacts res',res); + var tableData=[]; + // $log.info('getting res',res); + var result = (typeof(res.response) != "undefined" && res.response!=null)?res.response:null; + // $log.info('result',result); + // $log.info('done'); + var source = result; + // $log.info(source); + // Drop Portal app, empty name entries + for(var i=0;i { + $log.error('ContactUsCtrl.updateContactUsTable:error:: ', err); + }) + }; + + contactUsService.getAppCategoryFunctions().then(res=> { + // $log.info('ContactUsCtrl:: contactUsService getAppCategoryFunctionsthen res',res); + var tablefunctionalData=[]; + // $log.info('getting res',res); + var result = (typeof(res.response) != "undefined" && res.response!=null)?res.response:null; + // $log.info('result',result); + // $log.info('done'); + var source = result; + // $log.info(source); + for(var i=0;i { + $log.error('ContactUsCtrl:error:: ', err); + }) + + updateContactUsTable(); + this.editContactUsModalPopup = () => { + // $log.debug('ContactUsCtrl::editContactUsModalPopup updating table data...'); + var modalInstance = ngDialog.open({ + templateUrl: 'app/views/support/contact-us/contact-us-manage/contact-us-manage.html', + controller: 'ContactUsManageController', + resolve: { + message: function message() { + var message = { + type: 'Contact', + }; + return message; + } + } + }).closePromise.then(needUpdate => { + updateContactUsTable(); + }); + }; + + this.goToSection = (id) => { + + var targetDiv = document.getElementById(id); + + var offSetHeight = 0; + for(var i=0;i d.showFlag = false); + // let index = this.appTable.findIndex(a => a.app_Id == id); + var index =-1; + for(var i=0; i -1) { + // setting the showFlag to true based on index comparing with the app_Id + this.appTable[index].showFlag = true; + $location.hash('appId'+index); + $anchorScroll(); + /* $('#contentId').animate({ + scrollTop: targetDiv.offsetTop-offSetHeight + }, 'fast');*/ + } + + }; + + // Take the user to the application on the get access page. + this.goGetAccess = (appName) => { + // $log.debug('ContactUsCtrl::goGetAccess received name ' + appName); + applicationsService.goGetAccessAppName = appName; + $state.go('root.getAccess'); + }; + + } + } + ContactUsCtrl.$inject = ['$log','contactUsService', 'applicationsService', '$modal', 'ngDialog', '$state','$anchorScroll','$location']; + angular.module('ecompApp').controller('ContactUsCtrl', ContactUsCtrl); +})(); diff --git a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.spec.js b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.spec.js new file mode 100644 index 00000000..3841a2b3 --- /dev/null +++ b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.spec.js @@ -0,0 +1,19 @@ +/*- + * ================================================================================ + * 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. + * ================================================================================ + */ diff --git a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.less b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.less new file mode 100644 index 00000000..6fd0a420 --- /dev/null +++ b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.less @@ -0,0 +1,93 @@ +.w-ecomp-contactUs-home { + //.bg_portalWhite;//white for 1702 + .bg_portalGray; // gray for 1610 + position: @page-main-position; + top: @page-main-top; + left: @page-main-left; + right: @page-main-right; + bottom: @page-main-bottom; + padding-top: @padding-top; + padding-left: @padding-left-side; + background-color: white; + + .w-ecomp-main-view-title{ + font-family: Omnes-ECOMP-W02,Arial; + } + + #title{ + font-family: Omnes-ECOMP-W02-Light,Arial; + } + + #edit-button-contact-us{ + float: right; + } + + .contactUs-home-container { + .content_justify; + position: relative; + //padding-top: 15px; + padding-right: 0; + padding-left: 0; + padding-bottom: 32px; + width: 100%; + + + .contactUs-general-div { + margin: auto !important; + padding-top: 15px; + padding-bottom: 15px; + .content_justify; + } + } + +.collapsibleArrow { + width: 30px; + height: 30px; + margin-left: 10px; + } + +.contactUs-collapsible-panel { + margin: auto; + //width: 1170px; + + } + + .contactUs-collapsible-table { + margin: auto; + width: 1170px; + } + + .contactUs-txt { + font-weight: normal; + color: #666666; + font-size: 15px; + font-family: Omnes-ECOMP-W02-Medium,Arial; + margin:10px; + } + +.contactUs-panel-header { + font-weight: normal; + color: #666666; + font-size: 18px; + font-family: Omnes-ECOMP-W02-Medium,Arial; + border-top: 1px solid #ccc; + outline : none; + height: 35px; + + } + + .contactUs-panel-header:hover{ + color: #428bca; + background: #eae8e8; + } + +.contactUs-panel-labels { + font-weight: normal; + color: #666666; + font-size: 15px; + font-family: Omnes-ECOMP-W02-Medium,Arial; + padding-top: 5px; + padding-bottom: 5px; +} + +} diff --git a/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.tpl.html b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.tpl.html new file mode 100644 index 00000000..9e96b441 --- /dev/null +++ b/ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.tpl.html @@ -0,0 +1,126 @@ + +
+
+
+
+

Contact Us

+ + +
+ +
+ +
Application Functions +
+ + + + + + + + + + + + + + + + + +
CategoryECOMP FunctionsECOMP Application
+
+
+
+
+
+ {{rowData.app_Name}} +
+
+
+
+ +
+
All Applications +
+
+
+
+
+
+ + + + Expand app contact section + App contact section + +
+ +
+
+ No application information is available. Please use the links above to contact the ECOMP Portal team. +
+
+ + + + + + + + + + + + + + + + + + + + + +
Contact:{{rowData.contact_name}}
Email:{{rowData.contact_email}}
Info URL:{{rowData.url_Info}}
Description:{{rowData.desc}}
Get access:Click for application and role information
+
+
+ +
+
+
+
+
+ +
+
+
diff --git a/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.js b/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.js new file mode 100644 index 00000000..74b5ba4e --- /dev/null +++ b/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.js @@ -0,0 +1,123 @@ +/*- + * ================================================================================ + * 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. + * ================================================================================ + */ +'use strict'; +(function () { + class GetAccessCtrl { + constructor($log, $scope, $stateParams, getAccessService, userProfileService, ExternalRequestAccessService, applicationsService, ngDialog) { + // $log.debug('GetAccessCtrl: appService param is: ' + applicationsService.goGetAccessAppName); + var resultAccessValue = null; + + $scope.openAppRoleModal = (itemData) => { + if(resultAccessValue){ + let data = null; + data = { + dialogState: 2, + selectedUser:{ + attuid: $scope.attuid, + firstName: $scope.firstName, + lastName: $scope.lastName, + headerText: itemData.app_name + } + } + ngDialog.open({ + templateUrl: 'app/views/catalog/add-catalog-dialogs/new-catalog.modal.html', + controller: 'NewCatalogModalCtrl', + controllerAs: 'userInfo', + data: data + }); + } + } + + userProfileService.getUserProfile().then( + function(profile) { + $scope.attuid = profile.orgUserId; + $scope.firstName = profile.firstName; + $scope.lastName = profile.lastName; + }); + + this.updateAppsList = () => { + ExternalRequestAccessService.getExternalRequestAccessServiceInfo().then( + function(property) { + resultAccessValue = property.accessValue; + }).catch(err => { + $log.error('GetAccessCtrl: failed getExternalRequestAccessServiceInfo: ' + JSON.Stringify(err)); + }); + getAccessService.getListOfApp().then(res=> { + var tableData=[]; + // $log.info('GetAccessCtrl::updateAppsList: getting res'); + var result = (typeof(res.data) != "undefined" && res.data!=null)?res.data:null; + // $log.info('GetAccessCtrl::updateAppsList: result',result); + // $log.info('GetAccessCtrl::updateAppsList: done'); + var source = result; + // $log.info('GetAccessCtrl::updateAppsList source: ', source); + for(var i=0;i { + $log.error('GetAccessCtrl:error:: ', err); + }).finally(() => { + this.isLoadingTable = false; + }); + }; + + this.updateTable = (num) => { + this.startIndex=this.viewPerPage*(num-1); + this.currentPage = num; + }; + let init = () => { + // $log.info('GetAccessCtrl:: initializing...'); + this.searchString = ''; + this.getAccessTableHeaders = ['ECOMP Function', 'Application Name', 'Role Name', 'Current Role', 'Request Status']; + this.appTable=[]; + this.updateAppsList(); + this.viewPerPage=20; + this.startIndex=0; + this.currentPage = 1; + this.totalPage=0; + }; + init(); + } + } + GetAccessCtrl.$inject = ['$log', '$scope', '$stateParams', 'getAccessService', 'userProfileService', 'ExternalRequestAccessService','applicationsService', 'ngDialog']; + angular.module('ecompApp').controller('GetAccessCtrl', GetAccessCtrl); +})(); diff --git a/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.spec.js b/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.spec.js new file mode 100644 index 00000000..3841a2b3 --- /dev/null +++ b/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.spec.js @@ -0,0 +1,19 @@ +/*- + * ================================================================================ + * 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. + * ================================================================================ + */ diff --git a/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.less b/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.less new file mode 100644 index 00000000..7ac0d180 --- /dev/null +++ b/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.less @@ -0,0 +1,55 @@ +.w-ecomp-get-access-home { + //.bg_portalWhite;//white for 1702 + .bg_portalGray; // gray for 1610 + position: @page-main-position; + top: @page-main-top; + left: @page-main-left; + right: @page-main-right; + bottom: @page-main-bottom; + padding-top: @padding-top; + overflow-y: @page-main-overflow-y; + padding-left: @padding-left-side; + background-color: white; + + .w-ecomp-main-view-title{ + font-family: Omnes-ECOMP-W02-Light,Arial; + } + + .get-access-home-container { + position: relative; + padding-right: 0; + padding-left: 0; + padding-bottom: @container-bottom; + + .get-access-general-div { + width: @table-width; + //margin-left: @table-margin-left; + margin:auto; + } + + .get-access-table { + margin-top: 15px; + width: @table-width; + //margin-left: @table-margin-left; + margin:0 auto; + .table-control { + .table-dropdown-filter { + width: @table-dropdown-filter-width; + display: @table-dropdown-filter-display; + } + } + + .table-body { + cursor: pointer; + } + } + } +} + +table th, table td { + padding: 15px 14px 10px; +} + +#access-page-currentRole{ + text-align: center; +} diff --git a/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.tpl.html b/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.tpl.html new file mode 100644 index 00000000..7f6770ea --- /dev/null +++ b/ecomp-portal-FE-common/client/app/views/support/get-access/get-access.tpl.html @@ -0,0 +1,102 @@ + +
+
+
+
+

Get Access

+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
{{access.getAccessTableHeaders[0]}}{{access.getAccessTableHeaders[1]}}{{access.getAccessTableHeaders[2]}}{{access.getAccessTableHeaders[3]}}{{access.getAccessTableHeaders[4]}}
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+ + -- cgit 1.2.3-korg