UI and API improvements for working with large repositories
- Change the tag check bar to only select the current page (by default), but allow for selecting ALL tags - Limit the number of tags compared in the visualization view to 10 - Fix the multiselect dropdown to limit itself to 10 items selected - Remove saving the selected tags in the URL, as it is too slow and overloads the URLs in Chrome when there are 1000+ tags selected - Change the images API to not return locations: By skipping the extra join and looping, it made the /images API call 10x faster (in hand tests) Fixes #292 Fixes #293
This commit is contained in:
parent
55a0b83ddf
commit
4160b720f9
9 changed files with 125 additions and 54 deletions
|
@ -82,7 +82,7 @@
|
|||
</div>
|
||||
|
||||
<!-- Locations -->
|
||||
<div class="image-section">
|
||||
<div class="image-section" ng-if="imageData.locations">
|
||||
<i class="fa fa-map-marker section-icon"
|
||||
data-title="The geographic region(s) in which this image data is located"
|
||||
bs-tooltip></i>
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
<div class="multiselect-dropdown-element">
|
||||
<div class="dropdown" style="text-align: left;">
|
||||
<button class="btn-dropdown btn btn-default" data-toggle="dropdown">
|
||||
<span class="selected-item-template" ng-repeat="item in selectedItems" ng-transcope></span>
|
||||
<span class="selected-item-template" ng-repeat="item in selectedItems | limitTo:10" ng-transcope></span>
|
||||
<span class="selected-item-template"
|
||||
ng-if="(selectedItems | limitTo:11).length > 10">
|
||||
and {{ selectedItems.length - 10 }} more...
|
||||
</span>
|
||||
|
||||
<span class="none" ng-if="!selectedItems.length">(No {{ itemName }}s selected)</span>
|
||||
<span class="caret" ng-if="!readOnly"></span>
|
||||
</button>
|
||||
|
@ -25,7 +30,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li role="presentation" ng-if="(items | filter:filter).length == 0">
|
||||
<li role="presentation" ng-if="(items | filter:filter | limitTo:1).length == 0">
|
||||
<div class="empty">
|
||||
<div class="empty-primary-msg">No matching {{ itemName }}s found</div>
|
||||
<div class="empty-secondary-msg">
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
error-message="'Could not load repository images'">
|
||||
<h3 class="tab-header">
|
||||
Visualize Tags:
|
||||
<span class="multiselect-dropdown" items="tagNames" selected-items="selectedTags"
|
||||
<span class="multiselect-dropdown" items="tagNames" selected-items="selectedTagsSlice"
|
||||
item-name="tag" item-checked="updateState()">
|
||||
<span class="tag-span">{{ item }}</span>
|
||||
</span>
|
||||
</h3>
|
||||
|
||||
<!-- No Tags Selected -->
|
||||
<div class="empty" ng-if="!selectedTags.length">
|
||||
<div class="empty" ng-if="!selectedTagsSlice.length">
|
||||
<div class="empty-primary-msg">No tags selected to view</div>
|
||||
<div class="empty-secondary-msg">
|
||||
Please select one or more tags above.
|
||||
|
@ -18,7 +18,7 @@
|
|||
</div>
|
||||
|
||||
<!-- Tags Selected -->
|
||||
<div ng-show="selectedTags.length > 0">
|
||||
<div ng-show="selectedTagsSlice.length > 0">
|
||||
<div id="image-history row" class="resource-view" resource="imagesResource"
|
||||
error-message="'Cannot load repository images'">
|
||||
|
||||
|
|
|
@ -58,6 +58,16 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<div class="co-alert co-alert-info" ng-if="allTagsSelected && !fullPageSelected">
|
||||
All <strong>{{ tags.length }}</strong> visible tags are selected.
|
||||
<a href="javascript:void(0)" ng-click="clearSelectedTags()">Clear selection</a>.
|
||||
</div>
|
||||
|
||||
<div class="co-alert co-alert-info" ng-if="fullPageSelected">
|
||||
All <strong>{{ tagsPerPage }}</strong> tags on this page are selected.
|
||||
<a href="javascript:void(0)" ng-click="selectAllTags()">Select all {{ tags.length }} tags currently visible</a>.
|
||||
</div>
|
||||
|
||||
<div class="cor-loader" ng-show="!isEnabled"></div>
|
||||
|
||||
<table class="co-table" id="tagsTable" ng-if="isEnabled">
|
||||
|
@ -88,7 +98,7 @@
|
|||
</thead>
|
||||
|
||||
<tr class="co-checkable-row"
|
||||
ng-repeat="tag in tags | slice:(50 * options.page):(50 * (options.page + 1))"
|
||||
ng-repeat="tag in tags | slice:(tagsPerPage * options.page):(tagsPerPage * (options.page + 1))"
|
||||
ng-class="checkedTags.isChecked(tag, checkedTags.checked) ? 'checked' : ''"
|
||||
bindonce>
|
||||
<td><span class="cor-checkable-item" controller="checkedTags" item="tag"></span></td>
|
||||
|
|
Reference in a new issue