Show manifest digests in repo tag history timeline
This commit is contained in:
parent
57f78361b5
commit
0dbe267212
3 changed files with 32 additions and 12 deletions
|
@ -151,6 +151,10 @@
|
|||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.repo-tag-history-element .history-entry .image-link {
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
.repo-tag-history-element .history-entry .history-description {
|
||||
color: #777;
|
||||
}
|
||||
|
|
|
@ -24,22 +24,33 @@
|
|||
ng-click="showHistory(true, entry.tag_name)">{{ entry.tag_name }}</span>
|
||||
<span ng-switch on="entry.action">
|
||||
<span ng-switch-when="create">
|
||||
was created pointing to image <span class="image-link" repository="repository" image-id="entry.docker_image_id"></span>
|
||||
was created pointing to
|
||||
<span class="image-link" repository="repository"
|
||||
image-id="entry.docker_image_id"
|
||||
manifest-digest="entry.manifest_digest"></span>
|
||||
</span>
|
||||
<span ng-switch-when="delete">
|
||||
was deleted
|
||||
</span>
|
||||
<span ng-switch-when="move">
|
||||
was moved to image
|
||||
<span class="image-link" repository="repository" image-id="entry.docker_image_id"></span>
|
||||
from image
|
||||
<span class="image-link" repository="repository" image-id="entry.old_docker_image_id"></span>
|
||||
was moved to
|
||||
<span class="image-link" repository="repository"
|
||||
image-id="entry.docker_image_id"
|
||||
manifest-digest="entry.manifest_digest"></span>
|
||||
from
|
||||
<span class="image-link" repository="repository"
|
||||
image-id="entry.old_docker_image_id"
|
||||
manifest-digest="entry.old_manifest_digest"></span>
|
||||
</span>
|
||||
<span ng-switch-when="revert">
|
||||
was reverted to image
|
||||
<span class="image-link" repository="repository" image-id="entry.docker_image_id"></span>
|
||||
from image
|
||||
<span class="image-link" repository="repository" image-id="entry.old_docker_image_id"></span>
|
||||
was reverted to
|
||||
<span class="image-link" repository="repository"
|
||||
image-id="entry.docker_image_id"
|
||||
manifest-digest="entry.manifest_digest"></span>
|
||||
from
|
||||
<span class="image-link" repository="repository"
|
||||
image-id="entry.old_docker_image_id"
|
||||
manifest-digest="entry.old_manifest_digest"></span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -43,6 +43,7 @@ angular.module('quay').directive('repoTagHistory', function () {
|
|||
tags.forEach(function(tag) {
|
||||
var tagName = tag.name;
|
||||
var dockerImageId = tag.docker_image_id;
|
||||
var manifestDigest = tag.manifest_digest;
|
||||
|
||||
if (!tagEntries[tagName]) {
|
||||
tagEntries[tagName] = [];
|
||||
|
@ -53,7 +54,8 @@ angular.module('quay').directive('repoTagHistory', function () {
|
|||
tagEntries[entry.tag_name].splice(tagEntries[entry.tag_name].indexOf(entry), 1);
|
||||
};
|
||||
|
||||
var addEntry = function(action, time, opt_docker_id, opt_old_docker_id) {
|
||||
var addEntry = function(action, time, opt_docker_id, opt_old_docker_id,
|
||||
opt_manifest_digest, opt_old_manifest_digest) {
|
||||
var entry = {
|
||||
'tag_name': tagName,
|
||||
'action': action,
|
||||
|
@ -62,7 +64,9 @@ angular.module('quay').directive('repoTagHistory', function () {
|
|||
'reversion': tag.reversion,
|
||||
'time': time * 1000, // JS expects ms, not s since epoch.
|
||||
'docker_image_id': opt_docker_id || dockerImageId,
|
||||
'old_docker_image_id': opt_old_docker_id || ''
|
||||
'old_docker_image_id': opt_old_docker_id || '',
|
||||
'manifest_digest': opt_manifest_digest || manifestDigest,
|
||||
'old_manifest_digest': opt_old_manifest_digest || ''
|
||||
};
|
||||
|
||||
tagEntries[tagName].push(entry);
|
||||
|
@ -79,7 +83,8 @@ angular.module('quay').directive('repoTagHistory', function () {
|
|||
if (futureEntry.start_ts - tag.end_ts <= MOVE_THRESHOLD) {
|
||||
removeEntry(futureEntry);
|
||||
addEntry(futureEntry.reversion ? 'revert': 'move', tag.end_ts,
|
||||
futureEntry.docker_image_id, dockerImageId);
|
||||
futureEntry.docker_image_id, dockerImageId, futureEntry.manifest_digest,
|
||||
manifestDigest);
|
||||
} else {
|
||||
addEntry('delete', tag.end_ts)
|
||||
}
|
||||
|
|
Reference in a new issue