summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-12-05 14:58:51 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-12-05 14:59:11 +0800
commitbb073de34e081e165d4725c8f94e144c4e5618dc (patch)
tree8b53bd3067a099dd2390920a5602c98100d76ea7
parent6077654ad074c2c07acf1434dfdec2fc5abd17d9 (diff)
feat: Encapsulate basic task information into public components
Change-Id: If00db97b6cf4f0a192269acaad1981c3f0d27919 Issue-ID: USECASEUI-352 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
-rw-r--r--usecaseui-portal/src/app/app.module.ts5
-rw-r--r--usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.html49
-rw-r--r--usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.less10
-rw-r--r--usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.spec.ts25
-rw-r--r--usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.ts22
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.html55
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts3
7 files changed, 116 insertions, 53 deletions
diff --git a/usecaseui-portal/src/app/app.module.ts b/usecaseui-portal/src/app/app.module.ts
index b08f339f..d041eeeb 100644
--- a/usecaseui-portal/src/app/app.module.ts
+++ b/usecaseui-portal/src/app/app.module.ts
@@ -92,6 +92,8 @@ import { NsiManagementComponent } from './views/services/slicing-management/slic
import { NssiManagementComponent } from './views/services/slicing-management/slicing-resource-management/nssi-management/nssi-management.component';
import { SubnetParamsModelComponent } from './views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component';
import { SlicingBusinessTableComponent } from './views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-table/slicing-business-table.component'
+import { BasicInfoComponent } from './shared/components/basic-info/basic-info.component';
+
@NgModule({
providers: [
@@ -148,7 +150,8 @@ import { SlicingBusinessTableComponent } from './views/services/slicing-manageme
NsiManagementComponent,
NssiManagementComponent,
SubnetParamsModelComponent,
- SlicingBusinessTableComponent
+ SlicingBusinessTableComponent,
+ BasicInfoComponent
],
imports: [
BrowserModule,
diff --git a/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.html b/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.html
new file mode 100644
index 00000000..8a6cbf23
--- /dev/null
+++ b/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.html
@@ -0,0 +1,49 @@
+<nz-list class="taskmodel_list" [nzDataSource]="checkDetail" nzBordered [nzHeader]="'配置审核详情:'" [nzFooter]="null"
+ [nzRenderItem]="checkItem">
+ <ng-template #checkItem let-check>
+ <nz-list-item nz-row nzType="flex" nzJustify="start" [nzGutter]="8">
+ <div nz-col nzSpan="10">
+ <span>Task ID: {{ check.task_id }}</span>
+ </div>
+ <div nz-col nzSpan="8">
+ <span>Task Name: {{ check.task_name }}</span>
+ </div>
+ <div nz-col nzSpan="6">
+ <span>S-NSSAI:{{ check.service_snssai }}</span>
+ </div>
+ </nz-list-item>
+ <nz-list-item nz-row nzType="flex" nzJustify="start" [nzGutter]="8">
+ <div nz-col nzSpan="10">
+ <span>Arrived Time: {{ check.create_time | date: 'yyyy-MM-dd HH:mm:ss' }}</span>
+ </div>
+ <div nz-col nzSpan="8">
+ <span>Status: {{ check.processing_status }}</span>
+ </div>
+ </nz-list-item>
+ </ng-template>
+ </nz-list>
+
+ <nz-list class="taskmodel_list" [nzDataSource]="businessRequirement" nzBordered [nzHeader]="'业务需求信息:'"
+ [nzFooter]="null" [nzRenderItem]="businessItem">
+ <ng-template #businessItem let-item>
+ <nz-list-item nz-row nzType="flex" nzJustify="start" [nzGutter]="8" *ngFor="let list of businessList ">
+ <div nz-col [nzSpan]="list.length === 1 ? '24' : '8'" *ngFor="let ite of list">
+ <span class="ant-typography">{{ ite.title }} : &nbsp;{{ item[ite.key] }}</span>
+ </div>
+ </nz-list-item>
+ </ng-template>
+ </nz-list>
+
+ <nz-list class="taskmodel_list" [nzDataSource]="NSTinfo" nzBordered [nzHeader]="'匹配NST信息:'" [nzFooter]="null"
+ [nzRenderItem]="taskItem">
+ <ng-template #taskItem let-item>
+ <nz-list-item nz-row nzType="flex" nzJustify="start" [nzGutter]="8">
+ <div nz-col nzSpan="12">
+ <span>NST ID: {{ item.nst_id }}</span>
+ </div>
+ <div nz-col nzSpan="12">
+ <span>NST Name: {{ item.nst_name }}</span>
+ </div>
+ </nz-list-item>
+ </ng-template>
+ </nz-list>
diff --git a/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.less b/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.less
new file mode 100644
index 00000000..0415b5f3
--- /dev/null
+++ b/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.less
@@ -0,0 +1,10 @@
+.taskmodel_list {
+ margin-bottom: 20px;
+
+ .listitem_subtitle {
+ font-size: 14px;
+ color: rgba(0, 0, 0, 0.85);
+ margin-bottom: 16px;
+ font-weight: 500;
+ }
+} \ No newline at end of file
diff --git a/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.spec.ts b/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.spec.ts
new file mode 100644
index 00000000..9cfa89c8
--- /dev/null
+++ b/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { BasicInfoComponent } from './basic-info.component';
+
+describe('BasicInfoComponent', () => {
+ let component: BasicInfoComponent;
+ let fixture: ComponentFixture<BasicInfoComponent>;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ BasicInfoComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(BasicInfoComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.ts b/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.ts
new file mode 100644
index 00000000..0f096b71
--- /dev/null
+++ b/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.ts
@@ -0,0 +1,22 @@
+import { Component, OnInit, Input } from '@angular/core';
+import { BUSINESS_REQUIREMENT } from '../../../../constants/constants';
+@Component({
+ selector: 'app-basic-info',
+ templateUrl: './basic-info.component.html',
+ styleUrls: ['./basic-info.component.less']
+})
+export class BasicInfoComponent implements OnInit {
+
+ @Input() checkDetail: any;
+ @Input() businessRequirement: any;
+ @Input() NSTinfo: any;
+
+ // 业务需求列表
+ businessList: object[] = BUSINESS_REQUIREMENT;
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.html
index 6c2560ac..afec64a7 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.html
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.html
@@ -1,54 +1,11 @@
<nz-modal [nzVisible]="showDetail" nzWidth="85%" [nzTitle]="moduleTitle" (nzOnCancel)="handleCancel()"
(nzOnOk)="handleOk()">
- <nz-list class="taskmodel_list" [nzDataSource]="checkDetail" nzBordered [nzHeader]="'配置审核详情:'" [nzFooter]="null"
- [nzRenderItem]="checkItem">
- <ng-template #checkItem let-check>
- <nz-list-item nz-row nzType="flex" nzJustify="start" [nzGutter]="8">
- <div nz-col nzSpan="10">
- <span>Task ID: {{ check.task_id }}</span>
- </div>
- <div nz-col nzSpan="8">
- <span>Task Name: {{ check.task_name }}</span>
- </div>
- <div nz-col nzSpan="6">
- <span>S-NSSAI:{{ check.service_snssai }}</span>
- </div>
- </nz-list-item>
- <nz-list-item nz-row nzType="flex" nzJustify="start" [nzGutter]="8">
- <div nz-col nzSpan="10">
- <span>Arrived Time: {{ check.create_time | date: 'yyyy-MM-dd HH:mm:ss' }}</span>
- </div>
- <div nz-col nzSpan="8">
- <span>Status: {{ check.processing_status }}</span>
- </div>
- </nz-list-item>
- </ng-template>
- </nz-list>
-
- <nz-list class="taskmodel_list" [nzDataSource]="businessRequirement" nzBordered [nzHeader]="'业务需求信息:'"
- [nzFooter]="null" [nzRenderItem]="businessItem">
- <ng-template #businessItem let-item>
- <nz-list-item nz-row nzType="flex" nzJustify="start" [nzGutter]="8" *ngFor="let list of businessList ">
- <div nz-col [nzSpan]="list.length === 1 ? '24' : '8'" *ngFor="let ite of list">
- <span class="ant-typography">{{ ite.title }} : &nbsp;{{ item[ite.key] }}</span>
- </div>
- </nz-list-item>
- </ng-template>
- </nz-list>
-
- <nz-list class="taskmodel_list" [nzDataSource]="NSTinfo" nzBordered [nzHeader]="'匹配NST信息:'" [nzFooter]="null"
- [nzRenderItem]="taskItem">
- <ng-template #taskItem let-item>
- <nz-list-item nz-row nzType="flex" nzJustify="start" [nzGutter]="8">
- <div nz-col nzSpan="12">
- <span>NST ID: {{ item.nst_id }}</span>
- </div>
- <div nz-col nzSpan="12">
- <span>NST Name: {{ item.nst_name }}</span>
- </div>
- </nz-list-item>
- </ng-template>
- </nz-list>
+ <app-basic-info
+ [checkDetail]="checkDetail"
+ [businessRequirement]="businessRequirement"
+ [NSTinfo]="NSTinfo"
+ >
+ </app-basic-info>
<div>
<nz-list class="taskmodel_list" nzBordered [nzHeader]="'匹配共享切片实例:'" [nzFooter]="null">
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts
index d9c1ec34..fa27d9e5 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts
@@ -1,6 +1,5 @@
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { SlicingTaskServices } from '../../../../../core/services/slicingTaskServices';
-import { BUSINESS_REQUIREMENT } from '../../../../../../constants/constants';
@Component({
selector: 'app-slicing-task-model',
@@ -15,8 +14,6 @@ export class SlicingTaskModelComponent implements OnInit {
constructor(private http: SlicingTaskServices) { }
- // 业务需求列表
- businessList: object[] = BUSINESS_REQUIREMENT;
// 配置审核详情
checkDetail: any[] = [{}];
//业务需求信息