New create entity dialogs (team and robot)
Fixes https://github.com/coreos-inc/design/issues/230
This commit is contained in:
parent
2274d6ff84
commit
4a543be7a7
31 changed files with 687 additions and 232 deletions
|
@ -18,9 +18,7 @@ angular.module('quay').directive('repoPanelTags', function () {
|
|||
|
||||
'getImages': '&getImages'
|
||||
},
|
||||
controller: function($scope, $element, $filter, $location, ApiService, UIService, VulnerabilityService) {
|
||||
var orderBy = $filter('orderBy');
|
||||
|
||||
controller: function($scope, $element, $filter, $location, ApiService, UIService, VulnerabilityService, TableService) {
|
||||
$scope.maxTrackCount = 5;
|
||||
|
||||
$scope.checkedTags = UIService.createCheckStateController([], 'name');
|
||||
|
@ -45,32 +43,26 @@ angular.module('quay').directive('repoPanelTags', function () {
|
|||
var setTagState = function() {
|
||||
if (!$scope.repository || !$scope.selectedTags) { return; }
|
||||
|
||||
var tags = [];
|
||||
// Build a list of all the tags, with extending information.
|
||||
var allTags = [];
|
||||
|
||||
// Build a list of tags and filtered tags.
|
||||
for (var tag in $scope.repository.tags) {
|
||||
if (!$scope.repository.tags.hasOwnProperty(tag)) { continue; }
|
||||
|
||||
var tagData = $scope.repository.tags[tag];
|
||||
var tagInfo = $.extend(tagData, {
|
||||
'name': tag,
|
||||
'last_modified_datetime': (new Date(tagData.last_modified || 0)).valueOf() * (-1)
|
||||
'last_modified_datetime': TableService.getReversedTimestamp(tagData.last_modified)
|
||||
});
|
||||
|
||||
allTags.push(tagInfo);
|
||||
|
||||
if (!$scope.options.tagFilter || tag.indexOf($scope.options.tagFilter) >= 0 ||
|
||||
tagInfo.image_id.indexOf($scope.options.tagFilter) >= 0) {
|
||||
tags.push(tagInfo);
|
||||
}
|
||||
}
|
||||
|
||||
// Sort the tags by the predicate and the reverse, and map the information.
|
||||
var imageIDs = [];
|
||||
var ordered = orderBy(tags, $scope.options.predicate, $scope.options.reverse);
|
||||
var checked = [];
|
||||
var ordered = TableService.buildOrderedItems(allTags, $scope.options,
|
||||
['name'], ['last_modified_datetime', 'size']).entries;
|
||||
|
||||
var checked = [];
|
||||
var imageMap = {};
|
||||
var imageIndexMap = {};
|
||||
for (var i = 0; i < ordered.length; ++i) {
|
||||
|
@ -175,7 +167,7 @@ angular.module('quay').directive('repoPanelTags', function () {
|
|||
|
||||
$scope.$watch('options.predicate', setTagState);
|
||||
$scope.$watch('options.reverse', setTagState);
|
||||
$scope.$watch('options.tagFilter', setTagState);
|
||||
$scope.$watch('options.filter', setTagState);
|
||||
|
||||
$scope.$watch('options.page', function(page) {
|
||||
if (page != null && $scope.checkedTags) {
|
||||
|
|
Reference in a new issue