Add ability to revert tags via time machine
This commit is contained in:
parent
2a77bd2c92
commit
f19d2f684e
16 changed files with 277 additions and 19 deletions
|
@ -35,6 +35,12 @@
|
|||
from image
|
||||
<span class="image-link" repository="repository" image-id="entry.old_docker_image_id"></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>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="history-datetime">{{ entry.time | amDateFormat:'dddd, MMMM Do YYYY, h:mm:ss a' }}</div>
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
style="min-width: 120px;">
|
||||
<a href="javascript:void(0)" ng-click="orderBy('image_id')">Image</a>
|
||||
</td>
|
||||
<td class="options-col" ng-if="repository.can_write"></td>
|
||||
<td class="options-col"></td>
|
||||
<td class="options-col"></td>
|
||||
</thead>
|
||||
|
@ -105,12 +106,30 @@
|
|||
ng-click="fetchTagActionHandler.askFetchTag(tag)">
|
||||
</i>
|
||||
</td>
|
||||
<td class="options-col" ng-if="repository.can_write">
|
||||
<div class="dropdown" style="text-align: left;">
|
||||
<i class="fa fa-history dropdown-toggle" data-toggle="dropdown" data-title="Tag History"
|
||||
ng-click="loadTagHistory(tag)"
|
||||
bs-tooltip></i>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li ng-if="!tagHistory[tag.name]"><div class="cor-loader"></div></li>
|
||||
<li class="tag-image-history-item" ng-repeat="entry in tagHistory[tag.name]">
|
||||
<a href="javascript:void(0)" ng-click="askRevertTag(tag, entry.docker_image_id)">
|
||||
<div class="image-id">
|
||||
<i class="fa fa-circle-o"
|
||||
ng-style="{'color': imageMap[entry.docker_image_id].color || '#eee'}"></i>
|
||||
{{ entry.docker_image_id.substr(0, 12) }}
|
||||
</div>
|
||||
<div class="image-apply-time">
|
||||
{{ entry.start_ts * 1000 | amDateFormat:'dddd, MMMM Do YYYY, h:mm:ss a' }}
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td class="options-col">
|
||||
<span class="cor-options-menu" ng-if="repository.can_write">
|
||||
<span class="cor-option" option-click="showHistory(true, tag.name)"
|
||||
ng-if="tag.last_modified">
|
||||
<i class="fa fa-history"></i> View Tag History
|
||||
</span>
|
||||
<span class="cor-option" option-click="askDeleteTag(tag.name)">
|
||||
<i class="fa fa-times"></i> Delete Tag
|
||||
</span>
|
||||
|
@ -137,5 +156,4 @@
|
|||
<div class="tag-operations-dialog" repository="repository" images="images"
|
||||
action-handler="tagActionHandler"></div>
|
||||
|
||||
<div class="fetch-tag-dialog" repository="repository" action-handler="fetchTagActionHandler">
|
||||
</div>
|
||||
<div class="fetch-tag-dialog" repository="repository" action-handler="fetchTagActionHandler"></div>
|
|
@ -85,3 +85,20 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Recert Tag Confirm -->
|
||||
<div class="cor-confirm-dialog"
|
||||
dialog-context="revertTagInfo"
|
||||
dialog-action="revertTag(info.tag, info.image_id, callback)"
|
||||
dialog-title="Revert Tag"
|
||||
dialog-action-title="Revert Tag">
|
||||
|
||||
<div class="co-alert co-alert-warning">
|
||||
This will change the image to which the tag points.
|
||||
</div>
|
||||
|
||||
Are you sure you want to revert tag
|
||||
<span class="label label-default tag">{{ revertTagInfo.tag.name }}</span> to image
|
||||
<span class="image-id">{{ revertTagInfo.image_id.substr(0, 12) }}?</span>
|
||||
</div>
|
||||
</div>
|
Reference in a new issue