From d50da06023b9b9be44b4301893bafe0a32e91d77 Mon Sep 17 00:00:00 2001 From: Will Sun <30999793+AllForNothing@users.noreply.github.com> Date: Wed, 28 Apr 2021 18:22:09 +0800 Subject: [PATCH] Remove loading state for new webhook button (#14770) Signed-off-by: AllForNothing --- .../src/app/base/project/webhook/webhook.component.html | 2 +- .../src/app/base/project/webhook/webhook.component.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/portal/src/app/base/project/webhook/webhook.component.html b/src/portal/src/app/base/project/webhook/webhook.component.html index bc9408b5b..6d2b49906 100644 --- a/src/portal/src/app/base/project/webhook/webhook.component.html +++ b/src/portal/src/app/base/project/webhook/webhook.component.html @@ -4,7 +4,7 @@
- diff --git a/src/portal/src/app/base/project/webhook/webhook.component.ts b/src/portal/src/app/base/project/webhook/webhook.component.ts index 3f12ee6e6..9146244d8 100644 --- a/src/portal/src/app/base/project/webhook/webhook.component.ts +++ b/src/portal/src/app/base/project/webhook/webhook.component.ts @@ -22,7 +22,7 @@ import { Project } from '../project'; import { clone, DEFAULT_PAGE_SIZE, getSortingString } from '../../../shared/units/utils'; import { forkJoin, Observable } from 'rxjs'; import { UserPermissionService, USERSTATICPERMISSION } from '../../../shared/services'; -import { ClrDatagridStateInterface, ClrLoadingState } from '@clr/angular'; +import { ClrDatagridStateInterface } from '@clr/angular'; import { ConfirmationDialogComponent } from "../../../shared/components/confirmation-dialog"; import { ConfirmationButtons, ConfirmationState, ConfirmationTargets } from "../../../shared/entities/shared.const"; import { ConfirmationMessage } from "../../global-confirmation-dialog/confirmation-message"; @@ -53,7 +53,6 @@ export class WebhookComponent implements OnInit { loadingTriggers: boolean = false; hasCreatPermission: boolean = false; hasUpdatePermission: boolean = false; - addBtnState: ClrLoadingState = ClrLoadingState.DEFAULT; page: number = 1; pageSize: number = DEFAULT_PAGE_SIZE; total: number = 0; @@ -82,13 +81,10 @@ export class WebhookComponent implements OnInit { USERSTATICPERMISSION.WEBHOOK.KEY, USERSTATICPERMISSION.WEBHOOK.VALUE.CREATE)); permissionsList.push(this.userPermissionService.getPermission(this.projectId, USERSTATICPERMISSION.WEBHOOK.KEY, USERSTATICPERMISSION.WEBHOOK.VALUE.UPDATE)); - this.addBtnState = ClrLoadingState.LOADING; forkJoin(...permissionsList).subscribe(Rules => { [this.hasCreatPermission, this.hasUpdatePermission] = Rules; - this.addBtnState = ClrLoadingState.SUCCESS; }, error => { this.messageHandlerService.error(error); - this.addBtnState = ClrLoadingState.ERROR; }); } refresh() {