Fix some tabs and some spelling errors, prevent empty tokens, move the tooltips to the left.
This commit is contained in:
parent
faf6a5c497
commit
982fdd4c5f
3 changed files with 64 additions and 62 deletions
|
@ -486,6 +486,8 @@ function RepoAdminCtrl($scope, Restangular, $routeParams, $rootScope) {
|
|||
|
||||
var permissionPost = Restangular.one('repository/' + namespace + '/' + name + '/tokens/');
|
||||
permissionPost.customPOST(friendlyName).then(function(newToken) {
|
||||
$scope.newToken.friendlyName = '';
|
||||
$scope.createTokenForm.$setPristine();
|
||||
$scope.tokens[newToken.code] = newToken;
|
||||
});
|
||||
};
|
||||
|
|
|
@ -29,10 +29,10 @@
|
|||
<div class="description-overview">Quay allows a repository to be shared any number of users and to grant those users any level of permissions for a repository</div>
|
||||
|
||||
<ul class="description-list">
|
||||
<li>Permissions for a repository can be granted and managed in the repository's admin interface
|
||||
<li><b>Adding a user:</b> Type that user's username in the "Add New User..." field, and select the user
|
||||
<li><b>Changing permissions:</b> A user's permissions (read, read/write or admin) can be changed by clicking the field to the right of the user
|
||||
<li><b>Removing a user:</b> A user can be removed from the list by clicking the <b>X</b> and then clicking <b>Delete</b>
|
||||
<li>Permissions for a repository can be granted and managed in the repository's admin interface
|
||||
<li><b>Adding a user:</b> Type that user's username in the "Add New User..." field, and select the user
|
||||
<li><b>Changing permissions:</b> A user's permissions (read, read/write or admin) can be changed by clicking the field to the right of the user
|
||||
<li><b>Removing a user:</b> A user can be removed from the list by clicking the <b>X</b> and then clicking <b>Delete</b>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -41,21 +41,22 @@
|
|||
<h3>Using access tokens in place of users <span class="label label-info">Requires Admin Access</span></h3>
|
||||
<div class="container">
|
||||
<div class="description-overview">
|
||||
There are many circumstances where it makes sense to <b>not</b> user a user's username and password (deployment scripts, etc).
|
||||
To support this case, Quay allows the user of <b>access tokens</b> which can be created on a repository and have read and/or write
|
||||
There are many circumstances where it makes sense to <b>not</b> use a user's username and password (deployment scripts, etc).
|
||||
To support this case, Quay allows the use of <b>access tokens</b> which can be created on a repository and have read and/or write
|
||||
permissions, without any passwords.
|
||||
</div>
|
||||
|
||||
<ul class="description-list">
|
||||
<li>Tokens can be managed in the repository's admin interface
|
||||
<li><b>Adding a token:</b> Enter a user-readable description in the "New token description" field
|
||||
<li><b>Changing permissions:</b> A token's permissions (read or read/write) can be changed by clicking the field to the right of the token
|
||||
<li><b>Deleting a token:</b> A token can be deleted by clicking the <b>X</b> and then clicking <b>Delete</b>
|
||||
<li><b>Using a token:</b> To use the token, the following credentials can be used:
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Username</dt><dd>$token</dd>
|
||||
<dt>Password</dt><dd>(token value can be found by clicking on the token)</dd>
|
||||
</dl>
|
||||
<li><b>Adding a token:</b> Enter a user-readable description in the "New token description" field
|
||||
<li><b>Changing permissions:</b> A token's permissions (read or read/write) can be changed by clicking the field to the right of the token
|
||||
<li><b>Deleting a token:</b> A token can be deleted by clicking the <b>X</b> and then clicking <b>Delete</b>
|
||||
<li><b>Using a token:</b> To use the token, the following credentials can be used:
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Username</dt><dd>$token</dd>
|
||||
<dt>Password</dt><dd>(token value can be found by clicking on the token)</dd>
|
||||
<dt>Email</dt><dd>This value is ignored, any value may be used.</dd>
|
||||
</dl>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<div class="panel panel-default">
|
||||
<div class="panel-heading">User Access Permissions
|
||||
|
||||
<i class="info-icon icon-info-sign" data-content="Allow any number of users to read, write or admin this repository"></i>
|
||||
<i class="info-icon icon-info-sign" data-placement="left" data-content="Allow any number of users to read, write or administer this repository"></i>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
|
@ -64,49 +64,48 @@
|
|||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Access Token Permissions
|
||||
|
||||
<i class="info-icon icon-info-sign" data-content="Grant permissions to this repository by creating unique tokens that can be used without entering account passwords<br><br>To use in docker:<br><dl class='dl-horizontal'><dt>Username</dt><dd>$token</dd><dt>Password</dt><dd>(token value)</dd></dl>"></i>
|
||||
<i class="info-icon icon-info-sign" data-placement="left" data-content="Grant permissions to this repository by creating unique tokens that can be used without entering account passwords<br><br>To use in docker:<br><dl class='dl-horizontal'><dt>Username</dt><dd>$token</dd><dt>Password</dt><dd>(token value)</dd><dt>Email</dt><dd>(any value)</dd></dl>"></i>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<table class="permissions">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Token Description</td>
|
||||
<td>Permissions</td>
|
||||
<td></td>
|
||||
<form name="createTokenForm" ng-submit="createToken()">
|
||||
<table class="permissions">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Token Description</td>
|
||||
<td>Permissions</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr ng-repeat="(code, token) in tokens">
|
||||
<td class="user token">
|
||||
<i class="icon-key"></i>
|
||||
<a ng-click="showToken(token.code)">{{ token.friendlyName }}</a>
|
||||
</td>
|
||||
<td class="user-permissions">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button type="button" class="btn btn-default" ng-click="changeTokenAccess(token.code, 'read')" ng-class="{read: 'active', write: ''}[token.role]">Read only</button>
|
||||
<button type="button" class="btn btn-default" ng-click="changeTokenAccess(token.code, 'write')" ng-class="{read: '', write: 'active'}[token.role]">Write</button>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="delete-ui" tabindex="0" title="Delete Token">
|
||||
<span class="delete-ui-button" ng-click="deleteToken(token.code)"><button class="btn btn-danger" type="button">Delete</button></span>
|
||||
<i class="icon-remove"></i>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr ng-repeat="(code, token) in tokens">
|
||||
<td class="user token">
|
||||
<i class="icon-key"></i>
|
||||
<a ng-click="showToken(token.code)">{{ token.friendlyName }}</a>
|
||||
</td>
|
||||
<td class="user-permissions">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button type="button" class="btn btn-default" ng-click="changeTokenAccess(token.code, 'read')" ng-class="{read: 'active', write: ''}[token.role]">Read only</button>
|
||||
<button type="button" class="btn btn-default" ng-click="changeTokenAccess(token.code, 'write')" ng-class="{read: '', write: 'active'}[token.role]">Write</button>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="delete-ui" tabindex="0" title="Delete Token">
|
||||
<span class="delete-ui-button" ng-click="deleteToken(token.code)"><button class="btn btn-danger">Delete</button></span>
|
||||
<i class="icon-remove"></i>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<form name="createTokenForm" ng-submit="createToken()">
|
||||
<td>
|
||||
<input class="form-control" placeholder="New token description" ng-model="newToken.friendlyName">
|
||||
</td>
|
||||
<td>
|
||||
<button type="submit" class="btn btn-sm btn-default">Create</button>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="form-control" placeholder="New token description" ng-model="newToken.friendlyName"required>
|
||||
</td>
|
||||
<td>
|
||||
<button type="submit" ng-disabled="createTokenForm.$invalid" class="btn btn-sm btn-default">Create</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -175,16 +174,16 @@
|
|||
<h4 class="modal-title"><i class="icon-key"></i> {{ shownToken.friendlyName }}</h4>
|
||||
</div>
|
||||
<div class="modal-body token-dialog-body">
|
||||
<div class="alert alert-info">The docker <u>username</u> is <b>$token</b> and the <u>password</u> is the token</div>
|
||||
<div class="well well-sm">
|
||||
<input id="token-view" class="token-view" type="text" value="{{ shownToken.code }}" onClick="this.select();" readonly>
|
||||
</div>
|
||||
<div class="alert alert-info">The docker <u>username</u> is <b>$token</b> and the <u>password</u> is the token. You may use any value for email.</div>
|
||||
<div class="well well-sm">
|
||||
<input id="token-view" class="token-view" type="text" value="{{ shownToken.code }}" onClick="this.select();" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div id="clipboardCopied" style="display: none">
|
||||
Copied to clipboard
|
||||
</div>
|
||||
<button id="copyClipboard" type="button" class="btn btn-primary" data-clipboard-target="token-view">Copy to clipboard</button>
|
||||
<div id="clipboardCopied" style="display: none">
|
||||
Copied to clipboard
|
||||
</div>
|
||||
<button id="copyClipboard" type="button" class="btn btn-primary" data-clipboard-target="token-view">Copy to clipboard</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
|
|
Reference in a new issue