Merge pull request #79 from Slamper/master
Fix of HostConfig being lost when starting containers from the listpull/2/head
commit
d11c849a0f
|
@ -26,6 +26,29 @@ function($scope, Container, Settings, Messages, ViewSpinner) {
|
||||||
};
|
};
|
||||||
angular.forEach(items, function(c) {
|
angular.forEach(items, function(c) {
|
||||||
if (c.Checked) {
|
if (c.Checked) {
|
||||||
|
if(action === Container.start){
|
||||||
|
Container.get({id: c.Id}, function(d) {
|
||||||
|
c = d;
|
||||||
|
counter = counter + 1;
|
||||||
|
action({id: c.Id, HostConfig: c.HostConfig || {}}, function(d) {
|
||||||
|
Messages.send("Container " + msg, c.Id);
|
||||||
|
var index = $scope.containers.indexOf(c);
|
||||||
|
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;
|
counter = counter + 1;
|
||||||
action({id: c.Id}, function(d) {
|
action({id: c.Id}, function(d) {
|
||||||
Messages.send("Container " + msg, c.Id);
|
Messages.send("Container " + msg, c.Id);
|
||||||
|
@ -35,6 +58,9 @@ function($scope, Container, Settings, Messages, ViewSpinner) {
|
||||||
Messages.error("Failure", e.data);
|
Messages.error("Failure", e.data);
|
||||||
complete();
|
complete();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (counter === 0) {
|
if (counter === 0) {
|
||||||
|
|
|
@ -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,6 +211,29 @@ function($scope, Container, Settings, Messages, ViewSpinner) {
|
||||||
};
|
};
|
||||||
angular.forEach(items, function(c) {
|
angular.forEach(items, function(c) {
|
||||||
if (c.Checked) {
|
if (c.Checked) {
|
||||||
|
if(action === Container.start){
|
||||||
|
Container.get({id: c.Id}, function(d) {
|
||||||
|
c = d;
|
||||||
|
counter = counter + 1;
|
||||||
|
action({id: c.Id, HostConfig: c.HostConfig || {}}, function(d) {
|
||||||
|
Messages.send("Container " + msg, c.Id);
|
||||||
|
var index = $scope.containers.indexOf(c);
|
||||||
|
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;
|
counter = counter + 1;
|
||||||
action({id: c.Id}, function(d) {
|
action({id: c.Id}, function(d) {
|
||||||
Messages.send("Container " + msg, c.Id);
|
Messages.send("Container " + msg, c.Id);
|
||||||
|
@ -220,6 +243,9 @@ function($scope, Container, Settings, Messages, ViewSpinner) {
|
||||||
Messages.error("Failure", e.data);
|
Messages.error("Failure", e.data);
|
||||||
complete();
|
complete();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (counter === 0) {
|
if (counter === 0) {
|
||||||
|
|
Loading…
Reference in New Issue