diff options
author | Tao Shen <shentao@chinamobile.com> | 2019-12-09 03:46:17 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-12-09 03:46:17 +0000 |
commit | 0b0f8e4644bdfc110558d055ca2e01b878809b5c (patch) | |
tree | cf48b259fa13ea2759e80e6fd043045d042dbe4f /usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts | |
parent | 4abc9917d8d474b5bd3ba4f570e39e3e594de4b6 (diff) | |
parent | b821e657a2e05193c1d4ef014cb9a98a08ed2c15 (diff) |
Merge "feat:add detail model of slicing nsi page and add nssi detail model Base code"
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 + } + }); } } |