mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
feat(ui): network creation support for standalone engine (#119)
This commit is contained in:
parent
d0f57809d6
commit
145e45b4a8
2 changed files with 11 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue