mirror of https://github.com/portainer/portainer
feat(ui): network creation support for standalone engine (#119)
parent
d0f57809d6
commit
145e45b4a8
|
@ -47,7 +47,7 @@
|
|||
</div>
|
||||
<!-- !subnet-gateway-inputs -->
|
||||
<!-- tag-note -->
|
||||
<div class="form-group">
|
||||
<div class="form-group" ng-if="swarm">
|
||||
<div class="col-sm-12">
|
||||
<span class="small text-muted">Note: The network will be created using the overlay driver and will allow containers to communicate across the hosts of your cluster.</span>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
angular.module('networks', [])
|
||||
.controller('NetworksController', ['$scope', '$state', 'Network', 'Messages', 'errorMsgFilter',
|
||||
function ($scope, $state, Network, Messages, errorMsgFilter) {
|
||||
.controller('NetworksController', ['$scope', '$state', 'Network', 'Config', 'Messages', 'errorMsgFilter',
|
||||
function ($scope, $state, Network, Config, Messages, errorMsgFilter) {
|
||||
$scope.state = {};
|
||||
$scope.state.selectedItemCount = 0;
|
||||
$scope.state.advancedSettings = false;
|
||||
|
@ -46,7 +46,9 @@ function ($scope, $state, Network, Messages, errorMsgFilter) {
|
|||
function prepareNetworkConfiguration() {
|
||||
var config = angular.copy($scope.config);
|
||||
prepareIPAMConfiguration(config);
|
||||
config.Driver = 'overlay';
|
||||
if ($scope.swarm) {
|
||||
config.Driver = 'overlay';
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
|
@ -108,5 +110,9 @@ function ($scope, $state, Network, Messages, errorMsgFilter) {
|
|||
$('#loadNetworksSpinner').hide();
|
||||
});
|
||||
}
|
||||
fetchNetworks();
|
||||
|
||||
Config.$promise.then(function (c) {
|
||||
$scope.swarm = c.swarm;
|
||||
fetchNetworks();
|
||||
});
|
||||
}]);
|
||||
|
|
Loading…
Reference in New Issue