summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/services
diff options
context:
space:
mode:
authorroot <preethamshyam.sathiyaseelan@us.fujitsu.com>2020-04-27 09:44:02 +0000
committerPreetham Shyam <PreethamShyam.Sathiyaseelan@us.fujitsu.com>2020-04-28 07:08:46 +0000
commit263c5b346ab61103b8fe92f72e1ee62f3f9df833 (patch)
tree885324f8bfe0e5c4d35a5b4690470a8dabb8ab06 /usecaseui-portal/src/app/views/services
parent46c4844ebb561c9f879c8fe74ce4d8a688eef486 (diff)
Changes for MDONS usecase
Change-Id: I9c795fa2041c195ca29300398fb89b1cc3606ae7 Issue-ID: USECASEUI-371 Signed-off-by: root <preethamshyam.sathiyaseelan@us.fujitsu.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services')
-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
4 files changed, 83 insertions, 18 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"] = [];
}