mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-24 01:27:49 +01:00
fix UI bugs for Webhooks
Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
parent
841ac24ebc
commit
f11d4922d5
@ -1,4 +1,7 @@
|
||||
<div class="row">
|
||||
<div *ngIf="loadingWebhook" class="clr-row mt-2 center">
|
||||
<span class="spinner spinner-md"></span>
|
||||
</div>
|
||||
<div class="row" *ngIf="!loadingWebhook">
|
||||
<div *ngIf="!showCreate">
|
||||
<div>
|
||||
<div class="row flex-items-xs-between rightPos">
|
||||
@ -20,7 +23,7 @@
|
||||
<clr-dg-column>{{'WEBHOOK.STATUS' | translate}}</clr-dg-column>
|
||||
<clr-dg-column>{{'WEBHOOK.CREATED' | translate}}</clr-dg-column>
|
||||
<clr-dg-column>{{'WEBHOOK.LAST_TRIGGERED' | translate}}</clr-dg-column>
|
||||
<clr-dg-row *ngFor="let item of lastTriggers">
|
||||
<clr-dg-row *clrDgItems="let item of lastTriggers">
|
||||
<clr-dg-cell>{{item.event_type}}</clr-dg-cell>
|
||||
<clr-dg-cell [ngSwitch]="item.enabled">
|
||||
<div *ngSwitchCase="true" class="icon-wrap">
|
||||
@ -37,6 +40,7 @@
|
||||
</clr-dg-row>
|
||||
<clr-dg-footer>
|
||||
<span *ngIf="lastTriggerCount">1 - {{lastTriggerCount}} {{'WEBHOOK.OF' | translate}} </span> {{lastTriggerCount}} {{'WEBHOOK.ITEMS' | translate}}
|
||||
<clr-dg-pagination [clrDgPageSize]="10"></clr-dg-pagination>
|
||||
</clr-dg-footer>
|
||||
</clr-datagrid>
|
||||
</div>
|
||||
|
@ -34,4 +34,8 @@
|
||||
|
||||
.enabled-icon {
|
||||
margin: -2px 5px 0 0;
|
||||
}
|
||||
}
|
||||
.center {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ export class WebhookComponent implements OnInit {
|
||||
isEnabled: boolean;
|
||||
loading: boolean = false;
|
||||
showCreate: boolean = false;
|
||||
loadingWebhook: boolean = true;
|
||||
projectId: number;
|
||||
projectName: string;
|
||||
constructor(
|
||||
@ -92,6 +93,7 @@ export class WebhookComponent implements OnInit {
|
||||
getWebhook(projectId: number) {
|
||||
this.webhookService
|
||||
.listWebhook(projectId)
|
||||
.pipe(finalize(() => (this.loadingWebhook = false)))
|
||||
.subscribe(
|
||||
response => {
|
||||
if (response.length) {
|
||||
|
@ -341,8 +341,8 @@
|
||||
},
|
||||
"WEBHOOK": {
|
||||
"EDIT_BUTTON": "EDIT",
|
||||
"ENABLED_BUTTON": "ENABLED",
|
||||
"DISABLED_BUTTON": "DISABLED",
|
||||
"ENABLED_BUTTON": "ENABLE",
|
||||
"DISABLED_BUTTON": "DISABLE",
|
||||
"TYPE": "Webhook",
|
||||
"STATUS": "Status",
|
||||
"CREATED": "Created",
|
||||
|
@ -342,8 +342,8 @@
|
||||
},
|
||||
"WEBHOOK": {
|
||||
"EDIT_BUTTON": "EDIT",
|
||||
"ENABLED_BUTTON": "ENABLED",
|
||||
"DISABLED_BUTTON": "DISABLED",
|
||||
"ENABLED_BUTTON": "ENABLE",
|
||||
"DISABLED_BUTTON": "DISABLE",
|
||||
"TYPE": "Webhook",
|
||||
"STATUS": "Status",
|
||||
"CREATED": "Created",
|
||||
|
@ -334,8 +334,8 @@
|
||||
},
|
||||
"WEBHOOK": {
|
||||
"EDIT_BUTTON": "EDIT",
|
||||
"ENABLED_BUTTON": "ENABLED",
|
||||
"DISABLED_BUTTON": "DISABLED",
|
||||
"ENABLED_BUTTON": "ENABLE",
|
||||
"DISABLED_BUTTON": "DISABLE",
|
||||
"TYPE": "Webhook",
|
||||
"STATUS": "Status",
|
||||
"CREATED": "Created",
|
||||
|
@ -368,8 +368,8 @@
|
||||
},
|
||||
"WEBHOOK": {
|
||||
"EDIT_BUTTON": "EDIT",
|
||||
"ENABLED_BUTTON": "ENABLED",
|
||||
"DISABLED_BUTTON": "DISABLED",
|
||||
"ENABLED_BUTTON": "ENABLE",
|
||||
"DISABLED_BUTTON": "DISABLE",
|
||||
"TYPE": "Webhook",
|
||||
"STATUS": "Status",
|
||||
"CREATED": "Created",
|
||||
|
Loading…
Reference in New Issue
Block a user