Fix UI rendering issue when creating/deleting tags from the UI (#3269)

### Description of Changes

Tag operations in UI would not be rendered properly when using the paginated tags endpoint.
When a user would create/delete a tag from the repo-panel-tags, `digest` would be called. This caused the `$scope.repository.tags` to be removed.

To fix this:
* Bind the tags directly to the scope instead of the repository
* Change references to scope.repository.tags to use scope.repositoryTags

---
This commit is contained in:
Kenny Lee Sin Cheong 2018-10-23 13:26:40 -04:00 committed by GitHub
parent bb01e08d44
commit 8b25d5b77b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 69 additions and 37 deletions

View file

@ -71,6 +71,7 @@
<div class="tag-specific-images-view"
tag="tagToCreate"
repository="repository"
repository-tags="repositoryTags"
image-cutoff="toTagImage"
style="margin: 10px; margin-top: 20px; margin-bottom: -10px;"
ng-show="isAnotherImageTag(toTagImage, tagToCreate)"
@ -143,7 +144,7 @@
Are you sure you want to delete tag
<span class="label label-default tag">{{ deleteTagInfo.tag }}</span>?
<div class="tag-specific-images-view" tag="deleteTagInfo.tag" repository="repository"
<div class="tag-specific-images-view" tag="deleteTagInfo.tag" repository="repository" repository-tags="repositoryTags"
image-loader="imageLoader" style="margin-top: 20px">
The following images and any other images not referenced by a tag will be <span ng-if="repository.tag_expiration_s == 0">deleted</span><span ng-if="repository.tag_expiration_s != 0">unavailable and deleted in {{ getFormattedTimespan(repository.tag_expiration_s) }}</span>:
</div>