[manager,webapp] bugfix-监控详情数据获取异常问题
This commit is contained in:
@@ -36,7 +36,7 @@ public class MetricsDataController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RedisDataStorage redisDataStorage;
|
private RedisDataStorage redisDataStorage;
|
||||||
|
|
||||||
@GetMapping("/monitors/{monitorId}/metrics/{metrics}")
|
@GetMapping("/monitor/{monitorId}/metrics/{metrics}")
|
||||||
@ApiOperation(value = "查询监控指标组的指标数据", notes = "查询监控指标组的指标数据")
|
@ApiOperation(value = "查询监控指标组的指标数据", notes = "查询监控指标组的指标数据")
|
||||||
public ResponseEntity<Message<MetricsData>> getMetricsData(
|
public ResponseEntity<Message<MetricsData>> getMetricsData(
|
||||||
@ApiParam(value = "监控ID", example = "343254354")
|
@ApiParam(value = "监控ID", example = "343254354")
|
||||||
@@ -66,7 +66,7 @@ public class MetricsDataController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/monitors/{monitorId}/metrics/{metricFull}")
|
@GetMapping("/monitor/{monitorId}/metric/{metricFull}")
|
||||||
@ApiOperation(value = "查询监控指标组的指定指标的历史数据", notes = "查询监控指标组下的指定指标的历史数据")
|
@ApiOperation(value = "查询监控指标组的指定指标的历史数据", notes = "查询监控指标组下的指定指标的历史数据")
|
||||||
public ResponseEntity<Message<Void>> getMetricHistoryData(
|
public ResponseEntity<Message<Void>> getMetricHistoryData(
|
||||||
@ApiParam(value = "监控ID", example = "343254354")
|
@ApiParam(value = "监控ID", example = "343254354")
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
<ng-template #monitor_metrics_card_title>
|
<ng-template #monitor_metrics_card_title>
|
||||||
<p style="font-size: small; text-align: center; margin-bottom: 3px; color: #0c0c0c">{{metric}}</p>
|
<p style="font-size: small; text-align: center; margin-bottom: 3px; color: #0c0c0c">{{metrics}}</p>
|
||||||
<div>
|
<div>
|
||||||
<a nz-popover [nzPopoverContent]="'最近采集时间 ' + (time | _date: 'yyyy-MM-dd HH:mm:ss')"> <i nz-icon nzType="field-time" nzTheme="outline"></i></a>
|
<a nz-popover [nzPopoverContent]="'最近采集时间 ' + (time | _date: 'yyyy-MM-dd HH:mm:ss')"> <i nz-icon nzType="field-time" nzTheme="outline"></i></a>
|
||||||
<i style="font-size: 0.3px; font-weight: normal;color: rgba(84,83,83,0.89)">采集时间:{{time | _date: "HH:mm:ss"}}</i>
|
<i style="font-size: 0.3px; font-weight: normal;color: rgba(84,83,83,0.89)">采集时间:{{time | _date: "HH:mm:ss"}}</i>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export class MonitorDataChartComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
private _monitorId!: number;
|
private _monitorId!: number;
|
||||||
@Input()
|
@Input()
|
||||||
metric!: string;
|
metrics!: string;
|
||||||
|
|
||||||
time!: any;
|
time!: any;
|
||||||
fields!: any[];
|
fields!: any[];
|
||||||
@@ -29,7 +29,7 @@ export class MonitorDataChartComponent implements OnInit {
|
|||||||
|
|
||||||
loadData() {
|
loadData() {
|
||||||
// 读取实时指标数据
|
// 读取实时指标数据
|
||||||
let metricData$ = this.monitorSvc.getMonitorMetricData(this.monitorId, this.metric)
|
let metricData$ = this.monitorSvc.getMonitorMetricsData(this.monitorId, this.metrics)
|
||||||
.subscribe(message => {
|
.subscribe(message => {
|
||||||
metricData$.unsubscribe();
|
metricData$.unsubscribe();
|
||||||
if (message.code === 0) {
|
if (message.code === 0) {
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
<div style="display: flex;justify-content:flex-start;flex-wrap: wrap;">
|
<div style="display: flex;justify-content:flex-start;flex-wrap: wrap;">
|
||||||
<div *ngFor="let metric of metrics; let i = index">
|
<div *ngFor="let metric of metrics; let i = index">
|
||||||
<app-monitor-data-chart [metric]="metric" [monitorId]="monitorId"></app-monitor-data-chart>
|
<app-monitor-data-chart [metrics]="metric" [monitorId]="monitorId"></app-monitor-data-chart>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nz-tab>
|
</nz-tab>
|
||||||
|
|||||||
@@ -104,8 +104,8 @@ export class MonitorService {
|
|||||||
return this.http.get<Message<Page<Monitor>>>(monitors_uri, options);
|
return this.http.get<Message<Page<Monitor>>>(monitors_uri, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getMonitorMetricData(monitorId: number, metric: string) : Observable<Message<any>> {
|
public getMonitorMetricsData(monitorId: number, metrics: string) : Observable<Message<any>> {
|
||||||
return this.http.get<Message<any>>(`/monitors/${monitorId}/metrics/${metric}`);
|
return this.http.get<Message<any>>(`/monitor/${monitorId}/metrics/${metrics}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getAppsMonitorSummary() : Observable<Message<any>> {
|
public getAppsMonitorSummary() : Observable<Message<any>> {
|
||||||
|
|||||||
Reference in New Issue
Block a user