Rename image-link into manifest-link, and change to typescript, in prep for the UI changes to link to manifests

This commit is contained in:
Joseph Schorr 2018-03-28 13:56:09 -04:00
parent 58c2ddac98
commit d41dcaae23
12 changed files with 122 additions and 125 deletions

View file

@ -159,17 +159,14 @@
</span>
<span bo-if="feature.vulnCount > 0 && feature.fixableScore > 0">
<span class="strength-indicator" value="feature.fixableScore" maximum="featuresInfo.highestFixableScore"
log-base="2"></span>
log-base="2"></span>
</span>
</td>
<td class="double-col image-col hidden-xs hidden-sm hidden-md">
<span bo-if="feature.imageCommand">
<image-command command="feature.imageCommand"></image-command>
<a href="/repository/{{ repository.namespace }}/{{ repository.name }}/image/{{ feature.imageId }}"><i class="fa fa-archive"></i></a>
</span>
<span bo-if="!feature.imageCommand">
<span class="image-link" repository="repository" image-id="feature.imageId"></span>
</span>
<span bo-if="!feature.imageCommand">(No Command)</span>
</td>
<td></td>
</tr>

View file

@ -1,37 +0,0 @@
<span>
<span class="id-label" ng-if="!hasSHA256(manifestDigest)"
data-title="The Docker V1 ID for this image. This ID is not content addressable nor is it stable across pulls."
data-container="body"
ng-click="showCopyBox()"
bs-tooltip>V1ID</span>
<span class="id-label cas" ng-if="hasSHA256(manifestDigest)"
data-title="The content-addressable SHA256 hash of this tag."
data-container="body"
ng-click="showCopyBox()"
bs-tooltip>SHA256</span>
<a bo-href-i="/repository/{{ repository.namespace }}/{{ repository.name }}/image/{{ imageId }}"
class="image-link-element" bindonce>
<span ng-if="!hasSHA256(manifestDigest)">{{ imageId.substr(0, 12) }}</span>
<span ng-if="hasSHA256(manifestDigest)">{{ getShortDigest(manifestDigest) }}</span>
</a>
<div class="modal fade co-dialog" ng-if="showingCopyBox">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" ng-click="hideCopyBox()"
aria-hidden="true">&times;</button>
<h4 class="modal-title"><span ng-if="hasSHA256(manifestDigest)">Manifest SHA256</span><span ng-if="!hasSHA256(manifestDigest)">V1 ID</span></h4>
</div>
<div class="modal-body">
<div class="copy-box" hovering-message="true" value="hasSHA256(manifestDigest) ? manifestDigest : imageId"></div>
</div>
<div class="modal-footer" ng-show="!working">
<button type="button" class="btn btn-default" ng-click="hideCopyBox()">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</span>

View file

@ -152,12 +152,9 @@
</td>
<td class="double-col image-col hidden-xs hidden-sm hidden-md">
<span bo-if="vuln.imageCommand">
<image-command command="vuln.imageCommand"></image-command>
<a href="/repository/{{ repository.namespace }}/{{ repository.name }}/image/{{ vuln.imageId }}"><i class="fa fa-archive"></i></a>
</span>
<span bo-if="!vuln.imageCommand">
<span class="image-link" repository="repository" image-id="vuln.imageId"></span>
<image-command command="feature.imageCommand"></image-command>
</span>
<span bo-if="!vuln.imageCommand">(No Command)</span>
</td>
<td></td>
</tr>
@ -181,8 +178,8 @@
</td>
</tr>
<tr>
<td>Introduced in Image:</td>
<td><span class="image-link" repository="repository" image-id="vuln.imageId"></span></td>
<td>Introduced in Layer:</td>
<td>{{ ::vuln.imageId }}</td>
</tr>
</table>
</div>

View file

