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" },
56 instanceLists: any[] = [];
57 progressSetTimeOut: any;
60 this.getFinishedInstanceInfo();
63 height: this.initData.height,
64 width: this.initData.width,
67 tooltip: this.initData.option.tooltip,
69 legend: this.initData.option.legend,
70 dataZoom: this.initData.option.dataZoom,
98 data: this.initData.option.xAxis.data,
116 series: this.initData.option.series,
121 this.chartIntance = chart;
124 getFinishedInstanceInfo() {
125 this.myHttp.getFinishedInstanceInfo().subscribe(
127 const { code, message, data } = response;
129 this.nzMessage.error(message);
132 this.instanceLists = [...data];
140 queryInstancePerformance(instanceId) {
141 const requery = () => {
142 this.myHttp.queryInstancePerformanceData({ instanceId}).subscribe(
144 const { code, message, data } = response;
146 this.nzMessage.error(message);
148 if(this.chartIntance) {
149 this.updateOption = data;
153 if (this.progressSetTimeOut) {
154 clearInterval(this.progressSetTimeOut);
157 this.progressSetTimeOut = setTimeout(() => {