This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/partials/repo-admin.html

372 lines
17 KiB
HTML
Raw Normal View History

<div class="loading" ng-show="loading">
2013-10-24 21:41:37 +00:00
<i class="fa fa-spinner fa-spin fa-3x"></i>
</div>
<div class="container" ng-show="!loading && (!repo || !permissions)">
2013-09-27 19:26:16 +00:00
No repository found
</div>
<div class="container repo repo-admin" ng-show="!loading && repo && permissions">
2013-11-15 21:40:16 +00:00
<div class="header row">
2013-10-24 21:41:37 +00:00
<a href="{{ '/repository/' + repo.namespace + '/' + repo.name }}" class="back"><i class="fa fa-chevron-left"></i></a>
2013-09-27 19:26:16 +00:00
<h3>
<span class="repo-circle no-background" repo="repo"></span> <span style="color: #aaa;"> {{repo.namespace}}</span> <span style="color: #ccc">/</span> {{repo.name}}
2013-09-27 19:26:16 +00:00
</h3>
2013-11-15 21:40:16 +00:00
</div>
2013-11-15 21:40:16 +00:00
<div class="row">
<!-- Side tabs -->
<div class="col-md-2">
<ul class="nav nav-pills nav-stacked">
<li class="active"><a href="javascript:void(0)" data-toggle="tab" data-target="#permissions">Permissions</a></li>
<li><a href="javascript:void(0)" data-toggle="tab" data-target="#webhook" ng-click="loadWebhooks()">Webhooks</a></li>
2013-11-15 21:40:16 +00:00
<li><a href="javascript:void(0)" data-toggle="tab" data-target="#publicprivate">Public/Private</a></li>
2013-11-15 21:50:11 +00:00
<li><a href="javascript:void(0)" data-toggle="tab" data-target="#delete">Delete</a></li>
<li><a href="javascript:void(0)" data-toggle="tab" data-target="#logs" ng-click="loadLogs()">Usage Logs</a></li>
2013-11-15 21:40:16 +00:00
</ul>
</div>
2013-11-15 21:40:16 +00:00
<!-- Content -->
<div class="col-md-10">
<div class="tab-content">
<!-- Logs tab -->
<div id="logs" class="tab-pane">
<div class="logs-view" repository="repo" visible="logsShown"></div>
</div>
2013-11-15 21:40:16 +00:00
<!-- Permissions tab -->
<div id="permissions" class="tab-pane active">
<!-- User Access Permissions -->
<div class="panel panel-default">
2013-11-23 01:14:44 +00:00
<div class="panel-heading">Access Permissions
2013-11-23 01:14:44 +00:00
<i class="info-icon fa fa-info-circle" data-placement="left" data-content="Allow any number of users, robot accounts or teams to read, write or administer this repository"></i>
2013-11-15 21:40:16 +00:00
</div>
<div class="panel-body">
<table class="permissions">
<thead>
<tr>
2013-11-23 01:14:44 +00:00
<td style="min-width: 400px;">User<span ng-show="repo.is_organization">/Team</span>/Robot Account</td>
2013-11-15 21:40:16 +00:00
<td>Permissions</td>
<td style="width: 95px;"></td>
</tr>
</thead>
<!-- Team Permissions -->
<tr ng-repeat="(name, permission) in permissions['team']">
<td class="team entity">
<span class="entity-reference" orgname="repo.namespace" team="name"></span>
2013-11-15 21:40:16 +00:00
</td>
<td class="user-permissions">
<span class="role-group" current-role="permission.role" role-changed="setRole(role, name, 'team')" roles="roles"></span>
</td>
<td>
<span class="delete-ui" tabindex="0">
<span class="delete-ui-button" ng-click="deleteRole(name, 'team')"><button class="btn btn-danger">Delete</button></span>
<i class="fa fa-times" bs-tooltip="tooltip.title" data-placement="right" title="Delete Permission"></i>
</span>
</td>
</tr>
<!-- User Permissions -->
<tr ng-repeat="(name, permission) in permissions['user']">
<td class="{{ 'user entity ' + (permission.is_org_member ? '' : 'outside') }}">
<span class="entity-reference" name="name" isrobot="permission.is_robot"></span>
2013-11-15 21:40:16 +00:00
<i class="fa fa-exclamation-triangle" ng-show="permission.is_org_member === false" data-trigger="hover" bs-popover="{'content': 'This user is not a member of the organization'}"></i>
</td>
<td class="user-permissions">
<div class="btn-group btn-group-sm">
<span class="role-group" current-role="permission.role" role-changed="setRole(role, name, 'user')" roles="roles"></span>
</div>
</td>
<td>
<span class="delete-ui" tabindex="0" title="Delete Permission">
<span class="delete-ui-button" ng-click="deleteRole(name, 'user')"><button class="btn btn-danger">Delete</button></span>
<i class="fa fa-times" bs-tooltip="tooltip.title" data-placement="right" title="Delete Permission"></i>
</span>
</td>
</tr>
2013-11-15 21:40:16 +00:00
<tr>
2013-11-23 01:14:44 +00:00
<td colspan="2" class="admin-search">
2013-11-20 23:23:59 +00:00
<span class="entity-search" namespace="repo.namespace" include-teams="true" input-title="'Add a ' + (repo.is_organization ? 'team or ' : '') + 'user...'" entity-selected="addNewPermission"></span>
2013-11-15 21:40:16 +00:00
</td>
</tr>
</table>
</div>
</div>
2013-11-15 21:40:16 +00:00
<!-- Token Permissions -->
<div class="panel panel-default">
<div class="panel-heading">Access Token Permissions
2013-11-15 21:40:16 +00:00
<i class="info-icon fa fa-info-circle" 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">
<form name="createTokenForm" ng-submit="createToken()">
<table class="permissions">
<thead>
<tr>
2013-11-23 01:14:44 +00:00
<td style="min-width: 400px;">Token Description</td>
2013-11-15 21:40:16 +00:00
<td>Permissions</td>
<td></td>
</tr>
</thead>
<tr ng-repeat="(code, token) in tokens">
<td class="user token">
<i class="fa fa-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">
<span class="delete-ui-button" ng-click="deleteToken(token.code)"><button class="btn btn-danger" type="button">Delete</button></span>
<i class="fa fa-times" bs-tooltip="tooltip.title" data-placement="right" title="Delete Token"></i>
</span>
</td>
</tr>
2013-11-15 21:40:16 +00:00
<tr>
2013-11-23 01:14:44 +00:00
<td class="admin-search">
2013-11-15 21:40:16 +00:00
<input type="text" class="form-control" placeholder="New token description" ng-model="newToken.friendlyName"required>
</td>
2013-11-23 01:14:44 +00:00
<td class="admin-search">
2013-11-15 21:40:16 +00:00
<button type="submit" ng-disabled="createTokenForm.$invalid" class="btn btn-sm btn-default">Create</button>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
2013-11-15 22:45:37 +00:00
<!-- Webhook tab -->
<div id="webhook" class="tab-pane">
<div class="panel panel-default">
<div class="panel-heading">Push Webhooks
2013-11-21 21:03:11 +00:00
<i class="info-icon fa fa-info-circle" data-placement="left" data-content="URLs which will be invoked with an HTTP POST and JSON payload when a successful push to the repository occurs."></i>
</div>
2013-11-15 22:45:37 +00:00
<div class="panel-body" ng-show="webhooksLoading">
Loading webhooks: <i class="fa fa-spinner fa-spin fa-2x" style="vertical-align: middle; margin-left: 4px"></i>
</div>
<div class="panel-body" ng-show="!webhooksLoading">
2013-11-15 22:45:37 +00:00
<table class="permissions" ng-form="newWebhookForm">
<thead>
<tr>
<td style="width: 500px;">Webhook URL</td>
2013-11-15 22:45:37 +00:00
<td></td>
</tr>
</thead>
<tbody>
<tr ng-repeat="webhook in webhooks">
<td>{{ webhook.parameters.url }}</td>
<td>
<span class="delete-ui" tabindex="0">
<span class="delete-ui-button" ng-click="deleteWebhook(webhook)"><button class="btn btn-danger">Delete</button></span>
2013-12-03 00:15:20 +00:00
<i class="fa fa-times" bs-tooltip="tooltip.title" data-placement="right" title="Delete Webhook"></i>
2013-11-15 22:45:37 +00:00
</span>
</td>
</tr>
<tr>
<td>
2013-12-03 00:15:20 +00:00
<input type="url" class="form-control" placeholder="New webhook url..." ng-model="newWebhook.url" required>
2013-11-15 22:45:37 +00:00
</td>
<td>
<button class="btn btn-primary" type="submit" ng-click="createWebhook()">Create</button>
</td>
</tr>
</tbody>
</table>
2013-11-21 21:03:11 +00:00
<div class="right-info">
Quay will <b>POST</b> to these webhooks whenever a push occurs. See the <a href="/guide">User Guide</a> for more information.
2013-11-21 21:03:11 +00:00
</div>
2013-11-15 22:45:37 +00:00
</div>
</div>
</div>
2013-11-15 21:40:16 +00:00
<!-- Public/private tab -->
<div id="publicprivate" class="tab-pane">
<!-- Public/Private -->
<div class="panel panel-default">
<div class="panel-body">
<div class="repo-access-state" ng-show="!repo.is_public">
<div class="state-icon"><i class="fa fa-lock"></i></div>
2013-11-15 21:41:45 +00:00
This repository is currently <b>private</b>. Only users on the permissions list may view and interact with it.
2013-11-15 21:40:16 +00:00
<div class="change-access">
<button class="btn btn-danger" ng-click="askChangeAccess('public')">Make Public</button>
</div>
</div>
2013-11-15 21:40:16 +00:00
<div class="repo-access-state" ng-show="repo.is_public">
<div class="state-icon"><i class="fa fa-unlock"></i></div>
This repository is currently <b>public</b> and is visible to all users, and may be pulled by all users.
<div class="change-access">
<button class="btn btn-danger" ng-click="askChangeAccess('private')">Make Private</button>
</div>
</div>
</div>
</div>
</div>
2013-10-01 18:14:30 +00:00
2013-11-15 21:40:16 +00:00
<!-- Delete tab -->
<div id="delete" class="tab-pane">
<!-- Delete Repo -->
<div class="panel panel-default">
<div class="panel-body">
<div class="repo-delete">
<div class="alert alert-danger">Deleting a repository <b>cannot be undone</b>. Here be dragons!</div>
<button class="btn btn-danger" ng-click="askDelete()">Delete Repository</button>
</div>
</div>
</div>
</div>
2013-10-01 18:14:30 +00:00
</div>
</div>
</div>
2013-09-27 19:26:16 +00:00
2013-12-03 21:53:49 +00:00
<div class="docker-auth-dialog" username="'$token'" token="shownToken.code"
2013-11-23 01:14:44 +00:00
shown="!!shownToken" counter="shownTokenCounter">
<i class="fa fa-key"></i> {{ shownToken.friendlyName }}
</div>
2013-11-15 21:40:16 +00:00
<!-- Modal message dialog -->
2013-09-27 19:48:54 +00:00
<div class="modal fade" id="cannotchangeModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
2013-10-01 18:14:30 +00:00
<h4 class="modal-title">Cannot change</h4>
2013-09-27 19:48:54 +00:00
</div>
<div class="modal-body">
2013-10-01 18:14:30 +00:00
The selected action could not be performed because you do not have that authority.
2013-09-27 19:48:54 +00:00
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
2013-11-15 21:40:16 +00:00
<!-- Modal message dialog -->
<div class="modal fade" id="makepublicModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Make Repository Public</h4>
</div>
<div class="modal-body">
<div class="alert alert-warning">
Warning: This will allow <b>anyone</b> to pull from this repository
</div>
Are you sure you want to make this repository public?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" ng-click="changeAccess('public')">Make Public</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- Modal message dialog -->
<div class="modal fade" id="makeprivateModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Make Repository Private</h4>
</div>
<div class="modal-body">
<div class="alert alert-warning">
Warning: Only users on the permissions list will be able to access this repository.
</div>
Are you sure you want to make this repository private?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" ng-click="changeAccess('private')">Make Private</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
2013-09-27 19:48:54 +00:00
<!-- Modal message dialog -->
<div class="modal fade" id="channgechangepermModal">
2013-09-27 19:48:54 +00:00
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Cannot change permissions</h4>
</div>
<div class="modal-body">
<span ng-show="!changePermError">You do not have permission to change the permissions on the repository.</span>
<span ng-show="changePermError">{{ changePermError }}</span>
2013-09-27 19:48:54 +00:00
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
2013-10-01 18:14:30 +00:00
<!-- Modal message dialog -->
<div class="modal fade" id="confirmdeleteModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Delete Repository?</h4>
</div>
<div class="modal-body">
Are you <b>absolutely, positively</b> sure you would like to delete this repository? This <b>cannot be undone</b>.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" ng-click="deleteRepo()">Delete Repository</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- Modal message dialog -->
<div class="modal fade" id="confirmaddoutsideModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Add User?</h4>
</div>
<div class="modal-body">
The selected user is outside of your organization. Are you sure you want to grant the user access to this repository?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" ng-click="grantRole()">Yes, I'm sure</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->