From 3a2b5c60384feb490e878020bdb9c01f514d7856 Mon Sep 17 00:00:00 2001 From: "Christopher Lott (cl778h)" Date: Mon, 25 Sep 2017 15:52:24 -0400 Subject: Sonar Scans and Role Centralization; clean nl PORTAL-21: centralized user role management PORTAL-72: Address Sonar Scan code issues for ONAP - mostly on raptor PORTAL-86: ONAP - Remove internal att.com usages from tests and otherfiles PORTAL-90: Add debug statements to demo app's class; no functional change Issue: PORTAL-21 PORTAL-72 PORTAL-86 PORTAL-90 Change-Id: I72a6c812009f51446330bf42bab6d3338d053805 Signed-off-by: Christopher Lott (cl778h) --- .../scripts/DS2-controllers/admin-controller.js | 16 +- .../ds2-profile/self-profile-controller.js | 10 +- .../DS2-controllers/ds2-workflows/workflowApp.js | 5 +- .../fusion/scripts/DS2-services/modalService.js | 57 ------- .../ds2-admin/modals/role-functions-modal.html | 2 +- .../webapp/app/fusion/scripts/network/net_map.js | 6 +- .../app/fusion/scripts/view-models/header.html | 162 ------------------- .../app/fusion/scripts/view-models/left_menu.html | 27 ---- .../reportdashboard-page/src/report-dashboard.html | 19 --- .../fusion/scripts/webrtc/RTCMultiConnection.js | 25 +-- .../src/main/webapp/app/fusion/styles/global.css | 178 --------------------- .../app/fusion/styles/workflows/workflows.css | 10 -- .../drools/view-models/droolsSinglePage.html | 72 --------- 13 files changed, 25 insertions(+), 564 deletions(-) delete mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-services/modalService.js delete mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/view-models/header.html delete mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/view-models/left_menu.html delete mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/styles/global.css delete mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusionapp/drools/view-models/droolsSinglePage.html (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/app') diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js index 0c6105c8..0d95e72a 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js @@ -704,7 +704,7 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal },function(error){ console.log("roleControllerDS2 failed: " + error); - reloadPageOnce(); + // reloadPageOnce(); }).finally(function() { $scope.showLoader=false; // Always execute this on both error and success }); @@ -727,7 +727,13 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal }) $scope.roleFnInit(); - + $scope.updateRoleFunction = function(){ + $scope.role.roleFunctions=[]; + for(var i=0;i<$scope.ociavailableRoleFunctions.length;i++){ + if($scope.ociavailableRoleFunctions[i].selected) + $scope.role.roleFunctions.push($scope.ociavailableRoleFunctions[i]); + } + } $scope.saveRole = function() { var errorMsg; $scope.showLoader=true; @@ -841,6 +847,9 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal } } }); + modalInstance.result.finally(function () { + $scope.updateRoleFunction(); + }); } $scope.addNewChildRoleFunctionModalPopup = function(data, role,info) { @@ -860,6 +869,9 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal } } }); + modalInstance.result.finally(function () { + alert(); + }); } // remove role function associated to a role on Role Edit page diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-profile/self-profile-controller.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-profile/self-profile-controller.js index efe2b749..2c005365 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-profile/self-profile-controller.js +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-profile/self-profile-controller.js @@ -25,8 +25,7 @@ appDS2.controller('selfProfileController', function($scope, $http, $modal, $rout $scope.pageType=2; } - $scope.sbcid=$scope.profile.sbcid; - $scope.managerAttuid=$scope.profile.managerAttuid; + /***********************************************************functions***********************************************/ $scope.getProfileDetail = function(profileIdParam){ @@ -42,8 +41,7 @@ appDS2.controller('selfProfileController', function($scope, $http, $modal, $rout $scope.ociTimeZones=JSON.parse($scope.data.timeZones); $scope.ociCountries=JSON.parse($scope.data.countries); stateList=JSON.parse($scope.data.stateList); - $scope.sbcid=$scope.profile.sbcid; - $scope.managerAttuid=$scope.profile.managerAttuid; + if($scope.ociavailableRoles) $.each($scope.ociavailableRoles, function(i, a){ @@ -100,9 +98,7 @@ appDS2.controller('selfProfileController', function($scope, $http, $modal, $rout $scope.ociTimeZones=JSON.parse($scope.data.timeZones); $scope.ociCountries=JSON.parse($scope.data.countries); stateList=JSON.parse($scope.data.stateList); - $scope.sbcid=$scope.profile.sbcid; - $scope.managerAttuid=$scope.profile.managerAttuid; - + if($scope.ociavailableRoles) $.each($scope.ociavailableRoles, function(i, a){ var availableRole = a; diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowApp.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowApp.js index a3496785..2ae2b1b3 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowApp.js +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowApp.js @@ -1,5 +1,6 @@ -angular.module('att.abs.helper', []); +/*angular.module('att.abs.helper', []); angular.module('quantum', []); //angular.module('ui.bootstrap', []); appDS2=angular.module("workflowApp", ["ngRoute", 'ngMessages', 'ngCookies', 'b2b.att.tpls', 'ddh.att.tpls','ddh.att.dropdowns', 'ddh.att.switches', 'b2b.att.footer', 'b2b.att.header','gridster','ui.bootstrap']); - +*/ +var appDS2=angular.module("workflowApp", ["ngRoute", 'ngMessages','ngCookies','modalServices', 'ngCookies', 'b2b.att','gridster','ui.bootstrap','ui.bootstrap.modal']); \ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-services/modalService.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-services/modalService.js deleted file mode 100644 index cb85ffce..00000000 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-services/modalService.js +++ /dev/null @@ -1,57 +0,0 @@ - -angular.module("template/modalsAndAlerts/window2.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("template/modalsAndAlerts/window.html", - "
\n" + - "
sdfdsfsfd
\n" + - "
"); - }]); - -angular.module('ddh.att.modalsAndAlerts') - -.controller('modalsAndAlertsController', function ($scope, $modal, $log) { - $scope.name='eeee'; - $scope.items = ['item1', 'item2', 'item3']; - $scope.dt = new Date("March 10, 2014 00:00:00"); - $scope.helperText = "The date you selected is $date. Double tap to open calendar. Select a date to close the calendar."; - $scope.open = function (event) { - var modalInstance = $modal.open({ - templateUrl: 'template/modalsAndAlerts/modal-demo.html', - controller: ModalInstanceCtrl, - sizeClass: 'modal-long-adjust', - resolve: { - items: function () { - return $scope.items; - } - } - }); - - modalInstance.result.then(function (selectedItem) { - $scope.selected = selectedItem; - event.target.focus(); - }, function () { - $log.info('Modal dismissed at: ' + new Date()); - event.target.focus(); - }); - }; - $scope.ok = function () { - //add the ok functionality - console.log("ok"); - }; - $scope.cancel = function () { - //add the cancel functionality - console.log("cancel"); - }; -}) - -var ModalInstanceCtrl = function ($scope, $modalInstance, items) { - $scope.items = items; - $scope.selected = { - item: $scope.items[0] - }; - $scope.ok = function () { - $modalInstance.close($scope.selected.item); - }; - $scope.cancel = function () { - $modalInstance.dismiss('cancel'); - }; -}; diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-modal.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-modal.html index 48044da2..1ecf192b 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-modal.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-modal.html @@ -18,7 +18,7 @@ {{roleFunction.name}} diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/network/net_map.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/network/net_map.js index 49599503..421e511f 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/network/net_map.js +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/network/net_map.js @@ -243,7 +243,7 @@ plotHeader = function(attributes,cssType){ plotElement = function(element) { if(element.left){ - if(!element.id.startsWith("com.att.trinity.ue")){ + if(!element.id.startsWith("ue")){ left = element.left ; var thisColor = element.bgColor; var thisElement = new joint.shapes.basic.newRect({ @@ -325,7 +325,7 @@ plotElementIcon = function(element) { left = element.left ; uetop = element.top; - if(element.id.startsWith("com.att.trinity.ue")) { + if(element.id.startsWith("ue")) { uetop = element.top - 30; } else { uetop = element.top ; @@ -368,7 +368,7 @@ plotElementIcon = function(element) { }); } - if(element.id.startsWith("com.att.trinity.ue")){ + if(element.id.startsWith("ue")){ thisElement.attr({ rect: {fill: 'white', style:{'pointer-events':'none'}}, image: { style:{'pointer-events':'none'}} diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/view-models/header.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/view-models/header.html deleted file mode 100644 index e7616d94..00000000 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/view-models/header.html +++ /dev/null @@ -1,162 +0,0 @@ -
-
-
-
-
- - -
-
-
-
-
  • - - ECOMP Portal -
  • -
    -
    - - -
    - - -
    - -
    -
    -
    -
  • - Unable to load menus -
  • -
    -
  • -
    - - -
    -
  • -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/view-models/left_menu.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/view-models/left_menu.html deleted file mode 100644 index ad4e5d91..00000000 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/view-models/left_menu.html +++ /dev/null @@ -1,27 +0,0 @@ - -
    - - - -     {{app_name}} - -
    -
    -
    -
    - - - - - -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/report-dashboard.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/report-dashboard.html index 8fecfb7b..ecdccb62 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/report-dashboard.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/report-dashboard.html @@ -109,25 +109,6 @@ - - - diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/webrtc/RTCMultiConnection.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/webrtc/RTCMultiConnection.js index 3ce348b6..daf64413 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/webrtc/RTCMultiConnection.js +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/webrtc/RTCMultiConnection.js @@ -5574,8 +5574,7 @@ hark: 'https://cdn.webrtc-experiment.com/hark.js', firebase: 'https://cdn.webrtc-experiment.com/firebase.js', firebaseio: 'https://webrtc-signaling.firebaseio.com/', - - muted: 'static/fusion/images/ATT_Labs_Logo.png', + getConnectionStats: 'https://cdn.webrtc-experiment.com/getConnectionStats.js', FileBufferReader: 'https://cdn.webrtc-experiment.com/FileBufferReader.js' @@ -5995,29 +5994,7 @@ username: 'ambient' }); - /* CHANGED: Fusion: These are non-att servers for testing purposes - - iceServers.push({ - url: 'stun:stun.l.google.com:19302' - }); - - iceServers.push({ - url: 'stun:stun.anyfirewall.com:3478' - }); - - iceServers.push({ - url: 'turn:turn.bistri.com:80', - credential: 'homeo', - username: 'homeo' - }); - - iceServers.push({ - url: 'turn:turn.anyfirewall.com:443?transport=tcp', - credential: 'webrtc', - username: 'webrtc' - }); - */ // CUSTOM CODE // connection.iceServers = iceServers; diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/styles/global.css b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/styles/global.css deleted file mode 100644 index 25d1c578..00000000 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/styles/global.css +++ /dev/null @@ -1,178 +0,0 @@ -body{ - margin: 0; - padding: 0; - padding-bottom: 0 !important; - min-width: 980px; -} -label { - display: inline-block; - margin-bottom: 5px; - font-weight: 700; -} -.footer-columns label { - color: #009fdb; - font-size: 18px; -} - -.b2b-header-tabs .header__item.profile .profile-info{ - border: 1px solid #d3d3d3; - max-width:400px; - width:300px; - padding: 20px; - pointer-events: auto; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - font-size: 16px; - -webkit-transition: opacity .2s ease-out; - -moz-transition: opacity .2s ease-out; - transition: opacity .2s ease-out; - background: #fff; - border-radius: 5px; - box-shadow: 0 5px 6px 0 rgba(0,0,0,.25); - color: #333; - line-height: 20px; - position: absolute; - left:-123px; - top:38px; - display:none; -} -.b2b-header-tabs .header__item.profile .profile-info.open{ - display:block; -} -.b2b-header-tabs .header__item.profile .profile-info label{ - font-family:Omnes-ATT-W02; - display:block; - margin-top:20px; - font-size: 16px; -} -.b2b-header-tabs .header__item.profile .profile-info span{ - font-family:Omnes_ATTW02Medium; - display:block; -} - -.b2b-header-tabs .selectWrap button.awd-select{ - height:36px; - line-height:31px; - font-size:1rem; - display:inline-block; -} -/* @font-face { - font-family: atticons; - src: url(../fonts/atticons.eot?#iefix) format("embedded-opentype"), url(../fonts/atticons.woff) format("woff"), url(../fonts/atticons.ttf) format("truetype"), url(../fonts/atticons.svg#atticons) format("svg"); - font-weight: normal; - font-style: normal; -} */ -[class*=" icon-"], [class^=icon-] { - font-family: atticons; - speak: none; - font-style: normal; - font-weight: 400; - font-variant: normal; - text-transform: none; - line-height: 40px; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.icon-user-small { - display: inline-block; - vertical-align: middle; - width: 20px; - font-size: 56px; - margin-right: 16px; - float: left; -} -.icon-user-small:before { - content: "\e60b"; -} -.icon-local-search { - content: "\e685"; -} -.header-container { - width: 100%; - float: left; -} -.menu-container { - width: 250px; - float: left; -} -.content-container { - float: left; - min-height: 650px; - width: calc(100% - 250px); -} -.footer-container { - float:left; - width: 100%; -} -.profile-info { - font-size: 16px; - color: #333; - line-height: 20px; -} -h6 { - font-weight: bold; - font-size: 1.125em; - line-height: 1.3333333333; -} - -.icon-primary-accordion-plus, .icon-primary-accordion-minus { - float: right; - line-height: 20px; -} -.left-menu-collapsed { - width: 0px !important; -} -.menu-icon { - float: left; - line-height: 20px; - width: 25px; - height: 20px; - margin-top: -10px; -} -.b2b-footer-wrapper { - width: 100%; - background-color: #222; - height: 88px; -} -.icon-primary-right { - margin-left: -11px; -} -@media (max-width: 768px) { - .divider-bottom-footer .footerLogo { - margin: 10px 0 0 0px; - } - .b2b-header-tabs .header__items { - width: 700px; - } -} -@media screen and (min-device-width: 769px) and (max-width: 1200px) { - .b2b-header-tabs .header__items { - width: 700px; - } -} -@media screen and (max-width: 1100px) { - .b2b-header-tabs .header__item.profile { - float: right; - } -} -@media screen and (min-width: 768px) and (max-width: 1105px) { - table th, table td{ - padding: 19px 10px; - } -} -.icon-spinner { - animation: spinner 1s linear infinite; - background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%3E%0A%20%20%3Cpath%20fill%3D%22%230569AE%22%20d%3D%22M18%2036c-2.7%200-4.8-.6-6.2-1C8%2033.6%205.4%2031.1%204%2029.3%202.7%2027.6.9%2024.7.3%2020.8c-.3-2.1-.5-5.4.9-9.1C3%206.8%206.4%204.1%208.3%202.8%2011.8.5%2015.4%200%2017.8%200l.1%204.3c-1.8%200-4.6.4-7.3%202.2-1.4.9-4%203-5.4%206.7-1%202.8-.9%205.3-.7%206.9.5%203%201.8%205.1%202.9%206.4%201.1%201.4%203%203.2%206%204.3%201.5.5%204.6%201.3%208.3.3%203-.8%205-2.5%206.2-3.7%201.4-1.4%202.4-3.2%203.1-5%20.4-1.3.9-3.3.6-5.8-.5-4.2-2.8-7.1-4.2-8.5L30.5%205c1.8%201.8%204.8%205.6%205.4%2011.1.3%203.2-.3%205.9-.9%207.6-.8%202.4-2.2%204.8-4%206.7-1.5%201.6-4.2%203.8-8.1%204.9-1.8.5-3.4.7-4.9.7z%22%2F%3E%0A%20%20%3Cpath%20fill%3D%22%23FFF%22%20d%3D%22M17.8%202.2c1.8%200%204.9.3%208.2%202.2%201.2.7%202.2%201.5%203%202.3%22%2F%3E%0A%20%20%3Cpath%20fill%3D%22%23F2F2F3%22%20d%3D%22M27.5%208.1c-.8-.8-1.7-1.4-2.6-1.9-2.1-1.2-4.5-1.9-7.1-1.9V0c3.3%200%206.5.9%209.3%202.4%201.2.8%202.3%201.6%203.4%202.6l-3%203.1z%22%2F%3E%0A%3C%2Fsvg%3E"); - height: 50px; - width: 50px; -} -.loader-container { - position: fixed; - top: calc(50vh - 25px); - left: calc(50vw - 25px); -} -.loader-container i { - float: left; -} \ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/styles/workflows/workflows.css b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/styles/workflows/workflows.css index 2a740ec5..0995a992 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/styles/workflows/workflows.css +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/styles/workflows/workflows.css @@ -15,16 +15,6 @@ background-color:white; } -.scrolling-table #att-scroll-table-content{ - height:200px; - position: absolute !important; - width:700px; - padding-left: 0px; - padding-top: 0px; - padding-bottom: 0px; - padding-right:5px; -} - .workflow-popup-body{ position: relative; padding: 30px; diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusionapp/drools/view-models/droolsSinglePage.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusionapp/drools/view-models/droolsSinglePage.html deleted file mode 100644 index a1d0a5ba..00000000 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusionapp/drools/view-models/droolsSinglePage.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    - - \ No newline at end of file -- cgit 1.2.3-korg