2021-10-21 23:30:25 +02:00
|
|
|
<div class="modal fade" role="dialog" aria-modal="true" aria-labelledby="apiKeyTitle">
|
2021-05-14 21:03:45 +02:00
|
|
|
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
2019-03-07 17:18:45 +01:00
|
|
|
<form class="modal-content" #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate>
|
|
|
|
<div class="modal-header">
|
2020-11-10 22:13:42 +01:00
|
|
|
<h2 class="modal-title" id="apiKeyTitle">{{apiKeyTitle | i18n}}</h2>
|
2019-10-11 17:22:21 +02:00
|
|
|
<button type="button" class="close" data-dismiss="modal" appA11yTitle="{{'close' | i18n}}">
|
2019-03-07 17:18:45 +01:00
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
2020-11-10 22:13:42 +01:00
|
|
|
<p>{{apiKeyDescription | i18n}}</p>
|
2019-03-07 17:18:45 +01:00
|
|
|
<ng-container *ngIf="!clientSecret">
|
|
|
|
<label for="masterPassword">{{'masterPass' | i18n}}</label>
|
|
|
|
<input id="masterPassword" type="password" name="MasterPasswordHash" class="form-control"
|
|
|
|
[(ngModel)]="masterPassword" required appAutofocus appInputVerbatim>
|
|
|
|
</ng-container>
|
2020-11-10 22:13:42 +01:00
|
|
|
<app-callout type="warning" *ngIf="clientSecret">{{apiKeyWarning | i18n}}</app-callout>
|
2019-03-07 17:18:45 +01:00
|
|
|
<app-callout type="info" title="{{'oauth2ClientCredentials' | i18n}}" icon="fa-key"
|
|
|
|
*ngIf="clientSecret">
|
|
|
|
<p class="mb-1">
|
|
|
|
<strong>client_id:</strong><br>
|
|
|
|
<code>{{clientId}}</code>
|
|
|
|
</p>
|
|
|
|
<p class="mb-1">
|
|
|
|
<strong>client_secret:</strong><br>
|
|
|
|
<code>{{clientSecret}}</code>
|
|
|
|
</p>
|
|
|
|
<p class="mb-1">
|
|
|
|
<strong>scope:</strong><br>
|
|
|
|
<code>{{scope}}</code>
|
|
|
|
</p>
|
|
|
|
<p class="mb-0">
|
|
|
|
<strong>grant_type:</strong><br>
|
2020-11-10 22:13:42 +01:00
|
|
|
<code>{{grantType}}</code>
|
2019-03-07 17:18:45 +01:00
|
|
|
</p>
|
|
|
|
</app-callout>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading"
|
|
|
|
*ngIf="!clientSecret">
|
2019-10-11 16:35:24 +02:00
|
|
|
<i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}" aria-hidden="true"></i>
|
2020-11-10 22:13:42 +01:00
|
|
|
<span>{{(isRotation ? 'rotateApiKey' : 'viewApiKey') | i18n}}</span>
|
2019-03-07 17:18:45 +01:00
|
|
|
</button>
|
|
|
|
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">{{'close' | i18n}}</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|