diff options
4 files changed, 83 insertions, 11 deletions
diff --git a/usecaseui-portal/src/app/core/services/slicingTaskServices.ts b/usecaseui-portal/src/app/core/services/slicingTaskServices.ts index b11eeba5..3380d832 100644 --- a/usecaseui-portal/src/app/core/services/slicingTaskServices.ts +++ b/usecaseui-portal/src/app/core/services/slicingTaskServices.ts @@ -158,6 +158,11 @@ export class SlicingTaskServices { }
return this.http.get<any>(url);
}
+ //get slicingNssiDetail
+ getSlicingNssiDetail(nssiId: string){
+ let url = this.url.slicingNssiDetail.replace("{nssiId}",nssiId);
+ return this.http.get<any>(url);
+ }
}
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-model/nssi-model.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-model/nssi-model.component.html index b661e26f..6be39ea0 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-model/nssi-model.component.html +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-model/nssi-model.component.html @@ -1,3 +1,31 @@ -<p> - nssi-model works! -</p> +<nz-list class="taskmodel_list" nzBordered [nzHeader]="'Carry Slicing Nsi List £º'" [nzFooter]="null"> + <nz-table + #nssiTable + [nzData]="nsiList" + [nzShowPagination]="false" + nzHideOnSinglePage + > + <thead> + <tr> + <th>Service Instance Id</th> + <th>Service Instance Name</th> + <th>Service Type</th> + <th>Status</th> + <th width="100px">Detail</th> + </tr> + </thead> + <tbody> + <ng-template ngFor let-data [ngForOf]="nssiTable.data" let-i="index"> + <tr> + <td>{{ data.service_instance_id }}</td> + <td>{{ data.service_instance_name }}</td> + <td>{{ data.service_type }}</td> + <td>{{ data.orchestration_status }}</td> + <td> + <a (click)="showSingleNsiDetail(data)">detail</a> + </td> + </tr> + </ng-template> + </tbody> + </nz-table> +</nz-list>
\ No newline at end of file diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-model/nssi-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-model/nssi-model.component.ts index 11da9087..52e0f23d 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-model/nssi-model.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-model/nssi-model.component.ts @@ -1,5 +1,7 @@ -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 { NsiModelComponent } from '../../nsi-management/nsi-model/nsi-model.component'; @Component({ selector: 'app-nssi-model', templateUrl: './nssi-model.component.html', @@ -7,9 +9,34 @@ import { Component, OnInit } from '@angular/core'; }) export class NssiModelComponent implements OnInit { - constructor() { } - + constructor( + private myhttp: SlicingTaskServices, + private modalService: NzModalService + ) { + } + @Input() nssiId; + nsiList: any[]; ngOnInit() { + this.getNssiDetail() } - + getNssiDetail(){ + this.myhttp.getSlicingNssiDetail(this.nssiId).subscribe(res => { + const {result_header: {result_code}, result_body: {hosted_nsi_list} } = res; + if (+result_code === 200) { + this.nsiList = hosted_nsi_list; + } + }) + } + showSingleNsiDetail(data){ + this.modalService.create({ + nzContent:NsiModelComponent, + nzTitle:"Detail", + nzWidth:"70%", + nzOkText: null, + nzCancelText: null, + nzComponentParams:{ + nsiId:data.service_instance_id + } + }); + } } diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts index 00e5c5c9..034b9a5e 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts @@ -1,6 +1,8 @@ import { Component, OnInit } from '@angular/core'; import {BUSINESS_STATUS} from '../../../../../../../constants/constants'; import {SlicingTaskServices} from "../../../../../../core/services/slicingTaskServices"; +import { NzModalService } from 'ng-zorro-antd'; +import {NssiModelComponent} from "../nssi-model/nssi-model.component"; @Component({ selector: 'app-nssi-table', templateUrl: './nssi-table.component.html', @@ -9,7 +11,8 @@ import {SlicingTaskServices} from "../../../../../../core/services/slicingTaskSe export class NssiTableComponent implements OnInit { constructor( - private myhttp: SlicingTaskServices + private myhttp: SlicingTaskServices, + private modalService: NzModalService ) { } @@ -53,7 +56,16 @@ export class NssiTableComponent implements OnInit { searchData(reset: boolean = false) { this.getNssiList(); } - showdetail(data){ - + showdetail(data) { + const nssiModal = this.modalService.create({ + nzTitle:"Detail", + nzContent: NssiModelComponent, + nzWidth:"70%", + nzOkText: null, + nzCancelText: null, + nzComponentParams:{ + nssiId:data.service_instance_id + } + }) } } |