mirror of https://github.com/portainer/portainer
feat(networks): remove the ability to create host network (#3771)
parent
3de533042d
commit
7f0ce61413
|
@ -1,3 +1,4 @@
|
||||||
|
import _ from 'lodash-es';
|
||||||
import { AccessControlFormData } from '../../../../portainer/components/accessControlForm/porAccessControlFormModel';
|
import { AccessControlFormData } from '../../../../portainer/components/accessControlForm/porAccessControlFormModel';
|
||||||
import { MacvlanFormData } from '../../../components/network-macvlan-form/networkMacvlanFormModel';
|
import { MacvlanFormData } from '../../../components/network-macvlan-form/networkMacvlanFormModel';
|
||||||
|
|
||||||
|
@ -20,13 +21,13 @@ angular.module('portainer.docker').controller('CreateNetworkController', [
|
||||||
Subnet: '',
|
Subnet: '',
|
||||||
Gateway: '',
|
Gateway: '',
|
||||||
IPRange: '',
|
IPRange: '',
|
||||||
AuxAddress: ''
|
AuxAddress: '',
|
||||||
},
|
},
|
||||||
IPV6: {
|
IPV6: {
|
||||||
Subnet: '',
|
Subnet: '',
|
||||||
Gateway: '',
|
Gateway: '',
|
||||||
IPRange: '',
|
IPRange: '',
|
||||||
AuxAddress: ''
|
AuxAddress: '',
|
||||||
},
|
},
|
||||||
Labels: [],
|
Labels: [],
|
||||||
AccessControlData: new AccessControlFormData(),
|
AccessControlData: new AccessControlFormData(),
|
||||||
|
@ -248,6 +249,7 @@ angular.module('portainer.docker').controller('CreateNetworkController', [
|
||||||
PluginService.networkPlugins(apiVersion < 1.25)
|
PluginService.networkPlugins(apiVersion < 1.25)
|
||||||
.then(function success(data) {
|
.then(function success(data) {
|
||||||
$scope.availableNetworkDrivers = data;
|
$scope.availableNetworkDrivers = data;
|
||||||
|
$scope.availableNetworkDrivers = _.filter($scope.availableNetworkDrivers, (driver) => driver !== 'host' && driver !== 'null');
|
||||||
})
|
})
|
||||||
.catch(function error(err) {
|
.catch(function error(err) {
|
||||||
Notifications.error('Failure', err, 'Unable to retrieve network drivers');
|
Notifications.error('Failure', err, 'Unable to retrieve network drivers');
|
||||||
|
|
Loading…
Reference in New Issue