summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2020-02-10 19:53:18 +0800
committercyuamber <xuranyjy@chinamobile.com>2020-02-10 20:04:54 +0800
commitb11cf6b523d012186e9513f1bbdd196743f07aad (patch)
tree941f3a6faa9ef2fae379eed5abf6c6e7cd3e6480 /usecaseui-portal/src
parent9ea47f6d7cb13d8114ab83ae602206ad7e64e892 (diff)
feat:add csmf slicing purchase components of communication service page
Change-Id: I065e1189a8e4b043135c5c07ca8bf133d6857dd6 Issue-ID: USECASEUI-369 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src')
-rw-r--r--usecaseui-portal/src/app/app.module.ts4
-rw-r--r--usecaseui-portal/src/app/core/services/slicingTaskServices.ts1
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.html3
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.less0
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.spec.ts25
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts15
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.html5
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.less4
-rw-r--r--usecaseui-portal/src/constants/constants.ts194
9 files changed, 247 insertions, 4 deletions
diff --git a/usecaseui-portal/src/app/app.module.ts b/usecaseui-portal/src/app/app.module.ts
index 48b125de..d46f9f5e 100644
--- a/usecaseui-portal/src/app/app.module.ts
+++ b/usecaseui-portal/src/app/app.module.ts
@@ -97,6 +97,7 @@ import { SlicingBusinessModelComponent } from './views/services/slicing-manageme
import { NsiModelComponent } from './views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component';
import { NssiModelComponent } from './views/services/slicing-management/slicing-resource-management/nssi-management/nssi-model/nssi-model.component';
import { CsmfSlicingBusinessManagementComponent } from './views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component';
+import { BusinessOrderComponent } from './views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component';
@NgModule({
providers: [
@@ -158,7 +159,8 @@ import { CsmfSlicingBusinessManagementComponent } from './views/services/slicing
SlicingBusinessModelComponent,
NsiModelComponent,
NssiModelComponent,
- CsmfSlicingBusinessManagementComponent
+ CsmfSlicingBusinessManagementComponent,
+ BusinessOrderComponent
],
imports: [
BrowserModule,
diff --git a/usecaseui-portal/src/app/core/services/slicingTaskServices.ts b/usecaseui-portal/src/app/core/services/slicingTaskServices.ts
index 1c348a7f..05cf188c 100644
--- a/usecaseui-portal/src/app/core/services/slicingTaskServices.ts
+++ b/usecaseui-portal/src/app/core/services/slicingTaskServices.ts
@@ -53,6 +53,7 @@ export class SlicingTaskServices {
csmfDeactivate:"/api/usecaseui/csmf/5gSlicing/service/{serviceId}/deactivate",
csmfTerminate:"/api/usecaseui/csmf/5gSlicing/service/{serviceId}",
csmfGetProgress:"/api/usecaseui/csmf/5gSlicing/service/{serviceId}/progress",
+ csmfPurchase:"/uui-slicing/csmf/5gSlicing ",
//monitor 5G
fetchTraffic: this.baseUrl + "/monitoring/queryTimestamp/{queryTimestamp}/trafficData",
fetchOnlineusers: this.baseUrl + "/monitoring/queryTimestamp/{queryTimestamp}/onlineUsers",
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.html b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.html
new file mode 100644
index 00000000..606d9e15
--- /dev/null
+++ b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.html
@@ -0,0 +1,3 @@
+<p>
+ business-order works!
+</p>
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.less b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.less
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.less
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.spec.ts b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.spec.ts
new file mode 100644
index 00000000..1d7a756d
--- /dev/null
+++ b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { BusinessOrderComponent } from './business-order.component';
+
+describe('BusinessOrderComponent', () => {
+ let component: BusinessOrderComponent;
+ let fixture: ComponentFixture<BusinessOrderComponent>;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ BusinessOrderComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(BusinessOrderComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts
new file mode 100644
index 00000000..bf95a83c
--- /dev/null
+++ b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+import {COMMUNICATION_FORM_ITEMS} from "../../../../../../constants/constants";
+@Component({
+ selector: 'app-business-order',
+ templateUrl: './business-order.component.html',
+ styleUrls: ['./business-order.component.less']
+})
+export class BusinessOrderComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.html b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.html
index 2da05546..c260de77 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.html
+++ b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.html
@@ -7,6 +7,7 @@
<nz-option *ngFor="let item of statusOptions" [nzLabel]="item" [nzValue]="item"></nz-option>
</nz-select>
</div>
+ <button nz-button nzType="primary" class="buy-button">Purchase</button>
</div>
<div class="slicing-resource-table-list">
<nz-table #basicTable [nzData]="listOfData" [nzFrontPagination]="false" nzShowSizeChanger
@@ -43,7 +44,7 @@
</td>
<td>
<div class="action-icon">
- <nz-switch [ngModel]="data.service_status==='activated'?true:false"
+ <nz-switch [ngModel]="data.orchestration_status==='activated'?true:false"
[nzDisabled]="data.last_operation_type && data.last_operation_progress && data.last_operation_progress !== '100'"
(ngModelChange)="switchChange(data,i)"></nz-switch>
<nz-progress
@@ -52,7 +53,7 @@
</nz-progress>
</div>
<div class="action-icon">
- <i [ngClass]="{'cannotclick': data.last_operation_type && data.last_operation_progress && data.last_operation_progress !== '100' && (data.last_operation_type !== 'DELETE' || data.service_status==='activated')}"
+ <i [ngClass]="{'cannotclick': data.last_operation_type && data.last_operation_progress && data.last_operation_progress !== '100' && (data.last_operation_type !== 'DELETE' || data.orchestration_status==='activated')}"
nz-icon nzType="poweroff" nzTheme="outline" class="anticon anticon-poweroff"
(click)="terminate(data)"></i>
<nz-progress
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.less b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.less
index e71024f5..f52f4ad2 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.less
+++ b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.less
@@ -24,4 +24,8 @@ i.anticon {
pointer-events: none;
color: #aaa;
opacity: 0.6;
+}
+.buy-button{
+ float: right;
+ margin-right: 2%;
} \ No newline at end of file
diff --git a/usecaseui-portal/src/constants/constants.ts b/usecaseui-portal/src/constants/constants.ts
index 68c5c2e9..d5f61832 100644
--- a/usecaseui-portal/src/constants/constants.ts
+++ b/usecaseui-portal/src/constants/constants.ts
@@ -244,4 +244,196 @@ export const ADDRESS = [
]
export const BUSINESS_STATUS = [
"All", "activated", "deactivated"
-] \ No newline at end of file
+]
+
+export const COMMUNICATION_FORM_ITEMS = [
+ {
+ title: 'Slicing Business Name',
+ key: 'name'
+ },
+ {
+ title: 'Max Number of UEs',
+ key: 'maxNumberofUEs'
+ },
+ {
+ title: 'Data Rate Downlink (Mbps)',
+ key: 'expDataRateDL'
+ },
+ {
+ title: 'Latency',
+ key: 'latency'
+ },
+ {
+ title: 'Data Rate Uplink (Mbps)',
+ key: 'expDataRateUL'
+ },
+ {
+ title: 'Resource Sharing Level',
+ key: 'resourceSharingLevel',
+ options: [
+ {
+ title: 'Shared',
+ key: 'shared'
+ },
+ {
+ title: 'Non-shared',
+ key: 'no-shared'
+ }
+ ]
+ },
+ {
+ title: 'Mobility',
+ key: 'uEMobilityLevel',
+ },
+ {
+ title: 'Use Interval (Month)',
+ key: 'useInterval'
+ },
+ {
+ title: 'Max Number of UEs',
+ key: 'coverageArea'
+ }
+]
+
+export const COMMUNICATION_FORM_ADDRESS = {
+ "result_header": {
+ "result_code": 200,
+ "result_message": "Successfully"
+ },
+
+ "result_body": {
+ "province": [
+ {
+ "id": "1",
+ "name": "北京",
+ "city": [
+ {
+ "id": "101",
+ "name": "北京市",
+ "county": [
+ {
+ "id": "1001",
+ "name": "海淀区",
+ "street": [
+ {
+ "id": "100101",
+ "name": "万寿路街道"
+ },
+ {
+ "id": "100102",
+ "name": "中关村街道"
+ },
+ {
+ "id": "100103",
+ "name": "海淀街道"
+ },
+ {
+ "id": "100104",
+ "name": "西三旗街道"
+ }
+ ]
+ },
+ {
+ "id": "1002",
+ "name": "西城区",
+ "street": [
+ {
+ "id": "100201",
+ "name": "广安门内街道"
+ },
+ {
+ "id": "100202",
+ "name": "广安门外街道"
+ },
+ {
+ "id": "100203",
+ "name": "西长安街街道"
+ },
+ {
+ "id": "100204",
+ "name": "金融街街道"
+ }
+ ]
+ },
+ {
+ "id": "1003",
+ "name": "昌平区",
+ "street": [
+ {
+ "id": "100301",
+ "name": "城北街道"
+ },
+ {
+ "id": "100302",
+ "name": "城南街道"
+ },
+ {
+ "id": "100303",
+ "name": "天通苑北街道"
+ },
+ {
+ "id": "100304",
+ "name": "天通苑南街道"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "2",
+ "name": "上海",
+ "city": [{
+ "id": "201",
+ "name": "上海市",
+ "county": [{
+ "id": "2001",
+ "name": "浦东新区",
+ "street": [
+ {
+ "id": "200101",
+ "name": "陆家嘴街道"
+ },
+ {
+ "id": "200102",
+ "name": "周家渡街道"
+ },
+ {
+ "id": "200103",
+ "name": "塘桥街道"
+ },
+ {
+ "id": "200104",
+ "name": "南码头路街道"
+ }
+ ]
+ },
+ {
+ "id": "2002",
+ "name": "静安区",
+ "street": [
+ {
+ "id": "200201",
+ "name": "江宁路街道"
+ },
+ {
+ "id": "200202",
+ "name": "静安寺街道"
+ },
+ {
+ "id": "200203",
+ "name": "南京西路街道"
+ },
+ {
+ "id": "200204",
+ "name": "曹家渡街道"
+ }
+ ]
+ }
+ ]
+ }]
+ }
+ ]
+ }
+} \ No newline at end of file