Merge pull request #1244 from coreos-inc/enableaci

Add UI to the setup tool for enabling ACI conversion
This commit is contained in:
josephschorr 2016-02-17 12:29:48 -05:00
commit 11af123ba5
11 changed files with 106 additions and 18 deletions

View file

@ -286,6 +286,52 @@
</div>
</div>
<!-- ACI Conversion -->
<div class="co-panel">
<div class="co-panel-heading">
<i class="fa rocket-icon" style="width: 20px; height: 20px; background-size: cover; vertical-align: middle;"></i> <a href="http://github.com/coreos/rkt" target="_blank">rkt</a> Conversion
</div>
<div class="co-panel-body">
<div class="description">
<p>If enabled, all images in the registry can be fetched via <code>rkt fetch</code> or any other <a href="https://github.com/appc/spec/blob/master/spec/discovery.md" target="_blank">AppC discovery</a>-compliant implementation.</p>
</div>
<div class="co-checkbox">
<input id="ftmail" type="checkbox" ng-model="config.FEATURE_ACI_CONVERSION">
<label for="ftmail">Enable ACI Conversion</label>
</div>
<div class="co-alert co-alert-info" ng-if="config.FEATURE_ACI_CONVERSION" style="margin-top: 20px;">
Documentation on generating these keys can be found at <a href="https://tectonic.com/quay-enterprise/docs/latest/aci-signing-keys.html" target="_blank">Generating ACI Signing Keys</a>.
</div>
<table class="config-table" ng-if="config.FEATURE_ACI_CONVERSION">
<tr>
<td class="non-input">GPG2 Public Key File:</td>
<td>
<span class="config-file-field" filename="signing-public.gpg" has-file="hasfile.gpgSigningPublic"></span>
<div class="help-text">
The certificate must be in PEM format.
</div
</td>
</tr>
<tr>
<td class="non-input">GPG2 Private Key File:</td>
<td>
<span class="config-file-field" filename="signing-private.gpg" has-file="hasfile.gpgSigningPrivate"></span>
</td>
</tr>
<tr>
<td class="non-input">GPG2 Private Key Name:</td>
<td>
<span class="config-string-field" binding="config.GPG2_PRIVATE_KEY_NAME"
placeholder="Name of the private key in the private key file (Example: EAB32227)"></span>
</td>
</tr>
</table>
</div>
</div>
<!-- E-mail -->
<div class="co-panel">
<div class="co-panel-heading">

View file

@ -35,6 +35,10 @@ angular.module("core-config-setup", ['angularFileUpload'])
return config.AUTHENTICATION_TYPE == 'Keystone';
}, 'password': true},
{'id': 'signer', 'title': 'ACI Signing', 'condition': function(config) {
return config.FEATURE_ACI_CONVERSION;
}},
{'id': 'mail', 'title': 'E-mail Support', 'condition': function(config) {
return config.FEATURE_MAILING;
}},

View file

@ -12,7 +12,7 @@ angular.module('quay').directive('fetchTagDialog', function () {
'repository': '=repository',
'actionHandler': '=actionHandler'
},
controller: function($scope, $element, $timeout, ApiService, UserService, Config) {
controller: function($scope, $element, $timeout, ApiService, UserService, Config, Features) {
$scope.clearCounter = 0;
$scope.currentFormat = null;
$scope.currentEntity = null;
@ -35,11 +35,13 @@ angular.module('quay').directive('fetchTagDialog', function () {
});
}
$scope.formats.push({
'title': 'Rocket Fetch',
'icon': 'rocket-icon',
'command': 'rkt fetch {hostname}/{namespace}/{name}:{tag}'
});
if (Features.ACI_CONVERSION) {
$scope.formats.push({
'title': 'Rocket Fetch',
'icon': 'rocket-icon',
'command': 'rkt fetch {hostname}/{namespace}/{name}:{tag}'
});
}
$scope.formats.push({
'title': 'Basic Docker Pull',