summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-step-controller.js7
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step1.html2
2 files changed, 8 insertions, 1 deletions
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 54a14242..a23823e3 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
@@ -2,6 +2,7 @@ appDS2.controller('reportStepController', function($scope,$http,$location, $rout
/*****************Init values*********************/
$scope.reportIdURL = $routeParams.reportId;
$scope.isEdit = ($scope.reportIdURL==null||$scope.reportIdURL=='')?false:true;
+ $scope.isCopy = false;
$scope.isDefReady = $scope.isEdit;
$scope.activeTabsId = 'definition';
$scope.pageMsg =''
@@ -260,6 +261,11 @@ appDS2.controller('reportStepController', function($scope,$http,$location, $rout
$scope.stepTabs[x].disabled=false;
}
$scope.showLoader=false;
+ if(isCopy){
+ var newReportId = data.anyStacktrace.split("-")[0];
+ if(newReportId!=null && newReportId!='' && newReportId!=-1)
+ $window.location.href = "#/report_wizard/"+newReportId;
+ }
},function(error){
$scope.errorPopUp(error);
$log.error("report-step-controller: updateDefinition by Id failed.");
@@ -710,6 +716,7 @@ appDS2.controller('reportStepController', function($scope,$http,$location, $rout
/********************Init*************/
$scope.init = function(){
if ($routeParams.reportMode=="copy") {
+ $scope.isCopy = true;
raptorReportFactory.copyReportById($routeParams.reportId).then(function(data){
$scope.isEdit = true;
$scope.reportId = -1;
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step1.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step1.html
index 64d31d97..0ad05d24 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step1.html
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/steps/step1.html
@@ -7,7 +7,7 @@
<div class="span6" ng-hide="showLoader">
- <div class="form-row" ng-if="isEdit">
+ <div class="form-row" ng-if="isEdit && !isCopy">
<label for="textinputID-2a">Report ID</label>
<div class="field-group">
<input id="textinputID-2a" ddh-reset="" class="span12" type="text" data-ng-model="definitionData.reportId" ng-disabled="true">