Skip to content
This repository has been archived by the owner on Aug 22, 2021. It is now read-only.

Commit

Permalink
Merging pull request #28 from panem/master into develop
Browse files Browse the repository at this point in the history
* panem/master:
  fixing issues with busy spinner

Conflicts:
	public/js/page.js
  • Loading branch information
ssbanerje committed Nov 12, 2012
2 parents 8361d3a + 48bb646 commit ef99dc2
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions public/js/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ var App = function ($scope, $http) {
break;
}
}
if (!flag) {
if (flag) {
Busy.stop();
return;
} else {
proxify({ // Get list of cartridges
uri: $scope.host + '/broker/rest/cartridges',
headers: {
Expand Down Expand Up @@ -471,9 +474,6 @@ var App = function ($scope, $http) {
form: formData
}, function (data, status, headers, config) {
$('.deploy_'+ i.toString() + '_0').css('color', '#0d0');
if (ele.cartridges.length === 1) {
Busy.stop();
}
data = JSON.parse(data.error);
ele.properties.app.git = data.data.git_url;
ele.properties.app.app = data.data.app_url;
Expand All @@ -495,9 +495,6 @@ var App = function ($scope, $http) {
}
}, function (data, status, headers, config) {
$('.deploy_'+ i.toString() + '_' + j.toString()).css('color', '#0d0')
if (j==ele.cartridges.length-1) {
Busy.stop();
}
data = JSON.parse(data.error);
var cartData = {};
cartData.name = data.data.name;
Expand All @@ -514,11 +511,22 @@ var App = function ($scope, $http) {
};
recursiveProxify(1);
ele.deployed = true;
if (i === $scope.graph.vertices.length) {
}, errorCallbackForDeploy);
// Check to see if all operations have been finished
var int = setInterval(function () {
var flag = true;
for (var i=0; i<$scope.graph.vertices.length; i++) {
if ($scope.graph.vertices[i].deployed != true) {
flag = false;
break;
}
}
if (flag) {
Busy.stop();
$scope.deployingApp = false;
clearInterval(int);
}
}, errorCallbackForDeploy);
}, 1000);
});
};
};

0 comments on commit ef99dc2

Please sign in to comment.