mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 14:29:40 +02:00
Optionally include stopped containers
This commit is contained in:
parent
017863bfc0
commit
8e0baf0e37
2 changed files with 19 additions and 7 deletions
|
@ -41,7 +41,9 @@ angular.module('containersNetwork', ['ngVis'])
|
|||
title: "<ul style=\"list-style-type:none; padding: 0px; margin: 0px\">" +
|
||||
"<li><strong>ID:</strong> " + container.Id + "</li>" +
|
||||
"<li><strong>Image:</strong> " + container.Image + "</li>" +
|
||||
"</ul>"});
|
||||
"</ul>",
|
||||
color: (container.State.Running ? null : "gray")
|
||||
});
|
||||
};
|
||||
|
||||
this.addLinkEdgeIfExists = function(from, to) {
|
||||
|
@ -240,10 +242,19 @@ angular.module('containersNetwork', ['ngVis'])
|
|||
$scope.network.addContainer(container);
|
||||
};
|
||||
|
||||
Container.query({all: 0}, function(d) {
|
||||
for (var i = 0; i < d.length; i++) {
|
||||
Container.get({id: d[i].Id}, addContainer, showFailure);
|
||||
}
|
||||
});
|
||||
|
||||
var update = function (data) {
|
||||
Container.query(data, function(d) {
|
||||
for (var i = 0; i < d.length; i++) {
|
||||
Container.get({id: d[i].Id}, addContainer, showFailure);
|
||||
}
|
||||
});
|
||||
};
|
||||
update({all: 0});
|
||||
|
||||
$scope.includeStopped = false;
|
||||
$scope.toggleIncludeStopped = function() {
|
||||
$scope.network.updateShownContainers([]);
|
||||
update({all: $scope.includeStopped ? 1 : 0});
|
||||
};
|
||||
|
||||
}]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue