From 40a17c1d7e5f0edca350a49210e16223a875d290 Mon Sep 17 00:00:00 2001 From: "RAMALINGAM, SUNDAR (sr7234)" Date: Wed, 25 Jul 2018 16:13:16 -0400 Subject: Reporting Enhancements Issue-ID: PORTAL-314 Remote DB logic is added to enhance RAPTOR to pull content from different DB as well as Different DB TYPE Change-Id: I5cb343cd9daa912d78e7a8e409d28c8845d9afb4 Signed-off-by: RAMALINGAM, SUNDAR (sr7234) --- .../ds2-reports/report-run-controller.js | 7 ++++--- .../ds2-reports/report-step-controller.js | 18 +++++++++++++++++- .../DS2-view-models/ds2-reports/report-run.html | 2 +- .../DS2-view-models/ds2-reports/steps/step1.html | 17 ++++++++++------- 4 files changed, 32 insertions(+), 12 deletions(-) (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/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 daa47900..45c300fe 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 @@ -80,8 +80,8 @@ appDS2.controller("reportRunController", ['$scope','$rootScope','$routeParams',' } else $scope.reportData.reportHeading = $scope.reportData.reportName; - if(!$scope.urlParams.hideChart && $scope.reportData.chartAvailable && $scope.reportData.totalRows>1){ - // console.log('raptor.htm?action=chart.run&'+convertQueryString($scope.urlParams)); + if( ($scope.urlParams.hideChart === undefined || $scope.urlParams.hideChart) && $scope.reportData.chartAvailable && $scope.reportData.totalRows>=1){ + //console.log('raptor.htm?action=chart.run&'+convertQueryString($scope.urlParams)); $http.get('raptor.htm?action=chart.run&'+convertQueryString($scope.urlParams)).then( function(response){ $scope.showChart = true; @@ -175,7 +175,7 @@ appDS2.controller("reportRunController", ['$scope','$rootScope','$routeParams',' //console.log(stacktraceFP + " " + $scope.reportData.errormessage); } if(!pagination) { - if(!$scope.urlParams.hideChart && $scope.reportData.chartAvailable && $scope.reportData.totalRows>1){ + if( ($scope.urlParams.hideChart === undefined || $scope.urlParams.hideChart) && $scope.reportData.chartAvailable && $scope.reportData.totalRows>=1){ // console.log('raptor.htm?action=chart.run&c_master='+$scope.urlParams.c_master+'&'+formFieldsUrl+'display_content=Y&r_page='+(paginationOptions.pageNumber-1)); $http.get('raptor.htm?action=chart.run&c_master='+$scope.urlParams.c_master+'&'+formFieldsUrl+'display_content=Y&r_page='+(paginationOptions.pageNumber-1)).then( function(response) { @@ -209,6 +209,7 @@ appDS2.controller("reportRunController", ['$scope','$rootScope','$routeParams',' $scope.gridOptions = { pageNumber: 1, + useExternalPagination: true, sort : null, paginationPageSizes: [5], paginationPageSize: 5, 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 43f877c3..54a14242 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 @@ -95,8 +95,14 @@ appDS2.controller('reportStepController', function($scope,$http,$location, $rout {name:'HidePdf', selected:false} ] +/* $scope.definitionData.dbSrcOptions=[ + {text:'local', value:'local', selected:true}, + {text:'e911dev_leto07', value:'e911dev_leto07', selected:false}, + ]*/ + $scope.pageSizeValues=['10','25','50','100','500']; $scope.pageSizeOptions =[]; + $scope.dbSrcOptions =[]; $scope.maxRowValues = ['500','1000','2000','3000','4000','5000','10000','15000','20000','25000','30000','35000','40000','45000','50000','65000'] $scope.maxRowOptions =[]; $scope.frozenColValues = ['0','1','2','3','4']; @@ -110,7 +116,8 @@ appDS2.controller('reportStepController', function($scope,$http,$location, $rout /******create*****/ if(!$scope.isEdit){ $scope.definitionData.reportType = 'Linear'; - $scope.definitionData.dbInfo = 'Local'; + //$scope.definitionData.dbInfo = 'Local'; + //$scope.definitionData.dbSrcOptions = ['Local']; } /****end create***/ @@ -120,6 +127,10 @@ appDS2.controller('reportStepController', function($scope,$http,$location, $rout raptorReportFactory.getDefinitionByReportId(id).then(function(data){ $scope.showLoader=false; $scope.definitionData = data; + $scope.definitionData.dbSrc=data.dbInfo; + $scope.definitionData.dbSrcOptions = data.dbInfoList; + console.log($scope.definitionData.dbSrcOptions[0].name); + $scope.showLoader = false; for(x in data.displayOptions){ if(data.displayOptions[x].name=='HideFormFields') @@ -156,6 +167,7 @@ appDS2.controller('reportStepController', function($scope,$http,$location, $rout } $scope.constructureDefDropDown = function(){ + for(i in $scope.pageSizeValues){ var v = { value :$scope.pageSizeValues[i], @@ -202,6 +214,10 @@ appDS2.controller('reportStepController', function($scope,$http,$location, $rout $scope.constructDef = function(){ var data =Object.assign({}, $scope.definitionData); + if($scope.definitionData.dbSrc){ + console.log("Hello World ", $scope.definitionData.dbSrc); + data.dbInfo = $scope.definitionData.dbSrc; + } for(x in $scope.definitionData.displayOptions){ if($scope.definitionData.displayOptions[x].name=='HideFormFields') data.displayOptions[x].selected = $scope.displayOptions.hideFormFields diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-run.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-run.html index 7b2c23e1..ba609151 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-run.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-run.html @@ -112,7 +112,7 @@ body {
+ style="height: {{gridHeight}}">
{{reportData.message}} diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step1.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step1.html index a9baadf8..64d31d97 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step1.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step1.html @@ -24,20 +24,23 @@
- +
- +
- -
- -
+ + + + +
@@ -210,4 +213,4 @@
-
\ No newline at end of file +
-- cgit 1.2.3-korg