From 817390e74ff1aefebc1d5ed5853d9d95ff283a99 Mon Sep 17 00:00:00 2001 From: cyuamber Date: Mon, 9 Dec 2019 16:02:57 +0800 Subject: feat:add slicing business tableList of monitor 5g page Change-Id: I28bf171c279dfb2e109f4a7a1b72cda4fbc6c959 Issue-ID: USECASEUI-370 Signed-off-by: cyuamber --- .../fcaps/monitor-5g/monitor-5g.component.html | 57 ++++++++++++++++++++-- .../fcaps/monitor-5g/monitor-5g.component.less | 4 ++ .../views/fcaps/monitor-5g/monitor-5g.component.ts | 49 +++++++++++++++++-- 3 files changed, 104 insertions(+), 6 deletions(-) (limited to 'usecaseui-portal') diff --git a/usecaseui-portal/src/app/views/fcaps/monitor-5g/monitor-5g.component.html b/usecaseui-portal/src/app/views/fcaps/monitor-5g/monitor-5g.component.html index 951eb5e7..74a88dc7 100644 --- a/usecaseui-portal/src/app/views/fcaps/monitor-5g/monitor-5g.component.html +++ b/usecaseui-portal/src/app/views/fcaps/monitor-5g/monitor-5g.component.html @@ -1,3 +1,54 @@ -

- monitor-5g works! -

+
+
+
+ +
+
+
+
+ + + + Service Instance Id + Service Instance Name + Service Type + S-NSSAI + Status + + + + + + {{ data.service_instance_id }} + {{ data.service_instance_name }} + {{ data.service_type }} + {{ data.service_snssai }} + + {{ data.orchestration_status }} + + + + + +
+
+
\ No newline at end of file diff --git a/usecaseui-portal/src/app/views/fcaps/monitor-5g/monitor-5g.component.less b/usecaseui-portal/src/app/views/fcaps/monitor-5g/monitor-5g.component.less index e69de29b..cad2aeaa 100644 --- a/usecaseui-portal/src/app/views/fcaps/monitor-5g/monitor-5g.component.less +++ b/usecaseui-portal/src/app/views/fcaps/monitor-5g/monitor-5g.component.less @@ -0,0 +1,4 @@ +.monitorDate{ + margin-left: 2%; + margin-top: 30px; +} \ No newline at end of file diff --git a/usecaseui-portal/src/app/views/fcaps/monitor-5g/monitor-5g.component.ts b/usecaseui-portal/src/app/views/fcaps/monitor-5g/monitor-5g.component.ts index 128f1ba4..ac7cc905 100644 --- a/usecaseui-portal/src/app/views/fcaps/monitor-5g/monitor-5g.component.ts +++ b/usecaseui-portal/src/app/views/fcaps/monitor-5g/monitor-5g.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; - +import {SlicingTaskServices} from '.././../../core/services/slicingTaskServices'; @Component({ selector: 'app-monitor-5g', templateUrl: './monitor-5g.component.html', @@ -7,9 +7,52 @@ import { Component, OnInit } from '@angular/core'; }) export class Monitor5gComponent implements OnInit { - constructor() { } - + constructor( + private myhttp: SlicingTaskServices + ) { + } + listOfData: any[] = []; + pageIndex: number = 1; + pageSize: number = 10; + total: number = 0; + loading = false; ngOnInit() { + this.getBusinessList() } + getBusinessList (): void{ + this.loading = true; + let paramsObj = { + pageNo: this.pageIndex, + pageSize: this.pageSize + }; + this.myhttp.getSlicingBusinessList(paramsObj,false).subscribe (res => { + const { result_header: { result_code }, result_body: { slicing_business_list,record_number } } = res; + if (+result_code === 200) { + this.total = record_number; + this.loading = false; + this.listOfData = [].concat(slicing_business_list) + } + }) + } + searchData(reset: boolean = false) { + this.getBusinessList(); + } + onDateChange(result: Date): void { + console.log('Selected Time: ', result); + } + + onDateOk(result: Date): void { + console.log('onOk', result); + } + getChartsData = (time = new Date().getTime()) => { + if (!this.listOfData.length) { + return false; + } + const service_list = []; + this.listOfData.forEach(item => { + service_list.push({service_id: item.service_instance_id}); + }); + } + } -- cgit 1.2.3-korg