summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal')
-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.ts36
-rw-r--r--usecaseui-portal/src/assets/i18n/cn.json3
-rw-r--r--usecaseui-portal/src/assets/i18n/en.json3
6 files changed, 87 insertions, 20 deletions
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.ts b/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts
index 88d99b3a..e6aa64fb 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"] = [];
}
diff --git a/usecaseui-portal/src/assets/i18n/cn.json b/usecaseui-portal/src/assets/i18n/cn.json
index fdee1adf..1239c786 100644
--- a/usecaseui-portal/src/assets/i18n/cn.json
+++ b/usecaseui-portal/src/assets/i18n/cn.json
@@ -88,7 +88,8 @@
"i18nTextDefine_InstanceUpdatedSuccessfully":"更新成功",
"i18nTextDefine_InstanceUpdateFailed":"更新失败",
"i18nTextDefine_Close":"关闭",
- "i18nTextDefine_Templateparsingfailed": "模板解析失败",
+ "i18nTextDefine_Templateparsingfailed": "模板解析失败"
+ "i18nTextDefine_domainService":"Domain Services",
"ccvpn-creation-component": "--:",
"i18nTextDefine_InstanceCreation": "实例创建",
diff --git a/usecaseui-portal/src/assets/i18n/en.json b/usecaseui-portal/src/assets/i18n/en.json
index 9a453e08..eac2f216 100644
--- a/usecaseui-portal/src/assets/i18n/en.json
+++ b/usecaseui-portal/src/assets/i18n/en.json
@@ -166,5 +166,6 @@
"i18nTextDefine_ResourceVersion": "Resource version",
"i18nTextDefine_NearEnd": "Near End",
"i18nTextDefine_FarEnd": "Far End",
- "i18nTextDefine_ExternalNetworkMessage":"Note: Both the endpoints would be changed to ENNI."
+ "i18nTextDefine_ExternalNetworkMessage":"Note: Both the endpoints would be changed to ENNI.",
+ "i18nTextDefine_domainService":"Domain Services"
}