mirror of
https://github.com/portainer/portainer.git
synced 2025-07-31 11:19:40 +02:00
fix(network-creation): macvlan availability for standalone endpoints (#2441)
This commit is contained in:
parent
0ef25a4cbd
commit
488dc5f9db
1 changed files with 5 additions and 4 deletions
|
@ -105,7 +105,11 @@ angular.module('portainer.docker')
|
||||||
config.ConfigFrom = {
|
config.ConfigFrom = {
|
||||||
Network: selectedNetworkConfig.Name
|
Network: selectedNetworkConfig.Name
|
||||||
};
|
};
|
||||||
config.Scope = 'swarm';
|
if ($scope.applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE') {
|
||||||
|
config.Scope = 'swarm';
|
||||||
|
} else {
|
||||||
|
config.Scope = 'local';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function validateForm(accessControlData, isAdmin) {
|
function validateForm(accessControlData, isAdmin) {
|
||||||
|
@ -192,9 +196,6 @@ angular.module('portainer.docker')
|
||||||
|
|
||||||
PluginService.networkPlugins(apiVersion < 1.25)
|
PluginService.networkPlugins(apiVersion < 1.25)
|
||||||
.then(function success(data) {
|
.then(function success(data) {
|
||||||
if ($scope.applicationState.endpoint.mode.provider !== 'DOCKER_SWARM_MODE') {
|
|
||||||
data.splice(data.indexOf('macvlan'), 1);
|
|
||||||
}
|
|
||||||
$scope.availableNetworkDrivers = data;
|
$scope.availableNetworkDrivers = data;
|
||||||
})
|
})
|
||||||
.catch(function error(err) {
|
.catch(function error(err) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue