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;
5 $scope.isDefReady = $scope.isEdit;
6 $scope.activeTabsId = 'definition';
13 uniqueId: 'uniqueStep1',
14 tabPanelId: 'definitionTab',
20 uniqueId: 'uniqueStep2',
22 disabled: (!$scope.isDefReady)
26 uniqueId: 'uniqueTab3x',
27 tabPanelId: 'columnsTab',
28 disabled: (!$scope.isDefReady)
32 uniqueId: 'uniqueTab4x',
33 tabPanelId: 'formFieldsTab',
34 disabled: (!$scope.isDefReady)
38 uniqueId: 'uniqueTab5x',
39 tabPanelId: 'securityTab',
40 disabled: (!$scope.isDefReady)
44 uniqueId: 'uniqueTab6x',
46 disabled: (!$scope.isDefReady)
50 uniqueId: 'uniqueTab7x',
52 disabled: (!$scope.isDefReady)
56 $scope.$watch('activeTabsId', function (newVal, oldVal) {
57 if(newVal !== oldVal) {
62 $scope.renderStep = function(stepNum){
63 var containerElement = angular.element(document.getElementById("stepView"));
64 containerElement.empty();
65 $scope.stepNum = stepNum;
66 var jsonSrcName = getJsonSrcName(stepNum);
67 stepFormFactory.renderForm(jsonSrcName, containerElement, $scope);
69 $scope.next = function(){
70 $scope.stepNum = $scope.stepNum +1;
71 $scope.activeTabsId = $scope.stepTabs[$scope.stepNum].id;
75 $scope.previous = function(){
76 $scope.stepNum = $scope.stepNum -1;
77 $scope.activeTabsId = $scope.stepTabs[$scope.stepNum].id;
80 /*******************Step 1 Definitions****************/
81 $scope.displayOptions={
88 $scope.reportIdURL = $routeParams.reportId;
89 $scope.definitionData={};
90 $scope.definitionData.displayOptions=[
91 {name:'HideFormFields', selected:false},
92 {name:'HideChart', selected:false},
93 {name:'HideReportData', selected:false},
94 {name:'HideExcel', selected:false},
95 {name:'HidePdf', selected:false}
98 /* $scope.definitionData.dbSrcOptions=[
99 {text:'local', value:'local', selected:true},
100 {text:'e911dev_leto07', value:'e911dev_leto07', selected:false},
103 $scope.pageSizeValues=['10','25','50','100','500'];
104 $scope.pageSizeOptions =[];
105 $scope.dbSrcOptions =[];
106 $scope.maxRowValues = ['500','1000','2000','3000','4000','5000','10000','15000','20000','25000','30000','35000','40000','45000','50000','65000']
107 $scope.maxRowOptions =[];
108 $scope.frozenColValues = ['0','1','2','3','4'];
109 $scope.frozenColOptions =[];
110 $scope.dataGridAlignValues = ['Left','Right','Center'];
111 $scope.dataGridAlignOptions =[];
112 $scope.dataContainerValues = ['10','20','30','40','50','60','70','80','90','100','110','120','130','140','150','160','170','180','190','200'];
113 $scope.dataContainerOptions =[];
114 $scope.runTimeFormNumValues = ['1','2','3','4'];
115 $scope.runTimeFormNumOptions =[];
118 $scope.definitionData.reportType = 'Linear';
119 //$scope.definitionData.dbInfo = 'Local';
120 //$scope.definitionData.dbSrcOptions = ['Local'];
125 $scope.getDefinitionById = function(id) {
126 $scope.showLoader=true;
127 raptorReportFactory.getDefinitionByReportId(id).then(function(data){
128 $scope.showLoader=false;
129 $scope.definitionData = data;
130 $scope.definitionData.dbSrc=data.dbInfo;
131 $scope.definitionData.dbSrcOptions = data.dbInfoList;
132 console.log($scope.definitionData.dbSrcOptions[0].name);
134 $scope.showLoader = false;
135 for(x in data.displayOptions){
136 if(data.displayOptions[x].name=='HideFormFields')
137 $scope.displayOptions.hideFormFields = data.displayOptions[x].selected;
138 else if(data.displayOptions[x].name=='HideChart')
139 $scope.displayOptions.hideChart = data.displayOptions[x].selected;
140 else if(data.displayOptions[x].name=='HideReportData')
141 $scope.displayOptions.hideReportData = data.displayOptions[x].selected;
142 else if(data.displayOptions[x].name=='HideExcel')
143 $scope.displayOptions.hideExcel = data.displayOptions[x].selected;
144 else if(data.displayOptions[x].name=='HidePdf')
145 $scope.displayOptions.hidePdf = data.displayOptions[x].selected;
148 $scope.definitionData.frozenColumns = $scope.definitionData.frozenColumns+'';
149 $scope.definitionData.numFormCols = $scope.definitionData.numFormCols+'';
150 $scope.definitionData.allowScheduler = data.allowScheduler=='Y'?true:false;
151 $scope.definitionData.sizedByContent = data.sizedByContent=='Y'?true:false;
153 $scope.definitionData.oneTimeRec = data.oneTimeRec=='Y'?true:false;
154 $scope.definitionData.hourlyRec = data.hourlyRec=='Y'?true:false;
155 $scope.definitionData.dailyRec = data.dailyRec=='Y'?true:false;
156 $scope.definitionData.dailyMFRec = data.dailyMFRec=='Y'?true:false;
157 $scope.definitionData.weeklyRec = data.weeklyRec=='Y'?true:false;
158 $scope.definitionData.monthlyRec = data.monthlyRec=='Y'?true:false;
160 if($scope.definitionData.reportTitle==null || $scope.definitionData.reportTitle=='')
161 $scope.definitionData.reportTitle = $scope.definitionData.reportName;
163 $scope.errorPopUp(error);
164 $log.error("raptorReportFactory: getDefinitionById failed.");
165 $scope.showLoader = false;
169 $scope.constructureDefDropDown = function(){
171 for(i in $scope.pageSizeValues){
173 value :$scope.pageSizeValues[i],
174 text :$scope.pageSizeValues[i]
176 $scope.pageSizeOptions.push(v);
178 for(i in $scope.maxRowValues){
180 value :$scope.maxRowValues[i],
181 text :$scope.maxRowValues[i]
183 $scope.maxRowOptions.push(v);
185 for(i in $scope.frozenColValues){
187 value :$scope.frozenColValues[i]+'',
188 text :$scope.frozenColValues[i]
190 $scope.frozenColOptions.push(v);
192 for(i in $scope.dataGridAlignValues){
194 value :$scope.dataGridAlignValues[i].toLowerCase(),
195 text :$scope.dataGridAlignValues[i]
197 $scope.dataGridAlignOptions.push(v);
199 for(i in $scope.dataContainerValues){
201 value :$scope.dataContainerValues[i],
202 text :$scope.dataContainerValues[i]
204 $scope.dataContainerOptions.push(v);
206 for(i in $scope.runTimeFormNumValues){
208 value :$scope.runTimeFormNumValues[i],
209 text :$scope.runTimeFormNumValues[i]
211 $scope.runTimeFormNumOptions.push(v);
215 $scope.constructDef = function(){
216 var data =Object.assign({}, $scope.definitionData);
217 if($scope.definitionData.dbSrc){
218 console.log("Hello World ", $scope.definitionData.dbSrc);
219 data.dbInfo = $scope.definitionData.dbSrc;
221 for(x in $scope.definitionData.displayOptions){
222 if($scope.definitionData.displayOptions[x].name=='HideFormFields')
223 data.displayOptions[x].selected = $scope.displayOptions.hideFormFields
224 else if($scope.definitionData.displayOptions[x].name=='HideChart')
225 data.displayOptions[x].selected = $scope.displayOptions.hideChart
226 else if($scope.definitionData.displayOptions[x].name=='HideReportData')
227 data.displayOptions[x].selected = $scope.displayOptions.hideReportData
228 else if($scope.definitionData.displayOptions[x].name=='HideExcel')
229 data.displayOptions[x].selected = $scope.displayOptions.hideExcel
230 else if($scope.definitionData.displayOptions[x].name=='HidePdf')
231 data.displayOptions[x].selected = $scope.displayOptions.hidePdf
233 if(data.pageSize==null || data.pageSize.startsWith("Select"))
234 data.pageSize = null;
235 if(data.maxRowsInExcelCSVDownload==null || data.maxRowsInExcelCSVDownload.startsWith("Select"))
236 data.maxRowsInExcelCSVDownload = null;
237 if(data.frozenColumns==null || data.frozenColumns.startsWith("Select"))
238 data.frozenColumns = null;
239 if(data.dataGridAlign==null || data.dataGridAlign.startsWith("Select"))
240 data.dataGridAlign = null;
241 if(data.dataContainerHeight==null || data.dataContainerHeight.startsWith("Select"))
242 data.dataContainerHeight = null;
243 if(data.dataContainerWidth ==null || data.dataContainerWidth.startsWith("Select"))
244 data.dataContainerWidth = null;
245 if(data.numFormCols ==null || data.numFormCols.startsWith("Select"))
246 data.numFormCols = null;
250 if(data.reportTitle==null || data.reportTitle=='')
251 data.reportTitle = data.reportName;
254 $scope.updateDef = function(){
255 $scope.showLoader=true;
256 var dataToSave = $scope.constructDef();
257 raptorReportFactory.updateDefinition(dataToSave,$scope.isEdit).then(function(data){
258 $scope.successPopUp('Definition is updated');
259 for(x in $scope.stepTabs){
260 $scope.stepTabs[x].disabled=false;
262 $scope.showLoader=false;
264 $scope.errorPopUp(error);
265 $log.error("report-step-controller: updateDefinition by Id failed.");
268 /*******************Step1 Ends****************/
269 /*******************Step2 SQL****************/
270 $scope.pageisCreating = false;
274 $scope.sqlTestTableData='';
276 $scope.getSql = function(){
277 $scope.showLoader = true;
278 raptorReportFactory.getSqlInSession().then(function(data){
279 $scope.sqlInSessionJSON = data;
280 $scope.sqlScript.value = data.query;
281 $scope.showLoader = false;
283 $scope.errorPopUp(error);
284 $log.error("raptorReportFactory: getSearchData failed.");
287 $scope.testRunSql = function(){
288 $scope.showLoader=true;
289 var queryJSON = {query: $scope.sqlScript.value};
290 queryJSON = JSON.stringify(queryJSON);
291 raptorReportFactory.testRunSQL(queryJSON).then(function(data){
292 $scope.showLoader=false;
293 var modalInstance = $modal.open({
295 animation: $scope.animationsEnabled,
296 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html',
297 windowClass:'modal-docked',
298 sizeClass: 'modal-large',
299 controller: testRunSqlController,
301 queriedData: function(){
307 modalInstance.result.finally(function () {
309 $scope.showLoader=true;
310 $scope.pageisCreating = true;
311 $scope.pageMsg = 'Please wait while we are creating the report. Page will be reloaded after the creation is done.'
312 raptorReportFactory.getDefinitionInSession().then(function(data){
313 var newReportId = data.reportId;
314 if(newReportId!=null && newReportId!='' && newReportId!=-1)
315 $window.location.href = "#/report_wizard/"+newReportId;
317 $scope.showLoader = false;
318 $scope.pageisCreating = false;
320 $scope.errorPopUp(error);
321 $log.error("raptorReportFactory: get Definition In Session failed.");
322 $scope.showLoader = false;
328 $scope.errorPopUp(error);
329 $log.error("raptorReportFactory: test run SQL failed.");
333 /*******************Step2 End****************/
334 /*******************Step3 Column****************/
335 $scope.colTableRowData='';
336 $scope.isEditCol= true;
338 $scope.getColumn = function(){
339 $scope.showLoader = true;
340 raptorReportFactory.getColumnList().then(function(data){
341 $scope.colTableRowData = data;
342 $scope.showLoader = false;
344 $scope.errorPopUp(error);
345 $log.error("raptorReportFactory: get column list failed.");
349 $scope.openColumnPopup = function (rowData) {
350 var modalInstance = $modal.open({
352 animation: $scope.animationsEnabled,
353 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-col-edit.html',
354 windowClass:'modal-docked',
355 sizeClass: 'modal-jumbo',
356 controller: openColumnPopupController,
363 modalInstance.result.finally(function () {
368 /*******************Step3 End****************/
369 /*******************Step4 Starts Form Fields****************/
371 $scope.dataProcessing = false;
372 $scope.formFieldData = [];
373 $scope.getFormFieldList = function(){
374 $scope.showLoader= true;
375 $scope.formFieldData = [];
376 raptorReportFactory.getFormFieldList().then(function(data){
377 $scope.showLoader= false;
378 $scope.formFieldData = data;
379 $scope.formFieldData.sort(function(obj1, obj2) {
380 // Ascending: first age less than the previous
381 return obj1.orderSeq - obj2.orderSeq;
384 $scope.showLoader = false;
386 $scope.errorPopUp(error);
387 $log.error("raptorReportFactory: get formfields failed.");
388 $scope.showLoader = false;
392 $scope.formFieldReOrder = function(upID, downID){
395 $scope.moveDownFF={};
396 $scope.showLoader=true;
397 raptorReportFactory.getFormFieldEditInfoById(upID).then(function(data){
398 $scope.moveUpFF = data;
399 raptorReportFactory.getFormFieldEditInfoById(downID).then(function(data){
400 $scope.moveDownFF = data;
401 var downOrder = $scope.moveDownFF.orderSeq;
402 $scope.moveDownFF.orderSeq = $scope.moveUpFF.orderSeq;
403 $scope.moveUpFF.orderSeq = downOrder;
404 raptorReportFactory.saveFormFieldEditInfo($scope.moveDownFF).then(function(data){
405 raptorReportFactory.saveFormFieldEditInfo($scope.moveUpFF).then(function(data){
406 $scope.successPopUp('');
408 $scope.errorPopUp(error);
409 $log.error("raptorReportFactory: saveFormFieldEditInfo failed.");
410 }).finally(function() {
411 $scope.showLoader=false;
412 $scope.getFormFieldList();
415 $scope.errorPopUp(error);
416 $log.error("raptorReportFactory: saveFormFieldEditInfo failed.");
420 $scope.errorPopUp(error);
421 $log.error("raptorReportFactory: getColumnEditInfoById failed.");
424 $scope.errorPopUp(error);
425 $log.error("raptorReportFactory: getColumnEditInfoById failed.");
431 $scope.formFieldVerifySQL= function(sqlScript){
432 var queryJSON = {query: sqlScript};
433 queryJSON = JSON.stringify(queryJSON);
434 raptorReportFactory.formFieldVerifySQL(queryJSON).then(function(data){
435 var modalInstance = $modal.open({
437 animation: $scope.animationsEnabled,
438 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html',
439 sizeClass: 'modal-large',
440 controller: formFieldVerifySQLController,
442 queriedData: function(){
449 $scope.errorPopUp(error);
450 $log.error("raptorReportFactory: test run SQL failed.");
455 $scope.openFormFieldPopup = function (rowData,type) {
457 var modalInstance = $modal.open({
460 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-formfield-edit.html',
461 sizeClass: 'modal-large',
462 controller: openFormFieldPopupController,
464 fieldData: function(){
470 modalInstance.result.finally(function () {
471 $scope.getFormFieldList();
474 $scope.addFormField = function(){
475 $scope.openFormFieldPopup('','add');
479 $scope.deleteFormField = function(rowData) {
480 var modalInstance = $modal.open({
482 animation: $scope.animationsEnabled,
483 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-formfield-del-confirm.html',
484 sizeClass: 'modal-small',
485 controller: deleteFormFieldController,
492 modalInstance.result.then(function () {
493 $scope.getFormFieldList();
498 /*******************Step4 End****************/
499 /*******************Step5 Starts Security****************/
501 {value:"true", text:"Yes"},
502 {value:"false", text:"No"}
504 $scope.addReportUserId={
507 $scope.addReportRoleId={
510 $scope.loadSecurityPage = function() {
511 $scope.showLoader = true;
512 raptorReportFactory.resetSecurityLoadingCounter();
515 raptorReportFactory.getSecurityReportOwnerList().then(function(data){
516 $scope.reportOwnerList = data;
517 raptorReportFactory.icrementSecurityLoadingCounter();
518 if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;};
520 $scope.errorPopUp(error);
521 $log.error("raptorReportFactory: getSecurityReportOwnerList failed.");
524 //API call 2: get report role list
525 raptorReportFactory.getReportRoleList().then(function(data){
526 $scope.reportRoleList = data;
527 raptorReportFactory.icrementSecurityLoadingCounter();
528 if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;};
530 $scope.errorPopUp(error);
531 $log.error("raptorReportFactory: getReportRoleList failed.");
534 //API call 3: get security page basic info
535 raptorReportFactory.getReportSecurityInfo().then(function(data){
536 $scope.reportSecurityInfo = data;
537 $scope.reportOwnerId ={id: $scope.reportSecurityInfo.ownerId};
538 raptorReportFactory.icrementSecurityLoadingCounter();
539 if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;};
541 $scope.errorPopUp(error);
542 $log.error("raptorReportFactory: getReportSecurityInfo failed.");
543 $scope.showLoader = false;});
545 //API call 4: retrieve security users
546 raptorReportFactory.getReportSecurityUsers().then(function(data){
548 $scope.reportSecurityUsers = data;
549 for (var i=0; i<$scope.reportSecurityUsers.length;i++) {
550 $scope.reportSecurityUsers[i]["accessAllowed"] = !$scope.reportSecurityUsers[i]["readOnly"];
551 $scope.reportSecurityUsers[i].runAccess = true; // need to check why 1702 version is making it true always
553 raptorReportFactory.icrementSecurityLoadingCounter();
554 if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;};
556 $scope.errorPopUp(error);
557 $log.error("raptorReportFactory: reportSecurityUsers failed.");
560 //API call 5: retrieve security roles
561 raptorReportFactory.getReportSecurityRoles().then(function(data){
562 $scope.reportSecurityRoles = data;
563 for (var i=0; i<$scope.reportSecurityRoles.length;i++) {
564 $scope.reportSecurityRoles[i]["accessAllowed"] = !$scope.reportSecurityRoles[i]["readOnly"];
565 $scope.reportSecurityRoles[i].runAccess = true; // need to check why 1702 version is making it true always
568 raptorReportFactory.icrementSecurityLoadingCounter();
569 if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;};
571 $scope.errorPopUp(error);
572 $log.error("raptorReportFactory: reportSecurityRoles failed.");
575 $scope.addReportSecurityUser = function(userId) {
576 $scope.showLoader=true;
577 raptorReportFactory.addReportSecurityUser(userId).then(function(data){
578 $scope.loadSecurityPage();
580 $scope.errorPopUp(error);
581 $log.error("raptorReportFactory: addReportSecurityUser failed.");
582 }).finally(function() {
583 $scope.showLoader=false;
587 $scope.removeReportSecurityUser = function(securityUser) {
588 var modalInstance = $modal.open({
590 animation: $scope.animationsEnabled,
591 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-user-del-confirm.html',
592 sizeClass: 'modal-small',
593 controller: removeReportSecurityUserController,
595 securityUser: function(){
600 modalInstance.result.then(function () {
601 $scope.loadSecurityPage();
605 $scope.addReportSecurityRole = function(roleId) {
606 raptorReportFactory.addReportSecurityRole(roleId).then(function(data){
607 $scope.loadSecurityPage();
609 $scope.errorPopUp(error);
610 $log.error("raptorReportFactory: addReportSecurityRole failed.");
615 $scope.removeReportSecurityRole = function(securityRole) {
616 var modalInstance = $modal.open({
618 animation: $scope.animationsEnabled,
619 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-role-del-confirm.html',
620 sizeClass: 'modal-small',
621 controller: removeReportSecurityRoleController,
623 securityRole: function(){
628 modalInstance.result.then(function () {
629 $scope.loadSecurityPage();
634 $scope.saveReportSecurityInfo = function() {
635 $scope.showLoader = true;
636 var securityInfo = {'userId':$scope.reportSecurityInfo.ownerId+"",'isPublic':$scope.reportSecurityInfo.isPublic};
637 raptorReportFactory.updateReportSecurityInfo(securityInfo).then(function(data){
638 $scope.successPopUp('');
639 $scope.loadSecurityPage();
641 $scope.errorPopUp(error);
642 $log.error("raptorReportFactory: updateReportSecurityInfo failed.");
646 $scope.toggleUserEditAccessActive = function(rowData) {
647 var modalInstance = $modal.open({
649 animation: $scope.animationsEnabled,
650 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-user-role-confirm-toggle.html',
651 sizeClass: 'modal-small',
652 controller: toggleUserEditAccessActiveController,
661 $scope.toggleRoleEditAccessActive = function(rowData) {
662 var modalInstance = $modal.open({
664 animation: $scope.animationsEnabled,
665 templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-user-role-confirm-toggle.html',
666 sizeClass: 'modal-small',
667 controller: toggleRoleEditAccessActiveController,
676 /*******************Step5 End****************/
677 /*******************Step6 Starts****************/
679 $scope.getReportID = function(){
680 $scope.showLoader = true;
681 raptorReportFactory.getReportLogs($routeParams.reportId).then(function(data){
683 $scope.showLoader = false;
686 $scope.errorPopUp(error);
687 $log.error("raptorReportFactory: getReportID failed."+ error);
692 /*******************Step6 End****************/
693 /*******************Step7 Starts Run****************/
694 $scope.loadDefinitionInSession = function(){
695 $scope.showLoader = true;
696 raptorReportFactory.getDefinitionInSession().then(function(data){
697 $scope.reportId = data.reportId;
698 $scope.showLoader = false;
700 $scope.errorPopUp(error);
701 $log.error("raptorReportFactory: getDefinitionInSession failed.");
702 $scope.showLoader = false;
705 $scope.runReport = function(){
706 $window.location.href = "#/report_run/c_master="+$scope.reportId+"&refresh=Y";
708 /*******************Step7 End****************/
710 /********************Init*************/
711 $scope.init = function(){
712 if ($routeParams.reportMode=="copy") {
713 raptorReportFactory.copyReportById($routeParams.reportId).then(function(data){
714 $scope.isEdit = true;
715 $scope.reportId = -1;
716 $scope.getDefinitionById(-1);
718 $log.error("raptorReportFactory: deleteFormFieldById failed.");
720 } /*else if ($routeParams.reportMode=="import") {
721 $scope.$emit('RefreshInsession');
725 if($scope.activeTabsId=='definition'){ /*Step 1*/
726 $scope.constructureDefDropDown();
728 $scope.getDefinitionById($scope.reportIdURL); //edit
730 $scope.getDefinitionById(-1); //create
731 }else if($scope.activeTabsId=='sql'){ /*Step 2*/
733 }else if($scope.activeTabsId=='columns'){
735 }else if($scope.activeTabsId=='formFields'){
736 $scope.getFormFieldList();
737 }else if($scope.activeTabsId=='security'){
738 $scope.loadSecurityPage();
739 }else if($scope.activeTabsId=='log'){
740 $scope.getReportID();
741 }else if($scope.activeTabsId=='run'){
742 $scope.reportId = $scope.reportIdURL;
743 if($scope.reportId==null || $scope.reportId=='')
744 $scope.loadDefinitionInSession();
748 $scope.successPopUp = function (msg) {
749 var modalInstance = $modal.open({
750 templateUrl: 'app/fusion/scripts/DS2-modal/success_modal.html',
751 controller: ModalInstanceCtrl,
752 sizeClass: 'modal-small',
765 $scope.errorPopUp = function (msg) {
766 var modalInstance = $modal.open({
767 templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
768 controller: ModalInstanceCtrl,
769 sizeClass: 'modal-small',