summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/fcaps/monitor-management-service
diff options
context:
space:
mode:
authorliuwh7 <liuwh7@asiainfo.com>2021-10-13 11:19:07 +0800
committerliuwh7 <liuwh7@asiainfo.com>2021-10-13 11:19:25 +0800
commit0f94d079d5698b21aad9409ee23b82e84cd0f547 (patch)
treef6d0bb8b86377991bbfc4c65bc5c0d1f7a9145e6 /usecaseui-portal/src/app/views/fcaps/monitor-management-service
parent01a512d33806fe9d25c1f3140114d10ed94d133b (diff)
feat: modify intent based service
Signed-off-by: liuwh7 <liuwh7@asiainfo.com> Change-Id: I9974fb12163823288292cfc9ded92fefec3767eb Issue-ID: USECASEUI-605
Diffstat (limited to 'usecaseui-portal/src/app/views/fcaps/monitor-management-service')
-rw-r--r--usecaseui-portal/src/app/views/fcaps/monitor-management-service/monitor-facps-service/monitor-facps-service.component.ts98
1 files changed, 27 insertions, 71 deletions
diff --git a/usecaseui-portal/src/app/views/fcaps/monitor-management-service/monitor-facps-service/monitor-facps-service.component.ts b/usecaseui-portal/src/app/views/fcaps/monitor-management-service/monitor-facps-service/monitor-facps-service.component.ts
index 8da138bf..1c5017c4 100644
--- a/usecaseui-portal/src/app/views/fcaps/monitor-management-service/monitor-facps-service/monitor-facps-service.component.ts
+++ b/usecaseui-portal/src/app/views/fcaps/monitor-management-service/monitor-facps-service/monitor-facps-service.component.ts
@@ -19,62 +19,7 @@ export class MonitorFacpsServiceComponent implements OnInit {
selectedSubscriptionType: string = "";
selectedServiceInstance: string = "";
selectedTopology: string = "";
- instanceId: string = "";
- chartData: any = {
- xAxis: {
- data: [
- "2018-09-10 ",
- "2018-09-11",
- "2018-09-12",
- "2018-09-13",
- "2018-09-14",
- "2018-09-15",
- "2018-09-16",
- "2018-09-17",
- "2018-09-18",
- "2018-09-19",
- "2018-09-20",
- "2018-09-21",
- "2018-09-22"
- ]
- },
- series: [
- {
- data: [
- 30,
- 45,
- 34,
- 35,
- 43,
- 56,
- 36,
- 53,
- 42,
- 45,
- 44,
- 35,
- 32
- ]
- },
- {
- data: [
- 60,
- 60,
- 60,
- 60,
- 60,
- 60,
- 60,
- 60,
- 60,
- 60,
- 60,
- 60,
- 60
- ]
- }
- ]
- };
+ instanceId: string = "";
initData: any = {
height: 320,
option: {
@@ -106,6 +51,7 @@ export class MonitorFacpsServiceComponent implements OnInit {
updateOption: any;
instanceLists: any[] = [];
+ progressSetTimeOut: any;
ngOnInit() {
this.getFinishedInstanceInfo();
@@ -179,21 +125,31 @@ export class MonitorFacpsServiceComponent implements OnInit {
}
queryInstancePerformance(instanceId) {
- this.myHttp.queryInstancePerformanceData({ instanceId}).subscribe(
- (response) => {
- const { code, message, data } = response;
- if (code !== 200) {
- this.nzMessage.error(message);
- return;
- }
- if(this.chartIntance){
- this.updateOption = data;
+ const requery = () => {
+ this.myHttp.queryInstancePerformanceData({ instanceId}).subscribe(
+ (response) => {
+ const { code, message, data } = response;
+ if (code !== 200) {
+ this.nzMessage.error(message);
+ } else {
+ if(this.chartIntance) {
+ this.updateOption = data;
+ }
+ }
+
+ if (this.progressSetTimeOut) {
+ clearInterval(this.progressSetTimeOut);
+ }
+
+ this.progressSetTimeOut = setTimeout(() => {
+ requery();
+ }, 5000);
+ },
+ (err) => {
+ console.log(err);
}
- },
- (err) => {
- console.log(err);
- }
- )
+ )
+ }
+ requery();
}
-
}