From bc566b0599d6150d3a24f84ca2b80f956ece4e52 Mon Sep 17 00:00:00 2001 From: cyuamber Date: Fri, 6 Dec 2019 13:11:59 +0800 Subject: feat: add slicing nssi page basic business code Change-Id: I5d5034a7038b628db4fa94ec13ec6361b83839f9 Issue-ID: USECASEUI-369 Signed-off-by: cyuamber --- .../nsi-table/nsi-table.component.html | 6 +-- .../nsi-table/nsi-table.component.less | 6 --- .../nsi-table/nsi-table.component.ts | 4 +- .../nssi-management/nssi-management.component.html | 2 +- .../nssi-table/nssi-table.component.html | 51 +++++++++++++++++++ .../nssi-table/nssi-table.component.less | 3 ++ .../nssi-table/nssi-table.component.spec.ts | 25 +++++++++ .../nssi-table/nssi-table.component.ts | 59 ++++++++++++++++++++++ .../slicing-business-table.component.html | 2 +- 9 files changed, 144 insertions(+), 14 deletions(-) create mode 100644 usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.html create mode 100644 usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.less create mode 100644 usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.spec.ts create mode 100644 usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts (limited to 'usecaseui-portal/src/app/views') diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.html index 3196f8fe..f6291624 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.html +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.html @@ -8,9 +8,9 @@ -
+
- + {{ data.service_instance_id }} {{ data.service_instance_name }} diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.less b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.less index 66da35df..ad777025 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.less +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.less @@ -1,9 +1,3 @@ nz-select { width: 200px; } -.task_status{ - margin-bottom: 20px; - span{ - margin-right: 5%; - } -} \ No newline at end of file diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.ts index a1511b18..a88d1618 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.ts @@ -1,6 +1,5 @@ import { Component, OnInit } from '@angular/core'; import {BUSINESS_STATUS} from '../../../../../../../constants/constants'; -import { NzModalService } from 'ng-zorro-antd'; import {SlicingTaskServices} from "../../../../../../core/services/slicingTaskServices"; @Component({ selector: 'app-nsi-table', @@ -10,8 +9,7 @@ import {SlicingTaskServices} from "../../../../../../core/services/slicingTaskSe export class NsiTableComponent implements OnInit { constructor( - private myhttp: SlicingTaskServices, - private modalService: NzModalService + private myhttp: SlicingTaskServices ) { } diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-management.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-management.component.html index dde0abcc..1e81aa39 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-management.component.html +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-management.component.html @@ -1,3 +1,3 @@

- nssi-management works! +

diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.html new file mode 100644 index 00000000..c2408a81 --- /dev/null +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.html @@ -0,0 +1,51 @@ +
+
+
+ Status : + + + +
+
+
+ + + + Service Instance Id + Service Instance Name + Service Type + Context + 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/nssi-management/nssi-table/nssi-table.component.less b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.less new file mode 100644 index 00000000..3a7c3d0a --- /dev/null +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.less @@ -0,0 +1,3 @@ +nz-select { + width: 200px; +} \ No newline at end of file diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.spec.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.spec.ts new file mode 100644 index 00000000..b90e60ac --- /dev/null +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NssiTableComponent } from './nssi-table.component'; + +describe('NssiTableComponent', () => { + let component: NssiTableComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ NssiTableComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(NssiTableComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); 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 new file mode 100644 index 00000000..926350b9 --- /dev/null +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nssi-management/nssi-table/nssi-table.component.ts @@ -0,0 +1,59 @@ +import { Component, OnInit } from '@angular/core'; +import {BUSINESS_STATUS} from '../../../../../../../constants/constants'; +import {SlicingTaskServices} from "../../../../../../core/services/slicingTaskServices"; +@Component({ + selector: 'app-nssi-table', + templateUrl: './nssi-table.component.html', + styleUrls: ['./nssi-table.component.less'] +}) +export class NssiTableComponent implements OnInit { + + constructor( + private myhttp: SlicingTaskServices + ) { + } + + ngOnInit() { + this.getNssiList() + } + selectedValue:string = BUSINESS_STATUS[0]; + listOfData: any[] = []; + pageIndex: number = 1; + pageSize: number = 10; + total: number = 100; + loading = false; + isSelect: boolean = false; + statusOptions: any[] = BUSINESS_STATUS; + + getNssiList (): void{ + this.loading = true; + this.isSelect = false; + let paramsObj = { + pageNo: this.pageIndex, + pageSize: this.pageSize + }; + if(this.selectedValue !== BUSINESS_STATUS[0]){ + paramsObj["instanceStatus"] = this.selectedValue; + this.isSelect = true; + } + this.myhttp.getSlicingNssiList(paramsObj,this.isSelect).subscribe (res => { + const { result_header: { result_code }, result_body: { nssi_service_instances } } = res; + if (+result_code === 200) { + this.total = nssi_service_instances.length; + this.loading = false; + this.listOfData = nssi_service_instances; + } + }) + } + getListOfProcessingStatus(){ + this.pageIndex = 1; + this.pageSize = 10; + this.getNssiList(); + } + searchData(reset: boolean = false) { + this.getNssiList(); + } + showdetail(data){ + + } +} diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.html index a5ef19b7..80fcc763 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.html +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.html @@ -8,7 +8,7 @@
-
+