This is an automated email from the ASF dual-hosted git repository. gongchao pushed a commit to branch alarm-1-3 in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
commit c610d72187f2b2490c83778b2d3d6262d2354d41 Author: tomsun28 <[email protected]> AuthorDate: Fri Jan 3 16:05:06 2025 +0800 [webapp] update alert inhibit Signed-off-by: tomsun28 <[email protected]> --- web-app/src/app/pojo/NoticeRule.ts | 1 + .../alert/alert-notice/alert-notice.component.html | 40 ++-------------------- 2 files changed, 3 insertions(+), 38 deletions(-) diff --git a/web-app/src/app/pojo/NoticeRule.ts b/web-app/src/app/pojo/NoticeRule.ts index 65585b7cc..efdf73831 100644 --- a/web-app/src/app/pojo/NoticeRule.ts +++ b/web-app/src/app/pojo/NoticeRule.ts @@ -27,6 +27,7 @@ export class NoticeRule { enable: boolean = true; // forward all or not filterAll: boolean = true; + labels!: Record<string, string>; // filter alert level priorities!: number[]; tags!: TagItem[]; diff --git a/web-app/src/app/routes/alert/alert-notice/alert-notice.component.html b/web-app/src/app/routes/alert/alert-notice/alert-notice.component.html index ee0e6e647..436b7a37d 100644 --- a/web-app/src/app/routes/alert/alert-notice/alert-notice.component.html +++ b/web-app/src/app/routes/alert/alert-notice/alert-notice.component.html @@ -436,45 +436,9 @@ </nz-form-control> </nz-form-item> <nz-form-item *ngIf="!rule.filterAll"> - <nz-form-label nzFor="tags" nzSpan="7">{{ 'alert.notice.rule.tag' | i18n }}</nz-form-label> + <nz-form-label nzFor="labels" nzSpan="7">{{ 'alert.notice.rule.tag' | i18n }}</nz-form-label> <nz-form-control nzSpan="12"> - <nz-select - (nzOpenChange)="loadTagsOption()" - [(ngModel)]="filterTags" - [nzDisabled]="rule.filterAll" - [nzMaxTagCount]="5" - [nzOptions]="tagsOption" - id="tags" - name="tags" - nzAllowClear - nzMode="multiple" - [nzPlaceHolder]="'alert.notice.rule.tag.placeholder' | i18n" - nzShowSearch - required - > - </nz-select> - </nz-form-control> - </nz-form-item> - <nz-form-item *ngIf="!rule.filterAll"> - <nz-form-label nzFor="priorities" nzSpan="7">{{ 'alert.notice.rule.priority' | i18n }}</nz-form-label> - <nz-form-control nzSpan="12"> - <nz-select - (ngModelChange)="onPrioritiesChange()" - [(ngModel)]="rule.priorities" - [nzDisabled]="rule.filterAll" - id="priorities" - name="priorities" - nzAllowClear - nzMode="multiple" - [nzPlaceHolder]="'alert.notice.rule.priority.placeholder' | i18n" - nzShowSearch - required - > - <nz-option [nzLabel]="'alert.severity.all' | i18n" [nzValue]="9"></nz-option> - <nz-option [nzLabel]="'alert.severity.0' | i18n" [nzValue]="0"></nz-option> - <nz-option [nzLabel]="'alert.severity.1' | i18n" [nzValue]="1"></nz-option> - <nz-option [nzLabel]="'alert.severity.2' | i18n" [nzValue]="2"></nz-option> - </nz-select> + <app-labels-input [(ngModel)]="rule.labels" name="labels" required></app-labels-input> </nz-form-control> </nz-form-item> <nz-form-item> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
