Add support for deleting namespaces (users, organizations)
Fixes #102 Fixes #105
This commit is contained in:
parent
a74e94fb67
commit
73eb66eac5
23 changed files with 407 additions and 33 deletions
|
@ -8,13 +8,19 @@
|
|||
<h4 class="modal-title">{{ dialogTitle }}</h4>
|
||||
</div>
|
||||
<div class="modal-body" ng-show="working">
|
||||
<div class="cor-loader"></div>
|
||||
<div class="cor-loader" ng-if="!dialogContext.progress"></div>
|
||||
<div class="progress-message" ng-if="dialogContext.progressMessage">
|
||||
{{ dialogContext.progressMessage }}
|
||||
</div>
|
||||
<div class="cor-progress-bar" ng-if="dialogContext.progress" progress="dialogContext.progress">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body" ng-show="!working">
|
||||
<span ng-transclude/>
|
||||
</div>
|
||||
<div class="modal-footer" ng-show="!working">
|
||||
<button type="button" class="btn btn-primary" ng-click="performAction()" ng-disabled="dialogForm && dialogForm.$invalid">
|
||||
<button type="button" class="btn btn-primary" ng-class="dialogButtonClass || 'btn-primary'"
|
||||
ng-click="performAction()" ng-disabled="dialogForm && dialogForm.$invalid">
|
||||
{{ dialogActionTitle }}
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
|
|
4
static/directives/cor-progress-bar.html
Normal file
4
static/directives/cor-progress-bar.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<div class="cor-progress-bar-element progress">
|
||||
<div class="progress-bar" ng-style="{'width': (progress * 100) + '%'}"
|
||||
aria-valuenow="{{ (progress * 100) }}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
35
static/directives/delete-namespace-view.html
Normal file
35
static/directives/delete-namespace-view.html
Normal file
|
@ -0,0 +1,35 @@
|
|||
<div class="delete-namespace-view-element" quay-show="!Features.BILLING || subscriptionStatus != 'loading'">
|
||||
<table class="co-list-table">
|
||||
<tr>
|
||||
<td>Delete Account:</td>
|
||||
<td quay-show="!Features.BILLING || subscriptionStatus == 'none'">
|
||||
<a class="co-modify-link" ng-click="showDeleteNamespace()">Begin deletion</a>
|
||||
</td>
|
||||
<td quay-show="Features.BILLING && subscriptionStatus == 'valid'">
|
||||
<i class="fa fa-exclamation-triangle yellow"></i> You must cancel your billing subscription before this account can be deleted.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Delete account dialog -->
|
||||
<div class="cor-confirm-dialog"
|
||||
dialog-context="deleteNamespaceInfo"
|
||||
dialog-action="deleteNamespace(info, callback)"
|
||||
dialog-title="Delete Account"
|
||||
dialog-action-title="Delete Account"
|
||||
dialog-form="context.deleteform"
|
||||
dialog-button-class="btn-danger">
|
||||
<form name="context.deleteform" class="co-single-field-dialog">
|
||||
<div class="co-alert co-alert-danger">
|
||||
Deleting an account is <strong>non-reversable</strong> and will delete
|
||||
<strong>all of the account's data</strong> including repositories, created build triggers,
|
||||
and notifications.
|
||||
</div>
|
||||
|
||||
You must type <code>{{ deleteNamespaceInfo.namespace }}</code> below to confirm deletion is requested:
|
||||
<input type="text" class="form-control" placeholder="Enter namespace here"
|
||||
ng-model="deleteNamespaceInfo.verification" ng-pattern="deleteNamespaceInfo.namespace"
|
||||
required>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
Reference in a new issue