1 import { HttpClient } from "@angular/common/http";
2 import { Component, OnInit } from "@angular/core";
3 import { NzMessageService } from "ng-zorro-antd";
4 import { intentBaseService } from "../../../../core/services/intentBase.service";
7 selector: "app-monitor-facps-service",
8 templateUrl: "./monitor-facps-service.component.html",
9 styleUrls: ["./monitor-facps-service.component.less"],
11 export class MonitorFacpsServiceComponent implements OnInit {
14 private nzMessage: NzMessageService,
15 private myHttp: intentBaseService,
16 private http: HttpClient
19 selectedSubscriptionType: string = "";
20 selectedServiceInstance: string = "";
21 selectedTopology: string = "";
22 instanceId: string = "";
26 legend: { bottom: "0px", data: ["RATE", "MAXRATE"] },
32 itemStyle: { color: "#70ACEC" },
53 instanceLists: any[] = [];
54 progressSetTimeOut: any;
57 this.getFinishedInstanceInfo();
60 height: this.initData.height,
61 width: this.initData.width,
64 tooltip: this.initData.option.tooltip,
66 legend: this.initData.option.legend,
67 dataZoom: this.initData.option.dataZoom,
85 data: this.initData.option.xAxis.data,
103 series: this.initData.option.series,
108 this.chartIntance = chart;
111 getFinishedInstanceInfo() {
112 this.myHttp.getFinishedInstanceInfo().subscribe(
114 const { code, message, data } = response;
116 this.nzMessage.error(message);
119 this.instanceLists = [...data];
127 queryInstancePerformance(instanceId) {
128 const requery = () => {
129 this.myHttp.queryInstancePerformanceData({ instanceId}).subscribe(
131 const { code, message, data } = response;
133 this.nzMessage.error(message);
135 if(this.chartIntance) {
136 this.updateOption = data;
140 if (this.progressSetTimeOut) {
141 clearInterval(this.progressSetTimeOut);
144 this.progressSetTimeOut = setTimeout(() => {