From b02b98def3a3ca4cb12689415f1a1beb09f1004c Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 23 Apr 2015 13:56:25 -0400 Subject: [PATCH] Fix bug in robots manager around adding a new robot and make the robots listing using bind once to reduce the number of listeners --- static/directives/robots-manager.html | 35 ++++++++++++----------- static/js/directives/ui/robots-manager.js | 2 ++ 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/static/directives/robots-manager.html b/static/directives/robots-manager.html index ef7ca9087..b9b1f38f6 100644 --- a/static/directives/robots-manager.html +++ b/static/directives/robots-manager.html @@ -42,10 +42,10 @@ - + - - + + @@ -54,14 +54,15 @@ - {{ getPrefix(robotInfo.name) }}+{{ getShortenedName(robotInfo.name) }} + + - - + + (Not a member of any team) - + @@ -70,21 +71,23 @@ - - + + (No direct permissions on any repositories) - + Direct Permissions on - {{ robotInfo.repositories.length }} - repository - repositories + + + repository + repositories diff --git a/static/js/directives/ui/robots-manager.js b/static/js/directives/ui/robots-manager.js index b25532fe9..6a567c885 100644 --- a/static/js/directives/ui/robots-manager.js +++ b/static/js/directives/ui/robots-manager.js @@ -86,6 +86,8 @@ angular.module('quay').directive('robotsManager', function () { CreateService.createRobotAccount(ApiService, !!$scope.organization, $scope.organization ? $scope.organization.name : '', name, function(created) { + created.teams = []; + created.repositories = []; $scope.robots.push(created); }); };