X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fresources%2FMETA-INF%2Fresources%2Fdesigner%2Fscripts%2Fapp.js;h=3c723626e58aa2f37fe23ba43041cd6e7223beb6;hb=da4caf492050e17c1aaa8915064659a16e060d8d;hp=555b31c55c3840ed462e5d1a17266d0f03f49652;hpb=1aa4dc3048d39515c77c2565d0a050f6d5c9192f;p=clamp.git diff --git a/src/main/resources/META-INF/resources/designer/scripts/app.js b/src/main/resources/META-INF/resources/designer/scripts/app.js index 555b31c5..3c723626 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/app.js +++ b/src/main/resources/META-INF/resources/designer/scripts/app.js @@ -393,7 +393,7 @@ var app = angular.module('clds-app', ['ngRoute', $scope .cldsConfirmPerformAction("RESTART"); } else if (name == "Refresh Status") { - $scope.cldsPerformAction("REFRESH"); + $scope.refreshStatus(); } else if (name == "Properties CL") { $scope.cldsOpenModelProperties(); } else if (name == "Deploy") { @@ -1175,7 +1175,32 @@ var app = angular.module('clds-app', ['ngRoute', // + data); }); }; - + $scope.refreshStatus = function() { + var modelName = selected_model; + var svgXml = ""; + console.log(abootDiagram.saveSVG({ + format: true + }, function(err, xml) { + if (err) + console.log("error") + else + console.log(xml) + svgXml = xml; + })); + console.log("refreStatus modelName=" + modelName); + cldsModelService + .getModel(modelName) + .then( + function(pars) { + console + .log("refreStatus: pars=" + + pars); + cldsModelService + .processRefresh(pars); + }, + function(data) { + }); + }; $scope.cldsConfirmPerformAction = function(uiAction) { var dlg = dialogs.confirm('Message', 'Do you want to ' + @@ -1296,106 +1321,6 @@ var app = angular.module('clds-app', ['ngRoute', // $modalInstance.close("closed"); }); }; - $scope.CollectorsWindow = function(collectorsWin) { - - if (isTemplate) { - var dlg = dialogs - .create( - 'partials/portfolios/Template_model.html', - 'ImportSchemaCtrl', - collectorsWin, { - closable: true, - draggable: true - }, { - size: 'lg', - keyboard: true, - backdrop: 'static', - windowClass: 'my-class' - }); - dlg.result.then(function(name) { - - }, function() { - - // if(angular.equals($scope.name,'')) - // $scope.name = 'You did not enter in - // your name!'; - }); - } else { - var dlg = dialogs - .create( - 'partials/portfolios/Collector_properties.html', - 'ImportSchemaCtrl', { - closable: true, - draggable: true - }, { - size: 'lg', - keyboard: true, - backdrop: 'static', - windowClass: 'my-class' - }); - dlg.result.then(function(name) { - - }, function() { - - // if(angular.equals($scope.name,'')) - // $scope.name = 'You did not enter in - // your name!'; - }); - - } - - }; - $scope.StringMatchWindow = function(stringMatch) { - - if (isTemplate) { - var dlg = dialogs - .create( - 'partials/portfolios/Template_model.html', - 'ImportSchemaCtrl', - stringMatch, { - closable: true, - draggable: true - }, { - size: 'lg', - keyboard: true, - backdrop: 'static', - windowClass: 'my-class' - }); - dlg.result.then(function(name) { - - }, function() { - - // if(angular.equals($scope.name,'')) - // $scope.name = 'You did not enter in - // your name!'; - }); - } else { - - var dlg = dialogs - .create( - 'partials/portfolios/stringMatch_properties.html', - 'ImportSchemaCtrl', { - closable: true, - draggable: true - }, { - size: 'lg', - keyboard: true, - backdrop: 'static', - windowClass: 'my-class' - }); - - dlg.result.then(function(name) { - - // $scope.name = name; - }, function() { - - // if(angular.equals($scope.name,'')) - // $scope.name = 'You did not enter in - // your name!'; - }); - - } - }; $scope.VesCollectorWindow = function(vesCollector) { if (isTemplate) { @@ -1677,13 +1602,6 @@ function importshema() { } -function CollectorsWindow(collectorsWin) { - - angular.element(document.getElementById('navbar')).scope() - .CollectorsWindow(collectorsWin); - -} - function VesCollectorWindow(vesCollectorWin) { angular.element(document.getElementById('navbar')).scope() .VesCollectorWindow(vesCollectorWin); @@ -1700,13 +1618,6 @@ function F5Window() { } -function StringMatchWindow(stringMatch) { - - angular.element(document.getElementById('navbar')).scope() - .StringMatchWindow(stringMatch); - -} - function TCAWindow(tca) { angular.element(document.getElementById('navbar')).scope().TCAWindow(tca);