a8f853fd06cf37b75525d9f7acffb4a0ad12531f
[portal/sdk.git] /
1 appDS2.controller('reportImportController', function($scope,$http,$location, $routeParams, $q, $modal,$log,$window, raptorReportFactory, stepFormFactory, DOMHelper) {
2         $scope.importXML = function(){
3                 
4                 var importXMLJSON = {
5                                 "tabId":"Import",
6                                 "tabName":"Import",
7                                 "reportXML":$scope.xmlContent
8                 }
9                 $scope.errorMessage = ""
10                 raptorReportFactory.postImportXml(importXMLJSON).then(function(data){
11                         if (data.errormessage) {
12                                 $scope.errorMessage = data.errormessage;
13                         } else {
14                         $window.location.href = 'report#/report_wizard/-1';
15                         };
16                 },function(error){
17                         $log.error("raptorReportFactory: postImportXml failed.");
18                 });             
19         }
20 });