1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-29 18:29:44 +02:00

feat(templates): add the ability to connect a template to swarm attachable networks (#642)

This commit is contained in:
Thomas Krzero 2017-03-31 22:12:58 +02:00 committed by Anthony Lapenna
parent ffca440135
commit 53f31ba3b8
2 changed files with 13 additions and 1 deletions

View file

@ -15,6 +15,14 @@ angular.module('portainer.services')
});
};
service.filterSwarmModeAttachableNetworks = function(networks) {
return networks.filter(function (network) {
if (network.Scope === 'swarm' && network.Attachable === true) {
return network;
}
});
};
service.addPredefinedLocalNetworks = function(networks) {
networks.push({Scope: "local", Name: "bridge"});
networks.push({Scope: "local", Name: "host"});