1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-20 05:49:40 +02:00

fix(networks): review how networks are loaded for usage in multiple views (#1104)

This commit is contained in:
Anthony Lapenna 2017-08-11 09:46:55 +02:00 committed by GitHub
parent 3d5f9a76e4
commit d814f3aaa4
5 changed files with 67 additions and 90 deletions

View file

@ -305,10 +305,11 @@ function ($q, $scope, $state, Service, ServiceHelper, SecretHelper, SecretServic
function initView() {
$('#loadingViewSpinner').show();
var apiVersion = $scope.applicationState.endpoint.apiVersion;
$q.all({
volumes: VolumeService.volumes(),
networks: NetworkService.retrieveSwarmNetworks(),
secrets: apiVersion >= 1.25 ? SecretService.secrets() : []
secrets: apiVersion >= 1.25 ? SecretService.secrets() : [],
networks: NetworkService.networks(true, true, false, false)
})
.then(function success(data) {
$scope.availableVolumes = data.volumes;