From c2e4cbe95b94ce65b2ea54df8eba4f2195e938c2 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 9 Apr 2015 15:03:07 -0400 Subject: [PATCH] Nicer handling of robots: sort the robots by name and add a filtering box --- static/css/directives/ui/robots-manager.css | 6 ++++++ static/directives/robots-manager.html | 15 +++++++++++++-- static/js/directives/ui/robots-manager.js | 4 ++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/static/css/directives/ui/robots-manager.css b/static/css/directives/ui/robots-manager.css index b2eb42bcf..a04fbcdc2 100644 --- a/static/css/directives/ui/robots-manager.css +++ b/static/css/directives/ui/robots-manager.css @@ -77,4 +77,10 @@ .robots-manager-element .member-perm-summary { margin-right: 14px; +} + +.robots-manager-element .co-filter-box { + float: right; + min-width: 175px; + margin-bottom: 10px; } \ No newline at end of file diff --git a/static/directives/robots-manager.html b/static/directives/robots-manager.html index 7d490018a..03627b49c 100644 --- a/static/directives/robots-manager.html +++ b/static/directives/robots-manager.html @@ -19,6 +19,10 @@ be shared, such as deployment systems. + + + +
No robot accounts defined.
@@ -26,7 +30,14 @@
- +
+
No robot accounts found matching filter.
+
+ Please change your filter to display robot accounts. +
+
+ +
@@ -35,7 +46,7 @@ - +
Robot Account Name
diff --git a/static/js/directives/ui/robots-manager.js b/static/js/directives/ui/robots-manager.js index ff3463eaa..970681ea7 100644 --- a/static/js/directives/ui/robots-manager.js +++ b/static/js/directives/ui/robots-manager.js @@ -73,6 +73,10 @@ angular.module('quay').directive('robotsManager', function () { return -1; }; + $scope.getShortenedRobotName = function(info) { + return $scope.getShortenedName(info.name); + }; + $scope.getShortenedName = function(name) { var plus = name.indexOf('+'); return name.substr(plus + 1);