diff options
author | 2017-05-24 10:20:53 -0400 | |
---|---|---|
committer | 2017-05-24 10:22:16 -0400 | |
commit | 34f706fedc5536caf2a218dbcd809991a1b484dd (patch) | |
tree | ceabff4d5e7ec89ed866ce1451366479cb0bd426 /ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers | |
parent | c081bd0a7db3f434e76c03a9ca0334539ee84470 (diff) |
[PORTAL-10] Enhancing Drill Down
Changes have been made to improve the stability of Drill down
capabilities.
Change-Id: I6d4831b69f19f9b33cf43b65acc6dd7c5deebb67
Signed-off-by: st782s <statta@research.att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers')
3 files changed, 57 insertions, 26 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-chart-controller.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-chart-controller.js index 806b1bc..80e1a26 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-chart-controller.js +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-chart-controller.js @@ -345,7 +345,7 @@ appDS2.controller('reportChartController', function ($scope, $rootScope, $timeou }); -app.directive('onlyDigits', function () { +appDS2.directive('onlyDigits', function () { return { restrict: 'A', @@ -362,7 +362,7 @@ app.directive('onlyDigits', function () { }; }); -app.directive('onlyCharacters', function () { +appDS2.directive('onlyCharacters', function () { return { restrict: 'A', require: '?ngModel', diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-run-controller.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-run-controller.js index 760ff6d..6eb0afe 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-run-controller.js +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-run-controller.js @@ -52,12 +52,15 @@ appDS2.controller("reportRunController", ['$scope','$rootScope','$routeParams',' + $scope.backToParentReport = function (){ + $window.location.href = "report#/report_run/"+$scope.parentReportUrlParams + } $scope.urlParams = parseQueryString($scope.currentReportUrlParams); - $scope.reportChartURL = 'report#/report_chart_wizard/'+$scope.urlParams.c_master; + $scope.reportChartURL = 'report#/report_chart/'+$scope.urlParams.c_master; - $scope.reportEditURL = 'report_wizard.htm?action=report.edit&c_master='+$scope.urlParams.c_master; + $scope.reportEditURL = 'report#/report_wizard/'+$scope.urlParams.c_master; $http.get('raptor.htm?action=report.run.container&'+$scope.currentReportUrlParams).then( diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-step-controller.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-step-controller.js index f1e82fa..faa2c42 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-step-controller.js +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-step-controller.js @@ -408,8 +408,8 @@ appDS2.controller('reportStepController', function($scope,$http,$location, $rout "displayHeaderAlignment" : ($scope.selectedDisplayHeaderAlignment.value=="null")?null:$scope.selectedDisplayHeaderAlignment.value, "sortable" : ($scope.sortable.value=="true"), "visible" : ($scope.visible.value=="true"), - "drilldownURL" : drilldownURL, - "drilldownParams" : "", + "drilldownURL" : raptorReportFactory.drillDownURL, + "drilldownParams" : raptorReportFactory.drillDownParams, "drilldownType" : "" } raptorReportFactory.saveColumnEditInfo(colInfo).then(function(data){ @@ -600,26 +600,46 @@ appDS2.controller('reportStepController', function($scope,$http,$location, $rout }); }; - $scope.openDrillDownReportPopup = function (reportId) { + $scope.openDrillDownReportPopup = function (reportId,parentReportId) { var modalInstance = $modal.open({ scope: $scope, animation: $scope.animationsEnabled, templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-drilldown-edit.html', sizeClass: 'modal-large', controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','reportId', function ($scope, $modalInstance, $http, $log, raptorReportFactory, reportId) { + + $scope.drillDownOptionList =[]; $scope.selectedvalueradioGroup = {"name":""}; $scope.selectedChildReportFormField = {"value":""}; $scope.selectedChildReportColumn = {"value":""}; $scope.fixedValue = {"value":""}; $scope.suppressValues = {"value":""}; - raptorReportFactory.getChildReportFormField(reportId).then(function(data){ - $scope.childReportFF =data; + raptorReportFactory.getChildReportFormField(reportId).then(function(data){ + for (var i=0;i<data.length;i++) { + $scope.drillDownOptionList.push( + { + "name": data[i].name, + "id": data[i].id, + "selectedvalueradioGroup":{"name":""}, + "selectedChildReportFormField":{"value":""}, + "selectedChildReportColumn":{"value":""}, + "fixedValue":{"value":""}, + "suppressValues":{"value":""} + } + ) + } },function(error){ $log.error("raptorReportFactory: getChildReportFormField failed."); }); - raptorReportFactory.getChildReportColumn(reportId).then(function(data){ + raptorReportFactory.getChildReportFormField(parentReportId).then(function(data){ + $scope.childReportFF =data; + },function(error){ + $log.error("raptorReportFactory: getChildReportFormField failed."); + }); + + raptorReportFactory.getChildReportColumn(parentReportId).then(function(data){ $scope.childReportCol =data; },function(error){ $log.error("raptorReportFactory: getChildReportFormField failed."); @@ -628,19 +648,10 @@ appDS2.controller('reportStepController', function($scope,$http,$location, $rout raptorReportFactory.setDrillDownPopupOptions(null); $scope.complete = function() { -// if ($scope.selectedvalueradioGroup.name=="radiovalue1") { -// console.log("radio 1 selected"); -// } else if ($scope.selectedvalueradioGroup.name=="radiovalue2") { -// console.log("radio 2 selected"); -// } else if ($scope.selectedvalueradioGroup.name=="radiovalue3") { -// console.log("radio 3 selected"); -// } else if ($scope.selectedvalueradioGroup.name=="radiovalue4") { -// console.log("radio 4 selected"); -// } else if ($scope.selectedvalueradioGroup.name=="radiovalue5") { -// console.log("radio 5 selected"); -// } else { -// console.log("None selected"); -// } + + console.log("$scope.drillDownOptionList: "); + console.log($scope.drillDownOptionList); + var drillDownPopupOptions= { radioGroup : $scope.selectedvalueradioGroup.name, @@ -649,8 +660,23 @@ appDS2.controller('reportStepController', function($scope,$http,$location, $rout fixedValue: $scope.fixedValue.value, suppressValues: $scope.suppressValues.value } - raptorReportFactory.setDrillDownPopupOptions(drillDownPopupOptions); - console.log(raptorReportFactory.drillDownPopupOptions); + var drillDownParams = ""; + var ampStr =""; + for (var i=0;i<$scope.drillDownOptionList.length; i++) { + if (drillDownParams!="") { + ampStr = "&"; + } + if ($scope.drillDownOptionList[i].selectedvalueradioGroup.name=="fixedValue"){ + drillDownParams = drillDownParams + ampStr + $scope.drillDownOptionList[i].id + "="+$scope.drillDownOptionList[i].fixedValue.value; + } else if ($scope.drillDownOptionList[i].selectedvalueradioGroup.name=="reportFF"){ + drillDownParams = drillDownParams + ampStr + $scope.drillDownOptionList[i].id + "=[!"+$scope.drillDownOptionList[i].selectedChildReportFormField.value + "]"; + } else if ($scope.drillDownOptionList[i].selectedvalueradioGroup.name=="reportCol"){ + drillDownParams = drillDownParams + ampStr + $scope.drillDownOptionList[i].id + "=["+$scope.drillDownOptionList[i].selectedChildReportColumn.value + "]"; + } + } + raptorReportFactory.setDrillDownPopupOptions(reportId,drillDownParams); + console.log(raptorReportFactory.drillDownURL); + console.log(raptorReportFactory.drillDownParams); $modalInstance.close(); }; @@ -970,8 +996,10 @@ appDS2.controller('reportStepController', function($scope,$http,$location, $rout }); $scope.$on('openDrillDownpage', function(event, reportId) { + console.log("$scope.reportId"); + console.log($scope.reportId); if (reportId!="") { - $scope.openDrillDownReportPopup(reportId); + $scope.openDrillDownReportPopup(reportId,$scope.reportId); } }); |