If enabled, allow users and orgs to set their time machine expiration

Fixes https://www.pivotaltracker.com/story/show/142881203
This commit is contained in:
Joseph Schorr 2017-04-05 14:01:55 -04:00
parent eb5cebbcdf
commit 3dcbe3c631
25 changed files with 472 additions and 15 deletions

View file

@ -10,6 +10,7 @@
<span class="empty" ng-if="!binding || binding.length == 0">No {{ itemTitle }}s defined</span>
<form class="form-control-container" ng-submit="addItem()">
<input type="text" class="form-control" placeholder="{{ placeholder }}"
ng-pattern="getRegexp(itemPattern)"
ng-model="newItemName" style="display: inline-block">
<button class="btn btn-default" style="display: inline-block">Add</button>
</form>

View file

@ -177,6 +177,53 @@
</div>
</div>
<!-- Time Machine -->
<div class="co-panel">
<div class="co-panel-heading">
<i class="fa fa-history"></i> Time Machine
</div>
<div class="co-panel-body">
<div class="description">
<p>Time machine keeps older copies of tags within a repository for the configured period
of time, after whichn they are garbage collected. This allows users to
revert tags to older images in case they accidentally pushed a broken image. It is
highly recommended to have time machine enabled, but it does take a bit more space
in storage.
</p>
</div>
<table class="config-table">
<tr>
<td>Default expiration period:</td>
<td>
<span class="config-string-field" binding="config.MINIMUM_TAG_EXPIRATION"
pattern="[0-9]+(m|w|h|d|s)"></span>
<div class="help-text">
The default tag expiration period for all namespaces (users and organizations). Must be expressed in a duration string form: <code>30m</code>, <code>1h</code>, <code>1d</code>, <code>2w</code>.
</div>
</td>
</tr>
<tr>
<td>Allow users to select expiration:</td>
<td>
<div class="config-bool-field" binding="config.FEATURE_CHANGE_TAG_EXPIRATION">
Enable Expiration Configuration
<div class="help-text">
If enabled, users will be able to select the tag expiration duration for the namespace(s) they
administrate, from the configured list of options.
</div>
</div>
</td>
</tr>
<tr ng-if="config.FEATURE_CHANGE_TAG_EXPIRATION">
<td>Selectable expiration periods:</td>
<td>
<span class="config-list-field" item-title="Tag Expiration Period" binding="config.TAG_EXPIRATION_OPTIONS" item-pattern="[0-9]+(m|w|h|d|s)"></span>
</td>
</tr>
</table>
</div>
</div> <!-- /Time Machine -->
<!-- Redis -->
<div class="co-panel">
<div class="co-panel-heading">