summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main
diff options
context:
space:
mode:
authorSunder Tattavarada <statta@research.att.com>2019-05-31 14:38:06 +0000
committerGerrit Code Review <gerrit@onap.org>2019-05-31 14:38:06 +0000
commit2ff08984288baa289367ffc808717a9dfe38717b (patch)
tree0cd57d4b95eab247580a8ddd21376e86c3cd65e7 /ecomp-sdk/epsdk-app-overlay/src/main
parentbb4670a9c6fe20d8862ab4aa218e226c09893976 (diff)
parent944ec97d2b75bf63d596c529dc495c74e2cc7033 (diff)
Merge "AtomicPutWithDeleteLock Copy Report, SQL Injection"
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main')
-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">