Skip to content

Commit

Permalink
Fixed lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
kerwin612 committed Jul 4, 2024
1 parent ea889d2 commit b4efaf0
Showing 1 changed file with 22 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*/

import { Component, Input, OnInit } from '@angular/core';
import { finalize } from 'rxjs/operators';
import { NzNotificationService } from 'ng-zorro-antd/notification';
import { finalize } from 'rxjs/operators';

import { MonitorService } from '../../../service/monitor.service';

Expand Down Expand Up @@ -69,28 +69,29 @@ export class MonitorDataTableComponent implements OnInit {
loadData() {
this.loading = true;
// 读取实时指标数据
let metricData$ = this.monitorSvc.getMonitorMetricsData(this.monitorId, this.metrics)
.pipe(finalize(() => this.loading = false))
let metricData$ = this.monitorSvc
.getMonitorMetricsData(this.monitorId, this.metrics)
.pipe(finalize(() => (this.loading = false)))
.subscribe(
message => {
metricData$.unsubscribe();
if (message.code === 0 && message.data) {
this.time = message.data.time;
this.fields = message.data.fields;
this.valueRows = message.data.valueRows;
if (this.valueRows.length == 1) {
this.isTable = false;
this.rowValues = this.valueRows[0].values;
message => {
metricData$.unsubscribe();
if (message.code === 0 && message.data) {
this.time = message.data.time;
this.fields = message.data.fields;
this.valueRows = message.data.valueRows;
if (this.valueRows.length == 1) {
this.isTable = false;
this.rowValues = this.valueRows[0].values;
}
} else if (message.code !== 0) {
this.notifySvc.warning(`${this.metrics}:${message.msg}`, '');
console.info(`${this.metrics}:${message.msg}`);
}
} else if (message.code !== 0) {
this.notifySvc.warning(`${this.metrics}:${message.msg}`, '');
console.info(`${this.metrics}:${message.msg}`);
},
error => {
console.error(error.msg);
metricData$.unsubscribe();
}
},
error => {
console.error(error.msg);
metricData$.unsubscribe();
}
);
);
}
}

0 comments on commit b4efaf0

Please sign in to comment.