1 appDS2.controller('reportStepController', function($scope,$http,$location, $routeParams, $q, $modal,$log,$window, raptorReportFactory, stepFormFactory) {
2 /*****************Init values*********************/
3 $scope.reportIdURL = $routeParams.reportId;
4 $scope.isEdit = ($scope.reportIdURL==null||$scope.reportIdURL=='')?false:true;
6 $scope.isDefReady = $scope.isEdit;
7 $scope.activeTabsId = 'definition';
14 uniqueId: 'uniqueStep1',
15 tabPanelId: 'definitionTab',
21 uniqueId: 'uniqueStep2',
23 disabled: (!$scope.isDefReady)
27 uniqueId: 'uniqueTab3x',
28 tabPanelId: 'columnsTab',
29 disabled: (!$scope.isDefReady)
33 uniqueId: 'uniqueTab4x',
34 tabPanelId: 'formFieldsTab',
35 disabled: (!$scope.isDefReady)
39 uniqueId: 'uniqueTab5x',
40 tabPanelId: 'securityTab',
41 disabled: (!$scope.isDefReady)
45 uniqueId: 'uniqueTab6x',
47 disabled: (!$scope.isDefReady)
51 uniqueId: 'uniqueTab7x',
53 disabled: (!$scope.isDefReady)
57 $scope.$watch('activeTabsId', function (newVal, oldVal) {
58 if(newVal !== oldVal) {
63 $scope.renderStep = function(stepNum){
64 var containerElement = angular.element(document.getElementById("stepView"));
65 containerElement.empty();
66 $scope.stepNum = stepNum;
67 var jsonSrcName = getJsonSrcName(stepNum);
68 stepFormFactory.renderForm(jsonSrcName, containerElement, $scope);
70 $scope.next = function(){
71 $scope.stepNum = $scope.stepNum +1;
72 $scope.activeTabsId = $scope.stepTabs[$scope.stepNum].id;
76 $scope.previous = function(){
77 $scope.stepNum = $scope.stepNum -1;
78 $scope.activeTabsId = $scope.stepTabs[$scope.stepNum].id;
81 /*******************Step 1 Definitions****************/
82 $scope.displayOptions={
89 $scope.reportIdURL = $routeParams.reportId;
90 $scope.definitionData={};
91 $scope.definitionData.displayOptions=[
92 {name:'HideFormFields', selected:false},
93 {name:'HideChart', selected:false},
94 {name:'HideReportData', selected:false},
95 {name:'HideExcel', selected:false},
96 {name:'HidePdf', selected:false}
99 /* $scope.definitionData.dbSrcOptions=[
100 {text:'local', value:'local', selected:true},
101 {text:'e911dev_leto07', value:'e911dev_leto07', selected:false},
104 $scope.pageSizeValues=['10','25','50','100','500'];
105 $scope.pageSizeOptions =[];
106 $scope.dbSrcOptions =[];
107 $scope.maxRowValues = ['500','1000','2000','3000','4000','5000','10000','15000','20000','25000','30000','35000','40000','45000','50000','65000']
108 $scope.maxRowOptions =[];
109 $scope.frozenColValues = ['0','1','2','3','4'];
110 $scope.frozenColOptions =[];
111 $scope.dataGridAlignValues = ['Left','Right','Center'];
112 $scope.dataGridAlignOptions =[];
113 $scope.dataContainerValues = ['10','20','30','40','50','60','70','80','90','100','110','120','130','140','150','160','170','180','190','200'];
114 $scope.dataContainerOptions =[];
115 $scope.runTimeFormNumValues = ['1','2','3','4'];
116 $scope.runTimeFormNumOptions =[];
119 $scope.definitionData.reportType = 'Linear';
120 //$scope.definitionData.dbInfo = 'Local';
121 //$scope.definitionData.dbSrcOptions = ['Local'];
126 $scope.getDefinitionById = function(id) {
127 $scope.showLoader=true;
128 raptorReportFactory.getDefinitionByReportId(id).then(function(data){
129 $scope.showLoader=false;
130 $scope.definitionData = data;
131 $scope.definitionData.dbSrc=data.dbInfo;
132 $scope.definitionData.dbSrcOptions = data.dbInfoList;
133 console.log($scope.definitionData.dbSrcOptions[0].name);
135 $scope.showLoader = false;
136 for(x in data.displayOptions){
137 if(data.displayOptions[x].name=='HideFormFields')
138 $scope.displayOptions.hideFormFields = data.displayOptions[x].selected;
139 else if(data.displayOptions[x].name=='HideChart')
140 $scope.displayOptions.hideChart = data.displayOptions[x].selected;
141 else if(data.displayOptions[x].name=='HideReportData')
142 $scope.displayOptions.hideReportData = data.displayOptions[x].selected;
143 else if(data.displayOptions[x].name=='HideExcel')
144 $scope.displayOptions.hideExcel = data.displayOptions[x].selected;
145 else if(data.displayOptions[x].name=='HidePdf')
146 $scope.displayOptions.hidePdf = data.displayOptions[x].selected;
149 $scope.definitionData.frozenColumns = $scope.definitionData.frozenColumns+'';
150 $scope.definitionData.numFormCols = $scope.definitionData.numFormCols+'';
151 $scope.definitionData.allowScheduler = data.allowScheduler=='Y'?true:false;
152 $scope.definitionData.sizedByContent = data.sizedByContent=='Y'?true:false;
154 $scope.definitionData.oneTimeRec = data.oneTimeRec=='Y'?true:false;
155 $scope.definitionData.hourlyRec = data.hourlyRec=='Y'?true:false;
156 $scope.definitionData.dailyRec = data.dailyRec=='Y'?true:false;
157 $scope.definitionData.dailyMFRec = data.dailyMFRec=='Y'?true:false;
158 $scope.definitionData.weeklyRec = data.weeklyRec=='Y'?true:false;
159 $scope.definitionData.monthlyRec = data.monthlyRec=='Y'?true:false;
161 if($scope.definitionData.reportTitle==null || $scope.definitionData.reportTitle=='')
162 $scope.definitionData.reportTitle = $scope.definitionData.reportName;
164 $scope.errorPopUp(error);
165 $log.error("raptorReportFactory: getDefinitionById failed.");
166 $scope.showLoader = false;
170 $scope.constructureDefDropDown = function(){
172 for(i in $scope.pageSizeValues){
174 value :$scope.pageSizeValues[i],
175 text :$scope.pageSizeValues[i]
177 $scope.pageSizeOptions.push(v);
179 for(i in $scope.maxRowValues){
181 value :$scope.maxRowValues[i],
182 text :$scope.maxRowValues[i]
184 $scope.maxRowOptions.push(v);
186 for(i in $scope.frozenColValues){
188 value :$scope.frozenColValues[i]+'',
189 text :$scope.frozenColValues[i]
191 $scope.frozenColOptions.push(v);
193 for(i in $scope.dataGridAlignValues){
195 value :$scope.dataGridAlignValues[i].toLowerCase(),
196 text :$scope.dataGridAlignValues[i]
198 $scope.dataGridAlignOptions.push(v);
200 for(i in $scope.dataContainerValues){
202 value :$scope.dataContainerValues[i],
203 text :$scope.dataContainerValues[i]
205 $scope.dataContainerOptions.push(v);
207 for(i in $scope.runTimeFormNumValues){
209 value :$scope.runTimeFormNumValues[i],
210 text :$scope.runTimeFormNumValues[i]
212 $scope.runTimeFormNumOptions.push(v);
216 $scope.constructDef = function(){
217 var data =Object.assign({}, $scope.definitionData);
218 if($scope.definitionData.dbSrc){
219 console.log("Hello World ", $scope.definitionData.dbSrc);
220 data.dbInfo = $scope.definitionData.dbSrc;
222 for(x in $scope.definitionData.displayOptions){
223 if($scope.definitionData.displayOptions[x].name=='HideFormFields')
224 data.displayOptions[x].selected = $scope.displayOptions.hideFormFields
225 else if($scope.definitionData.displayOptions[x].name=='HideChart')
226 data.displayOptions[x].selected = $scope.displayOptions.hideChart
227 else if($scope.definitionData.displayOptions[x].name=='HideReportData')
228 data.displayOptions[x].selected = $scope.displayOptions.hideReportData
229 else if($scope.definitionData.displayOptions[x].name=='HideExcel')
230 data.displayOptions[x].selected = $scope.displayOptions.hideExcel
231 else if($scope.definitionData.displayOptions[x].name=='HidePdf')
232 data.displayOptions[x].selected = $scope.displayOptions.hidePdf
234 if(data.pageSize==null || data.pageSize.startsWith("Select"))
235 data.pageSize = null;
236 if(data.maxRowsInExcelCSVDownload==null || data.maxRowsInExcelCSVDownload.startsWith("Select"))
237 data.maxRowsInExcelCSVDownload = null;
238 if(data.frozenColumns==null || data.frozenColumns.startsWith("Select"))
239 data.frozenColumns = null;
240 if(data.dataGridAlign==null || data.dataGridAlign.startsWith("Select"))
241 data.dataGridAlign = null;
242 if(data.dataContainerHeight==null || data.dataContainerHeight.startsWith("Select"))
243 data.dataContainerHeight = null;
244 if(data.dataContainerWidth ==null || data.dataContainerWidth.startsWith("Select"))
245 data.dataContainerWidth = null;
246 if(data.numFormCols ==null || data.numFormCols.startsWith("Select"))
247 data.numFormCols = null;
251 if(data.reportTitle==null || data.reportTitle=='')
252 data.reportTitle = data.reportName;
255 $scope.updateDef = function(){
256 $scope.showLoader=true;
257 var dataToSave = $scope.constructDef();
258 raptorReportFactory.updateDefinition(dataToSave,$scope.isEdit).then(function(data){
259 $scope.successPopUp('Definition is updated');
260 for(x in $scope.stepTabs){
261 $scope.stepTabs[x].disabled=false;
263 $scope.showLoader=false;
265 var newReportId = data.anyStacktrace.split("-")[0];
266 if(newReportId!=null && newReportId!='' && newReportId!=-1)
267 $window.location.href = "#/report_wizard/"+newReportId;
270 $scope.errorPopUp(error);
271 $log.error("report-step-controller: updateDefinition by Id failed.");
274 /*******************Step1 Ends****************/
275 /*******************Step2 SQL****************/
276 $scope.pageisCreating = false;
280 $scope.sqlTestTableData='';
282 $scope.getSql = function(){
283 $scope.showLoader = true;
284 raptorReportFactory.getSqlInSession().then(function(data){
285 $scope.sqlInSessionJSON = data;
286 $scope.sqlScript.value = data.query;
287 $scope.showLoader = false;
289 $scope.errorPopUp(error);
290 $log.error("raptorReportFactory: getSearchData failed.");
293 $scope.testRunSql = function(){
294 $scope.showLoader=true;
295 var queryJSON = {query: $scope.sqlScript.value};
296 queryJSON = JSON.stringify(queryJSON);
297 raptorReportFactory.testRunSQL(queryJSON).then(function(data){
298 $scope.showLoader=false;
299 var modalInstance = $modal.open({
301 animation: $scope.animationsEnabled,
302 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html',
303 windowClass:'modal-docked',
304 sizeClass: 'modal-large',
305 controller: testRunSqlController,
307 queriedData: function(){
313 modalInstance.result.finally(function () {
315 $scope.showLoader=true;
316 $scope.pageisCreating = true;
317 $scope.pageMsg = 'Please wait while we are creating the report. Page will be reloaded after the creation is done.'
318 raptorReportFactory.getDefinitionInSession().then(function(data){
319 var newReportId = data.reportId;
320 if(newReportId!=null && newReportId!='' && newReportId!=-1)
321 $window.location.href = "#/report_wizard/"+newReportId;
323 $scope.showLoader = false;
324 $scope.pageisCreating = false;
326 $scope.errorPopUp(error);
327 $log.error("raptorReportFactory: get Definition In Session failed.");
328 $scope.showLoader = false;
334 $scope.errorPopUp(error);
335 $log.error("raptorReportFactory: test run SQL failed.");
339 /*******************Step2 End****************/
340 /*******************Step3 Column****************/
341 $scope.colTableRowData='';
342 $scope.isEditCol= true;
344 $scope.getColumn = function(){
345 $scope.showLoader = true;
346 raptorReportFactory.getColumnList().then(function(data){
347 $scope.colTableRowData = data;
348 $scope.showLoader = false;
350 $scope.errorPopUp(error);
351 $log.error("raptorReportFactory: get column list failed.");
355 $scope.openColumnPopup = function (rowData) {
356 var modalInstance = $modal.open({
358 animation: $scope.animationsEnabled,
359 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-col-edit.html',
360 windowClass:'modal-docked',
361 sizeClass: 'modal-jumbo',
362 controller: openColumnPopupController,
369 modalInstance.result.finally(function () {
374 /*******************Step3 End****************/
375 /*******************Step4 Starts Form Fields****************/
377 $scope.dataProcessing = false;
378 $scope.formFieldData = [];
379 $scope.getFormFieldList = function(){
380 $scope.showLoader= true;
381 $scope.formFieldData = [];
382 raptorReportFactory.getFormFieldList().then(function(data){
383 $scope.showLoader= false;
384 $scope.formFieldData = data;
385 $scope.formFieldData.sort(function(obj1, obj2) {
386 // Ascending: first age less than the previous
387 return obj1.orderSeq - obj2.orderSeq;
390 $scope.showLoader = false;
392 $scope.errorPopUp(error);
393 $log.error("raptorReportFactory: get formfields failed.");
394 $scope.showLoader = false;
398 $scope.formFieldReOrder = function(upID, downID){
401 $scope.moveDownFF={};
402 $scope.showLoader=true;
403 raptorReportFactory.getFormFieldEditInfoById(upID).then(function(data){
404 $scope.moveUpFF = data;
405 raptorReportFactory.getFormFieldEditInfoById(downID).then(function(data){
406 $scope.moveDownFF = data;
407 var downOrder = $scope.moveDownFF.orderSeq;
408 $scope.moveDownFF.orderSeq = $scope.moveUpFF.orderSeq;
409 $scope.moveUpFF.orderSeq = downOrder;
410 raptorReportFactory.saveFormFieldEditInfo($scope.moveDownFF).then(function(data){
411 raptorReportFactory.saveFormFieldEditInfo($scope.moveUpFF).then(function(data){
412 $scope.successPopUp('');
414 $scope.errorPopUp(error);
415 $log.error("raptorReportFactory: saveFormFieldEditInfo failed.");
416 }).finally(function() {
417 $scope.showLoader=false;
418 $scope.getFormFieldList();
421 $scope.errorPopUp(error);
422 $log.error("raptorReportFactory: saveFormFieldEditInfo failed.");
426 $scope.errorPopUp(error);
427 $log.error("raptorReportFactory: getColumnEditInfoById failed.");
430 $scope.errorPopUp(error);
431 $log.error("raptorReportFactory: getColumnEditInfoById failed.");
437 $scope.formFieldVerifySQL= function(sqlScript){
438 var queryJSON = {query: sqlScript};
439 queryJSON = JSON.stringify(queryJSON);
440 raptorReportFactory.formFieldVerifySQL(queryJSON).then(function(data){
441 var modalInstance = $modal.open({
443 animation: $scope.animationsEnabled,
444 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html',
445 sizeClass: 'modal-large',
446 controller: formFieldVerifySQLController,
448 queriedData: function(){
455 $scope.errorPopUp(error);
456 $log.error("raptorReportFactory: test run SQL failed.");
461 $scope.openFormFieldPopup = function (rowData,type) {
463 var modalInstance = $modal.open({
466 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-formfield-edit.html',
467 sizeClass: 'modal-large',
468 controller: openFormFieldPopupController,
470 fieldData: function(){
476 modalInstance.result.finally(function () {
477 $scope.getFormFieldList();
480 $scope.addFormField = function(){
481 $scope.openFormFieldPopup('','add');
485 $scope.deleteFormField = function(rowData) {
486 var modalInstance = $modal.open({
488 animation: $scope.animationsEnabled,
489 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-formfield-del-confirm.html',
490 sizeClass: 'modal-small',
491 controller: deleteFormFieldController,
498 modalInstance.result.then(function () {
499 $scope.getFormFieldList();
504 /*******************Step4 End****************/
505 /*******************Step5 Starts Security****************/
507 {value:"true", text:"Yes"},
508 {value:"false", text:"No"}
510 $scope.addReportUserId={
513 $scope.addReportRoleId={
516 $scope.loadSecurityPage = function() {
517 $scope.showLoader = true;
518 raptorReportFactory.resetSecurityLoadingCounter();
521 raptorReportFactory.getSecurityReportOwnerList().then(function(data){
522 $scope.reportOwnerList = data;
523 raptorReportFactory.icrementSecurityLoadingCounter();
524 if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;};
526 $scope.errorPopUp(error);
527 $log.error("raptorReportFactory: getSecurityReportOwnerList failed.");
530 //API call 2: get report role list
531 raptorReportFactory.getReportRoleList().then(function(data){
532 $scope.reportRoleList = data;
533 raptorReportFactory.icrementSecurityLoadingCounter();
534 if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;};
536 $scope.errorPopUp(error);
537 $log.error("raptorReportFactory: getReportRoleList failed.");
540 //API call 3: get security page basic info
541 raptorReportFactory.getReportSecurityInfo().then(function(data){
542 $scope.reportSecurityInfo = data;
543 $scope.reportOwnerId ={id: $scope.reportSecurityInfo.ownerId};
544 raptorReportFactory.icrementSecurityLoadingCounter();
545 if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;};
547 $scope.errorPopUp(error);
548 $log.error("raptorReportFactory: getReportSecurityInfo failed.");
549 $scope.showLoader = false;});
551 //API call 4: retrieve security users
552 raptorReportFactory.getReportSecurityUsers().then(function(data){
554 $scope.reportSecurityUsers = data;
555 for (var i=0; i<$scope.reportSecurityUsers.length;i++) {
556 $scope.reportSecurityUsers[i]["accessAllowed"] = !$scope.reportSecurityUsers[i]["readOnly"];
557 $scope.reportSecurityUsers[i].runAccess = true; // need to check why 1702 version is making it true always
559 raptorReportFactory.icrementSecurityLoadingCounter();
560 if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;};
562 $scope.errorPopUp(error);
563 $log.error("raptorReportFactory: reportSecurityUsers failed.");
566 //API call 5: retrieve security roles
567 raptorReportFactory.getReportSecurityRoles().then(function(data){
568 $scope.reportSecurityRoles = data;
569 for (var i=0; i<$scope.reportSecurityRoles.length;i++) {
570 $scope.reportSecurityRoles[i]["accessAllowed"] = !$scope.reportSecurityRoles[i]["readOnly"];
571 $scope.reportSecurityRoles[i].runAccess = true; // need to check why 1702 version is making it true always
574 raptorReportFactory.icrementSecurityLoadingCounter();
575 if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;};
577 $scope.errorPopUp(error);
578 $log.error("raptorReportFactory: reportSecurityRoles failed.");
581 $scope.addReportSecurityUser = function(userId) {
582 $scope.showLoader=true;
583 raptorReportFactory.addReportSecurityUser(userId).then(function(data){
584 $scope.loadSecurityPage();
586 $scope.errorPopUp(error);
587 $log.error("raptorReportFactory: addReportSecurityUser failed.");
588 }).finally(function() {
589 $scope.showLoader=false;
593 $scope.removeReportSecurityUser = function(securityUser) {
594 var modalInstance = $modal.open({
596 animation: $scope.animationsEnabled,
597 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-user-del-confirm.html',
598 sizeClass: 'modal-small',
599 controller: removeReportSecurityUserController,
601 securityUser: function(){
606 modalInstance.result.then(function () {
607 $scope.loadSecurityPage();
611 $scope.addReportSecurityRole = function(roleId) {
612 raptorReportFactory.addReportSecurityRole(roleId).then(function(data){
613 $scope.loadSecurityPage();
615 $scope.errorPopUp(error);
616 $log.error("raptorReportFactory: addReportSecurityRole failed.");
621 $scope.removeReportSecurityRole = function(securityRole) {
622 var modalInstance = $modal.open({
624 animation: $scope.animationsEnabled,
625 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-role-del-confirm.html',
626 sizeClass: 'modal-small',
627 controller: removeReportSecurityRoleController,
629 securityRole: function(){
634 modalInstance.result.then(function () {
635 $scope.loadSecurityPage();
640 $scope.saveReportSecurityInfo = function() {
641 $scope.showLoader = true;
642 var securityInfo = {'userId':$scope.reportSecurityInfo.ownerId+"",'isPublic':$scope.reportSecurityInfo.isPublic};
643 raptorReportFactory.updateReportSecurityInfo(securityInfo).then(function(data){
644 $scope.successPopUp('');
645 $scope.loadSecurityPage();
647 $scope.errorPopUp(error);
648 $log.error("raptorReportFactory: updateReportSecurityInfo failed.");
652 $scope.toggleUserEditAccessActive = function(rowData) {
653 var modalInstance = $modal.open({
655 animation: $scope.animationsEnabled,
656 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-user-role-confirm-toggle.html',
657 sizeClass: 'modal-small',
658 controller: toggleUserEditAccessActiveController,
667 $scope.toggleRoleEditAccessActive = function(rowData) {
668 var modalInstance = $modal.open({
670 animation: $scope.animationsEnabled,
671 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-user-role-confirm-toggle.html',
672 sizeClass: 'modal-small',
673 controller: toggleRoleEditAccessActiveController,
682 /*******************Step5 End****************/
683 /*******************Step6 Starts****************/
685 $scope.getReportID = function(){
686 $scope.showLoader = true;
687 raptorReportFactory.getReportLogs($routeParams.reportId).then(function(data){
689 $scope.showLoader = false;
692 $scope.errorPopUp(error);
693 $log.error("raptorReportFactory: getReportID failed."+ error);
698 /*******************Step6 End****************/
699 /*******************Step7 Starts Run****************/
700 $scope.loadDefinitionInSession = function(){
701 $scope.showLoader = true;
702 raptorReportFactory.getDefinitionInSession().then(function(data){
703 $scope.reportId = data.reportId;
704 $scope.showLoader = false;
706 $scope.errorPopUp(error);
707 $log.error("raptorReportFactory: getDefinitionInSession failed.");
708 $scope.showLoader = false;
711 $scope.runReport = function(){
712 $window.location.href = "#/report_run/c_master="+$scope.reportId+"&refresh=Y";
714 /*******************Step7 End****************/
716 /********************Init*************/
717 $scope.init = function(){
718 if ($routeParams.reportMode=="copy") {
719 $scope.isCopy = true;
720 raptorReportFactory.copyReportById($routeParams.reportId).then(function(data){
721 $scope.isEdit = true;
722 $scope.reportId = -1;
723 $scope.getDefinitionById(-1);
725 $log.error("raptorReportFactory: deleteFormFieldById failed.");
727 } /*else if ($routeParams.reportMode=="import") {
728 $scope.$emit('RefreshInsession');
732 if($scope.activeTabsId=='definition'){ /*Step 1*/
733 $scope.constructureDefDropDown();
735 $scope.getDefinitionById($scope.reportIdURL); //edit
737 $scope.getDefinitionById(-1); //create
738 }else if($scope.activeTabsId=='sql'){ /*Step 2*/
740 }else if($scope.activeTabsId=='columns'){
742 }else if($scope.activeTabsId=='formFields'){
743 $scope.getFormFieldList();
744 }else if($scope.activeTabsId=='security'){
745 $scope.loadSecurityPage();
746 }else if($scope.activeTabsId=='log'){
747 $scope.getReportID();
748 }else if($scope.activeTabsId=='run'){
749 $scope.reportId = $scope.reportIdURL;
750 if($scope.reportId==null || $scope.reportId=='')
751 $scope.loadDefinitionInSession();
755 $scope.successPopUp = function (msg) {
756 var modalInstance = $modal.open({
757 templateUrl: 'app/fusion/scripts/DS2-modal/success_modal.html',
758 controller: ModalInstanceCtrl,
759 sizeClass: 'modal-small',
772 $scope.errorPopUp = function (msg) {
773 var modalInstance = $modal.open({
774 templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
775 controller: ModalInstanceCtrl,
776 sizeClass: 'modal-small',