From b5cf64c752266c6ac18a02365c42142737507e71 Mon Sep 17 00:00:00 2001 From: ramirezg Date: Mon, 10 Aug 2015 10:18:23 -0400 Subject: [PATCH] adding service binder again --- static/app/controllers.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/static/app/controllers.js b/static/app/controllers.js index 36350ee9..dbe955f7 100644 --- a/static/app/controllers.js +++ b/static/app/controllers.js @@ -117,6 +117,18 @@ // Only render while we are not updating an app ourselves. if ($cloudfoundry.getPollAppStatusProperty() === true) { $scope.appSummary = appSummary; + // Show the available services + $cloudfoundry.getSpaceServices($routeParams['spaceguid']).then(function(services) { + // Add a tag to services if they are bound + $scope.availableServices = services.map(function(service) { + $scope.appSummary.services.forEach(function(boundService) { + if (boundService.guid == service.metadata.guid) { + service.boundService = boundService; + }; + }); + return service; + }); + }); } }; var renderAppStats = function(appStats) {