From f51a3e2b128f0b96bc9ed67dfc3081f4b41d1303 Mon Sep 17 00:00:00 2001 From: "Kishore Reddy, Gujja (kg811t)" Date: Fri, 8 Jun 2018 16:40:16 -0400 Subject: Junit Test Cases & Raptors Issue-ID: PORTAL-273. PORTAL-301 Covered JUNITS for sdk modules and RAPTOR reports fixes Change-Id: Ifaf3bf06f0ec123051a791cc8e7f10662f97a525 Signed-off-by: Kishore Reddy, Gujja (kg811t) --- .../ds2-reports/report-chart-controller.js | 56 +- .../DS2-controllers/ds2-reports/report-router.js | 80 +- .../ds2-reports/report-run-controller.js | 99 +- .../ds2-reports/report-search-controller.js | 70 +- .../ds2-reports/report-step-controller.js | 1850 +++++++------------ .../ds2-raptor-report/raptorReportFactory.js | 79 + .../ds2-raptor-report/reportModalControllers.js | 423 +++++ .../DS2-view-models/ds2-reports/all-reports.html | 9 +- .../ds2-reports/directive/dynamicform.js | 39 +- .../ds2-reports/modal/report-del-confirm.html | 38 +- .../modal/report-formfield-del-confirm.html | 37 +- .../modal/report-security-role-del-confirm.html | 39 +- .../modal/report-security-user-del-confirm.html | 38 +- .../modal/report-user-role-confirm-toggle.html | 41 +- .../ds2-reports/modal/report-wizard-col-edit.html | 338 ++-- .../modal/report-wizard-formfield-edit.html | 253 +-- .../modal/report-wizard-test-run-sql.html | 89 +- .../ds2-reports/report-chart-wizard.html | 1897 +++++++++++--------- .../DS2-view-models/ds2-reports/report-run.html | 156 +- .../DS2-view-models/ds2-reports/report-search.html | 7 +- .../DS2-view-models/ds2-reports/report-step.html | 35 + .../DS2-view-models/ds2-reports/steps/step1.html | 213 +++ .../DS2-view-models/ds2-reports/steps/step2.html | 26 + .../DS2-view-models/ds2-reports/steps/step3.html | 34 + .../DS2-view-models/ds2-reports/steps/step4.html | 47 + .../DS2-view-models/ds2-reports/steps/step5.html | 172 ++ .../DS2-view-models/ds2-reports/steps/step6.html | 34 + .../DS2-view-models/ds2-reports/steps/step7.html | 16 + .../ds2-reports/wz_steps/json/step1.json | 22 +- 29 files changed, 3639 insertions(+), 2598 deletions(-) create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-services/ds2-raptor-report/reportModalControllers.js create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-step.html create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step1.html create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step2.html create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step3.html create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step4.html create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step5.html create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step6.html create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step7.html (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp') 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 8fa14643..b15205fc 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 @@ -1,4 +1,4 @@ -appDS2.controller('reportChartController', function ($scope, $rootScope, $timeout, $window, $http, $routeParams,modalService) { +appDS2.controller('reportChartController', function ($scope, $rootScope, $timeout, $window, $modal, $http, $routeParams,modalService) { $scope.showLoader = true; $scope.commonOptionOpen = false; $scope.additionalOptionOpen = false; @@ -15,11 +15,16 @@ appDS2.controller('reportChartController', function ($scope, $rootScope, $timeou $scope.populateChrtWzdFields = function() { $scope.reportRunJson = {}; + $scope.showLoader=true; $http.get("raptor.htm?action=chart.json&c_master="+$routeParams.reportId).then(function (response) { + $scope.showLoader=false; $scope.reportRunJson = response.data; //Set chart type - $scope.reportRunJson.commonChartOptions.animateAnimatedChart = $scope.reportRunJson.commonChartOptions.animateAnimatedChart+""; - $scope.reportRunJson.commonChartOptions.hideLegend = $scope.reportRunJson.commonChartOptions.hideLegend + ""; + if($scope.reportRunJson.commonChartOptions!=null){ + $scope.reportRunJson.commonChartOptions.animateAnimatedChart = $scope.reportRunJson.commonChartOptions.animateAnimatedChart+""; + $scope.reportRunJson.commonChartOptions.hideLegend = $scope.reportRunJson.commonChartOptions.hideLegend + ""; + } + $scope.reportRunJson.showTitle = $scope.reportRunJson.showTitle + ""; // if barChartOptions is not null @@ -126,9 +131,11 @@ appDS2.controller('reportChartController', function ($scope, $rootScope, $timeou $scope.saveChartData = function() { $scope.showLoader = true; - - $scope.reportRunJson.commonChartOptions.animateAnimatedChart = ($scope.reportRunJson.commonChartOptions.animateAnimatedChart=="true") - $scope.reportRunJson.commonChartOptions.hideLegend = ($scope.reportRunJson.commonChartOptions.hideLegend=="true"); + if($scope.reportRunJson.commonChartOptions){ + $scope.reportRunJson.commonChartOptions.animateAnimatedChart = ($scope.reportRunJson.commonChartOptions.animateAnimatedChart=="true") + $scope.reportRunJson.commonChartOptions.hideLegend = ($scope.reportRunJson.commonChartOptions.hideLegend=="true"); + } + $scope.reportRunJson.showTitle = ($scope.reportRunJson.showTitle=="true"); $scope.reportRunJson.chartTypeJSON = { @@ -190,12 +197,12 @@ appDS2.controller('reportChartController', function ($scope, $rootScope, $timeou //add the remove list to the json $scope.reportRunJson.rangeAxisRemoveList= $scope.rangeAxisRemoveList; $http.post("save_chart", JSON.stringify($scope.reportRunJson)).success(function(data, status) { - $scope.successSubmit=true; + $scope.successSubmit=true; $scope.showLoader = false; $scope.reportRunJson.commonChartOptions.animateAnimatedChart = $scope.reportRunJson.commonChartOptions.animateAnimatedChart+""; $scope.reportRunJson.commonChartOptions.hideLegend = $scope.reportRunJson.commonChartOptions.hideLegend + ""; $scope.reportRunJson.showTitle = $scope.reportRunJson.showTitle + ""; - if ($scope.reportRunJson.chartType == "BarChart3D") { + if ($scope.reportRunJson.chartType == "BarChart3D" && $scope.reportRunJson.barChartOptions) { $scope.reportRunJson.barChartOptions.displayBarControls = $scope.reportRunJson.barChartOptions.displayBarControls+""; $scope.reportRunJson.barChartOptions.minimizeXAxisTickers = $scope.reportRunJson.barChartOptions.minimizeXAxisTickers+""; $scope.reportRunJson.barChartOptions.stackedChart = $scope.reportRunJson.barChartOptions.stackedChart+""; @@ -203,6 +210,7 @@ appDS2.controller('reportChartController', function ($scope, $rootScope, $timeou $scope.reportRunJson.barChartOptions.verticalOrientation = $scope.reportRunJson.barChartOptions.verticalOrientation +""; $scope.reportRunJson.barChartOptions.xAxisDateType = $scope.reportRunJson.barChartOptions.xAxisDateType +""; } + $scope.successPopUp(); $scope.populateChrtWzdFields(); }) } @@ -419,6 +427,38 @@ appDS2.controller('reportChartController', function ($scope, $rootScope, $timeou $rootScope.isViewRendering = false; }); + $scope.successPopUp = function (msg) { + var modalInstance = $modal.open({ + templateUrl: 'app/fusion/scripts/DS2-modal/success_modal.html', + controller: ModalInstanceCtrl, + sizeClass: 'modal-small', + resolve: { + msg: function () { + var message = { + title: '', + text: msg + }; + return message; + } + } + }); + }; + + $scope.errorPopUp = function (msg) { + var modalInstance = $modal.open({ + templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html', + controller: ModalInstanceCtrl, + sizeClass: 'modal-small', + resolve: { + msg: function () { + return msg; + } + } + }); + }; + var ModalInstanceCtrl = function ($scope, $modalInstance, msg,$rootScope) { + $scope.msg=msg; + } }); diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-router.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-router.js index 1e22cca3..58913a40 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-router.js +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-router.js @@ -1,41 +1,41 @@ appDS2.config(['$routeProvider', - function($routeProvider) { - $routeProvider. - when('/', { - templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/report-search.html', - controller: 'reportSearchController' - }). - when('/report_search', { - templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/report-search.html', - controller: 'reportSearchController' - }). - when('/report_run/:reportUrlParams*', { - templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/report-run.html', - controller: 'reportRunController' - }). - when('/report_chart_wizard/:reportId', { - templateUrl: 'static/fusion/raptor/ebz/report_chart_wizard.html', - controller: 'ChartController' - }). - when('/report_chart/:reportId', { - templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/report-chart-wizard.html', - controller: 'reportChartController' - }). - when("/report_wizard", { - templateUrl : "app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/report-step.html", - controller: "reportStepController" - }). - when("/report_wizard/:reportId", { - templateUrl : "app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/report-step.html", - controller: "reportStepController" - }). - when("/report_wizard/:reportMode/:reportId", { - templateUrl : "app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/report-step.html", - controller: "reportStepController" - }). - when("/report_import", { - templateUrl : "app/fusion/scripts/DS2-view-models/ds2-reports/report-import.html", - controller: "reportImportController" - }) - ; - }]); \ No newline at end of file + function($routeProvider) { + $routeProvider. + when('/', { + templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/report-search.html', + controller: 'reportSearchController' + }). + when('/report_search', { + templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/report-search.html', + controller: 'reportSearchController' + }). + when('/report_run/:reportUrlParams*', { + templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/report-run.html', + controller: 'reportRunController' + }). + when('/report_chart_wizard/:reportId', { + templateUrl: 'static/fusion/raptor/ebz/report_chart_wizard.html', + controller: 'ChartController' + }). + when('/report_chart/:reportId', { + templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/report-chart-wizard.html', + controller: 'reportChartController' + }). + when("/report_wizard", { + templateUrl : "app/fusion/scripts/DS2-view-models/ds2-reports/report-step.html", + controller: "reportStepController" + }). + when("/report_wizard/:reportId", { + templateUrl : "app/fusion/scripts/DS2-view-models/ds2-reports/report-step.html", + controller: "reportStepController" + }). + when("/report_wizard/:reportMode/:reportId", { + templateUrl : "app/fusion/scripts/DS2-view-models/ds2-reports/report-step.html", + controller: "reportStepController" + }). + when("/report_import", { + templateUrl : "app/fusion/scripts/DS2-view-models/ds2-reports/report-import.html", + controller: "reportImportController" + }) + ; +}]); \ No newline at end of file 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 6eb0afe6..daa47900 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 @@ -1,5 +1,5 @@ -appDS2.controller("reportRunController", ['$scope','$rootScope','$routeParams','$http','dateFilter', '$window', '$timeout', 'rowSorter', - function ($scope,$rootScope,$routeParams,$http,dateFilter,$window,$timeout,rowSorter) { +appDS2.controller("reportRunController", ['$scope','$rootScope','$routeParams','$http','dateFilter', '$window', '$timeout', 'rowSorter','$modal', + function ($scope,$rootScope,$routeParams,$http,dateFilter,$window,$timeout,rowSorter,$modal) { $scope.dateformat = "MM/dd/yyyy"; $scope.datetimeformat = "MM/dd/yyyy hh:mm a"; $scope.showFormFields = false; @@ -14,7 +14,7 @@ appDS2.controller("reportRunController", ['$scope','$rootScope','$routeParams',' value: false }; $scope.isInProgress = true; - + $scope.showLoader=false; if($routeParams.reportUrlParams.indexOf("parent___params===")>-1) { $scope.showBackButton = true; $scope.parentReportUrlParams = $routeParams.reportUrlParams.substring($routeParams.reportUrlParams.indexOf("parent___params===")+18); @@ -67,36 +67,41 @@ appDS2.controller("reportRunController", ['$scope','$rootScope','$routeParams',' function(response){ // console.log(response); $scope.isInProgress = false; - $scope.reportData = response.data; - // console.log('reportData report run container response',$scope.reportData); - if ($scope.reportData.reportTitle) { - $scope.reportData.reportHeading = $scope.reportData.reportTitle; - if ($scope.reportData.reportSubTitle) { - $scope.reportData.reportSubTitle = $scope.reportData.reportSubTitle; + if(response.data.errormessage!=null && response.data.errormessage!=''){ + $scope.errorPopUp(response.data.errormessage); + }else{ + $scope.reportData = response.data; + // console.log('reportData report run container response',$scope.reportData); + if ($scope.reportData.reportTitle) { + $scope.reportData.reportHeading = $scope.reportData.reportTitle; + if ($scope.reportData.reportSubTitle) { + $scope.reportData.reportSubTitle = $scope.reportData.reportSubTitle; + } } + 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)); + $http.get('raptor.htm?action=chart.run&'+convertQueryString($scope.urlParams)).then( + function(response){ + $scope.showChart = true; + document.getElementById('chartiframe').contentWindow.document.write(response.data); + document.getElementById('chartiframe').contentWindow.document.close(); + }); + } + + if($scope.reportData.displayForm && $scope.reportData.formFieldList && $scope.reportData.formFieldList.length>0 && !$scope.urlParams.hideFormFields){ + $scope.showFormFields = true; + } } - 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)); - $http.get('raptor.htm?action=chart.run&'+convertQueryString($scope.urlParams)).then( - function(response){ - $scope.showChart = true; - document.getElementById('chartiframe').contentWindow.document.write(response.data); - document.getElementById('chartiframe').contentWindow.document.close(); - }); - } - - if($scope.reportData.displayForm && $scope.reportData.formFieldList && $scope.reportData.formFieldList.length>0 && !$scope.urlParams.hideFormFields){ - $scope.showFormFields = true; - } + }); $scope.getFormFieldSelectedValuesAsURL = function(){ var formFieldsUrl = ''; $scope.reportData.formFieldList.forEach(function(formField) { if(formField.fieldType==='LIST_BOX') { - if($scope.formFieldSelectedValues && $scope.formFieldSelectedValues[formField.fieldId] && $scope.formFieldSelectedValues[formField.fieldId].value != '') { - formFieldsUrl = formFieldsUrl+formField.fieldId+'='+$scope.formFieldSelectedValues[formField.fieldId].value+'&'; + if($scope.formFieldSelectedValues && $scope.formFieldSelectedValues[formField.fieldId] ) { + formFieldsUrl = formFieldsUrl+formField.fieldId+'='+$scope.formFieldSelectedValues[formField.fieldId]+'&'; } } else if(formField.fieldType==='LIST_MULTI_SELECT') { if($scope.formFieldSelectedValues[formField.fieldId].length >0) { @@ -114,11 +119,13 @@ appDS2.controller("reportRunController", ['$scope','$rootScope','$routeParams',' formFieldsUrl = formFieldsUrl+formField.fieldId+'='+$scope.formFieldSelectedValues[formField.fieldId]+'&'; } }); + //formFieldsUrl = str.slice(0, -1); return formFieldsUrl; } $scope.runReport = function(pagination){ + $scope.showLoader=true; var formFieldsUrl = $scope.getFormFieldSelectedValuesAsURL(); /*if ($scope.reportData.reportTitle) $scope.reportData.reportHeading = $scope.reportData.reportTitle; @@ -149,6 +156,7 @@ appDS2.controller("reportRunController", ['$scope','$rootScope','$routeParams',' // console.log('raptor.htm?action=report.run.container&c_master='+$scope.urlParams.c_master+'&'+formFieldsUrl+'refresh=Y&display_content=Y&r_page='+(paginationOptions.pageNumber-1)); $http.get('raptor.htm?action=report.run.container&c_master='+$scope.urlParams.c_master+'&'+formFieldsUrl+'refresh=Y&display_content=Y&r_page='+(paginationOptions.pageNumber-1)).then( function(response){ + $scope.showLoader=false; $scope.reportData = response.data; if ($scope.reportData.reportTitle) { $scope.reportData.reportHeading = $scope.reportData.reportTitle; @@ -207,6 +215,7 @@ appDS2.controller("reportRunController", ['$scope','$rootScope','$routeParams',' paginationTemplate: correctTotalPaginationTemplate, columnDefs: [], data: [], + enableSorting: true, enableGridMenu: true, enableSelectAll: true, gridMenuCustomItems : [ @@ -218,10 +227,10 @@ appDS2.controller("reportRunController", ['$scope','$rootScope','$routeParams',' action : function($event) { $window.open($scope.reportEditURL,'_self'); }, order : 211 }, - { title : 'Export All data as Excel 2007', + /*{ title : 'Export All data as Excel 2007', action : function($event) { $window.open('raptor.htm?c_master='+$scope.reportData.reportID+'&r_action=report.download.excel2007.session','_self'); - }, order : 212 }, + }, order : 212 },*/ { title : 'Export All data as Excel', action : function($event) { $window.open('raptor.htm?c_master='+$scope.reportData.reportID+'&r_action=report.download.excel.session','_self'); @@ -323,9 +332,43 @@ appDS2.controller("reportRunController", ['$scope','$rootScope','$routeParams',' $http.get('raptor.htm?action=report.formfields.run.container&c_master='+$scope.reportData.reportID+'&'+formFieldsUrl).then( function(response){ $scope.reportData = response.data; + if($scope.reportData.reportHeading==null || $scope.reportData.reportHeading=='') + $scope.reportData.reportHeading = ($scope.reportData.reportTitle=='')?$scope.reportData.reportName:$scope.reportData.reportTitle; }); }; $timeout(function() { $rootScope.isViewRendering = false; }); + $scope.successPopUp = function (msg) { + var modalInstance = $modal.open({ + templateUrl: 'app/fusion/scripts/DS2-modal/success_modal.html', + controller: ModalInstanceCtrl, + sizeClass: 'modal-small', + resolve: { + msg: function () { + var message = { + title: '', + text: msg + }; + return message; + } + } + }); + }; + + $scope.errorPopUp = function (msg) { + var modalInstance = $modal.open({ + templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html', + controller: ModalInstanceCtrl, + sizeClass: 'modal-small', + resolve: { + msg: function () { + return msg; + } + } + }); + }; + var ModalInstanceCtrl = function ($scope, $modalInstance, msg,$rootScope) { + $scope.msg=msg; + } }]); diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-search-controller.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-search-controller.js index e1c5e1e8..36a541ed 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-search-controller.js +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-search-controller.js @@ -2,13 +2,17 @@ appDS2.requires.push('ui.grid'); appDS2.requires.push('ui.grid.pagination'); appDS2.requires.push('ui.grid.resizeColumns'); appDS2.controller("reportSearchController", ['$scope','$rootScope','$http','$timeout','uiGridConstants','$modal','$q','$log','raptorReportFactory',function ($scope,$rootScope,$http,$timeout,uiGridConstants,$modal,$q,$log,raptorReportFactory) { - + $scope.showLoader=false; $scope.getSearchData = function(){ + $scope.showLoader=true; + raptorReportFactory.getSearchData().then(function(data){ $scope.searchdData = data; },function(error){ $log.error("raptorReportFactory: getSearchData failed."); - }); + }).finally(function() { + $scope.showLoader=false;// Always execute this on both error and success + });; } $scope.getSearchData(); @@ -21,12 +25,15 @@ appDS2.controller("reportSearchController", ['$scope','$rootScope','$http','$tim if($scope.reportName && $scope.reportName!=''){ searchParams = searchParams+'&rep_name='+$scope.reportName+'&rep_name_options='+$scope.operatorRepName.index; } - + $scope.showLoader=true; var pageSearchParameter = ($scope.paginationOptions.pageNumber-1)+searchParams raptorReportFactory.getSearchDataAtPage(pageSearchParameter).then(function(data){ $scope.searchdData = data },function(error){ $log.error("raptorReportFactory: getSearchDataAtPage failed."); + }).finally(function() { + $scope.showLoader=false;// Always execute this on both error and success + }); }; @@ -37,6 +44,57 @@ appDS2.controller("reportSearchController", ['$scope','$rootScope','$http','$tim sort: null }; + function convertValue(v){ + return parseInt(v.displayValue); + } + + $scope.getSortingAlgorithm= function (columnName) { + return function(a, b, rowA, rowB, direction) { + console.log("sorting by column " + columnName,a,b); + if(columnName=='rep_id'){ + if(a && b && a.displayValue && b.displayValue){ + if (convertValue(a) == convertValue(b)) return 0; + if (convertValue(a) < convertValue(b)) return -1; + if (convertValue(a) > convertValue(b)) return 1; + }else{ + return 0; + } + }else if(columnName=='rep_name'){ + if(a && b && a.displayValue && b.displayValue){ + if (a.displayValue == b.displayValue) return 0; + if (a.displayValue < b.displayValue) return -1; + if (a.displayValue > b.displayValue) return 1; + }else{ + return 0; + } + }else if(columnName=='descr'){ + if(a && b && a.displayValue && b.displayValue){ + if (a.displayValue == b.displayValue) return 0; + if (a.displayValue < b.displayValue) return -1; + if (a.displayValue > b.displayValue) return 1; + }else{ + return 0; + } + }else if(columnName=='owner'){ + if(a && b && a.displayValue && b.displayValue){ + if (a.displayValue == b.displayValue) return 0; + if (a.displayValue < b.displayValue) return -1; + if (a.displayValue > b.displayValue) return 1; + }else{ + return 0; + } + }else if(columnName=='create_date'){ + if(a && b && a.displayValue && b.displayValue){ + if (a.displayValue == b.displayValue) return 0; + if (a.displayValue < b.displayValue) return -1; + if (a.displayValue > b.displayValue) return 1; + }else{ + return 0; + } + } + } + }; + var correctTotalPaginationTemplate = //same as normal template, but fixed totals: {{(((grid.options.paginationCurrentPage-1)*grid.options.paginationPageSize)+1)}} {{(grid.options.paginationCurrentPage*grid.options.paginationPageSize>grid.options.totalItems?grid.options.totalItems:grid.options.paginationCurrentPage*grid.options.paginationPageSize)}} "
0\">/ {{ paginationApi.getTotalPages() }}
1\"> {{sizesLabel}}
{{grid.options.paginationPageSize}} {{sizesLabel}}
0\">{{(((grid.options.paginationCurrentPage-1)*grid.options.paginationPageSize)+1)}} - {{(grid.options.paginationCurrentPage*grid.options.paginationPageSize>grid.options.totalItems?grid.options.totalItems:grid.options.paginationCurrentPage*grid.options.paginationPageSize)}} {{paginationOf}} {{grid.options.totalItems}} {{totalItemsLabel}}
"; @@ -103,15 +161,15 @@ appDS2.controller("reportSearchController", ['$scope','$rootScope','$http','$tim } else { $scope.gridOptions.columnDefs.push({ displayName: entry.columnTitle, field: entry.columnId, enableSorting: true, + sortingAlgorithm: $scope.getSortingAlgorithm(entry.columnId), cellTemplate: '
{{COL_FIELD.displayValue}}
' }); } }); - + $scope.gridOptions.useExternalPagination=true; $scope.gridOptions.paginationPageSizes= [$scope.searchdData.metaReport.pageSize]; - $scope.gridOptions.paginationPageSize= $scope.searchdData.metaReport.pageSize; + $scope.gridOptions.paginationPageSize= 50;//$scope.searchdData.metaReport.pageSize; $scope.gridOptions.totalItems = $scope.searchdData.metaReport.totalSize; - $scope.gridOptions.data = []; $scope.searchdData.rows[0].forEach(function(entry) { var localData = {}; 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 3196b336..43f877c3 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 @@ -1,1263 +1,763 @@ appDS2.controller('reportStepController', function($scope,$http,$location, $routeParams, $q, $modal,$log,$window, raptorReportFactory, stepFormFactory) { + /*****************Init values*********************/ + $scope.reportIdURL = $routeParams.reportId; + $scope.isEdit = ($scope.reportIdURL==null||$scope.reportIdURL=='')?false:true; + $scope.isDefReady = $scope.isEdit; + $scope.activeTabsId = 'definition'; + $scope.pageMsg ='' + $scope.stepNum = 0; + $scope.stepTabs=[ + { + title: 'Definition', + id: 'definition', + uniqueId: 'uniqueStep1', + tabPanelId: 'definitionTab', + disabled: false + + }, { + title: 'SQL', + id: 'sql', + uniqueId: 'uniqueStep2', + tabPanelId: 'sqlTab', + disabled: (!$scope.isDefReady) + }, { + title: 'Columns', + id: 'columns', + uniqueId: 'uniqueTab3x', + tabPanelId: 'columnsTab', + disabled: (!$scope.isDefReady) + }, { + title: 'Form Fields', + id: 'formFields', + uniqueId: 'uniqueTab4x', + tabPanelId: 'formFieldsTab', + disabled: (!$scope.isDefReady) + }, { + title: 'Security', + id: 'security', + uniqueId: 'uniqueTab5x', + tabPanelId: 'securityTab', + disabled: (!$scope.isDefReady) + }, { + title: 'Log', + id: 'log', + uniqueId: 'uniqueTab6x', + tabPanelId: 'logTab', + disabled: (!$scope.isDefReady) + }, { + title: 'Run', + id: 'run', + uniqueId: 'uniqueTab7x', + tabPanelId: 'runTab', + disabled: (!$scope.isDefReady) + } + + ]; + $scope.$watch('activeTabsId', function (newVal, oldVal) { + if(newVal !== oldVal) { + $scope.init(); + } + }); - $scope.showLoader = true; - // tabs for report wizard steps: - $scope.activeTabsId = 'Definition'; - $scope.addReportUserId = {'id':''}; - $scope.addReportRoleId = {'id':''}; - // For all the dropdown box, please declare the active selection variable in the following manner: - // $scope.selectedOpt = {}; - // $scope.selectedOpt.value = ""; + $scope.renderStep = function(stepNum){ + var containerElement = angular.element(document.getElementById("stepView")); + containerElement.empty(); + $scope.stepNum = stepNum; + var jsonSrcName = getJsonSrcName(stepNum); + stepFormFactory.renderForm(jsonSrcName, containerElement, $scope); + } + $scope.next = function(){ + $scope.stepNum = $scope.stepNum +1; + $scope.activeTabsId = $scope.stepTabs[$scope.stepNum].id; + }; + + + $scope.previous = function(){ + $scope.stepNum = $scope.stepNum -1; + $scope.activeTabsId = $scope.stepTabs[$scope.stepNum].id; + } + + /*******************Step 1 Definitions****************/ + $scope.displayOptions={ + hideFormFields:false, + hideChart:false, + hideReportData:false, + hideExcel:false, + hidePdf:false + } + $scope.reportIdURL = $routeParams.reportId; + $scope.definitionData={}; + $scope.definitionData.displayOptions=[ + {name:'HideFormFields', selected:false}, + {name:'HideChart', selected:false}, + {name:'HideReportData', selected:false}, + {name:'HideExcel', selected:false}, + {name:'HidePdf', selected:false} + ] + + $scope.pageSizeValues=['10','25','50','100','500']; + $scope.pageSizeOptions =[]; + $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']; + $scope.frozenColOptions =[]; + $scope.dataGridAlignValues = ['Left','Right','Center']; + $scope.dataGridAlignOptions =[]; + $scope.dataContainerValues = ['10','20','30','40','50','60','70','80','90','100','110','120','130','140','150','160','170','180','190','200']; + $scope.dataContainerOptions =[]; + $scope.runTimeFormNumValues = ['1','2','3','4']; + $scope.runTimeFormNumOptions =[]; + /******create*****/ + if(!$scope.isEdit){ + $scope.definitionData.reportType = 'Linear'; + $scope.definitionData.dbInfo = 'Local'; + } + /****end create***/ + + /*functions*/ $scope.getDefinitionById = function(id) { + $scope.showLoader=true; raptorReportFactory.getDefinitionByReportId(id).then(function(data){ - $scope.loadDefinition(data); + $scope.showLoader=false; $scope.definitionData = data; $scope.showLoader = false; + for(x in data.displayOptions){ + if(data.displayOptions[x].name=='HideFormFields') + $scope.displayOptions.hideFormFields = data.displayOptions[x].selected; + else if(data.displayOptions[x].name=='HideChart') + $scope.displayOptions.hideChart = data.displayOptions[x].selected; + else if(data.displayOptions[x].name=='HideReportData') + $scope.displayOptions.hideReportData = data.displayOptions[x].selected; + else if(data.displayOptions[x].name=='HideExcel') + $scope.displayOptions.hideExcel = data.displayOptions[x].selected; + else if(data.displayOptions[x].name=='HidePdf') + $scope.displayOptions.hidePdf = data.displayOptions[x].selected; + } + + $scope.definitionData.frozenColumns = $scope.definitionData.frozenColumns+''; + $scope.definitionData.numFormCols = $scope.definitionData.numFormCols+''; + $scope.definitionData.allowScheduler = data.allowScheduler=='Y'?true:false; + $scope.definitionData.sizedByContent = data.sizedByContent=='Y'?true:false; + + $scope.definitionData.oneTimeRec = data.oneTimeRec=='Y'?true:false; + $scope.definitionData.hourlyRec = data.hourlyRec=='Y'?true:false; + $scope.definitionData.dailyRec = data.dailyRec=='Y'?true:false; + $scope.definitionData.dailyMFRec = data.dailyMFRec=='Y'?true:false; + $scope.definitionData.weeklyRec = data.weeklyRec=='Y'?true:false; + $scope.definitionData.monthlyRec = data.monthlyRec=='Y'?true:false; + + if($scope.definitionData.reportTitle==null || $scope.definitionData.reportTitle=='') + $scope.definitionData.reportTitle = $scope.definitionData.reportName; },function(error){ - $log.error("raptorReportFactory: getSearchData failed."); + $scope.errorPopUp(error); + $log.error("raptorReportFactory: getDefinitionById failed."); $scope.showLoader = false; }); } - $scope.addReportSecurityUser = function(userId) { - raptorReportFactory.addReportSecurityUser(userId).then(function(data){ - $scope.loadSecurityPage(); - },function(error){ - $log.error("raptorReportFactory: addReportSecurityUser failed."); - }); + $scope.constructureDefDropDown = function(){ + for(i in $scope.pageSizeValues){ + var v = { + value :$scope.pageSizeValues[i], + text :$scope.pageSizeValues[i] + } + $scope.pageSizeOptions.push(v); + } + for(i in $scope.maxRowValues){ + var v = { + value :$scope.maxRowValues[i], + text :$scope.maxRowValues[i] + } + $scope.maxRowOptions.push(v); + } + for(i in $scope.frozenColValues){ + var v = { + value :$scope.frozenColValues[i]+'', + text :$scope.frozenColValues[i] + } + $scope.frozenColOptions.push(v); + } + for(i in $scope.dataGridAlignValues){ + var v = { + value :$scope.dataGridAlignValues[i].toLowerCase(), + text :$scope.dataGridAlignValues[i] + } + $scope.dataGridAlignOptions.push(v); + } + for(i in $scope.dataContainerValues){ + var v = { + value :$scope.dataContainerValues[i], + text :$scope.dataContainerValues[i] + } + $scope.dataContainerOptions.push(v); + } + for(i in $scope.runTimeFormNumValues){ + var v = { + value :$scope.runTimeFormNumValues[i], + text :$scope.runTimeFormNumValues[i] + } + $scope.runTimeFormNumOptions.push(v); + } } - - $scope.removeReportSecurityUser = function(securityUser) { - var modalInstance = $modal.open({ - scope: $scope, - animation: $scope.animationsEnabled, - templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-user-del-confirm.html', - sizeClass: 'modal-large', - controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','securityUser', function ($scope, $modalInstance, $http, $log, raptorReportFactory,securityUser) { - $scope.securityUserName = securityUser.name; - $scope.ok = function() { - raptorReportFactory.removeReportSecurityUser(securityUser.id).then(function(data){ - $modalInstance.close(); - },function(error){ - $log.error("raptorReportFactory: removeReportSecurityUser failed."); - }); - } - $scope.cancel = function() { - $modalInstance.dismiss(); - }; - }], - resolve:{ - securityUser: function(){ - return securityUser; - } - } - }); - modalInstance.result.then(function () { - $scope.loadSecurityPage(); - }, function () { - }); - }; - - - $scope.addReportSecurityRole = function(roleId) { - raptorReportFactory.addReportSecurityRole(roleId).then(function(data){ - $scope.loadSecurityPage(); - },function(error){ - $log.error("raptorReportFactory: addReportSecurityRole failed."); - }); - } - - $scope.removeReportSecurityRole = function(securityRole) { - var modalInstance = $modal.open({ - scope: $scope, - animation: $scope.animationsEnabled, - templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-role-del-confirm.html', - sizeClass: 'modal-large', - controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','securityRole', function ($scope, $modalInstance, $http, $log, raptorReportFactory,securityRole) { - $scope.securityRoleName = securityRole.name; - $scope.ok = function() { - raptorReportFactory.removeReportSecurityRole(securityRole.id).then(function(data){ - $modalInstance.close(); - },function(error){ - $log.error("raptorReportFactory: removeReportSecurityRole failed."); - }); - } - $scope.cancel = function() { - $modalInstance.dismiss(); - }; - }], - resolve:{ - securityRole: function(){ - return securityRole; - } - } - }); - modalInstance.result.then(function () { - $scope.loadSecurityPage(); - }, function () { - }); - } - $scope.saveReportSecurityInfo = function(userId, isPublic) { - var securityInfo = {'userId':userId+"",'isPublic':isPublic}; - raptorReportFactory.updateReportSecurityInfo(securityInfo).then(function(data){ - $scope.loadSecurityPage(); - },function(error){ - $log.error("raptorReportFactory: updateReportSecurityInfo failed."); - }); - }; - - $scope.createNewDefinition = function() { - raptorReportFactory.createNewDefinition().then(function(data){ - $scope.loadDefinition(data); - $scope.definitionData = data; - $scope.showLoader = false; + $scope.constructDef = function(){ + var data =Object.assign({}, $scope.definitionData); + for(x in $scope.definitionData.displayOptions){ + if($scope.definitionData.displayOptions[x].name=='HideFormFields') + data.displayOptions[x].selected = $scope.displayOptions.hideFormFields + else if($scope.definitionData.displayOptions[x].name=='HideChart') + data.displayOptions[x].selected = $scope.displayOptions.hideChart + else if($scope.definitionData.displayOptions[x].name=='HideReportData') + data.displayOptions[x].selected = $scope.displayOptions.hideReportData + else if($scope.definitionData.displayOptions[x].name=='HideExcel') + data.displayOptions[x].selected = $scope.displayOptions.hideExcel + else if($scope.definitionData.displayOptions[x].name=='HidePdf') + data.displayOptions[x].selected = $scope.displayOptions.hidePdf + } + if(data.pageSize==null || data.pageSize.startsWith("Select")) + data.pageSize = null; + if(data.maxRowsInExcelCSVDownload==null || data.maxRowsInExcelCSVDownload.startsWith("Select")) + data.maxRowsInExcelCSVDownload = null; + if(data.frozenColumns==null || data.frozenColumns.startsWith("Select")) + data.frozenColumns = null; + if(data.dataGridAlign==null || data.dataGridAlign.startsWith("Select")) + data.dataGridAlign = null; + if(data.dataContainerHeight==null || data.dataContainerHeight.startsWith("Select")) + data.dataContainerHeight = null; + if(data.dataContainerWidth ==null || data.dataContainerWidth.startsWith("Select")) + data.dataContainerWidth = null; + if(data.numFormCols ==null || data.numFormCols.startsWith("Select")) + data.numFormCols = null; + + if(!$scope.isEdit) + data.reportId=-1; + if(data.reportTitle==null || data.reportTitle=='') + data.reportTitle = data.reportName; + return data; + } + $scope.updateDef = function(){ + $scope.showLoader=true; + var dataToSave = $scope.constructDef(); + raptorReportFactory.updateDefinition(dataToSave,$scope.isEdit).then(function(data){ + $scope.successPopUp('Definition is updated'); + for(x in $scope.stepTabs){ + $scope.stepTabs[x].disabled=false; + } + $scope.showLoader=false; },function(error){ - $log.error("raptorReportFactory: getSearchData failed."); + $scope.errorPopUp(error); + $log.error("report-step-controller: updateDefinition by Id failed."); }); - } - - var initializeCreateReport = function() { - $scope["selectedReportType"] ={}; - $scope.selectedReportType.value ="linear"; - $scope.selectedReportType2 ={}; - $scope.selectedReportType2.value =""; - $scope.selectedDataSource ={}; - $scope.selectedDataSource.value="local"; - $scope.sqlScript = "SELECT "; - $scope.pageSize = {"value":"50"}; } - - - var loadSqlInSession = function(){ + /*******************Step1 Ends****************/ + /*******************Step2 SQL****************/ + $scope.pageisCreating = false; + $scope.sqlScript={ + value:'' + }; + $scope.sqlTestTableData=''; + /*function*/ + $scope.getSql = function(){ + $scope.showLoader = true; raptorReportFactory.getSqlInSession().then(function(data){ $scope.sqlInSessionJSON = data; - $scope.sqlScript = data.query; - $scope.showLoader = false; + $scope.sqlScript.value = data.query; + $scope.showLoader = false; },function(error){ + $scope.errorPopUp(error); $log.error("raptorReportFactory: getSearchData failed."); }); - }; - - initializeCreateReport(); - if ($routeParams.reportMode) { - if ($routeParams.reportMode=="copy") { - raptorReportFactory.copyReportById($routeParams.reportId).then(function(data){ - $scope.$emit('RefreshInsession'); - },function(error){ - $log.error("raptorReportFactory: deleteFormFieldById failed."); - }); - } else if ($routeParams.reportMode=="import") { - $scope.$emit('RefreshInsession'); - } - } else if ($routeParams.reportId) { - $scope.getDefinitionById($routeParams.reportId); - $scope.isEdit = true; - $scope.reportId = $routeParams.reportId; - } else { - $scope.isEdit = false; - $scope.createNewDefinition(); - } - - - $scope.RunCurrentReport = function (){ - $window.location.href = "#/report_run/c_master="+$scope.reportId+"&refresh=Y"; - } - - $scope.deleteFormField = function(rowData) { - var modalInstance = $modal.open({ - scope: $scope, - animation: $scope.animationsEnabled, - templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-formfield-del-confirm.html', - sizeClass: 'modal-large', - controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','rowData', function ($scope, $modalInstance, $http, $log, raptorReportFactory, rowData) { - $scope.tempFieldId = rowData.id; - $scope.ok = function() { - raptorReportFactory.deleteFormFieldById(rowData.id).then(function(data){ - $modalInstance.close(); - },function(error){ - $log.error("raptorReportFactory: deleteFormFieldById failed."); - }); - } - $scope.cancel = function() { - $modalInstance.dismiss(); - }; - }], - resolve:{ - rowData: function(){ - return rowData; - } - } - }); - modalInstance.result.then(function () { - $scope.$emit('RefreshFormField'); - }, function () { - }); - } - - $scope.loadDefinition = function(definitionData) { - $scope.reportId = definitionData.reportId+""; - $scope.reportName = definitionData.reportName; - $scope.reportDescr = definitionData.reportDescr; - $scope.formHelpText = definitionData.formHelpText; - $scope.selectedPageSize = {"value": definitionData.pageSize+''}; - $scope.selectedMaxRowsInExcelCSVDownload = {"value": definitionData.maxRowsInExcelCSVDownload}; - $scope.reportTitle = definitionData.reportTitle; - $scope.reportSubTitle = definitionData.reportSubTitle; - $scope.selectedNumFormCols ={"value": definitionData.numFormCols+''}; - $scope.selectedFrozenColumns={"value": definitionData.frozenColumns+''}; - $scope.selectedDataGridAlign = {"value":definitionData.dataGridAlign+''}; - $scope.emptyMessage = definitionData.emptyMessage+''; - $scope.selectedDataContainerHeight = {"value":definitionData.dataContainerHeight+''}; - $scope.selectedDataContainerWidth = {"value":definitionData.dataContainerWidth+''}; - var displayAreaValue = "null" - for (var i=0; i<3; i++ ) { - if (definitionData.displayArea[i].selected) { - displayAreaValue = definitionData.displayArea[i].name; - } - } - $scope.selectedDisplayArea = {"value":displayAreaValue+""}; - - $scope.hideFormFieldsAfterRunSelected = {"value": definitionData.hideFormFieldsAfterRun} - - $scope.hideFormFieldsSelected = {"value":definitionData.displayOptions[0].selected}; - $scope.hideChartSelected = {"value":definitionData.displayOptions[1].selected}; - $scope.hideReportDataSelected = {"value":definitionData.displayOptions[2].selected}; - $scope.hideExcelSelected = {"value":definitionData.displayOptions[3].selected}; - $scope.hidePdfSelected = {"value":definitionData.displayOptions[4].selected}; - $scope.runtimeColSortDisabled = {"value":definitionData.runtimeColSortDisabled}; - $scope.showLoader = false; - } - - - var setDefinition = function(){ - $scope.updatedDefJson = { - "tabName" : "Definition", - "tabId" : "Def", - "reportId" : ($scope.isEdit?$scope.reportId+'':"-1"), - "reportName" : $scope.reportName, - "reportDescr" : $scope.reportDescr, - "reportType" : "Linear", - "dbInfo" : "local", - "formHelpText" : $scope.formHelpText, - "pageSize" : Number($scope.selectedPageSize.value), - "displayArea" : [ { - "id" : "HOME", - "name" : "HOME", - "selected" : ($scope.selectedDisplayArea.value=="HOME") - }, { - "id" : "CUSTOMER", - "name" : "CUSTOMER", - "selected" : ($scope.selectedDisplayArea.value==="CUSTOMER") - }, { - "id" : "REPORTS", - "name" : "REPORTS", - "selected" : ($scope.selectedDisplayArea.value==="REPORTS") - } ], - "hideFormFieldsAfterRun" : $scope.hideFormFieldsAfterRunSelected.value, - "maxRowsInExcelCSVDownload" : Number($scope.selectedMaxRowsInExcelCSVDownload.value), - "frozenColumns" : Number($scope.selectedFrozenColumns.value), - "dataGridAlign" : $scope.selectedDataGridAlign.value, - "emptyMessage" : $scope.emptyMessage, - "dataContainerHeight" : $scope.selectedDataContainerHeight.value, - "dataContainerWidth" : $scope.selectedDataContainerWidth.value, - "displayOptions" : [ { - "name" : "HideFormFields", - "selected" : $scope.hideFormFieldsSelected.value - }, { - "name" : "HideChart", - "selected" : $scope.hideChartSelected.value - }, { - "name" : "HideReportData", - "selected" : $scope.hideReportDataSelected.value - }, { - "name" : "HideExcel", - "selected" : $scope.hideExcelSelected.value - }, { - "name" : "HidePdf", - "selected" : $scope.hidePdfSelected.value - } ], - "runtimeColSortDisabled" : $scope.runtimeColSortDisabled.value, - "numFormCols" : Number($scope.selectedNumFormCols.value), - "reportTitle" : $scope.reportTitle, - "reportSubTitle" : $scope.reportSubTitle - } - } - - var updateDefinitionData = function() { - setDefinition(); - raptorReportFactory.updateDefinition($scope.updatedDefJson,$scope.isEdit).then(function(data){ - },function(error){ - $log.error("raptorReportFactory: updateDefinition by Id failed."); - }); - } - - var saveNewDefinitionData = function() { - setDefinition(); - raptorReportFactory.saveNewDefinition($scope.updatedDefJson).then(function(data){ - },function(error){ - $log.error("raptorReportFactory: saveNewDefinition by Id failed."); - }); - } - $scope.testRunSql = function(){ - var queryJSON = {query: $scope.sqlScript}; + $scope.showLoader=true; + var queryJSON = {query: $scope.sqlScript.value}; queryJSON = JSON.stringify(queryJSON); raptorReportFactory.testRunSQL(queryJSON).then(function(data){ + $scope.showLoader=false; var modalInstance = $modal.open({ - scope: $scope, - animation: $scope.animationsEnabled, - templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html', - sizeClass: 'modal-large', - controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','queriedData', function ($scope, $modalInstance, $http, $log, raptorReportFactory, queriedData) { - var init = function() { - $scope.isError = false; - if (queriedData.errormessage) { - $scope.isError = true; - $scope.errormessage = queriedData.errormessage; - $scope.stacktrace = queriedData.stacktrace; - } else { - $scope.queryData = queriedData; - } - } - init(); - $scope.close = function() { - $modalInstance.dismiss(); - }; - }], + scope: $scope, + animation: $scope.animationsEnabled, + templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html', + windowClass:'modal-docked', + sizeClass: 'modal-large', + controller: testRunSqlController, resolve:{ queriedData: function(){ - return data; + return data; } - } - }) + } + }); + modalInstance.result.finally(function () { + if(!$scope.isEdit){ + $scope.showLoader=true; + $scope.pageisCreating = true; + $scope.pageMsg = 'Please wait while we are creating the report. Page will be reloaded after the creation is done.' + raptorReportFactory.getDefinitionInSession().then(function(data){ + var newReportId = data.reportId; + if(newReportId!=null && newReportId!='' && newReportId!=-1) + $window.location.href = "#/report_wizard/"+newReportId; + + $scope.showLoader = false; + $scope.pageisCreating = false; + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: get Definition In Session failed."); + $scope.showLoader = false; + }); + } + }); + },function(error){ + $scope.errorPopUp(error); $log.error("raptorReportFactory: test run SQL failed."); }); } + + /*******************Step2 End****************/ + /*******************Step3 Column****************/ + $scope.colTableRowData=''; + $scope.isEditCol= true; + + $scope.getColumn = function(){ + $scope.showLoader = true; + raptorReportFactory.getColumnList().then(function(data){ + $scope.colTableRowData = data; + $scope.showLoader = false; + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: get column list failed."); + }); + } + + $scope.openColumnPopup = function (rowData) { + var modalInstance = $modal.open({ + scope: $scope, + animation: $scope.animationsEnabled, + templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-col-edit.html', + windowClass:'modal-docked', + sizeClass: 'modal-jumbo', + controller: openColumnPopupController, + resolve:{ + colData: function(){ + return rowData; + } + } + }); + modalInstance.result.finally(function () { + $scope.getColumn(); + }); + }; + /*******************Step3 End****************/ + /*******************Step4 Starts Form Fields****************/ + + $scope.dataProcessing = false; + $scope.formFieldData = []; + $scope.getFormFieldList = function(){ + $scope.showLoader= true; + $scope.formFieldData = []; + raptorReportFactory.getFormFieldList().then(function(data){ + $scope.showLoader= false; + $scope.formFieldData = data; + $scope.formFieldData.sort(function(obj1, obj2) { + // Ascending: first age less than the previous + return obj1.orderSeq - obj2.orderSeq; + }); + $scope.showLoader = false; + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: get formfields failed."); + $scope.showLoader = false; + }); + } + + $scope.formFieldReOrder = function(upID, downID){ + + $scope.moveUpFF={}; + $scope.moveDownFF={}; + $scope.showLoader=true; + raptorReportFactory.getFormFieldEditInfoById(upID).then(function(data){ + $scope.moveUpFF = data; + raptorReportFactory.getFormFieldEditInfoById(downID).then(function(data){ + $scope.moveDownFF = data; + var downOrder = $scope.moveDownFF.orderSeq; + $scope.moveDownFF.orderSeq = $scope.moveUpFF.orderSeq; + $scope.moveUpFF.orderSeq = downOrder; + raptorReportFactory.saveFormFieldEditInfo($scope.moveDownFF).then(function(data){ + raptorReportFactory.saveFormFieldEditInfo($scope.moveUpFF).then(function(data){ + $scope.successPopUp(''); + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: saveFormFieldEditInfo failed."); + }).finally(function() { + $scope.showLoader=false; + $scope.getFormFieldList(); + }) + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: saveFormFieldEditInfo failed."); + }); + + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: getColumnEditInfoById failed."); + }); + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: getColumnEditInfoById failed."); + }) + + + } + $scope.formFieldVerifySQL= function(sqlScript){ var queryJSON = {query: sqlScript}; queryJSON = JSON.stringify(queryJSON); raptorReportFactory.formFieldVerifySQL(queryJSON).then(function(data){ var modalInstance = $modal.open({ - scope: $scope, - animation: $scope.animationsEnabled, - templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html', - sizeClass: 'modal-large', - controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','queriedData', function ($scope, $modalInstance, $http, $log, raptorReportFactory, queriedData) { - var init = function() { - $scope.isError = false; - if (queriedData.errormessage) { - $scope.isError = true; - $scope.errormessage = queriedData.errormessage; - $scope.stacktrace = queriedData.stacktrace; - } else { - $scope.queryData = queriedData; - } - } - init(); - $scope.close = function() { - $modalInstance.dismiss(); - }; - }], + scope: $scope, + animation: $scope.animationsEnabled, + templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html', + sizeClass: 'modal-large', + controller: formFieldVerifySQLController, resolve:{ queriedData: function(){ - return data; + return data; } - } - }) - + } + }) + },function(error){ + $scope.errorPopUp(error); $log.error("raptorReportFactory: test run SQL failed."); }); } - /* $scope.selectedDataSource.allowSchedule={}; - $scope.selectedDataSource.allowSchedule.value=""*/ - - var getJsonSrcName = function(stepNum){ - var JsonSrcPrefix = "app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step" - return JsonSrcPrefix + stepNum +".json"; - } - - $scope.gTabs = [ - { - title: 'Definition', - id: 'Definition', - uniqueId: 'uniqueTab1x', - tabPanelId: 'threetab1x' - }, { - title: 'SQL', - id: 'SQL', - uniqueId: 'uniqueTab2x', - tabPanelId: 'threetab2x', - disabled: (!$scope.isEdit) - }, { - title: 'Columns', - id: 'Columns', - uniqueId: 'uniqueTab3x', - tabPanelId: 'threetab3x', - disabled: (!$scope.isEdit) - }, { - title: 'Form Fields', - id: 'Form Fields', - uniqueId: 'uniqueTab4x', - tabPanelId: 'threetab4x', - disabled: (!$scope.isEdit) - }, { - title: 'Security', - id: 'Security', - uniqueId: 'uniqueTab5x', - tabPanelId: 'threetab5x', - disabled: (!$scope.isEdit) - }, { - title: 'Run', - id: 'Run', - uniqueId: 'uniqueTab6x', - tabPanelId: 'threetab6x', - disabled: (!$scope.isEdit) - } - ]; - - $scope.unhideAllOtherTabs = function(){ - for (var selectedTab = 0; selectedTab < $scope.gTabs.length; selectedTab++) { - $scope.gTabs[selectedTab].disabled = false; - } - } - - $scope.openColumnPopup = function (rowData) { - var modalInstance = $modal.open({ - scope: $scope, - animation: $scope.animationsEnabled, - templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-col-edit.html', - sizeClass: 'modal-large', - controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','colData', function ($scope, $modalInstance, $http, $log, raptorReportFactory, colData) { - raptorReportFactory.getColumnEditInfoById(colData.id).then(function(data){ - $scope.columnEditData = data; - $scope.colId = data.colId; -/* $scope.colName = data.colName;*/ - $scope.colName = {'value':data.colName+''}; - $scope.selectedDisplayAlignment = {"value":data.displayAlignment+''}; - $scope.selectedDisplayHeaderAlignment = {"value":data.displayHeaderAlignment+''}; - $scope.sortable = {"value":''+data.sortable}; - $scope.visible = {"value":''+data.visible}; - $scope.drilldownURL = data.drilldownURL; - $scope.drilldownParams = data.drilldownParams; - $scope.drilldownType = data.drilldownType; - $scope.selectedDrillDownReport = {"value":""}; - - - },function(error){ - $log.error("raptorReportFactory: getColumnEditInfoById failed."); - }); - - var init = function() { - - raptorReportFactory.getDrillDownReportList().then(function(data2){ - $scope.drilldownReports = data2; - },function(error){ - $log.error("raptorReportFactory: getDrillDownReportList failed."); - }); - -/* $scope.colTableRowData = colData;*/ - $scope.displayAlignmentOptions = [ - {value:"null", text:""}, - {value:"Left", text:"Left"}, - {value:"Center", text:"Center"}, - {value:"Right", text:"Right"} - ]; - $scope.ynOptions = [ - {value:"true", text:"Yes"}, - {value:"false", text:"No"} - ]; - $scope.drillDownOptions = [ - {value:"drillDownOpt1", text:"drillDownOpt1"}, - {value:"drillDownOpt2", text:"drillDownOpt2"}, - {value:"drillDownOpt3", text:"drillDownOpt3"} - ]; - } - - init(); - $scope.$watch('selectedDrillDownReport.value',function(){ - if ($scope.selectedDrillDownReport) { - $scope.$emit('openDrillDownpage',$scope.selectedDrillDownReport.value); - } - }); - - $scope.save = function() { - var drilldownURL = "";//raptorReportFactory.drillDownPopupOptions - //raptorReportFactory.drillDownPopupOptions.radioGroup - var colInfo = { - "tabId" : "ColEdit", - "tabName" : "Column Edit", - "colId" : $scope.colId, - "colName" : $scope.colName.value, - "displayAlignment" : ($scope.selectedDisplayAlignment.value=="null")?null:$scope.selectedDisplayAlignment.value, - "displayHeaderAlignment" : ($scope.selectedDisplayHeaderAlignment.value=="null")?null:$scope.selectedDisplayHeaderAlignment.value, - "sortable" : ($scope.sortable.value=="true"), - "visible" : ($scope.visible.value=="true"), - "drilldownURL" : raptorReportFactory.drillDownURL, - "drilldownParams" : raptorReportFactory.drillDownParams, - "drilldownType" : "" - } - raptorReportFactory.saveColumnEditInfo(colInfo).then(function(data){ - $modalInstance.close(); - },function(error){ - $log.error("raptorReportFactory: getColumnEditInfoById failed."); - }); - }; - - $scope.cancel = function() { - $modalInstance.dismiss(); - }; - }], - resolve:{ - colData: function(){ - return rowData; - } - } - }); - - modalInstance.result.then(function () { - $scope.$emit('RefreshColumnList'); - }, function () { - }); - }; - - - $scope.throwReportNameMissingError = function () { - var modalInstance = $modal.open({ - scope: $scope, - animation: $scope.animationsEnabled, - templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-report-name-validation.html', - sizeClass: 'modal-small', - controller: ['$scope', '$modalInstance', '$http', '$log', function ($scope, $modalInstance, $http, $log) { - $scope.close = function() { - $modalInstance.dismiss(); - }; - }] - }); - modalInstance.result.then(function () { - }, function () { - }); - }; - - - $scope.addNewFormField = function () { - var modalInstance = $modal.open({ - scope: $scope, - animation: $scope.animationsEnabled, - templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-formfield-edit.html', - sizeClass: 'modal-large', - controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory', function ($scope, $modalInstance, $http, $log, raptorReportFactory) { - raptorReportFactory.getFormFieldEditInfoById("add").then(function(data){ - $scope.formFieldEditData = data; - $scope.fieldId = $scope.formFieldEditData.fieldId; - $scope.fieldName ={"value": $scope.formFieldEditData.fieldName}; - $scope.selectedVisible = {"value":$scope.formFieldEditData.visible+''}; - $scope.defaultValue = {"value": $scope.formFieldEditData.defaultValue}; - $scope.fieldDefaultSQL = {"value": $scope.formFieldEditData.fieldDefaultSQL}; - $scope.fieldSqlContent = {"value": $scope.formFieldEditData.fieldSQL}; - $scope.selectedValidationType = {"value":$scope.formFieldEditData.validationType +''}; - $scope.selectedFieldType = {"value":$scope.formFieldEditData.fieldType +''}; - $scope.sqlDefaultValueSelected= {value:false}; - $scope.sqlDefaultValueSelected ={"value":false}; - if (($scope.fieldDefaultSQL.value)&&($scope.fieldDefaultSQL.value!="")) { - $scope.sqlDefaultValueSelected.value =true; - } - },function(error){ - $log.error("raptorReportFactory: getColumnEditInfoById failed."); - }); - - - $scope.ynOptions = [ - {value:"true", text:"Yes"}, - {value:"false", text:"No"} - ]; - - $scope.verifyFieldValueOptions = [ - {value:"DATE", text:"Date"}, - {value:"TIME_STAMP_HOUR", text:"TimeStamp (Hour)"}, - {value:"TIME_STAMP_HOUR_MIN", text:"TimeStamp (Hour,Min)"}, - {value:"HIDDEN", text:"Hidden"} - ] - - $scope.fieldTypeOptions = [ - {value:"TEXT", text:"Text Box"}, - {value:"LIST_BOX", text:"List Box"}, - {value:"LIST_MULTI_SELECT", text:"Multi-select List Box"}, - {value:"HIDDEN", text:"Hidden"} - ]; - - $scope.save = function() { - var formFieldJSON = { - "tabId" : "FormEdit", - "tabName" : "Form Edit", - "fieldId" : $scope.fieldId, - "fieldName" : $scope.fieldName.value, - "fieldType" : $scope.selectedFieldType.value, - "visible" : ($scope.selectedVisible.value=="true"), - "defaultValue" : ($scope.sqlDefaultValueSelected.value?'':$scope.defaultValue.value), - "fieldDefaultSQL" : ($scope.sqlDefaultValueSelected.value?$scope.fieldDefaultSQL.value:""), - "fieldSQL" :$scope.fieldSqlContent.value, - "validationType" : "NONE", - "predefinedValueList" :null - } - raptorReportFactory.saveFormFieldEditInfo(formFieldJSON).then(function(data){ - $modalInstance.close(); - },function(error){ - $log.error("raptorReportFactory: saveFormFieldEditInfo failed."); - }); - }; - - $scope.cancel = function() { - $modalInstance.dismiss(); - }; - }] - }); - modalInstance.result.then(function () { - $scope.$emit('RefreshFormField'); - }, function () { - }); - }; - - $scope.openFormFieldPopup = function (rowData) { - var modalInstance = $modal.open({ - scope: $scope, - animation: $scope.animationsEnabled, - templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-formfield-edit.html', - sizeClass: 'modal-large', - controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','fieldData', function ($scope, $modalInstance, $http, $log, raptorReportFactory, fieldData) { - var init = function() { - raptorReportFactory.getFormFieldEditInfoById(fieldData.id).then(function(data){ - $scope.formFieldEditData = data; - $scope.fieldId = $scope.formFieldEditData.fieldId; - $scope.fieldName = {"value":$scope.formFieldEditData.fieldName}; - $scope.selectedVisible = {"value":$scope.formFieldEditData.visible+''}; - $scope.defaultValue = {"value":$scope.formFieldEditData.defaultValue}; - $scope.fieldDefaultSQL = {"value": $scope.formFieldEditData.fieldDefaultSQL}; - $scope.fieldSqlContent = {"value": $scope.formFieldEditData.fieldSQL}; - $scope.selectedValidationType = {"value":$scope.formFieldEditData.validationType +''}; - $scope.selectedFieldType = {"value":$scope.formFieldEditData.fieldType +''}; - $scope.sqlDefaultValueSelected ={"value":false}; - if (($scope.fieldDefaultSQL.value)&&($scope.fieldDefaultSQL.value!="")) { - $scope.sqlDefaultValueSelected.value =true; - } - },function(error){ - $log.error("raptorReportFactory: getColumnEditInfoById failed."); - }); - - $scope.ynOptions = [ - {value:"true", text:"Yes"}, - {value:"false", text:"No"} - ]; - - $scope.verifyFieldValueOptions = [ - {value:"DATE", text:"Date"}, - {value:"TIME_STAMP_HOUR", text:"TimeStamp (Hour)"}, - {value:"TIME_STAMP_HOUR_MIN", text:"TimeStamp (Hour,Min)"}, - {value:"HIDDEN", text:"Hidden"} - ] - - $scope.fieldTypeOptions = [ - {value:"TEXT", text:"Text Box"}, - {value:"LIST_BOX", text:"List Box"}, - {value:"LIST_MULTI_SELECT", text:"Multi-select List Box"}, - {value:"HIDDEN", text:"Hidden"} - ]; - - } - - init(); - - $scope.save = function() { - var formFieldJSON = { - "tabId" : "FormEdit", - "tabName" : "Form Edit", - "fieldId" : $scope.fieldId, - "fieldName" : $scope.fieldName.value, - "fieldType" : $scope.selectedFieldType.value, - "visible" : ($scope.selectedVisible.value=="true"), - "defaultValue" : ($scope.sqlDefaultValueSelected.value?'':$scope.defaultValue.value), - "fieldDefaultSQL" : ($scope.sqlDefaultValueSelected.value?$scope.fieldDefaultSQL.value:""), - "fieldSQL" :$scope.fieldSqlContent.value, - "validationType" : "NONE", - "predefinedValueList" :null - } - raptorReportFactory.saveFormFieldEditInfo(formFieldJSON).then(function(data){ - $modalInstance.close(); - },function(error){ - $log.error("raptorReportFactory: saveFormFieldEditInfo failed."); - }); - }; - - $scope.cancel = function() { - $modalInstance.dismiss(); - }; - }], - resolve:{ - fieldData: function(){ - return rowData; - } - } - }); - - modalInstance.result.then(function () { - $scope.$emit('RefreshFormField'); - }, function () { - }); - }; - - $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":""}; + $scope.openFormFieldPopup = function (rowData,type) { + $scope.type= type; + var modalInstance = $modal.open({ + scope: $scope, + animation: true, + templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-formfield-edit.html', + sizeClass: 'modal-large', + controller: openFormFieldPopupController, + resolve:{ + fieldData: function(){ + return rowData; + } + } + }); - raptorReportFactory.getChildReportFormField(reportId).then(function(data){ - for (var i=0;i1){ - $scope.unhideAllOtherTabs(); - } - break; - } - } - } - }); - - $scope.loadSecurityPage = function() { - $scope.showLoader = true; - raptorReportFactory.resetSecurityLoadingCounter(); - - //API call 1: + //API call 1: raptorReportFactory.getSecurityReportOwnerList().then(function(data){ - $scope.reportOwnerList = data; + $scope.reportOwnerList = data; raptorReportFactory.icrementSecurityLoadingCounter(); if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;}; - },function(error){ - $log.error("raptorReportFactory: getSecurityReportOwnerList failed."); - }); + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: getSecurityReportOwnerList failed."); + }); //API call 2: get report role list raptorReportFactory.getReportRoleList().then(function(data){ - $scope.reportRoleList = data; + $scope.reportRoleList = data; raptorReportFactory.icrementSecurityLoadingCounter(); if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;}; },function(error){ - $log.error("raptorReportFactory: getReportRoleList failed."); - }); + $scope.errorPopUp(error); + $log.error("raptorReportFactory: getReportRoleList failed."); + }); //API call 3: get security page basic info raptorReportFactory.getReportSecurityInfo().then(function(data){ - $scope.reportSecurityInfo = data; - $scope.reportOwnerId ={id: $scope.reportSecurityInfo.ownerId}; + $scope.reportSecurityInfo = data; + $scope.reportOwnerId ={id: $scope.reportSecurityInfo.ownerId}; raptorReportFactory.icrementSecurityLoadingCounter(); if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;}; - },function(error){ - $log.error("raptorReportFactory: getReportSecurityInfo failed."); - $scope.showLoader = false;}); - + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: getReportSecurityInfo failed."); + $scope.showLoader = false;}); + //API call 4: retrieve security users raptorReportFactory.getReportSecurityUsers().then(function(data){ - $scope.reportSecurityUsers = data; - for (var i=0; i<$scope.reportSecurityUsers.length;i++) { - $scope.reportSecurityUsers[i]["accessAllowed"] = !$scope.reportSecurityUsers[i]["readOnly"]; - } - raptorReportFactory.icrementSecurityLoadingCounter(); + + $scope.reportSecurityUsers = data; + for (var i=0; i<$scope.reportSecurityUsers.length;i++) { + $scope.reportSecurityUsers[i]["accessAllowed"] = !$scope.reportSecurityUsers[i]["readOnly"]; + $scope.reportSecurityUsers[i].runAccess = true; // need to check why 1702 version is making it true always + } + raptorReportFactory.icrementSecurityLoadingCounter(); if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;}; - },function(error){ - $log.error("raptorReportFactory: reportSecurityUsers failed."); - }); + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: reportSecurityUsers failed."); + }); //API call 5: retrieve security roles raptorReportFactory.getReportSecurityRoles().then(function(data){ - $scope.reportSecurityRoles = data; - for (var i=0; i<$scope.reportSecurityRoles.length;i++) { - $scope.reportSecurityRoles[i]["accessAllowed"] = !$scope.reportSecurityRoles[i]["readOnly"]; - } - + $scope.reportSecurityRoles = data; + for (var i=0; i<$scope.reportSecurityRoles.length;i++) { + $scope.reportSecurityRoles[i]["accessAllowed"] = !$scope.reportSecurityRoles[i]["readOnly"]; + $scope.reportSecurityRoles[i].runAccess = true; // need to check why 1702 version is making it true always + } + raptorReportFactory.icrementSecurityLoadingCounter(); if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;}; - },function(error){ - $log.error("raptorReportFactory: reportSecurityRoles failed."); - }); - } - - - $scope.renderStep = function(stepNum){ - var containerElement = angular.element(document.getElementById("stepView")); - containerElement.empty(); - $scope.stepNum = stepNum; - var jsonSrcName = getJsonSrcName(stepNum); - stepFormFactory.renderForm(jsonSrcName, containerElement, $scope); - } - - $scope.toggleUserEditAccessActive = function(rowData) { - var modalInstance = $modal.open({ - scope: $scope, - animation: $scope.animationsEnabled, - templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-user-role-confirm-toggle.html', - sizeClass: 'modal-small', - controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','rowData', function ($scope, $modalInstance, $http, $log, raptorReportFactory, rowData) { - $scope.rowData = rowData; - $scope.toggleEditAccessStatus = function(rowData) { - raptorReportFactory.toggleUserEditAccess(rowData); - $modalInstance.close(); - }; - - $scope.cancelEditAccessToggle = function(rowData) { - rowData.accessAllowed = ! rowData.accessAllowed; - $modalInstance.dismiss('cancel');} - }], - resolve:{ - rowData: function(){ - return rowData; - } - } - }); - modalInstance.result.then(function () { - - }, function () { - }); + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: reportSecurityRoles failed."); + }); } - - $scope.toggleRoleEditAccessActive = function(rowData) { - var modalInstance = $modal.open({ - scope: $scope, - animation: $scope.animationsEnabled, - templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-user-role-confirm-toggle.html', - sizeClass: 'modal-small', - controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','rowData', function ($scope, $modalInstance, $http, $log, raptorReportFactory, rowData) { - $scope.rowData = rowData; - $scope.toggleEditAccessStatus = function(rowData) { - raptorReportFactory.toggleRoleEditAccess(rowData); - $modalInstance.close(); - }; - - $scope.cancelEditAccessToggle = function(rowData) { - rowData.accessAllowed = ! rowData.accessAllowed; - $modalInstance.dismiss('cancel');} - }], - resolve:{ - rowData: function(){ - return rowData; - } - } - }); - modalInstance.result.then(function () { - - }, function () { - }); + $scope.addReportSecurityUser = function(userId) { + $scope.showLoader=true; + raptorReportFactory.addReportSecurityUser(userId).then(function(data){ + $scope.loadSecurityPage(); + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: addReportSecurityUser failed."); + }).finally(function() { + $scope.showLoader=false; + }); } - - - - - - // initialize the page at step 1; - $scope.renderStep(1); - - // create a message to display in our view - $scope.allProjects = []; - if(!$routeParams.step && $routeParams.step == "") $routeParams.step = 1; - if($routeParams.proj && $routeParams.proj > 0) - $scope.projid = $routeParams.proj; - if($routeParams.step) - $scope.stepNum = $routeParams.step; - else - $scope.stepNum = 1; - - $scope.jsonSrcName = getJsonSrcName($scope.stepNum); - - $scope.selectAction = function () { - var containerElement = angular.element(document.getElementById("stepView")); - containerElement.empty(); - $scope.project_name = this.prj.projectName; - $scope.stepNum = 1; - var stepNum = $scope.stepNum; - var jsonSrcName = getJsonSrcName(stepNum); - stepFormFactory.renderForm(jsonSrcName, containerElement, $scope); - renderProject(this.prj.id, 1); - }; - - - $scope.createAction = function () { - var containerElement = angular.element(document.getElementById("stepView")); - containerElement.empty(); - $scope.stepNum = 1; - var stepNum = $scope.stepNum; - $scope.jsonSrcName = "app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step"+$scope.stepNum +".json"; - var jsonSrcName = $scope.jsonSrcName; - stepFormFactory.renderForm(jsonSrcName, containerElement, $scope); - }; - // select current project - renderProject = function (proj_id, stepNum) { - var userSelectedPrjId = proj_id; - $http({ - method: 'GET', - url: 'get_selected_project_data', - params:{'selectedPrjId':userSelectedPrjId, 'step': stepNum} - }).then(function successCallback(response) { - var selectedproject = response.data; - $scope.projid = userSelectedPrjId; - //$scope.allProjects = projectLists; - //$location.path('/'+userSelectedPrjId+'/'+stepNum); - var div = d3.select("#stepView"); - div.select("[name='proj_id']").text(userSelectedPrjId); - div.select("[name='proj_id']").property("value", userSelectedPrjId); - d3.select("[name='project_id']").property("value", userSelectedPrjId); - var h3Text = div.select("h3").text(); - div.select("h3").text($scope.project_name+ " - " + h3Text); - for (var key in selectedproject) { - if (selectedproject.hasOwnProperty(key)) { - var val = selectedproject[key]; - var formElement = d3.selectAll("[name='" + key + "']"); - if(formElement[0].length > 0) - console.log(formElement.attr("type")); - if(formElement[0].length > 0 && formElement.attr("type") === "radio") { - var formRadio = d3.selectAll("[id='" + key +"_"+val + "']"); - formRadio.property('checked', true); - } - if(formElement[0].length > 0 && formElement.property("type") === "textarea") { - div.select("textarea[name='" + key +"']").property('value', val); - } - if(formElement[0].length > 0 && formElement.attr("type") === "text") { - var formText = d3.selectAll("[name='" + key + "']"); - formText.property("value", val); - } - if(formElement[0].length > 0 && formElement.html().startsWith(" 0 && formElementOther.attr("type") === "checkbox") { - var formCheckbox = d3.selectAll("[name='" + key +"_"+val + "']"); - formRadio.property('checked', true); - } - } - } - } - - - - }); - } - - //submit function - $scope.submit = function(){ - let defer = $q.defer(); - - var div = d3.select("#stepView"); - var jsonSrcName = $scope.jsonSrcName; - var stepNum = $scope.stepNum; - var values = ""; - $http({ - method: 'GET', - url: jsonSrcName - }).then(function successCallback(response) { - var json = response.data; - var step = json.step; - if(step > 0) { - var sections = json.content.sections; - sections.forEach(function(d, i) { - var elements = d.elements; - if(elements) { - //elements.forEach(function(element, elementIndex) { - values += "{"; - values += "\"step\""+ ":\"" + step + "\","; - values += "\"proj_id\""+ ":\"" + d3.select('input[name="project_id"]').property("value") + "\","; - - for (elementIndex = 0; elementIndex < elements.length; elementIndex++) { - var element = elements[elementIndex]; - - if(elementIndex > 0) values += ","; - values += "\""+element.name +"\""+ ":" ; - if(element.input === "hidden") { - values += "\""+div.select('input[name="'+element.name+'"]').property("value") +"\""; - } - if(element.input === "radio") { - values += "\""+ div.select('input[name="'+element.name+'"]:checked').property("value") +"\""; - } - if(element.input === "checkbox") { - var checkOptions = element.options; - values += "[{"; - checkOptions.forEach(function(d, i) { - // if(document.getElementById("'"+element.name+"_"+d.id+"'") != null) - values += "\""+d.id+"\""+ ":" + div.select('input[name="'+element.name+"_"+d.id+'"]').property("checked") ; - if(i=($scope.drilDownFormField.length-1)){ + var id = $scope.drilDownFormField[i].id; + drillDownParams+= id+"="; + } + }else + drillDownParams+=$scope.drillDownParams[i].fieldName+"="; + if( selectedRadio == (i+'-1')){//'Fixed Value' + drillDownParams+= $scope.drillDownParams[i].valValue+ampStr; + }else if( selectedRadio == (i+'-2')){//'Value of Column' + drillDownParams+= ('['+$scope.drillDownParams[i].valColId+']'+ampStr); + }else if( selectedRadio == (i+'-3')){//'Value of form field' + drillDownParams+= ('[!'+$scope.drillDownParams[i].valFieldId+']'+ampStr); + }else if( selectedRadio == (i+'-4')){//'Value set' + if($scope.drillDownParams[i].valColId!='' && $scope.drillDownParams[i].valFieldId!='' && $scope.drillDownParams[i].valColId!='Select' && $scope.drillDownParams[i].valFieldId!='Select') + drillDownParams+= ('['+$scope.drillDownParams[i].valColId+'!'+$scope.drillDownParams[i].valFieldId+']'+ampStr); + } + } + } + drillDownParams = drillDownParams.substring(0, drillDownParams.length - 1); + $scope.colInfo.drilldownParams = drillDownParams; + $scope.isEditCol=true; + }; + $scope.selectedDrillReportFormField = []; + $scope.drillDownParams = {}; + $scope.getDrillReportFormField = function(ddReportId,param){ + $scope.isEditCol = false; + $scope.processingData = true; + + raptorReportFactory.getChildReportFormField(ddReportId).then(function(data){ + $scope.drilDownFormField = data; + for(var i in data){ + var array = [ + {selection: 'No Value', value:'Accept Default', radioGroup :i+'-'+'0'}, + {selection: 'Fixed Value', value:'Accept Default' , radioGroup :i+'-'+'1'}, + {selection: 'Value of Column', value:'Accept Default', radioGroup :i+'-'+'2'}, + {selection: 'Value of form field', value:'Accept Default', radioGroup :i+'-'+'3'}, + {selection: 'Value set', value:'Pass the value of the selected column if not empty, otherwise pass the value of the selected form field', radioGroup :i+'-'+'4'} + ] + $scope.drilDownValues.push(array); + } + + if(param!=''){ + raptorReportFactory.getDrillDownParamDef(param).then(function(dataDD){ + var temp = $scope.drilDownFormField; + $scope.drillDownParams = []; + for(var i in $scope.drilDownFormField){ + $scope.selectedDrillReportFormField[i] = i+'-0'; + var tmp = { + fieldName: $scope.drilDownFormField[i].id, + valColId:'', + ValFieldId:'', + valType:'', + valValue:'' + }; + $scope.drillDownParams.push(tmp); + } + for(var i in $scope.drilDownFormField){ + for(var j in dataDD){ + if($scope.drilDownFormField[i].id == dataDD[j].fieldName){ + $scope.selectedDrillReportFormField[i] = i+'-'+dataDD[j].valType; + $scope.drillDownParams[i] = dataDD[j]; + } + } + } + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: getChildReportFormField failed."); + }).finally(function() { + $scope.processingData=false; + }); + }else{ + $scope.processingData = false; + } + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: getChildReportFormField failed."); + }); + + raptorReportFactory.getChildReportFormField($scope.colInfo.drilldownURL).then(function(data){ + $scope.childReportFF =data; + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: getChildReportFormField failed."); + }); + + raptorReportFactory.getChildReportColumn($routeParams.reportId).then(function(data){ + $scope.childReportCol =data; + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: getChildReportFormField failed."); + }); + } +} + + +var openFormFieldPopupController = function ($scope, $modalInstance, $http, $log, raptorReportFactory, fieldData) { + $scope.formFieldEditData = {}; + $scope.sqlAsDefaultValue ={ + value:false + }; + $scope.predefinedValues ={ + value:'' + }; + var init = function() { + if($scope.type=='edit'){ + $scope.dataProcessing = true; + raptorReportFactory.getFormFieldEditInfoById(fieldData.id).then(function(data){ + $scope.dataProcessing = false; + $scope.formFieldEditData = data; + if($scope.formFieldEditData.fieldDefaultSQL) + $scope.sqlAsDefaultValue.value = true; + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: getColumnEditInfoById failed."); + }).finally(function() { + $scope.dataProcessing=false; + }); + }else{ + $scope.formFieldEditData ={ + groupFormField: false, + visible:"true" + }; + } + $scope.ynOptions = [ + {value:"true", text:"Yes"}, + {value:"false", text:"No"} + ]; + $scope.verifyFieldValueOptions = [ + {value:null, text:"--- Do Not Perform Validation ---"}, + {value:"DATE", text:"Date"}, + {value:"TIMESTAMP_HR", text:"TimeStamp (Hour)"}, + {value:"TIMESTAMP_MIN", text:"TimeStamp (Hour,Min)"}, + {value:"TIMESTAMP_SEC", text:"TimeStamp (Hour,Min,Sec)"}, + {value:"INTEGER", text:"Integer"}, + {value:"POSITIVE_INTEGER", text:"Positive Integer"}, + {value:"NON_NEGATIVE_INTEGER", text:"Positive Integer. Cannot Be Zero"}, + {value:"FLOAT", text:"Any Number"}, + {value:"NON_NEGATIVE_FLOAT", text:"Positive Number"}, + {value:"POSITIVE_FLOAT", text:"Positive Number. Cannot Be Zero"} + ] + $scope.fieldTypeOptions = [ + {value:"TEXT", text:"Text Box"}, + {value:"LIST_BOX", text:"List Box"}, + {value:"LIST_MULTI_SELECT", text:"Multi-select List Box"}, + {value:"HIDDEN", text:"Hidden"} + ]; + } + init(); + $scope.save = function() { + if($scope.sqlAsDefaultValue.value && ($scope.formFieldEditData.fieldDefaultSQL==null || $scope.formFieldEditData.fieldDefaultSQL=='')){ + $scope.errorPopUp("if SQL as Default Value is checked, 'Default SQL' and 'SQL Generating Custom List of Values' fields cannot be empty"); + return; + }else if(!$scope.sqlAsDefaultValue.value){ + $scope.formFieldEditData.fieldDefaultSQL=null; + } + $scope.dataProcessing = true; + console.log($scope.formFieldEditData.validationType); + if($scope.formFieldEditData.validationType=='Select') + $scope.formFieldEditData.validationType = ''; + raptorReportFactory.saveFormFieldEditInfo($scope.formFieldEditData).then(function(data){ + $scope.dataProcessing = false; + $scope.successPopUp(''); + $modalInstance.close(); + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: saveFormFieldEditInfo failed."); + }).finally(function() { + $scope.dataProcessing=false; + }); + }; + + $scope.add = function() { + $scope.dataProcessing = true; + $scope.formFieldEditData.visible== + raptorReportFactory.addFormFieldEditInfo($scope.formFieldEditData).then(function(data){ + $scope.dataProcessing = false; + $modalInstance.close(); + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: add FormFieldEditInfo failed."); + }).finally(function() { + $scope.dataProcessing=false; + }); + }; + + $scope.addPredefinedValueList = function() { + if($scope.formFieldEditData.predefinedValueList==null) + $scope.formFieldEditData.predefinedValueList=[]; + var item ={ + id:$scope.predefinedValues.value, + name:$scope.predefinedValues.value, + selected:false + }; + if($scope.predefinedValues.value!=null && $scope.predefinedValues.value!='') + $scope.formFieldEditData.predefinedValueList.push(item); + }; + + $scope.removePredefinedValueList = function(removeVal) { + var removeIndex = null; + for(i in $scope.formFieldEditData.predefinedValueList){ + if($scope.formFieldEditData.predefinedValueList[i].id == removeVal){ + removeIndex= i; + break; + } + } + $scope.formFieldEditData.predefinedValueList.splice(removeIndex, 1) + }; + + $scope.cancel = function() { + $modalInstance.dismiss(); + }; +} + + +var deleteFormFieldController = function ($scope, $modalInstance, $http, $log, raptorReportFactory, rowData) { + $scope.tempFieldId = rowData.id; + $scope.ok = function() { + raptorReportFactory.deleteFormFieldById(rowData.id).then(function(data){ + $modalInstance.close(); + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: deleteFormFieldById failed."); + }); + } + $scope.cancel = function() { + $modalInstance.dismiss(); + }; +} + +var removeReportSecurityUserController = function ($scope, $modalInstance, $http, $log, raptorReportFactory,securityUser) { + $scope.securityUserName = securityUser.name; + $scope.ok = function() { + raptorReportFactory.removeReportSecurityUser(securityUser.id).then(function(data){ + $modalInstance.close(); + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: removeReportSecurityUser failed."); + }); + } + $scope.cancel = function() { + $modalInstance.dismiss(); + }; +} + +var removeReportSecurityRoleController = function ($scope, $modalInstance, $http, $log, raptorReportFactory,securityRole) { + $scope.securityRoleName = securityRole.name; + $scope.ok = function() { + raptorReportFactory.removeReportSecurityRole(securityRole.id).then(function(data){ + $modalInstance.close(); + },function(error){ + $scope.errorPopUp(error); + $log.error("raptorReportFactory: removeReportSecurityRole failed."); + }); + } + $scope.cancel = function() { + $modalInstance.dismiss(); + }; +} + +var formFieldVerifySQLController = function ($scope, $modalInstance, $http, $log, raptorReportFactory, queriedData) { + var init = function() { + $scope.isError = false; + if (queriedData.errormessage) { + $scope.isError = true; + $scope.errormessage = queriedData.errormessage; + $scope.stacktrace = queriedData.stacktrace; + } else { + $scope.queryData = queriedData; + } + } + init(); + $scope.close = function() { + $modalInstance.dismiss(); + }; +} +var toggleUserEditAccessActiveController = function ($scope, $modalInstance, $http, $log, raptorReportFactory, rowData) { + $scope.rowData = rowData; + $scope.toggleEditAccessStatus = function(rowData) { + raptorReportFactory.toggleUserEditAccess(rowData); + $modalInstance.close(); + }; + + $scope.cancelEditAccessToggle = function(rowData) { + rowData.accessAllowed = ! rowData.accessAllowed; + $modalInstance.dismiss('cancel');} +} + +var toggleRoleEditAccessActiveController = function ($scope, $modalInstance, $http, $log, raptorReportFactory, rowData) { + $scope.rowData = rowData; + $scope.toggleEditAccessStatus = function(rowData) { + raptorReportFactory.toggleRoleEditAccess(rowData); + $modalInstance.close(); + }; + + $scope.cancelEditAccessToggle = function(rowData) { + rowData.accessAllowed = ! rowData.accessAllowed; + $modalInstance.dismiss('cancel');} +} \ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/all-reports.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/all-reports.html index 7f470d40..ce70dc58 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/all-reports.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/all-reports.html @@ -21,7 +21,6 @@ - @@ -66,12 +65,14 @@ + + -
- +
+
- + diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/directive/dynamicform.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/directive/dynamicform.js index 9064b0dc..5147719f 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/directive/dynamicform.js +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/directive/dynamicform.js @@ -12,22 +12,42 @@ appDS2 link: function ($scope, element, attrs) { $scope.element=element; $scope.datetimeformat = "MM/dd/yyyy hh:mm a"; - console.log("$scope"); - console.log($scope); $scope.buildField = function (field, parentElement) { var x = ''; if(field.visible) { + if (field.fieldType === 'LIST_MULTI_SELECT') { - x = angular.element('
'+ + /*x = angular.element('
'+ '
'+ ''+ - '
'); + '');*/ + + x = angular.element( + '
'+ + '

'+field.fieldDisplayName+'

'+ + '
'+ + ''+ + '
'+ + '
'+ + '
'+ + '
'); } else if (field.fieldType === 'LIST_BOX') { - x = angular.element('
'); + var temp = + '
'+ + ''+ + ''+ + '
'; + + x = angular.element(temp); + //x = angular.element('
'); } else if((field.fieldType === 'text' || field.fieldType === 'TEXT') && field.validationType === 'DATE'){ - x = angular.element('
'); + x = angular.element('
'); } else if((field.fieldType === 'text' || field.fieldType === 'TEXT') && field.validationType === 'TIMESTAMP_MIN'){ x = angular.element('
'); } else if(field.fieldType === 'text' || field.fieldType === 'TEXT'){ @@ -35,9 +55,10 @@ appDS2 } else if(field.fieldType === 'CHECK_BOX'){ x = angular.element('
'); } + parentElement.append(x); + $compile(x)($scope); } - parentElement.append(x); - $compile(x)($scope); + }; $scope.buildForm = function() { // create elements and a @@ -80,7 +101,7 @@ appDS2 formField.formFieldValues.forEach(function(entry,i) { $scope.formFieldLuValues[formField.fieldId].push({ index: i, value: entry.id, title: entry.name}); if(entry.defaultValue){ - $scope.ngModel[formField.fieldId]={ index: i, value: entry.id, title: entry.name}; + //$scope.ngModel[formField.fieldId]={ index: i, value: entry.id, title: entry.name}; } }); } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-del-confirm.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-del-confirm.html index da255bbf..3f0338c9 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-del-confirm.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-del-confirm.html @@ -1,26 +1,18 @@ -
-
-

Remove Report

-
- -
+ +
+

Remove Report

+
+
-
-
- -
- -
- - - -
+
+
+

The selected report will be removed. Do you want to continue

+
+ \ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-formfield-del-confirm.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-formfield-del-confirm.html index 7bdf5a29..20dd9202 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-formfield-del-confirm.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-formfield-del-confirm.html @@ -1,26 +1,17 @@ -
-
-

Remove Formfield

-
- -
+
+

Remove Formfield

+
+
-
-
- -
- -
- - - -
+
+
+ The selected formfield {{tempFieldId}} will be removed. Do you want to continue? +
+ \ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-role-del-confirm.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-role-del-confirm.html index 01d1e609..629b9a91 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-role-del-confirm.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-role-del-confirm.html @@ -1,26 +1,19 @@ -
-
-

Remove Report Role

-
- -
+ +
+

Remove Report Role

+
+
-
-
- -
- -
- - - -
+
+
+ {{securityRoleName}} + will be removed. Would you want to continue? +
+ \ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-user-del-confirm.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-user-del-confirm.html index 6620fe7c..5af1b227 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-user-del-confirm.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-user-del-confirm.html @@ -1,26 +1,18 @@ -
-
-

Remove Report User

-
- -
+
+

Remove Report User

+
+
-
-
- -
- -
- - - -
+
+
+ {{securityUserName}} + will be removed. Would you want to continue? +
+ \ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-user-role-confirm-toggle.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-user-role-confirm-toggle.html index 21bb046f..06f2049a 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-user-role-confirm-toggle.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-user-role-confirm-toggle.html @@ -1,23 +1,24 @@ -
-
-

-

Confirm

-
- -
+ +
+

+ +

+

Confirm

+
+
-
- You are about to {{rowData.accessAllowed?"grant":"revoke"}} {{rowData.name}} edit access. Would you like to continue? -
- +
+ You are about to {{rowData.accessAllowed?"grant":"revoke"}} + {{rowData.name}} edit access. Would you like to continue? +
+ diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-col-edit.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-col-edit.html index e74f89a8..3aadf27e 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-col-edit.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-col-edit.html @@ -1,130 +1,232 @@ -
-
-

Report Column - Edit

-
- -
+
+

Report Column - Edit

+
+
-
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Column ID:{{columnEditData.colId}}
Display Name:
Display Alignment: - -
Display Header Alignment: - -
Sortable: - -
Visible: - -
Drill-down Link: - -
- - - \ No newline at end of file + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Column ID:{{colInfo.colId}}
Column Name:{{colInfo.colName}}
Depends on formfield:
Datatype: + +
Group By Pos: + +
Custom Text for Sub-Total:
Hide Repeated Values: + +
Multi Group Column Level: + +
Multi group Column Range : Colspan: + +
Display Name: + +
Display Width (In Pxls): + +
No Wrap ?: + +
Indent Parameter to display value: + +
Display Alignment: + +
Display Header Alignment: + +
Sortable: + +
Visible: + +
Drill-down Link: + +
Total for the column: + +
+ + + + + + + + + + + + + + + + + +
{{ff.name}}
+ + {{ dd.selection }} + Accept default + +
+ +
+
+ + + +
+ + + + + + +
+ + + \ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-formfield-edit.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-formfield-edit.html index c88eb596..3c17ff7b 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-formfield-edit.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-formfield-edit.html @@ -1,149 +1,154 @@ -
-
-

Report Form Field - Edit

-
- -
+
+

Report Form Field - Edit

+
+
-
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
+
+ +
+
+
Field Name:
Field Type: - -
Visible: - -
SQL as Default Value: - -
Default Value:
Default SQL: - - -

-
SQL Generating Custom List of Values: - - -

-
+ + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + - -
Field Name:
Field Type:
Visible: + +
Is used in Group By Clause? + +
SQL as Default Value: + +
Default SQL: + + +

+ +

+
Default Value:
-
- -
-
+
+ \ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html index a7955cad..e3fda72b 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html @@ -1,62 +1,57 @@ - - -
-
-

SQL Test Run - {{isError?'Failed':'Executed'}}

-
- -
+ --> +
+

SQL Test Run - + {{isError?'Failed':'Executed'}}

+
+
-
-
- -
- -
-

Error Message:


-

{{errormessage}}

-

Stack Trace:


-

{{stacktrace}}

+
+
+
-
- - - - - - - - - - +
+

Error Message:

+
+

{{errormessage}}

+

Stack Trace:

+
+

{{stacktrace}}

-
-
{{colName}}
{{rowData[keyName]}}
-
- + +
+
-
\ No newline at end of file +
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-chart-wizard.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-chart-wizard.html index 8558729e..ed3c4ba9 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-chart-wizard.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-chart-wizard.html @@ -1,897 +1,1080 @@
-

Report Chart Configuration

+

Report Chart Configuration

-
- -
+
+ +
-
-
- - - - - - - - - - - - - - -
Chart Type
- -
- - - - - - - - - - - - - - -
Width (px)Height (px)
- - - -
- - - - - - - - - -
-
- - - - - -
Title
- - - -
- - - - - - - - - - - - - - - -
Domain AxisCategory
- - - -
- - -
- - - - - - - - - - - - - - - - - - - - - - - -
Range AxisY AxisChart TitleColorLine Type
- - - - - - - - - - - - - - - -
-
+
+
+
+ +
+ + + + + + + - - -
-
-
-
-
- - -
-
-
-
-
- -
-
- -
- -
-
- -
-
- -
-
- Show - Hide -
-
- - -
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
- - -
-
- -
- -
-
- -
- -
-
-
-
- -
-
-
-
- -
-
- -
- -
- Add - - Remove -
-
-
-
-
- - - -
-
- -
-
-
- -
-
-
-
- -
-
-
- -

-
-
- - - - -
- - - - - -
-
-
- Vertical - Horizontal +
+ + + + + +
Chart Type
+ + + + + + + + + + + + + + +
Width (px)Height (px)
+ + + + + + + + + +
+
+ + + + + +
Title
+ + + + + + + + + + + + + + + +
Domain AxisCategory
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + +
Range AxisY AxisChart TitleColorLine Type
+ + + + +
+
+ +
+
- -
-
- Yes - No -
- -
-
- Yes - No -
- -
-
- Yes - No -
- -
-
- Yes - No -

- -
-
- Yes - No -
- -
-
- - -
-
- - -
- {{reportRunJson.chartType}} -
- - - -
-
+
-
- Line - Area +
+
- -
-
- -

- -
-
- -
- -
-
- Yes - No -
- -
-
- Yes - No -
-
-
- - - - -
- -
- - - - -
-
-
-
- -
- -
-
- Weekly - Daily - Hourly - 30 Min + + +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+ +
+
Show Hide +
+
+ + +
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+ +
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
+
+
+
+ + + +
+
+ +
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+ + + + +
+ + + + + +
+
+
Vertical Horizontal +
+ +
+
Yes No +
+ +
+
Yes No +
+ +
+
+ Yes No +
+ +
+
Yes No +
+
+ +
+
Yes No +
+ +
+
+ + +
+
+ +
+
+ {{reportRunJson.chartType}} +
+ + + +
+
+
+
Line Area +
+ +
+
+
+
+ +
+
+
+ +
+
Yes No +
+ +
+
Yes No +
+
+
+ +
+ +
+ +
+ + + + +
+
+
+
+ +
+ +
+
+ Weekly Daily Hourly 30 Min +
+
+
+
+ +
+ + + + + + + + + + + +
+
+
+
up 45° up 90° down 45° down 90° Standard +
+ +
+
+ Top Bottom +
+
+ +
+
Yes No +
+ +
+
Yes No +
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Save + Run
-
-
-
-
- -
- - - - - - - - - - - -
-
-
-
- up 45° - up 90° - down 45° - down 90° - Standard -
- -
-
- Top - Bottom -

- -
-
- Yes - No -
- -
-
- Yes - No -

- -
-
- -
-
-
- -
-
-
- -
-
-
- -

-
-
-
-
-

- Save - Run -
-
- - -
-
-
Additional Options
-

-

-
-
- -
-
-
- -
-
- - - - - - - - - - - - - - -
Primary Axis LabelSecondary Axis Label
- - - -
- - - - - - - - - - - - - - -
Range Axis Minimum RangeMaximum Range
- - - -
-
+
+ + +
+
+
Additional + Options
+

+
+
+ +
- -
- - - - -
-
-
Bar Chart Options
-

-

-
-
- -
-
-
- -
+ +
- - - - - - - - - - - - - - - - - - - - - -
OrientationStackedShow ControlsXAxis Date TypeDisplay less XAxis tickers
- - - - - - - - - - - - - - -
- - - - - - - - - - - - - - -
Is Time Axis?Log Scale (Y Axis)
- - - - -
-
+ + + + + + + + + + + + + + +
Primary Axis LabelSecondary Axis Label
+
+ + + + + + + + + + + + + + +
Range Axis Minimum RangeMaximum Range
+ +
+
-
-
- - - - - -
-
-
Time Series Chart Options
-

-

-
-
- -
-
-
- -
-
- - - - - - - - - - - - - - - - - - - -
Render asX Axis LabelX Axis TickersIs Time Axis?Multi Series
- - - - - - - - - - -
-
+ + + + + +
+
+
Bar + Chart Options
+

+
+
+ +
- -
- - - - -
-
-
Common Options
-

-

-
-
- -
-
-
- -
-
-
-
- - - - - - - - - -
-
- - -
-
- - - -
Legend AngleLegend Position
- - - - - - - - -
- - - + +
+
+
- - - - - + + + + + + + + - - -
-
- - -
-
- - - - + + + + + + + + + + +
LegendAnimation
OrientationStackedShow ControlsXAxis Date TypeDisplay less XAxis tickers
- - - - - - -
+ + + + + + + + + + + + + +
Is Time Axis?Log Scale (Y Axis)
+
+
+ + + + + +
+
+
Time + Series Chart Options
+

+
+
+ +
+
+
+
+
- - - - - - + + + + + + + - - - - - - - - + + + + + + + + +
Top MarginBottom MarginLeft MarginRight Margin
Render asX Axis LabelX Axis TickersIs Time Axis?Multi Series
- - - - - - - -
-
-
-
- - +
+
+
+ -
-
+ + +
+
+
Common + Options
+

+
+
+ +
+
+
+
+
+
+
+ + + + + + + + + +
+
+ + +
+
+ + + +
Legend AngleLegend Position
+ + + + + + + + + + + + +
+
+ + +
+
+ + + + +
LegendAnimation
+ + + + + + + + + + + + + + + + + + +
Top MarginBottom MarginLeft MarginRight Margin
+
+
+
+ + +
+
- - - - -
+ + + + +
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 aaa1cac0..7b2c23e1 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 @@ -1,96 +1,124 @@ -
-
-

{{reportData.reportHeading}}

-
- +
+
+
+

{{reportData.reportHeading}}

+
+
+ +
+
+
-
- + +
+
+
+
+ +
+

{{reportData.reportSubTitle}}

-
- -
+
Loading...
+ +
+ +
+
+ +
+ + +
+
+
+
+
+ {{reportData.message}} +
+
+
-

{{reportData.reportSubTitle}}

- -
Loading...
- -
- -

- -
- - -
-
-
-
-
- {{reportData.message}} -
-
-
-
- -
+ +
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-search.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-search.html index 7524acca..2fd0e436 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-search.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-search.html @@ -29,7 +29,7 @@ body {
- +
@@ -41,12 +41,15 @@ body {
- +
+
+

diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-step.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-step.html new file mode 100644 index 00000000..9550ac33 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-step.html @@ -0,0 +1,35 @@ +
+
+
+ + + {{tab.title}} + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + \ No newline at end of file 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 new file mode 100644 index 00000000..a9baadf8 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step1.html @@ -0,0 +1,213 @@ +

Step 1 - Report Definition

+ +
+ +
+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + +
+
+
+ +
+ +
+
+
+
+
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ +
+
+ +
+ + +
+
+ + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+ +
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step2.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step2.html new file mode 100644 index 00000000..e21af0c8 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step2.html @@ -0,0 +1,26 @@ +

Step 2 - Report SQL

+ +
+ +
+

{{pageMsg}}

+
+
+ +
+ +
+
+
+ +
+
+ +
+ +
+ + diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step3.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step3.html new file mode 100644 index 00000000..e1f02a1c --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step3.html @@ -0,0 +1,34 @@ +

Step 3 - Report Columns

+
+ +
+
+
+ + + + + + + + + + + + + + + + + +
NoIDDisplay NameEdit
{{$index+1}}{{rowData.id}}{{rowData.name}}
+
+ + +
+ + diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step4.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step4.html new file mode 100644 index 00000000..dc3be5c8 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step4.html @@ -0,0 +1,47 @@ +

Step 4 - Report Form Fields

+
+ +
+
+
+

Report Form Fields 4

+ + + + + + + + + + + + + + + + + + + +
Order NumberField NameEditOrderDelete
{{rowData.orderSeq}}{{rowData.name}}[{{rowData.id}}] + + + + + + +
+
+
+ +
+ + +
+ + diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step5.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step5.html new file mode 100644 index 00000000..13278029 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step5.html @@ -0,0 +1,172 @@ + +

Step 5 - Report Security

+ +
+ +
+
+
+
+
+ + + + + + + + + + + + + + + +
Created By: {{reportSecurityInfo.createdUser}}Created Date: {{reportSecurityInfo.createdDate}}
Last Updated By: {{reportSecurityInfo.updateUser}}Last Updated: {{reportSecurityInfo.updatedDate}}
Report Owner: + + Public? (All users can run the report): +
+
+ +
+

Report Users

+ + + + + + + + + + + + + + + + + + + +
NoUser NameRun AccessEdit AccessRemove
{{$index+1}}{{reportUser.name}} + +
+
+
+

Grant Access To:

+
+ +
+
+ +
+
+ +
+

Report Roles

+ + + + + + + + + + + + + + + + + + + +
NoRole NameRun AccessEdit AccessRemove
{{$index+1}}{{reportRole.name}} + +
+
+

Grant Access To:

+
+ +
+
+ +
+
+
+ +
+
+
+ + +
+ +
+ + diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step6.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step6.html new file mode 100644 index 00000000..4849190a --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step6.html @@ -0,0 +1,34 @@ +

Step 6 - Report Log

+ +
+ +
+
+
+

Report Logs

+ + + + + + + + + + + + + + + + + +
NoUser NameLog TimeAction
{{$index+1}}{{rowData.userName}}{{rowData.logTime}}{{rowData.action}}
+
+ + +
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step7.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step7.html new file mode 100644 index 00000000..298cce8f --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step7.html @@ -0,0 +1,16 @@ +

Step 7 - Report Run

+ +
+ +
+
+
+ +
+ +
+ + diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step1.json b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step1.json index 66562d4b..abdbd023 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step1.json +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step1.json @@ -11,7 +11,13 @@ "name": "proj_id", "displayName": "Project Id", "defaultValue": "" - }, + }, + { + "input": "text", + "name": "reportId", + "displayName": "Report ID:", + "defaultValue": "" + }, { "input": "text", "name": "reportName", @@ -75,9 +81,17 @@ "defaultValue": "no", "action": "", "action_img": "", - "checkboxes":[{"value":"homeSelected.value", "text":"HOME"}, - {"value":"customerSelected.value", "text":"CUSTOMER"}, - {"value":"reportsSelected.value", "text":"REPORTS"} + "checkboxes":[ + {"value":"homeSelected", "text":"HOME"}, + {"value":"customerSelected", "text":"CUSTOMER"}, + {"value":"reportsSelected", "text":"REPORTS"}, + {"value":"utilSelected", "text":"Utilization"}, + {"value":"tmSelected", "text":"Tunnel Management"}, + {"value":"trSelected", "text":"Tunnel Routing"}, + {"value":"cmSelected", "text":"Capacity Management"}, + {"value":"tlSelected", "text":"Traffic Loss"}, + {"value":"smSelected", "text":"System Monitoring"}, + {"value":"netOperateSelected", "text":"Network Operation Monitoring"} ] }, -- cgit 1.2.3-korg