summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal
diff options
context:
space:
mode:
authorliuwh7 <liuwh7@asiainfo.com>2022-03-29 14:37:38 +0800
committerliuwh7 <liuwh7@asiainfo.com>2022-03-29 14:37:52 +0800
commit841ef0d6f86a17105c92e44683e796b829962f52 (patch)
treeff2858d18ca0debdaabf214c3b66aaafcc84cdfb /usecaseui-portal
parent5d7bec14a9e18d7de0f1b228f9b396a810eb5b47 (diff)
fix: after submit to new page
Signed-off-by: liuwh7 <liuwh7@asiainfo.com> Change-Id: I945a645748991d13b3195f3390642bfb2ef5a3e7 Issue-ID: REQ-1075
Diffstat (limited to 'usecaseui-portal')
-rw-r--r--usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.html2
-rw-r--r--usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.ts10
-rw-r--r--usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line/cloud-leased-line.component.html1
-rw-r--r--usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line/cloud-leased-line.component.ts6
-rw-r--r--usecaseui-portal/src/app/views/services/intent-based-services/intent-based-predict/intent-based-predict.component.html4
-rw-r--r--usecaseui-portal/src/app/views/services/intent-based-services/intent-based-predict/intent-based-predict.component.ts21
-rw-r--r--usecaseui-portal/src/app/views/services/intent-based-services/intent-based-services.component.html1
-rw-r--r--usecaseui-portal/src/app/views/services/intent-based-services/intent-based-services.component.ts5
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.html2
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts15
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts36
11 files changed, 66 insertions, 37 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
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.html b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.html
index 74069f69..9ad0d4e6 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.html
+++ b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.html
@@ -1,4 +1,4 @@
-<nz-modal [(nzVisible)]="showModel" nzTitle="Create Communication Service" (nzOnCancel)="handleCancel()" nzWidth="80%"
+<nz-modal [(nzVisible)]="showModel" nzTitle="Create Communication Service" (nzOnCancel)="handleCancel(false)" nzWidth="80%"
[nzFooter]="modalFooter">
<div class="subnet_params_container">
<form nz-form>
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts
index 70ef4ef8..55bf386b 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts
@@ -39,7 +39,7 @@ export class BusinessOrderComponent implements OnInit {
@Input() showModel: boolean;
@Input() modelParams: any;
- @Output() cancel = new EventEmitter<boolean>();
+ @Output() cancel = new EventEmitter<any>();
comunicationFormItems = COMMUNICATION_FORM_ITEMS;
slicing_order_info = {
name: null,
@@ -83,9 +83,12 @@ export class BusinessOrderComponent implements OnInit {
});
}
- handleCancel(): void {
+ handleCancel(flag): void {
this.showModel = false;
- this.cancel.emit(this.showModel);
+ this.cancel.emit({
+ closeFlag: false,
+ to5gPage: flag
+ });
this.slicing_order_info = {
name: null,
maxNumberofUEs: null,
@@ -151,7 +154,7 @@ export class BusinessOrderComponent implements OnInit {
slicing_order_info: this.slicing_order_info,
};
const csmfSlicingPurchaseFailedCallback = () => {
- this.handleCancel();
+ this.handleCancel(true);
};
this.loading = true;
@@ -179,7 +182,7 @@ export class BusinessOrderComponent implements OnInit {
this.message.create("error", "Network error");
}
this.loading = false;
- this.handleCancel();
+ this.handleCancel(true);
});
}
@@ -198,7 +201,7 @@ export class BusinessOrderComponent implements OnInit {
this.message.create("error", "Network error");
}
this.loading = false;
- this.handleCancel();
+ this.handleCancel(true);
});
}
}
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts
index 6eb5e936..40a5c252 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts
@@ -1,8 +1,8 @@
import { Component, Input, OnInit, SimpleChanges } from "@angular/core";
+import * as moment from "moment";
+import { NzMessageService, NzModalService } from "ng-zorro-antd";
import { BUSINESS_STATUS } from "../../../../../constants/constants";
import { SlicingTaskServices } from ".././../../../core/services/slicingTaskServices";
-import { NzModalService, NzMessageService } from "ng-zorro-antd";
-import * as moment from "moment";
import { INTERVAL_TIME } from "../constant";
@Component({
selector: "app-csmf-slicing-business-management",
@@ -234,22 +234,22 @@ export class CsmfSlicingBusinessManagementComponent implements OnInit {
}
OrderModelShow(): void {
- this.orderForm = null;
- this.businessOrderShow = true;
+ this.orderForm = null;
+ this.businessOrderShow = true;
}
orderModelClose($event: any): void {
- this.businessOrderShow = $event;
- this.getCSMFBusinessList();
- }
- inputOrderModelShow(): void {
- this.inputBusinessOrderShow = true;
- }
- inputOrderModelClose($event: any): void {
- this.inputBusinessOrderShow = false;
- if ($event.cancel) {
- return;
- }
- this.orderForm = $event.param;
- this.businessOrderShow = true;
- }
+ this.businessOrderShow = $event.closeFlag;
+ this.getCSMFBusinessList();
+ }
+ inputOrderModelShow(): void {
+ this.inputBusinessOrderShow = true;
+ }
+ inputOrderModelClose($event: any): void {
+ this.inputBusinessOrderShow = false;
+ if ($event.cancel) {
+ return;
+ }
+ this.orderForm = $event.param;
+ this.businessOrderShow = true;
+ }
}