Merge pull request #9 from crosbymichael/master

Pull latest changes
pull/2/head
Kevan Ahlquist 10 years ago
commit c798a95fb3

@ -26,15 +26,41 @@ function($scope, Container, Settings, Messages, ViewSpinner) {
}; };
angular.forEach(items, function(c) { angular.forEach(items, function(c) {
if (c.Checked) { if (c.Checked) {
counter = counter + 1; if(action === Container.start){
action({id: c.Id}, function(d) { Container.get({id: c.Id}, function(d) {
Messages.send("Container " + msg, c.Id); c = d;
var index = $scope.containers.indexOf(c); counter = counter + 1;
complete(); action({id: c.Id, HostConfig: c.HostConfig || {}}, function(d) {
}, function(e) { Messages.send("Container " + msg, c.Id);
Messages.error("Failure", e.data); var index = $scope.containers.indexOf(c);
complete(); complete();
}); }, function(e) {
Messages.error("Failure", e.data);
complete();
});
}, function(e) {
if (e.status === 404) {
$('.detail').hide();
Messages.error("Not found", "Container not found.");
} else {
Messages.error("Failure", e.data);
}
complete();
});
}
else{
counter = counter + 1;
action({id: c.Id}, function(d) {
Messages.send("Container " + msg, c.Id);
var index = $scope.containers.indexOf(c);
complete();
}, function(e) {
Messages.error("Failure", e.data);
complete();
});
}
} }
}); });
if (counter === 0) { if (counter === 0) {

46
dist/dockerui.js vendored

@ -1,4 +1,4 @@
/*! dockerui - v0.6.0 - 2015-02-01 /*! dockerui - v0.6.0 - 2015-02-09
* https://github.com/crosbymichael/dockerui * https://github.com/crosbymichael/dockerui
* Copyright (c) 2015 Michael Crosby & Kevan Ahlquist; * Copyright (c) 2015 Michael Crosby & Kevan Ahlquist;
* Licensed MIT * Licensed MIT
@ -211,15 +211,41 @@ function($scope, Container, Settings, Messages, ViewSpinner) {
}; };
angular.forEach(items, function(c) { angular.forEach(items, function(c) {
if (c.Checked) { if (c.Checked) {
counter = counter + 1; if(action === Container.start){
action({id: c.Id}, function(d) { Container.get({id: c.Id}, function(d) {
Messages.send("Container " + msg, c.Id); c = d;
var index = $scope.containers.indexOf(c); counter = counter + 1;
complete(); action({id: c.Id, HostConfig: c.HostConfig || {}}, function(d) {
}, function(e) { Messages.send("Container " + msg, c.Id);
Messages.error("Failure", e.data); var index = $scope.containers.indexOf(c);
complete(); complete();
}); }, function(e) {
Messages.error("Failure", e.data);
complete();
});
}, function(e) {
if (e.status === 404) {
$('.detail').hide();
Messages.error("Not found", "Container not found.");
} else {
Messages.error("Failure", e.data);
}
complete();
});
}
else{
counter = counter + 1;
action({id: c.Id}, function(d) {
Messages.send("Container " + msg, c.Id);
var index = $scope.containers.indexOf(c);
complete();
}, function(e) {
Messages.error("Failure", e.data);
complete();
});
}
} }
}); });
if (counter === 0) { if (counter === 0) {

Loading…
Cancel
Save