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

fix(services): use secrets with services only if endpoint API version >= 1.25

This commit is contained in:
Anthony Lapenna 2017-07-24 11:59:09 +02:00
parent 02203e7ce5
commit 7c40d2caa9
5 changed files with 13 additions and 30 deletions

View file

@ -302,10 +302,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: SecretService.secrets()
secrets: apiVersion >= 1.25 ? SecretService.secrets() : []
})
.then(function success(data) {
$scope.availableVolumes = data.volumes;