diff options
Diffstat (limited to 'usecaseui-portal/src/app/views/services/intent-based-services')
8 files changed, 38 insertions, 12 deletions
diff --git a/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.html b/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.html index d563e0b4..8d84b953 100644 --- a/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.html +++ b/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.html @@ -1,7 +1,7 @@ <nz-modal [(nzVisible)]="cloudLeasedLineShowFlag" nzTitle="Create Cloud Leased Line" - (nzOnCancel)="cancel()" + (nzOnCancel)="cancel(false)" nzWidth="70%" [nzFooter]="modalFooter" > diff --git a/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.ts b/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.ts index b48cd3f0..4299ba83 100644 --- a/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.ts +++ b/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.ts @@ -19,7 +19,7 @@ export class CloudLeasedLineModalComponent implements OnInit { @Input() modelParams: any; @Input() cloudLeasedLineShowFlag: boolean; - @Output() cancelEmitter = new EventEmitter<boolean>(); + @Output() cancelEmitter = new EventEmitter<any>(); comunicationFormItems = COMMUNICATION_FORM_ITEMS; isUpdateFlag: boolean = false; nodeLists: any[] = []; @@ -125,7 +125,7 @@ export class CloudLeasedLineModalComponent implements OnInit { return; } this.nzMessage.success('Update IntentInstance Success!'); - this.cancel(); + this.cancel(true); }, (err) => { console.log(err); @@ -144,7 +144,7 @@ export class CloudLeasedLineModalComponent implements OnInit { return; } this.nzMessage.success('Create IntentInstance Success!'); - this.cancel(); + this.cancel(true); }, (err) => { console.log(err); @@ -152,7 +152,7 @@ export class CloudLeasedLineModalComponent implements OnInit { ) } - cancel(): void { + cancel(flag): void { this.cloudLeasedLineShowFlag = false this.isUpdateFlag = false this.cloud_leased_line_info = { @@ -165,7 +165,7 @@ export class CloudLeasedLineModalComponent implements OnInit { }, cloudPointName: '', }; - this.cancelEmitter.emit(); + this.cancelEmitter.emit(flag); } isString(val) { diff --git a/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line/cloud-leased-line.component.html b/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line/cloud-leased-line.component.html index 78f752c6..bd4ae434 100644 --- a/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line/cloud-leased-line.component.html +++ b/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line/cloud-leased-line.component.html @@ -74,6 +74,7 @@ Inactive </button> <button + *ngIf="data.status === '1'" nz-button nzType="primary" class="buy-button" diff --git a/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line/cloud-leased-line.component.ts b/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line/cloud-leased-line.component.ts index dd044e7e..5dac8cb7 100644 --- a/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line/cloud-leased-line.component.ts +++ b/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line/cloud-leased-line.component.ts @@ -24,7 +24,11 @@ export class CloudLeasedLineComponent implements OnInit { this.getCloudLeasedLineList(); } - ngOnDestroy() {} + ngOnDestroy() { + this.progressingTimer.forEach((item) => { + clearInterval(item.timer); + }); + } statusObj: any = { 0: 'Incomplete', diff --git a/usecaseui-portal/src/app/views/services/intent-based-services/intent-based-predict/intent-based-predict.component.html b/usecaseui-portal/src/app/views/services/intent-based-services/intent-based-predict/intent-based-predict.component.html index bdd59ea3..73c4ab17 100644 --- a/usecaseui-portal/src/app/views/services/intent-based-services/intent-based-predict/intent-based-predict.component.html +++ b/usecaseui-portal/src/app/views/services/intent-based-services/intent-based-predict/intent-based-predict.component.html @@ -32,11 +32,11 @@ <app-cloud-leased-line-modal [modelParams]="modalParam" [cloudLeasedLineShowFlag]="cloudModalShowFlag" - (cancelEmitter)="modalClose()" + (cancelEmitter)="cloudModalClose($event)" ></app-cloud-leased-line-modal> <app-business-order [modelParams]="modalParam" [showModel]="businessModalShowFlag" - (cancel)="modalClose()" + (cancel)="businessModalClose($event)" ></app-business-order> </div> diff --git a/usecaseui-portal/src/app/views/services/intent-based-services/intent-based-predict/intent-based-predict.component.ts b/usecaseui-portal/src/app/views/services/intent-based-services/intent-based-predict/intent-based-predict.component.ts index d88afa9c..d2fe0fce 100644 --- a/usecaseui-portal/src/app/views/services/intent-based-services/intent-based-predict/intent-based-predict.component.ts +++ b/usecaseui-portal/src/app/views/services/intent-based-services/intent-based-predict/intent-based-predict.component.ts @@ -1,4 +1,5 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, EventEmitter, OnInit, Output } from '@angular/core'; +import { Router } from "@angular/router"; import { NzMessageService } from 'ng-zorro-antd'; import { intentBaseService } from '../../../../core/services/intentBase.service'; @@ -10,10 +11,12 @@ import { intentBaseService } from '../../../../core/services/intentBase.service' export class IntentBasedPredictComponent implements OnInit { constructor( + private router:Router, private myhttp: intentBaseService, private msg: NzMessageService ) {} + @Output() eventEmitter = new EventEmitter<any>(); // textarea input predict param communicationMessage: String = ""; // button loading @@ -64,10 +67,22 @@ export class IntentBasedPredictComponent implements OnInit { ) } - modalClose() { + cloudModalClose(param) { this.cloudModalShowFlag = false; - this.businessModalShowFlag = false; this.modalParam = {}; this.communicationMessage = ''; + if (param) { + this.eventEmitter.emit(); + } + } + + businessModalClose(param) { + this.businessModalShowFlag = param.closeFlag; + this.modalParam = {}; + this.communicationMessage = ''; + const to5gPage = param.to5gPage; + if (to5gPage) { + this.router.navigate(['/services/slicing-management']); + } } } diff --git a/usecaseui-portal/src/app/views/services/intent-based-services/intent-based-services.component.html b/usecaseui-portal/src/app/views/services/intent-based-services/intent-based-services.component.html index 52f70988..1e09139a 100644 --- a/usecaseui-portal/src/app/views/services/intent-based-services/intent-based-services.component.html +++ b/usecaseui-portal/src/app/views/services/intent-based-services/intent-based-services.component.html @@ -2,6 +2,7 @@ <nz-tab [nzTitle]="'i18nTextDefine_intentBaseService' | translate"> <app-intent-based-predict *ngIf="selectedIndex === 0" + (eventEmitter)="toCloudPage()" ></app-intent-based-predict> </nz-tab> <nz-tab [nzTitle]="'i18nTextDefine_cloudLeasedLine' | translate"> diff --git a/usecaseui-portal/src/app/views/services/intent-based-services/intent-based-services.component.ts b/usecaseui-portal/src/app/views/services/intent-based-services/intent-based-services.component.ts index 2d6f59d2..0017f624 100644 --- a/usecaseui-portal/src/app/views/services/intent-based-services/intent-based-services.component.ts +++ b/usecaseui-portal/src/app/views/services/intent-based-services/intent-based-services.component.ts @@ -15,7 +15,12 @@ export class IntentBasedServicesComponent implements OnInit { ngOnInit() { } + handleTabChange($event): void { this.selectedIndex = $event.index; } + + toCloudPage() { + this.selectedIndex = 1; + } }
\ No newline at end of file |