summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-12-06 09:36:55 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-12-06 09:57:57 +0800
commit39aa34b0431e6dc2946b95ae40df5466a3c19d72 (patch)
treeab840886657601bc201323f280d2daaa37847296 /usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management
parente2e2bcf625b3fa8edffa3e7ed81452448f3912d8 (diff)
feat: add slicing nsi basic business code of nsi page
Change-Id: I85ceaad153cf4dd9b9c3d4e6db9d9ce4cf6af4bf Issue-ID: USECASEUI-369 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management')
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-management.component.html2
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.html45
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.less9
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.spec.ts25
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.ts53
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-management.component.html4
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.html8
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts4
8 files changed, 142 insertions, 8 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-management.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-management.component.html
index f4a3f37e..f9baae7a 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-management.component.html
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-management.component.html
@@ -1,3 +1,3 @@
<p>
- nsi-management works!
+ <app-nsi-table></app-nsi-table>
</p>
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
new file mode 100644
index 00000000..5bcdbb6a
--- /dev/null
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.html
@@ -0,0 +1,45 @@
+<div class="slicing-resource-table">
+ <div nz-row>
+ <div nz-col nzSpan="12" class="task_status">
+ <span>Status : </span>
+ <nz-select nzShowSearch nzPlaceHolder="Select a processing status" [(ngModel)]="selectedValue">
+ <nz-option *ngFor="let item of statusOptions" [nzLabel]="item" [nzValue]="item"></nz-option>
+ </nz-select>
+ </div>
+ </div>
+ <div>
+ <nz-table
+ #nsiTable
+ [nzData]="listOfData"
+ [nzFrontPagination]="false"
+ [nzPageSizeOptions]="[5,10,15,20]"
+ [nzTotal]='total'
+ [(nzPageSize)]="pageSize"
+ [(nzPageIndex)]='pageIndex'
+ [nzLoading]="loading"
+ >
+ <thead>
+ <tr>
+ <th>Service Instance Id</th>
+ <th>Service Instance Name</th>
+ <th>Service Type</th>
+ <th>Status</th>
+ <th width="140px">Detail</th>
+ </tr>
+ </thead>
+ <tbody>
+ <ng-template ngFor let-data [ngForOf]="nsiTable.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)="showdetail(data)">detail</a>
+ </td>
+ </tr>
+ </ng-template>
+ </tbody>
+ </nz-table>
+ </div>
+</div> \ 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.less b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.less
new file mode 100644
index 00000000..66da35df
--- /dev/null
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.less
@@ -0,0 +1,9 @@
+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.spec.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.spec.ts
new file mode 100644
index 00000000..a6fc9167
--- /dev/null
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { NsiTableComponent } from './nsi-table.component';
+
+describe('NsiTableComponent', () => {
+ let component: NsiTableComponent;
+ let fixture: ComponentFixture<NsiTableComponent>;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ NsiTableComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(NsiTableComponent);
+ 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/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
new file mode 100644
index 00000000..372504e8
--- /dev/null
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-table/nsi-table.component.ts
@@ -0,0 +1,53 @@
+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',
+ templateUrl: './nsi-table.component.html',
+ styleUrls: ['./nsi-table.component.less']
+})
+export class NsiTableComponent implements OnInit {
+
+ constructor(
+ private myhttp: SlicingTaskServices,
+ private modalService: NzModalService
+ ) {
+ }
+
+ ngOnInit() {
+ this.getNsiList()
+ }
+ 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;
+
+ getNsiList (): 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.getSlicingNsiList(paramsObj,this.isSelect).subscribe (res => {
+ const { result_header: { result_code }, result_body: { nsi_service_instances } } = res;
+ if (+result_code === 200) {
+ this.total = nsi_service_instances.length;
+ this.loading = false;
+ this.listOfData = nsi_service_instances;
+ }
+ })
+ }
+ showdetail(data){
+
+ }
+}
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-management.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-management.component.html
index 7626b040..eaf98ab0 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-management.component.html
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-management.component.html
@@ -1,3 +1,3 @@
-<h3>
+<p>
<app-slicing-business-table></app-slicing-business-table>
-</h3> \ No newline at end of file
+</p> \ No newline at end of file
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 07bdc07e..2eaf881e 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
@@ -23,11 +23,11 @@
>
<thead>
<tr>
- <th>Service_instance_id</th>
- <th>Service_instance_name</th>
- <th>Service_type</th>
+ <th>Service Instance Id</th>
+ <th>Service Instance Name</th>
+ <th>Service Type</th>
<th>S-NSSAI</th>
- <th>Orchestration_status</th>
+ <th>Status</th>
<th width="130px">Aciton</th>
<th width="100px">Detail</th>
</tr>
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts
index 884a3be4..05592569 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component.ts
@@ -19,7 +19,9 @@ export class SlicingBusinessTableComponent implements OnInit {
ngOnInit() {
this.getBusinessList()
}
-
+ ngOnDestroy() {
+ clearInterval(this.progressingTimer);
+ }
selectedValue:string = BUSINESS_STATUS[0];
listOfData: any[] = [];
pageIndex: number = 1;