mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 23:09:41 +02:00
feat(templates): add the ability to connect a template to swarm attachable networks (#642)
This commit is contained in:
parent
ffca440135
commit
53f31ba3b8
2 changed files with 13 additions and 1 deletions
|
@ -122,7 +122,11 @@ function ($scope, $q, $state, $anchorScroll, Config, ContainerService, Container
|
|||
function filterNetworksBasedOnProvider(networks) {
|
||||
var endpointProvider = $scope.applicationState.endpoint.mode.provider;
|
||||
if (endpointProvider === 'DOCKER_SWARM' || endpointProvider === 'DOCKER_SWARM_MODE') {
|
||||
networks = NetworkService.filterGlobalNetworks(networks);
|
||||
if (endpointProvider === 'DOCKER_SWARM') {
|
||||
networks = NetworkService.filterGlobalNetworks(networks);
|
||||
} else {
|
||||
networks = NetworkService.filterSwarmModeAttachableNetworks(networks);
|
||||
}
|
||||
$scope.globalNetworkCount = networks.length;
|
||||
NetworkService.addPredefinedLocalNetworks(networks);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue