Merge pull request #2619 from charltonaustin/drop-down_menu_reports_bug

fix(frontend): add subscope
This commit is contained in:
Charlton Austin 2017-05-04 14:43:17 -04:00 committed by GitHub
commit 3b1d696197
2 changed files with 10 additions and 10 deletions

View file

@ -47,7 +47,7 @@ angular.module('quay').directive('entitySearch', function () {
$scope.lazyLoading = true;
$scope.teams = null;
$scope.robots = null;
$scope.page.robots = null;
$scope.isAdmin = false;
$scope.isOrganization = false;
@ -71,7 +71,7 @@ angular.module('quay').directive('entitySearch', function () {
// Reset the cached teams and robots.
$scope.teams = null;
$scope.robots = null;
$scope.page.robots = null;
// Load the organization's teams (if applicable).
if ($scope.isOrganization && isSupported('team')) {
@ -87,7 +87,7 @@ angular.module('quay').directive('entitySearch', function () {
// Load the user/organization's robots (if applicable).
if ($scope.isAdmin && isSupported('robot')) {
ApiService.getRobots($scope.isOrganization ? $scope.namespace : null).then(function(resp) {
$scope.robots = resp.robots;
$scope.page.robots = resp.robots;
$scope.lazyLoading = false;
}, function() {
$scope.lazyLoading = false;
@ -120,7 +120,7 @@ angular.module('quay').directive('entitySearch', function () {
$scope.handleRobotCreated = function(created) {
$scope.setEntity(created.name, 'user', true, created.avatar);
$scope.robots.push(created);
$scope.page.robots.push(created);
};
$scope.setEntity = function(name, kind, is_robot, avatar) {