[alter,webapp]fix 告警定义关联监控问题

This commit is contained in:
tomsun28
2022-01-30 12:34:20 +08:00
parent 9cf56d7c01
commit 9b08d8d19b
9 changed files with 31 additions and 22 deletions

View File

@@ -1,8 +1,10 @@
import { Monitor } from './Monitor';
export class AlertDefineBind {
id!: number;
alertDefineId!: number;
monitorId!: number;
monitorName!: string;
monitor!: Monitor;
gmtCreate!: number;
gmtUpdate!: number;
}

View File

@@ -307,7 +307,7 @@ export class AlertSettingComponent implements OnInit {
let bindRecode: Record<number, string> = {};
if (defineBindData.data != undefined) {
defineBindData.data.forEach(bind => {
bindRecode[bind.monitorId] = bind.monitorName;
bindRecode[bind.monitorId] = bind.monitor.name;
});
}
let listTmp: any[] = [];
@@ -337,7 +337,6 @@ export class AlertSettingComponent implements OnInit {
let bind = new AlertDefineBind();
bind.alertDefineId = this.currentAlertDefineId;
bind.monitorId = item.id;
bind.monitorName = item.name;
defineBinds.push(bind);
}
});

View File

@@ -103,7 +103,7 @@ export class UserLoginComponent implements OnDestroy {
.post<Message<any>>('/account/auth/form', {
type: this.type,
identifier: this.userName.value,
password: this.password.value
credential: this.password.value
})
.pipe(
finalize(() => {