mirror of https://github.com/portainer/portainer
fix(network-creation): macvlan availability for standalone endpoints (#2441)
parent
0ef25a4cbd
commit
488dc5f9db
|
@ -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…
Reference in New Issue