1 import { Component, OnInit } from "@angular/core";
2 import { Router } from "@angular/router";
3 import { NzMessageService } from "ng-zorro-antd";
4 import { intentBaseService } from "../../../../core/services/intentBase.service";
7 selector: 'app-cloud-leased-line',
8 templateUrl: './cloud-leased-line.component.html',
9 styleUrls: ['./cloud-leased-line.component.less']
11 export class CloudLeasedLineComponent implements OnInit {
14 private router:Router,
15 private myHttp: intentBaseService,
16 private nzMessage: NzMessageService
24 this.getCloudLeasedLineList();
36 listOfData: any[] = [];
38 pageIndex: number = 1;
39 pageSize: number = 10;
43 cloudLeasedLineShowFlag: boolean = false;
44 smartCloudLeasedLineShowFlag: boolean = false;
46 getCloudLeasedLineList(): void {
47 this.myHttp.getInstanceList({
48 currentPage: this.pageIndex,
49 pageSize: this.pageSize
50 }).subscribe((response) => {
51 const { code, message, data } = response;
53 this.nzMessage.error(message);
56 this.total = data.totalRecords;
57 this.listOfData = [...data.list];
64 this.getCloudLeasedLineList();
69 cloudLeasedLineShow(): void {
70 this.cloudLeasedLineShowFlag = true;
73 cloudLeasedLineClose(): void {
74 this.cloudLeasedLineShowFlag = false;
77 this.getCloudLeasedLineList();
80 smartCloudLeasedLineShow(): void {
81 this.smartCloudLeasedLineShowFlag = true;
84 smartCloudLeasedLineClose(data): void {
85 this.smartCloudLeasedLineShowFlag = false;
89 this.cloudLeasedLineShowFlag = true;
90 this.resolveResult = {
97 cloudPointName: 'aaa',
101 goMonitorService(): void {
102 this.router.navigateByUrl('/fcaps/monitor_service');
105 activeCloudLeasedLine(row): void {
106 this.myHttp.activeIntentInstance({
107 instanceId: row.instanceId
108 }).subscribe((data) => {
115 inactiveCloudLeasedLine(row): void {
116 this.myHttp.invalidIntentInstance({
117 instanceId: row.instanceId
118 }).subscribe((data) => {
125 deleteCloudLeasedLine(row): void {
126 this.myHttp.deleteIntentInstance(row.instanceId).subscribe((data) => {