diff options
Diffstat (limited to 'usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts')
-rw-r--r-- | usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts index 1b8a6627..070a483f 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts @@ -1,6 +1,8 @@ -import { Component, OnInit } from '@angular/core'; +import {Component, Input, OnInit} from '@angular/core'; import {NzModalService} from "ng-zorro-antd"; +import {SlicingTaskServices} from '.././../../../../../core/services/slicingTaskServices'; import { SlicingBusinessModelComponent } from '../../slicing-business-management/slicing-business-model/slicing-business-model.component'; +import { NssiModelComponent } from '../../nssi-management/nssi-model/nssi-model.component'; @Component({ selector: 'app-nsi-model', templateUrl: './nsi-model.component.html', @@ -9,14 +11,47 @@ import { SlicingBusinessModelComponent } from '../../slicing-business-management export class NsiModelComponent implements OnInit { constructor( + private myhttp: SlicingTaskServices, private modalService: NzModalService ) { } - + @Input() nsiId; + businessList: any[]; + nssiList: any[]; ngOnInit() { + this.getNsiDetail() } - button(){ - this.modalService.create({nzContent:SlicingBusinessModelComponent}); - console.log(2222) + getNsiDetail() { + this.myhttp.getSlicingNsiDetail(this.nsiId).subscribe(res => { + const {result_header: {result_code}, result_body: {hosted_business_list,included_nssi_list} } = res; + if (+result_code === 200) { + this.businessList = hosted_business_list; + this.nssiList = included_nssi_list; + } + }) + } + showBusinessDetail(data){ + this.modalService.create({ + nzContent:SlicingBusinessModelComponent, + nzTitle:"Detail", + nzWidth:"70%", + nzOkText: null, + nzCancelText: null, + nzComponentParams:{ + businessId:data.service_instance_id + } + }); + } + showNssiDetail(data){ + this.modalService.create({ + nzContent:NssiModelComponent, + nzTitle:"Detail", + nzWidth:"70%", + nzOkText: null, + nzCancelText: null, + nzComponentParams:{ + nssiId:data.service_instance_id + } + }); } } |