summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal/src/app/views')
-rw-r--r--usecaseui-portal/src/app/views/management/customer/customer.component.ts45
-rw-r--r--usecaseui-portal/src/app/views/management/management.component.html2
-rw-r--r--usecaseui-portal/src/app/views/management/management.component.ts28
-rw-r--r--usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.ts12
-rw-r--r--usecaseui-portal/src/app/views/services/services-list/ccvpn-creation/ccvpn-creation.component.ts4
-rw-r--r--usecaseui-portal/src/app/views/services/services-list/e2e-creation/e2e-creation.component.ts2
-rw-r--r--usecaseui-portal/src/app/views/services/services-list/e2e-detail/e2e-detail.component.ts8
-rw-r--r--usecaseui-portal/src/app/views/services/services-list/mdons-creation/mdons-creation.component.ts27
-rw-r--r--usecaseui-portal/src/app/views/services/services-list/mdons-detail/mdons-detail.component.html33
-rw-r--r--usecaseui-portal/src/app/views/services/services-list/mdons-detail/mdons-detail.component.ts5
-rw-r--r--usecaseui-portal/src/app/views/services/services-list/services-list.component.html102
-rw-r--r--usecaseui-portal/src/app/views/services/services-list/services-list.component.ts226
12 files changed, 263 insertions, 231 deletions
diff --git a/usecaseui-portal/src/app/views/management/customer/customer.component.ts b/usecaseui-portal/src/app/views/management/customer/customer.component.ts
index 78d4f145..6858987f 100644
--- a/usecaseui-portal/src/app/views/management/customer/customer.component.ts
+++ b/usecaseui-portal/src/app/views/management/customer/customer.component.ts
@@ -13,9 +13,10 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
-import { Component, OnInit, ViewChild } from '@angular/core'
-import { ManagemencsService } from '../../../core/services/managemencs.service'
-import { Observable } from 'rxjs'
+import {Component, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';
+import { ManagemencsService } from '../../../core/services/managemencs.service';
+import { Observable } from 'rxjs';
+import {NzMessageService} from "ng-zorro-antd";
@Component({
selector: 'app-customer',
@@ -29,8 +30,12 @@ export class CustomerComponent implements OnInit {
public chose = ''
resizeMark
- constructor (private managemencs: ManagemencsService) {}
-
+ constructor(
+ private managemencs: ManagemencsService,
+ private message: NzMessageService,
+ ) {
+ }
+ @Output() closeCustomer = new EventEmitter();
ngOnInit () {
this.getAllCustomers()
this.resizeMark = Observable.fromEvent(window, 'resize').subscribe(
@@ -47,7 +52,7 @@ export class CustomerComponent implements OnInit {
ngOnDestroy () {
this.resizeMark.unsubscribe()
}
-
+ isCustomerEmpty = false;
AllCustomersdata = []
AllServiceTypes = []
customerber = []
@@ -61,16 +66,24 @@ export class CustomerComponent implements OnInit {
deleteCustomerModelVisible = false
deleteServiceTypeModelVisible = false
getAllCustomers () {
- this.managemencs.getAllCustomers().subscribe(data => {
- this.AllCustomersdata = data.map(item => {
- return { name: item['subscriber-name'], id: item['global-customer-id'] }
- })
- this.selectCustomer = this.AllCustomersdata[0]
- this.serviceInit['customer'] = this.AllCustomersdata[0].name
- this.getCustomersPie()
- this.getServiceTypes(this.selectCustomer)
- this.getCustomersColumn(this.selectCustomer)
- })
+ this.managemencs.getAllCustomers().subscribe((data) => {
+ if(data.length!==0){
+ this.AllCustomersdata = data.map((item) => {
+ return { name: item["subscriber-name"], id: item["global-customer-id"] }
+ });
+ this.selectCustomer = this.AllCustomersdata[0];
+ this.serviceInit["customer"] = this.AllCustomersdata[0].name;
+ this.getCustomersPie();
+ this.getServiceTypes(this.selectCustomer);
+ this.getCustomersColumn(this.selectCustomer);
+ }else {
+ this.message.info('Customer has not been created in ONAP.' +
+ 'Please create customer and its service type!');
+ setTimeout(()=>{
+ this.closeCustomer.emit(this.isCustomerEmpty = true);
+ },1000)
+ }
+ })
}
// Get all servicetype
diff --git a/usecaseui-portal/src/app/views/management/management.component.html b/usecaseui-portal/src/app/views/management/management.component.html
index 4e0ac36f..3b42d20f 100644
--- a/usecaseui-portal/src/app/views/management/management.component.html
+++ b/usecaseui-portal/src/app/views/management/management.component.html
@@ -33,6 +33,6 @@
</div>
</div>
<div *ngIf="!nocuster">
- <app-customer></app-customer>
+ <app-customer (closeCustomer)="closeCustomer($event)"></app-customer>
</div>
</div> \ No newline at end of file
diff --git a/usecaseui-portal/src/app/views/management/management.component.ts b/usecaseui-portal/src/app/views/management/management.component.ts
index 727de636..75ce4de7 100644
--- a/usecaseui-portal/src/app/views/management/management.component.ts
+++ b/usecaseui-portal/src/app/views/management/management.component.ts
@@ -13,9 +13,10 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
-import { Component, OnInit, HostBinding } from '@angular/core'
-import { showHideAnimate, slideToRight } from '../../shared/utils/animates'
-import { ManagemencsService } from '../../core/services/managemencs.service'
+import { Component, OnInit, HostBinding } from '@angular/core';
+import { showHideAnimate, slideToRight } from '../../shared/utils/animates';
+import { ManagemencsService } from '../../core/services/managemencs.service';
+import {NzMessageService} from "ng-zorro-antd";
@Component({
selector: 'app-management',
@@ -26,10 +27,13 @@ import { ManagemencsService } from '../../core/services/managemencs.service'
export class ManagementComponent implements OnInit {
@HostBinding('@routerAnimate') routerAnimateState //Routing animation
- nocuster: boolean
- firstCustomer: string
+ nocuster: boolean = true;
+ firstCustomer: string = "";
- constructor (private managemencs: ManagemencsService) {}
+ constructor(
+ private managemencs: ManagemencsService,
+ private message: NzMessageService,
+ ) { }
ngOnInit () {
this.getAllCustomers()
@@ -38,7 +42,7 @@ export class ManagementComponent implements OnInit {
// Get all customers
getAllCustomers () {
this.managemencs.getAllCustomers().subscribe(data => {
- this.nocuster = data.length > 0 ? false : true
+ this.nocuster = data.length !== 0 ? false : true;
})
}
createNewCustomer (customer) {
@@ -51,13 +55,17 @@ export class ManagementComponent implements OnInit {
this.managemencs.createCustomer(customer, createParams).subscribe(data => {
if (data['status'] == 'SUCCESS') {
this.nocuster = false
- } else {
- this.nocuster = true
- console.log(data, 'Interface returned error')
+ } else {
+ this.nocuster = true;
+ this.clearCustomerInput();
+ this.message.error(data["errorMessage"]);
}
})
}
clearCustomerInput () {
this.firstCustomer = ''
}
+ closeCustomer(isClose){
+ this.nocuster = isClose;
+ }
}
diff --git a/usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.ts b/usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.ts
index 6bfdf498..98f40637 100644
--- a/usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.ts
+++ b/usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.ts
@@ -14,10 +14,10 @@
limitations under the License.
*/
import { HttpClient, HttpRequest, HttpResponse } from '@angular/common/http';
-import { Component, OnInit, HostBinding, TemplateRef, ViewChild } from '@angular/core';
+import { Component, OnInit, HostBinding, ViewChild } from '@angular/core';
import { onboardService } from '../../core/services/onboard.service';
import { slideToRight } from '../../shared/utils/animates';
-import { NzMessageService, UploadFile, NzModalRef, NzModalService } from 'ng-zorro-antd';
+import { NzMessageService, UploadFile, NzModalService } from 'ng-zorro-antd';
import { filter } from 'rxjs/operators';
@Component({
@@ -338,8 +338,12 @@ export class OnboardVnfVmComponent implements OnInit {
}
this.myhttp[API](pkgid)
.subscribe((data) => {
- this.notification.notificationSuccess(this.currentTab, 'OnboardingState', pkgid);
resolve()
+ if(data.status === 'FAILED'){
+ this.notification.notificationFailed(this.currentTab, 'delete', pkgid);
+ }else {
+ this.notification.notificationSuccess(this.currentTab, 'delete', pkgid);
+ }
//refresh list after successful deletion
switch (this.currentTab) {
case 'NS':
@@ -354,7 +358,7 @@ export class OnboardVnfVmComponent implements OnInit {
}
}, (err) => {
console.log(err);
- this.notification.notificationFailed(this.currentTab, 'OnboardingState', pkgid);
+ this.notification.notificationFailed(this.currentTab, 'delete', pkgid);
})
}
}
diff --git a/usecaseui-portal/src/app/views/services/services-list/ccvpn-creation/ccvpn-creation.component.ts b/usecaseui-portal/src/app/views/services/services-list/ccvpn-creation/ccvpn-creation.component.ts
index abbe6d6a..7ac17b65 100644
--- a/usecaseui-portal/src/app/views/services/services-list/ccvpn-creation/ccvpn-creation.component.ts
+++ b/usecaseui-portal/src/app/views/services/services-list/ccvpn-creation/ccvpn-creation.component.ts
@@ -521,8 +521,8 @@ export class CcvpnCreationComponent implements OnInit {
siteImage = [];
tpImage = [];
imgmap = {
- '1': '../../../assets/images/domain1.png',
- '2': '../../../assets/images/site.png'
+ '1': 'assets/images/domain1.png',
+ '2': 'assets/images/site.png'
};
drawImage(sitelist) {
diff --git a/usecaseui-portal/src/app/views/services/services-list/e2e-creation/e2e-creation.component.ts b/usecaseui-portal/src/app/views/services/services-list/e2e-creation/e2e-creation.component.ts
index 8f22be00..cd228b28 100644
--- a/usecaseui-portal/src/app/views/services/services-list/e2e-creation/e2e-creation.component.ts
+++ b/usecaseui-portal/src/app/views/services/services-list/e2e-creation/e2e-creation.component.ts
@@ -313,7 +313,7 @@ export class E2eCreationComponent implements OnInit {
.append("g")
.attr("class", "node")
.attr("transform", function (d) {
- return "translate(" + (d.x + -50) + "," + (d.y) + ")";
+ return "translate(" + (d.x + -40) + "," + (d.y) + ")";
});
node.append('image')
diff --git a/usecaseui-portal/src/app/views/services/services-list/e2e-detail/e2e-detail.component.ts b/usecaseui-portal/src/app/views/services/services-list/e2e-detail/e2e-detail.component.ts
index ca49a6b9..ddfac403 100644
--- a/usecaseui-portal/src/app/views/services/services-list/e2e-detail/e2e-detail.component.ts
+++ b/usecaseui-portal/src/app/views/services/services-list/e2e-detail/e2e-detail.component.ts
@@ -68,9 +68,9 @@ export class E2eDetailComponent implements OnInit {
};
imgmap = {
- '1': '../../../../assets/images/create-e2e.png',
- '2': '../../../../assets/images/create-ns.png',
- '3': '../../../../assets/images/create-vnf.png',
+ '1': 'assets/images/create-e2e.png',
+ '2': 'assets/images/create-ns.png',
+ '3': 'assets/images/create-vnf.png',
};
getKeys(item) {
@@ -83,7 +83,6 @@ export class E2eDetailComponent implements OnInit {
if (this.detailParams.serviceDomain == 'E2E Service') {
this.input_parameters = JSON.stringify(this.detailParams['input-parameters']);
this.input_parameters = JSON.parse(this.input_parameters);
-
this.service = {
name: this.input_parameters.service.name,
description: this.input_parameters.service.description,
@@ -121,6 +120,7 @@ export class E2eDetailComponent implements OnInit {
}
} else if (this.detailParams.serviceDomain == 'Network Service') {
+ console.log(this.detailParams,"---this.detailParams--ns");
this.ns_service = {
name: this.detailParams.name || this.detailParams['service-instance-name'],
description: this.detailParams.description || null
diff --git a/usecaseui-portal/src/app/views/services/services-list/mdons-creation/mdons-creation.component.ts b/usecaseui-portal/src/app/views/services/services-list/mdons-creation/mdons-creation.component.ts
index 8d0f2562..8f7b1844 100644
--- a/usecaseui-portal/src/app/views/services/services-list/mdons-creation/mdons-creation.component.ts
+++ b/usecaseui-portal/src/app/views/services/services-list/mdons-creation/mdons-creation.component.ts
@@ -79,6 +79,15 @@ export class MdonsCreationComponent implements OnInit {
this.buildFormArrayOfGroupsFromArr();
}
+ chunkTemplateParam(){
+ console.log(this.templateParameters)
+ for (let i = 0; i < this.templateParameters.inputs.length; i++){
+ if(this.templateParameters.inputs[i].name.includes('vf_')){
+ this.templateParameters.inputs[i].name = this.templateParameters.inputs[i].name.replace('vf_','')
+ }
+ }
+ }
+
buildFormArrayOfGroupsFromArr() {
for (let i of this.templateParameters.inputs) {
if (i.isRequired === "true" && !(i.name.includes('_id'))) {
@@ -154,21 +163,25 @@ export class MdonsCreationComponent implements OnInit {
this.templateParameters.inputs.forEach((ipnut) => {
this.service.parameters.requestInputs[ipnut.name] = ipnut.value == undefined ? ipnut.defaultValue : ipnut.value;
if (ipnut.name.includes('uni') && ipnut.name.includes('id')) {
- this.service.parameters.requestInputs[ipnut.name] = this.nniMap.get(ipnut.name) == undefined ? this.uniIdSelected.id : this.nniMap.get(ipnut.name).id;
- }
+ this.service.parameters.requestInputs[ipnut.name] = this.nniMap.get(ipnut.name) == undefined ? this.removePortNumber(this.uniIdSelected.id) : this.removePortNumber(this.nniMap.get(ipnut.name).id);
+ }
if (ipnut.name.includes('enni') && ipnut.name.includes('id')) {
- this.service.parameters.requestInputs[ipnut.name] = this.nniMap.get(ipnut.name) == undefined ? this.enniIdSelected.id : this.nniMap.get(ipnut.name).id;
- }
+ this.service.parameters.requestInputs[ipnut.name] = this.nniMap.get(ipnut.name) == undefined ? this.removePortNumber(this.enniIdSelected.id) : this.removePortNumber(this.nniMap.get(ipnut.name).id);
+ }
if (ipnut.name.includes('nni') && ipnut.name.includes('id')) {
- this.service.parameters.requestInputs[ipnut.name] = this.nniMap.get(ipnut.name) == undefined ? this.nniIdSelected.id : this.nniMap.get(ipnut.name).id;
- }
+ this.service.parameters.requestInputs[ipnut.name] = this.nniMap.get(ipnut.name) == undefined ? this.removePortNumber(this.nniIdSelected.id) : this.removePortNumber(this.nniMap.get(ipnut.name).id);
+ }
if (ipnut.name === 'name') {
this.service.name = ipnut.value == undefined ? ipnut.defaultValue : ipnut.value;
}
})
this.mdonsCloseCreate.emit({ service: this.service });
}
- }
+ }
+
+ removePortNumber(portNum){
+ return portNum.split('(')[0].toString().trim()
+ }
markFormTouched(group: FormGroup | FormArray) {
Object.keys(group.controls).forEach((key: string) => {
diff --git a/usecaseui-portal/src/app/views/services/services-list/mdons-detail/mdons-detail.component.html b/usecaseui-portal/src/app/views/services/services-list/mdons-detail/mdons-detail.component.html
index dd622985..e90d53bf 100644
--- a/usecaseui-portal/src/app/views/services/services-list/mdons-detail/mdons-detail.component.html
+++ b/usecaseui-portal/src/app/views/services/services-list/mdons-detail/mdons-detail.component.html
@@ -6,7 +6,7 @@
<button class="back" nz-button (click)="goback()"></button>
</div>
</div>
- <div class="detaildata fl">
+ <div class="detaildata fl" style="width: 100%;">
<div class="baseparms clearfix">
<div class="vnf-box">
<h3> {{"i18nTextDefine_Base" | translate}} </h3>
@@ -33,12 +33,29 @@
</div>
</div>
-<!-- chart -->
-<div class="chart fr">
- <div id="createChart">
- <svg width="100%" height="100%">
- </svg>
+<div class="detaildata fl" style="width: 100%;">
+ <div class="baseparms clearfix">
+ <div class="vnf-box">
+ <h3>{{"i18nTextDefine_domainService" | translate}}</h3>
+ <ul class="clearfix">
+ <li *ngFor="let item of domainService;">
+ <h3>{{item.domainServiceRealtedTo}}</h3>
+ <div *ngIf="item.domainServiceRealtedTo == 'Domain Service Instance'">
+ <span title="Domain ServiceId">Domain ServiceId:</span>
+ <span class="input-content">{{item.domainServiceId}}</span>
+ </div>
+ <div *ngIf="item.domainServiceRealtedTo == 'Domain Service Instance'">
+ <span title="Domain Service Name">Domain Service Name:</span>
+ <span class="input-content">{{item.domainServiceName}}</span>
+ </div>
+ <div *ngIf="item.domainServiceRealtedTo == 'Logical Link'">
+ <span title="Logical Link Name">Logical Link Name:</span>
+ <span class="input-content">{{item.logicalLinkName}}</span>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
</div>
-</div>
-</div> \ No newline at end of file
+</div>
diff --git a/usecaseui-portal/src/app/views/services/services-list/mdons-detail/mdons-detail.component.ts b/usecaseui-portal/src/app/views/services/services-list/mdons-detail/mdons-detail.component.ts
index 3818eb91..47b6a34b 100644
--- a/usecaseui-portal/src/app/views/services/services-list/mdons-detail/mdons-detail.component.ts
+++ b/usecaseui-portal/src/app/views/services/services-list/mdons-detail/mdons-detail.component.ts
@@ -17,6 +17,7 @@ export class MdonsDetailComponent implements OnInit {
serviceType: any;
input_parameters: any;
e2e_requestInputs: any;
+ domainService =[];
service = {
name: "",
@@ -43,7 +44,7 @@ export class MdonsDetailComponent implements OnInit {
this.serviceInstanceName = this.detailParams['serviceDomain'] || this.detailParams["nsName"];
this.input_parameters = JSON.parse(this.detailParams['input-parameters']);
-
+ this.domainService = this.detailParams["childServiceInstances"];
this.service = {
name: this.input_parameters.service.name,
description: this.input_parameters.service.description,
@@ -53,7 +54,7 @@ export class MdonsDetailComponent implements OnInit {
}
if (this.e2e_requestInputs != undefined) {
for (let item of this.e2e_requestInputs) {
- if ((item.includes("enni_id") || item.includes("uni_id"))) {
+ if (item.includes("_id")) {
let nsIndex = {
"name": "ns",
"type": "ns",
diff --git a/usecaseui-portal/src/app/views/services/services-list/services-list.component.html b/usecaseui-portal/src/app/views/services/services-list/services-list.component.html
index 206ce2d6..99c137e9 100644
--- a/usecaseui-portal/src/app/views/services/services-list/services-list.component.html
+++ b/usecaseui-portal/src/app/views/services/services-list/services-list.component.html
@@ -197,100 +197,6 @@
<app-notification #notification [isServicesList]="true" [customerSelected]="customerSelected"></app-notification>
<!-- add notification-->
-
- <ng-template #templateCreatestarting>
- <div class="ant-notification-notice-content">
- <div class="ant-notification-notice-with-icon">
- <span class="ant-notification-notice-icon">
- <img src="assets/images/execute-inproess.png" alt="instance temination is starting">
- </span>
- <div class="ant-notification-notice-message"
- *ngIf="thisCreateService['serviceDomain'] === 'CCVPN' || thisService['serviceDomain'] === 'SOTN' || thisService['serviceDomain'] === 'MDONS'">
- {{ thisService['serviceDomain'] }} &nbsp; {{"i18nTextDefine_InstanceCreationStarting" |
- translate}}
- </div>
- <div class="ant-notification-notice-message"
- *ngIf="createData['commonParams']['templateType'] == 'E2E Service'">E2E &nbsp;
- {{"i18nTextDefine_InstanceCreationStarting" | translate}}
- </div>
- <div class="ant-notification-notice-message"
- *ngIf="createData['commonParams']['templateType'] == 'Network Service'">NS &nbsp;
- {{"i18nTextDefine_InstanceCreationStarting" | translate}}
- </div>
- <div class="ant-notification-notice-description">
- <div class="notificationlist">
- <p> {{"i18nTextDefine_InstanceName" | translate}} :</p>
- <span>{{ thisCreateService["service-instance-name"] }}
- </span>
- </div>
- <div class="notificationlist">
- <p> {{"i18nTextDefine_Customer" | translate}} :</p>
- <span>{{ createData['commonParams']['customer'].name }}</span>
- </div>
- <div class="notificationlist">
- <p> {{"i18nTextDefine_UseCase" | translate}} :</p>
- <span>{{ createData['commonParams']['templateType'] }}</span>
- </div>
- </div>
- <div class="close-icons">{{"i18nTextDefine_Close" | translate}}</div>
- </div>
- </div>
- </ng-template>
- <ng-template #templateCreateSuccessFaild>
- <div class="ant-notification-notice-content">
- <div class="ant-notification-notice-with-icon">
- <span class="ant-notification-notice-icon">
- <img src="assets/images/execute-success.png" alt="instance temination is starting"
- *ngIf="thisCreateService.status == 'Successful'">
- <img src="assets/images/execute-faild.png" alt="instance temination is starting"
- *ngIf="thisCreateService.status == 'Failed'">
- </span>
- <div class="ant-notification-notice-message"
- *ngIf="(thisCreateService['serviceDomain'] == 'CCVPN' || thisCreateService['serviceDomain'] == 'SOTN' || thisCreateService['serviceDomain'] == 'MDONS') && thisCreateService.status == 'Successful'">
- {{ thisCreateService['serviceDomain'] }} &nbsp; {{"i18nTextDefine_InstanceCreatedSuccessfully" |
- translate}}
- </div>
- <div class="ant-notification-notice-message"
- *ngIf="(createData['commonParams']['templateType'] == 'E2E Service') && thisCreateService.status == 'Successful'">
- E2E &nbsp; {{"i18nTextDefine_InstanceCreatedSuccessfully" | translate}}
- </div>
- <div class="ant-notification-notice-message"
- *ngIf="(createData['commonParams']['templateType'] == 'Network Service') && thisCreateService.status == 'Successful'">
- NS &nbsp; {{"i18nTextDefine_InstanceCreatedSuccessfully" | translate}}
- </div>
- <div class="ant-notification-notice-message"
- *ngIf="(thisCreateService['serviceDomain'] == 'CCVPN' || thisCreateService['serviceDomain'] == 'SOTN' || thisCreateService['serviceDomain'] == 'MDONS') && thisCreateService.status == 'Failed'">
- {{ thisCreateService['serviceDomain'] }} &nbsp; {{"i18nTextDefine_InstanceCreationFailed" |
- translate}}
- </div>
- <div class="ant-notification-notice-message"
- *ngIf="(createData['commonParams']['templateType'] == 'E2E Service') && thisCreateService.status == 'Failed'">
- E2E &nbsp; {{"i18nTextDefine_InstanceCreationFailed" | translate}}
- </div>
- <div class="ant-notification-notice-message"
- *ngIf="(createData['commonParams']['templateType'] == 'Network Service') && thisCreateService.status == 'Failed'">
- NS &nbsp; {{"i18nTextDefine_InstanceCreationFailed" | translate}}
- </div>
- <div class="ant-notification-notice-description">
- <div class="notificationlist">
- <p> {{"i18nTextDefine_InstanceName" | translate}} :</p>
- <span>{{ thisCreateService["service-instance-name"] ||
- thisCreateService["nsInstanceName"] }}
- </span>
- </div>
- <div class="notificationlist">
- <p> {{"i18nTextDefine_Customer" | translate}} :</p>
- <span>{{ createData['commonParams']['customer'].name }}</span>
- </div>
- <div class="notificationlist">
- <p> {{"i18nTextDefine_UseCase" | translate}} :</p>
- <span>{{ thisCreateService["serviceDomain"] }}</span>
- </div>
- </div>
- <div class="close-icons">{{"i18nTextDefine_Close" | translate}}</div>
- </div>
- </div>
- </ng-template>
<ng-template #templateDeleteSuccessFaild>
<div class="ant-notification-notice-content">
<div class="ant-notification-notice-with-icon">
@@ -526,18 +432,18 @@
</div>
<div class="createComponent" *ngIf="createshow">
<app-ccvpn-creation [createParams]="createData" [ccvpn_temParametersContent]="ccvpn_temParametersContent"
- (closeCreate)="closeCreate($event,templateCreatestarting,templateCreateSuccessFaild)">
+ (closeCreate)="closeCreate($event)">
</app-ccvpn-creation>
</div>
<div class="createComponent" *ngIf="createshow2">
<app-e2e-creation [createParams]="createData" [e2e_ns_temParametersContent]="e2e_ns_temParametersContent"
- (nsCloseCreate)="nsCloseCreate($event,templateCreatestarting,templateCreateSuccessFaild)"
- (e2eCloseCreate)="e2eCloseCreate($event,templateCreatestarting,templateCreateSuccessFaild)">
+ (nsCloseCreate)="nsCloseCreate($event)"
+ (e2eCloseCreate)="e2eCloseCreate($event)">
</app-e2e-creation>
</div>
<div class="createComponent" *ngIf="showCreateMDONS">
<app-mdons-creation [createParams]="createData" [mdons_temParametersContent]="mdons_temParametersContent"
- (mdonsCloseCreate)="mdonsCloseCreate($event,templateCreatestarting,templateCreateSuccessFaild)">
+ (mdonsCloseCreate)="mdonsCloseCreate($event)">
</app-mdons-creation>
</div>
<!--</div>-->
diff --git a/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts b/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts
index 88d99b3a..8b0f5ca1 100644
--- a/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts
+++ b/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts
@@ -240,7 +240,41 @@ export class ServicesListComponent implements OnInit {
return vnfInfo;
})
}
- } else {
+ } else if(item["serviceDomain"] === "MDONS") {
+ if (item["relationship-list"] && item["relationship-list"]["relationship"]) {
+ let domainServiceList = [];
+
+ for(let i = 0; i < item["relationship-list"]["relationship"].length; i++){
+ let domainServiceInfo = {
+ domainServiceRealtedTo:"",
+ domainServiceId:"",
+ domainServiceName:"",
+ logicalLinkName:""
+ }
+
+ if(item["relationship-list"]["relationship"][i]["related-to"] === 'service-instance') {
+ domainServiceInfo.domainServiceRealtedTo = "Domain Service Instance";
+ domainServiceInfo.domainServiceName = item["relationship-list"]["relationship"][i]["related-to-property"][0]["property-value"];
+ } else if(item["relationship-list"]["relationship"][i]["related-to"] === 'logical-link'){
+ domainServiceInfo.domainServiceRealtedTo = "Logical Link";
+ }
+ let relationshipdata = item["relationship-list"]["relationship"][i]["relationship-data"];
+ for (let j=0;j< relationshipdata.length;j++ ) {
+ if(relationshipdata[j]["relationship-key"] === "service-instance.service-instance-id"){
+ domainServiceInfo.domainServiceId = relationshipdata[j]["relationship-value"];
+ }
+ if(relationshipdata[j]["relationship-key"] === "logical-link.link-name"){
+ domainServiceInfo.logicalLinkName = relationshipdata[j]["relationship-value"];
+ }
+ }
+
+ domainServiceList.splice(i,0,domainServiceInfo);
+ }
+ item["childServiceInstances"]= domainServiceList;
+ } else {
+ item["childServiceInstances"] = [];
+ }
+ } else{
item["childServiceInstances"] = [];
}
@@ -330,41 +364,46 @@ export class ServicesListComponent implements OnInit {
}
}
return item;
- })
+ });
+ this.serviceNunber.map(item=>{
+ item["Success"] = 0;
+ item["failed"] = 0;
+ item["InProgress"] = 0;
+ });
this.tableData.forEach(item => {
if (item.serviceDomain === 'E2E Service') {
- if (item.operationResult === 2001) {
+ if (Number(item.operationResult) === 2001) {
this.serviceNunber[0]["Success"] += 1;
- } else if (item.operationResult === 2002) {
+ } else if (Number(item.operationResult) === 2002) {
this.serviceNunber[0]["failed"] += 1;
- } else if (item.operationResult === 2003) {
+ } else if (Number(item.operationResult) === 2003) {
this.serviceNunber[0]["InProgress"] += 1;
}
}
else if (item.serviceDomain === 'Network Service') {
- if (item.operationResult === 2001) {
+ if (Number(item.operationResult) === 2001) {
this.serviceNunber[1]["Success"] += 1;
- } else if (item.operationResult === 2002) {
+ } else if (Number(item.operationResult) === 2002) {
this.serviceNunber[1]["failed"] += 1;
- } else if (item.operationResult === 2003) {
+ } else if (Number(item.operationResult) === 2003) {
this.serviceNunber[1]["InProgress"] += 1;
}
}
else if (item.serviceDomain === 'CCVPN') {
- if (item.operationResult === 2001) {
+ if (Number(item.operationResult) === 2001) {
this.serviceNunber[2]["Success"] += 1;
- } else if (item.operationResult === 2002) {
+ } else if (Number(item.operationResult) === 2002) {
this.serviceNunber[2]["failed"] += 1;
- } else if (item.operationResult === 2003) {
+ } else if (Number(item.operationResult) === 2003) {
this.serviceNunber[2]["InProgress"] += 1;
}
}
else if (item.serviceDomain === 'MDONS') {
- if (item.operationResult === "2001") {
+ if (Number(item.operationResult) === 2001) {
this.serviceNunber[3]["Success"] += 1;
- } else if (item.operationResult === "2002") {
+ } else if (Number(item.operationResult) === 2002) {
this.serviceNunber[3]["failed"] += 1;
- } else if (item.operationResult === "2003") {
+ } else if (Number(item.operationResult) === 2003) {
this.serviceNunber[3]["InProgress"] += 1;
}
}
@@ -479,13 +518,15 @@ export class ServicesListComponent implements OnInit {
service["customer"] = this.customerSelected;
service["serviceType"] = this.serviceTypeSelected;
- service.childServiceInstances.forEach((item) => {
- if (item.serviceDomain === "SITE") {
- service.siteSer.push(item);
- } else if (item.serviceDomain === "SDWAN") {
- service.sdwanSer.push(item);
- }
- })
+ if(service.childServiceInstances !== undefined){
+ service.childServiceInstances.forEach((item) => {
+ if (item.serviceDomain === "SITE") {
+ service.siteSer.push(item);
+ } else if (item.serviceDomain === "SDWAN") {
+ service.sdwanSer.push(item);
+ }
+ })
+ }
if (service["serviceDomain"] === 'CCVPN' || service["serviceDomain"] === 'SOTN') {
this.detailCCVPNShow = true;
if (typeNum === 1) {
@@ -518,9 +559,9 @@ export class ServicesListComponent implements OnInit {
if (this.thisService["serviceDomain"] === "Network Service") {
this.deleteNsService(obj, this.thisService);
} else {
- this.deleteService(this.thisService, templateDeleteSuccessFaild);
+ this.deleteService(this.thisService);
}
- this.notification1.notificationStart(this.thisService['serviceDomain'], 'deleteStarting', this.thisService["service-instance-name"] || this.thisService["nsInstanceName"])
+ this.notification1.notificationStart(this.thisService['serviceDomain'], 'InstanceTeminationStarting', this.thisService["service-instance-name"] || this.thisService["nsInstanceName"])
}
deleteSuccessNotification(template: TemplateRef<{}>): void {
@@ -537,14 +578,20 @@ export class ServicesListComponent implements OnInit {
//ccvpn sotn createservice
parentServiceInstanceId = "";
- thisCreateService = {};
-
- closeCreate(obj, templateCreatestarting, templateCreateSuccessFaild) {
+ closeCreate(obj) {
if (!obj) {
this.createshow = false; //close
this.listDisplay = false; //close
return false;
}
+ this.pageIndex = 1;
+ this.customerList.map(item=>{
+ if(item.id === obj.service.globalSubscriberId){
+ this.customerSelected = Object.assign({},item)
+ }
+ });
+ this.serviceTypeSelected = { name: obj.service.serviceType };
+ this.getTableData();
this.createshow = false;
this.listDisplay = false;
this.loadingAnimateShow = true;
@@ -553,7 +600,7 @@ export class ServicesListComponent implements OnInit {
let createParams = "?customerId=" + this.createData['commonParams'].customer.id +
"&serviceType=" + this.createData['commonParams'].serviceType.name +
"&serviceDomain=" + this.createData['commonParams'].templateType;
- this.createService(obj, createParams, templateCreatestarting, templateCreateSuccessFaild).then((data) => {
+ this.createService(obj, createParams).then((data) => {
this.loadingAnimateShow = false;
newData = { //Newly created service data in the main form
'service-instance-id': data["serviceId"],
@@ -565,9 +612,8 @@ export class ServicesListComponent implements OnInit {
statusClass: 1001,
tips: ""
};
- this.thisCreateService = newData;
this.tableData = [newData, ...this.tableData];
- this.createNotification(templateCreatestarting);
+ this.notification1.notificationStart(newData['serviceDomain'], 'InstanceCreationStarting', newData["service-instance-name"] || newData["nsInstanceName"]);
let updata = (prodata) => {
newData.rate = prodata.progress;
newData.tips = this.listSortMasters["operationTypes"].find((its) => {
@@ -584,10 +630,9 @@ export class ServicesListComponent implements OnInit {
let queryParams = { serviceId: data["serviceId"], operationId: data["operationId"], operationType: "1001" };
return this.queryProgress(queryParams, updata);
}).then((data) => {
-
newData.rate = 100;
newData.status = "Successful";
- this.createSuccessNotification(templateCreateSuccessFaild);
+ this.notification1.notificationSuccess(newData.serviceDomain, 'InstanceCreatedSuccessfully', newData["service-instance-name"] || newData["nsInstanceName"]);
newData.tips = this.listSortMasters["operationTypes"].find((its) => {
return its["sortCode"] == newData["statusClass"] && its["language"] == this.language
})["sortValue"] + '\xa0\xa0\xa0' + this.listSortMasters["operationResults"].find((its) => {
@@ -604,12 +649,20 @@ export class ServicesListComponent implements OnInit {
})
}
- mdonsCloseCreate(obj, templateCreatestarting, templateCreateSuccessFaild) {
+ mdonsCloseCreate(obj) {
if (!obj) {
this.showCreateMDONS = false; //
this.listDisplay = false; //
return false;
}
+ this.pageIndex = 1;
+ this.customerList.map(item=>{
+ if(item.id === obj.service.globalSubscriberId){
+ this.customerSelected = Object.assign({},item)
+ }
+ });
+ this.serviceTypeSelected = { name: obj.service.serviceType };
+ this.getTableData();
this.showCreateMDONS = false; //
this.listDisplay = false; //
this.loadingAnimateShow = true;
@@ -620,7 +673,7 @@ export class ServicesListComponent implements OnInit {
"&parentServiceInstanceId=" +
"&uuid=" + obj.service.serviceUuid +
"&invariantUuuid=" + obj.service.serviceInvariantUuid;
- this.createService(obj, createParams, templateCreatestarting, templateCreateSuccessFaild).then((data) => {
+ this.createService(obj, createParams).then((data) => {
this.loadingAnimateShow = false;
newData = {
'service-instance-id': data["serviceId"],
@@ -635,15 +688,12 @@ export class ServicesListComponent implements OnInit {
if (data == "FAILED") {
newData.status = "Failed";
newData.tips = "Unavailable";
- this.thisCreateService = newData;
this.tableData = [newData, ...this.tableData];
- this.createNotification(templateCreateSuccessFaild);
+ this.notification1.notificationFailed(newData.serviceDomain, 'InstanceCreationFailed', newData["service-instance-name"] || newData["nsInstanceName"]);
return false;
}
-
- this.thisCreateService = newData;
this.tableData = [newData, ...this.tableData];
- this.createNotification(templateCreatestarting);
+ this.notification1.notificationStart(newData['serviceDomain'], 'InstanceCreationStarting', newData["service-instance-name"] || newData["nsInstanceName"]);
let updata = (prodata) => {
newData.rate = prodata.progress;
newData.tips = this.listSortMasters["operationTypes"].find((its) => {
@@ -665,7 +715,7 @@ export class ServicesListComponent implements OnInit {
}
newData.rate = 100;
newData.status = "Successful";
- this.createSuccessNotification(templateCreateSuccessFaild);
+ this.notification1.notificationSuccess(newData.serviceDomain, 'InstanceCreatedSuccessfully', newData["service-instance-name"] || newData["nsInstanceName"]);
newData.tips = this.listSortMasters["operationTypes"].find((its) => {
return its["sortCode"] == newData["statusClass"] && its["language"] == this.language
})["sortValue"] + '\xa0\xa0\xa0' + this.listSortMasters["operationResults"].find((its) => {
@@ -683,12 +733,20 @@ export class ServicesListComponent implements OnInit {
}
- e2eCloseCreate(obj, templateCreatestarting, templateCreateSuccessFaild) {
+ e2eCloseCreate(obj) {
if (!obj) {
this.createshow2 = false; //
this.listDisplay = false; //
return false;
}
+ this.pageIndex = 1;
+ this.customerList.map(item=>{
+ if(item.id === obj.service.globalSubscriberId){
+ this.customerSelected = Object.assign({},item)
+ }
+ });
+ this.serviceTypeSelected = { name: obj.service.serviceType };
+ this.getTableData();
this.createshow2 = false; //
this.listDisplay = false; //
this.loadingAnimateShow = true;
@@ -699,7 +757,7 @@ export class ServicesListComponent implements OnInit {
"&parentServiceInstanceId=" +
"&uuid=" + obj.service.serviceUuid +
"&invariantUuuid=" + obj.service.serviceInvariantUuid;
- this.createService(obj, createParams, templateCreatestarting, templateCreateSuccessFaild).then((data) => {
+ this.createService(obj, createParams).then((data) => {
this.loadingAnimateShow = false;
newData = { //
'service-instance-id': data["serviceId"],
@@ -710,10 +768,15 @@ export class ServicesListComponent implements OnInit {
statusClass: 1001,
rate: 0,
tips: ""
- }
- this.thisCreateService = newData;
+ };
this.tableData = [newData, ...this.tableData];
- this.createNotification(templateCreatestarting);
+ this.notification1.notificationStart(newData['serviceDomain'], 'InstanceCreationStarting', newData["service-instance-name"] || newData["nsInstanceName"]);
+ // if (data.status === "FAILED") {
+ // newData.status = "Failed";
+ // this.notification1.notificationFailed(newData.serviceDomain, 'InstanceCreationFailed', newData["service-instance-name"] || newData["nsInstanceName"]);
+ // this.getTableData();
+ // return false;
+ // }
let updata = (prodata) => {
newData.rate = prodata.progress;
newData.tips = this.listSortMasters["operationTypes"].find((its) => {
@@ -732,7 +795,7 @@ export class ServicesListComponent implements OnInit {
}).then((data) => {
newData.rate = 100;
newData.status = "Successful";
- this.createSuccessNotification(templateCreateSuccessFaild);
+ this.notification1.notificationSuccess(newData.serviceDomain, 'InstanceCreatedSuccessfully', newData["service-instance-name"] || newData["nsInstanceName"]);
newData.tips = this.listSortMasters["operationTypes"].find((its) => {
return its["sortCode"] == newData["statusClass"] && its["language"] == this.language
})["sortValue"] + '\xa0\xa0\xa0' + this.listSortMasters["operationResults"].find((its) => {
@@ -750,12 +813,20 @@ export class ServicesListComponent implements OnInit {
}
- nsCloseCreate(obj, templateCreatestarting, templateCreateSuccessFaild) {
+ nsCloseCreate(obj) {
if (!obj) {
this.createshow2 = false; //
this.listDisplay = false; //
return false;
}
+ this.pageIndex = 1;
+ this.customerList.map(item=>{
+ if(item.id === obj.step1.context.globalCustomerId){
+ this.customerSelected = Object.assign({},item)
+ }
+ });
+ this.serviceTypeSelected = { name: obj.step1.context.serviceType };
+ this.getTableData();
this.createshow2 = false; //
this.listDisplay = false; //
this.loadingAnimateShow = true;
@@ -774,12 +845,12 @@ export class ServicesListComponent implements OnInit {
rate: 0,
tips: ""
}
- this.thisCreateService = newData;
this.tableData = [newData, ...this.tableData];
- this.createNotification(templateCreatestarting);
- if (data.status == "FAILED") {
+ this.notification1.notificationStart(newData['serviceDomain'], 'InstanceCreationStarting', newData["service-instance-name"] || newData["nsInstanceName"]);
+ if (data.status === "FAILED") {
newData.status = "Failed";
- this.createSuccessNotification(templateCreateSuccessFaild);
+ this.notification1.notificationFailed(newData.serviceDomain, 'InstanceCreationFailed', newData["service-instance-name"] || newData["nsInstanceName"]);
+ this.getTableData();
return false;
}
let createParams = "?ns_instance_id=" + data.nsInstanceId +
@@ -789,16 +860,15 @@ export class ServicesListComponent implements OnInit {
"&parentServiceInstanceId=";
// step2
this.createNsService(createParams, obj.step2).then((jobid) => {
- if (jobid == "Failed") {
+ if (jobid === "Failed") {
newData.status = "Failed";
- this.thisCreateService = newData;
- this.createSuccessNotification(templateCreateSuccessFaild);
newData.tips = this.listSortMasters["operationTypes"].find((its) => {
return its["sortCode"] == newData["statusClass"] && its["language"] == this.language
})["sortValue"] + '\xa0\xa0\xa0' + this.listSortMasters["operationResults"].find((its) => {
return its["sortCode"] == 2002 && its["language"] == this.language
})["sortValue"];
- return false;
+ this.notification1.notificationFailed(newData.serviceDomain, 'InstanceCreationFailed', newData["service-instance-name"] || newData["nsInstanceName"]);
+ return ;
}
let operationType = "1001";
let updata = (prodata) => {
@@ -815,30 +885,29 @@ export class ServicesListComponent implements OnInit {
}
}
- return this.queryNsProgress(jobid, newData["service-instance-id"], updata, operationType);
- }).then((data) => {
- newData.rate = 100;
- newData.status = "Successful";
- this.thisCreateService = newData;
- this.createSuccessNotification(templateCreateSuccessFaild);
- newData.tips = this.listSortMasters["operationTypes"].find((its) => {
- return its["sortCode"] == newData["statusClass"] && its["language"] == this.language
- })["sortValue"] + '\xa0\xa0\xa0' + this.listSortMasters["operationResults"].find((its) => {
- return its["sortCode"] == 2001 && its["language"] == this.language
- })["sortValue"];
- let hasUndone = this.tableData.some((item) => {
- return item.rate < 100;
+ this.queryNsProgress(jobid, newData["service-instance-id"], updata, operationType).then((data) => {
+ newData.rate = 100;
+ newData.status = "Successful";
+ this.notification1.notificationSuccess(newData.serviceDomain, 'InstanceCreatedSuccessfully', newData["service-instance-name"] || newData["nsInstanceName"]);
+ newData.tips = this.listSortMasters["operationTypes"].find((its) => {
+ return its["sortCode"] == newData["statusClass"] && its["language"] == this.language
+ })["sortValue"] + '\xa0\xa0\xa0' + this.listSortMasters["operationResults"].find((its) => {
+ return its["sortCode"] == 2001 && its["language"] == this.language
+ })["sortValue"];
+ let hasUndone = this.tableData.some((item) => {
+ return item.rate < 100;
+ })
+ if (!hasUndone) {
+ setTimeout(() => {
+ this.getTableData();
+ }, 1000)
+ }
})
- if (!hasUndone) {
- setTimeout(() => {
- this.getTableData();
- }, 1000)
- }
})
})
}
- createService(requestBody, createParams, templateCreatestarting, templateCreateSuccessFaild) {
+ createService(requestBody, createParams) {
let mypromise = new Promise((res, rej) => {
this.myhttp.createInstance(requestBody, createParams)
.subscribe((data) => {
@@ -1027,7 +1096,7 @@ export class ServicesListComponent implements OnInit {
})
}
- deleteService(service: any, templateDeleteSuccessFaild) {
+ deleteService(service: any) {
let allprogress = {};
let querypros = [];
service.rate = 0;
@@ -1052,6 +1121,7 @@ export class ServicesListComponent implements OnInit {
})["sortValue"] + '\xa0\xa0\xa0' + this.listSortMasters["operationResults"].find((its) => {
return its["sortCode"] == 2002 && its["language"] == this.language
})["sortValue"];
+ this.notification1.notificationFailed(service.serviceDomain, 'InstanceTeminationFailed', service["service-instance-name"] || service["nsInstanceName"])
return false;
}
let obj = {
@@ -1089,7 +1159,7 @@ export class ServicesListComponent implements OnInit {
})["sortValue"] + this.listSortMasters["operationResults"].find((its) => {
return its["sortCode"] == 2001 && its["language"] == this.language
})["sortValue"];
- this.deleteSuccessNotification(templateDeleteSuccessFaild);
+ this.notification1.notificationSuccess(service.serviceDomain, 'InstanceTeminatedSuccessfully', service["service-instance-name"] || service["nsInstanceName"])
let hasUndone = this.tableData.some((item) => {
return item.rate < 100;
})
@@ -1112,7 +1182,7 @@ export class ServicesListComponent implements OnInit {
this.stopNsService(id, obj).then((jobid) => {
if (jobid === "Failed") {
service.status = "Failed";
- this.notification1.notificationFailed(service.serviceDomain, 'deleteStarting', service["service-instance-name"] || service["nsInstanceName"])
+ this.notification1.notificationFailed(service.serviceDomain, 'InstanceTeminationFailed', service["service-instance-name"] || service["nsInstanceName"])
service.tips = this.listSortMasters["operationTypes"].find((its) => {
return its["sortCode"] == service.statusClass && its["language"] == this.language
})["sortValue"] + this.listSortMasters["operationResults"].find((its) => {
@@ -1141,7 +1211,7 @@ export class ServicesListComponent implements OnInit {
})["sortValue"] + this.listSortMasters["operationResults"].find((its) => {
return its["sortCode"] == 2001 && its["language"] == this.language
})["sortValue"];
- this.notification1.notificationSuccess(service.serviceDomain, 'deleteStarting', service["service-instance-name"] || service["nsInstanceName"])
+ this.notification1.notificationSuccess(service.serviceDomain, 'InstanceTeminatedSuccessfully', service["service-instance-name"] || service["nsInstanceName"])
} else {
service.status = "Failed";
service.tips = this.listSortMasters["operationTypes"].find((its) => {
@@ -1149,7 +1219,7 @@ export class ServicesListComponent implements OnInit {
})["sortValue"] + this.listSortMasters["operationResults"].find((its) => {
return its["sortCode"] == 2002 && its["language"] == this.language
})["sortValue"];
- this.notification1.notificationFailed(service.serviceDomain, 'deleteStarting', service["service-instance-name"] || service["nsInstanceName"])
+ this.notification1.notificationFailed(service.serviceDomain, 'InstanceTeminationFailed', service["service-instance-name"] || service["nsInstanceName"])
return false;
}
let hasUndone = this.tableData.some((item) => {