From f56256f89743e0b7096a6ee4a8f09570a6446fce Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Wed, 7 Sep 2016 16:38:54 +1200 Subject: [PATCH] fix(containers): make hidden containers labels available in the $scope --- app/components/containers/containersController.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/components/containers/containersController.js b/app/components/containers/containersController.js index db2898001..a0000c421 100644 --- a/app/components/containers/containersController.js +++ b/app/components/containers/containersController.js @@ -14,13 +14,13 @@ function ($scope, Container, ContainerHelper, Info, Settings, Messages, Config) $scope.sortType = sortType; }; - var update = function (data, containersToHideLabels) { + var update = function (data) { $('#loadContainersSpinner').show(); $scope.state.selectedItemCount = 0; Container.query(data, function (d) { var containers = d; - if (containersToHideLabels) { - containers = ContainerHelper.hideContainers(d, containersToHideLabels); + if ($scope.containersToHideLabels) { + containers = ContainerHelper.hideContainers(d, $scope.containersToHideLabels); } $scope.containers = containers.map(function (container) { var model = new ContainerViewModel(container); @@ -147,15 +147,15 @@ function ($scope, Container, ContainerHelper, Info, Settings, Messages, Config) $scope.swarm = false; Config.$promise.then(function (c) { - var containersToHideLabels = c.hiddenLabels; + $scope.containersToHideLabels = c.hiddenLabels; $scope.swarm = c.swarm; if (c.swarm) { Info.get({}, function (d) { $scope.swarm_hosts = retrieveSwarmHostsInfo(d); - update({all: Settings.displayAll ? 1 : 0}, containersToHideLabels); + update({all: Settings.displayAll ? 1 : 0}); }); } else { - update({all: Settings.displayAll ? 1 : 0}, containersToHideLabels); + update({all: Settings.displayAll ? 1 : 0}); } }); }]);