@ -38,38 +38,38 @@
<span ng-switch on="entry.action">
<span ng-switch-when="recreate">
was recreated pointing to
<span class="image-link" repository="repository"
<manifest-link repository="repository"
image-id="entry.docker_image_id"
manifest-digest="entry.manifest_digest"></span>
manifest-digest="entry.manifest_digest"></manifest-link>
</span>
<span ng-switch-when="create">
was created pointing to
<span class="image-link" repository="repository"
<manifest-link repository="repository"
image-id="entry.docker_image_id"
manifest-digest="entry.manifest_digest"></span>
manifest-digest="entry.manifest_digest"></manifest-link>
</span>
<span ng-switch-when="delete">
was deleted
</span>
<span ng-switch-when="move">
was moved to
<span class="image-link" repository="repository"
<manifest-link repository="repository"
image-id="entry.docker_image_id"
manifest-digest="entry.manifest_digest"></span>
manifest-digest="entry.manifest_digest"></manifest-link>
from
<span class="image-link" repository="repository"
<manifest-link repository="repository"
image-id="entry.old_docker_image_id"
manifest-digest="entry.old_manifest_digest"></span>
manifest-digest="entry.old_manifest_digest"></manifest-link>
</span>
<span ng-switch-when="revert">
was reverted to
<span class="image-link" repository="repository"
<manifest-link repository="repository"
image-id="entry.docker_image_id"
manifest-digest="entry.manifest_digest"></span>
manifest-digest="entry.manifest_digest"></manifest-link>
from
<span class="image-link" repository="repository"
<manifest-link repository="repository"
image-id="entry.old_docker_image_id"
manifest-digest="entry.old_manifest_digest"></span>
manifest-digest="entry.old_manifest_digest"></manifest-link>
</span>
</span>
</div>
@ -87,21 +87,21 @@
<span ng-switch on="entry.action">
<a ng-switch-when="delete" ng-click="askRestoreTag(entry, true)">
Restore <span class="tag-span"><span>{{ entry.tag_name }}</span></span> to
<span class="image-link" repository="repository"
<manifest-link repository="repository"
image-id="entry.docker_image_id"
manifest-digest="entry.manifest_digest"></span>
manifest-digest="entry.manifest_digest"></manifest-link>
</a>
<a ng-switch-when="move" ng-click="askRestoreTag(entry, false)">
Revert <span class="tag-span" data-title="{{ entry.tag_name }}" bs-tooltip><span>{{ entry.tag_name }}</span></span> to
<span class="image-link" repository="repository"
<manifest-link repository="repository"
image-id="entry.old_docker_image_id"
manifest-digest="entry.old_manifest_digest"></span>
manifest-digest="entry.old_manifest_digest"></manifest-link>
</a>
<a ng-switch-when="revert" ng-click="askRestoreTag(entry, false)">
Restore <span class="tag-span" data-title="{{ entry.tag_name }}" bs-tooltip><span>{{ entry.tag_name }}</span></span> to
<span class="image-link" repository="repository"
<manifest-link repository="repository"
image-id="entry.old_docker_image_id"
manifest-digest="entry.old_manifest_digest"></span>
manifest-digest="entry.old_manifest_digest"></manifest-link>
</a>
</span>
</div>

View file

@ -237,9 +237,9 @@
<expiration-status-view expiration-date="tag.expiration_date" ng-if="repository.tag_operations_disabled || !repository.can_write"></expiration-status-view>
</td>
<!-- Image link -->
<!-- Manifest link -->
<td class="hidden-xs hidden-sm image-id-col">
<span class="image-link" repository="repository" image-id="tag.image_id" manifest-digest="tag.manifest_digest"></span>
<manifest-link repository="repository" image-id="tag.image_id" manifest-digest="tag.manifest_digest"></manifest-link>
</td>
<td class="hidden-xs hidden-sm hidden-md image-track"
ng-if="imageTracks.length > maxTrackCount" bindonce>
@ -293,7 +293,7 @@
<td class="labels-col" colspan="{{6 + (repository.trust_enabled ? 1 : 0) + (Features.SECURITY_SCANNER ? 1 : 0) }}">
<!-- Image ID -->
<div class="image-id-row">
<span class="image-link" repository="repository" image-id="tag.image_id" manifest-digest="tag.manifest_digest"></span>
<manifest-link repository="repository" image-id="tag.image_id" manifest-digest="tag.manifest_digest"></manifest-link>
</div>
<!-- Labels -->

View file

@ -162,9 +162,9 @@
Are you sure you want to restore tag
<span class="label label-default tag">{{ restoreTagInfo.tag.name }}</span> to image
<span class="image-link" repository="repository"
image-id="restoreTagInfo.image_id"
manifest-digest="restoreTagInfo.manifest_digest"></span>?
<manifest-link repository="repository"
image-id="restoreTagInfo.image_id"
manifest-digest="restoreTagInfo.manifest_digest"></manifest-link>?
</div>
<!-- Tag Operations Disabled Dialog -->