2018-10-20 20:33:01 -04:00
|
|
|
<my-bridge-config [bridgeComponent]="this">
|
|
|
|
<ng-template #bridgeParamsTemplate>
|
|
|
|
<my-ibox [isCollapsible]="true">
|
|
|
|
<h5 class="my-ibox-title">
|
2020-10-23 07:30:20 -04:00
|
|
|
{{'Add a new webhook' | translate}}
|
2018-10-20 20:33:01 -04:00
|
|
|
</h5>
|
|
|
|
<div class="my-ibox-content">
|
|
|
|
<label class="label-block">
|
2020-10-23 07:30:20 -04:00
|
|
|
{{'Webhook Name' | translate}}
|
2019-07-11 00:17:16 -04:00
|
|
|
<input title="webhook name" type="text" class="form-control form-control-sm"
|
|
|
|
[(ngModel)]="webhookName" [disabled]="isBusy">
|
2018-10-20 20:33:01 -04:00
|
|
|
</label>
|
|
|
|
<div style="margin-top: 25px">
|
|
|
|
<button type="button" class="btn btn-sm btn-primary" [disabled]="isBusy" (click)="newHook()">
|
2020-10-23 07:30:20 -04:00
|
|
|
{{'Create' | translate}}
|
2018-10-20 20:33:01 -04:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</my-ibox>
|
|
|
|
<my-ibox [isCollapsible]="true">
|
|
|
|
<h5 class="my-ibox-title">
|
|
|
|
Webhooks
|
|
|
|
</h5>
|
|
|
|
<div class="my-ibox-content">
|
|
|
|
<table class="table table-striped table-condensed table-bordered">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
2020-10-23 07:30:20 -04:00
|
|
|
<th>{{'Type' | translate}}</th>
|
2018-10-20 20:33:01 -04:00
|
|
|
<th>URL</th>
|
2020-10-23 07:30:20 -04:00
|
|
|
<th class="actions-col">{{'Actions' | translate}}</th>
|
2018-10-20 20:33:01 -04:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr *ngIf="newConfig.webhooks.length === 0">
|
2020-10-23 07:30:20 -04:00
|
|
|
<td colspan="4">{{'No webhooks' | translate}}</td>
|
2018-10-20 20:33:01 -04:00
|
|
|
</tr>
|
|
|
|
<tr *ngFor="let hook of newConfig.webhooks">
|
|
|
|
<td *ngIf="hook.label">{{ hook.label }}</td>
|
2020-10-23 07:30:20 -04:00
|
|
|
<td *ngIf="!hook.label"><i>{{'No name' | translate}}</i></td>
|
2018-10-20 20:33:01 -04:00
|
|
|
<td>{{ hook.type }}</td>
|
|
|
|
<td class="webhook-url"><a [href]="hook.url" target="_blank">{{ hook.url }}</a></td>
|
|
|
|
<td class="actions-col">
|
|
|
|
<button type="button" class="btn btn-sm btn-outline-danger"
|
|
|
|
[disabled]="isBusy"
|
|
|
|
(click)="removeHook(hook)">
|
2020-10-23 07:30:20 -04:00
|
|
|
<i class="far fa-trash-alt"></i> {{'Delete' | translate}}
|
2018-10-20 20:33:01 -04:00
|
|
|
</button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</my-ibox>
|
|
|
|
</ng-template>
|
2020-10-23 07:30:20 -04:00
|
|
|
</my-bridge-config>
|