From b821e657a2e05193c1d4ef014cb9a98a08ed2c15 Mon Sep 17 00:00:00 2001 From: cyuamber Date: Mon, 9 Dec 2019 10:51:11 +0800 Subject: feat:add detail model of slicing nsi page and add nssi detail model Base code Change-Id: I1636bc07415a8e6588bfa742333c684351082d62 Issue-ID: USECASEUI-369 Signed-off-by: cyuamber --- .../nsi-model/nsi-model.component.html | 68 ++++++++++++++++++++-- .../nsi-model/nsi-model.component.ts | 45 ++++++++++++-- 2 files changed, 104 insertions(+), 9 deletions(-) (limited to 'usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model') diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.html index a90a90d1..47bd9e59 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.html +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.html @@ -1,4 +1,64 @@ -

- nsi-model works! - -

+ + + + + Service Instance Id + Service Instance Name + Service Type + Status + Detail + + + + + + {{ data.service_instance_id }} + {{ data.service_instance_name }} + {{ data.service_type }} + {{ data.service_snssai }} + {{ data.orchestration_status }} + + detail + + + + + + + + + + + Service Instance Id + Service Instance Name + Service Type + Status + Detail + + + + + + {{ data.service_instance_id }} + {{ data.service_instance_name }} + {{ data.service_type }} + {{ data.environment_context }} + {{ data.orchestration_status }} + + detail + + + + + + \ No newline at end of file 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 + } + }); } } -- cgit 1.2.3-korg