From c437d5360c75c1af5417c3681235a0f8015a9a85 Mon Sep 17 00:00:00 2001 From: liuwh7 Date: Wed, 15 Sep 2021 09:57:09 +0800 Subject: feat: add intent based service Signed-off-by: liuwh7 Change-Id: If63eb5e61f01751771ad090728f33214077edd6f Issue-ID: USECASEUI-605 --- .../nlp-upload-dialog.component.html | 30 +++++ .../nlp-upload-dialog.component.less | 56 ++++++++++ .../nlp-upload-dialog.component.spec.ts | 25 +++++ .../nlp-upload-dialog.component.ts | 37 +++++++ .../onboard-vnf-vm/onboard-vnf-vm.component.html | 16 ++- .../onboard-vnf-vm/onboard-vnf-vm.component.ts | 121 +++++++++++++++------ 6 files changed, 244 insertions(+), 41 deletions(-) create mode 100644 usecaseui-portal/src/app/views/onboard-vnf-vm/nlp-upload-dialog/nlp-upload-dialog.component.html create mode 100644 usecaseui-portal/src/app/views/onboard-vnf-vm/nlp-upload-dialog/nlp-upload-dialog.component.less create mode 100644 usecaseui-portal/src/app/views/onboard-vnf-vm/nlp-upload-dialog/nlp-upload-dialog.component.spec.ts create mode 100644 usecaseui-portal/src/app/views/onboard-vnf-vm/nlp-upload-dialog/nlp-upload-dialog.component.ts (limited to 'usecaseui-portal/src/app/views/onboard-vnf-vm') diff --git a/usecaseui-portal/src/app/views/onboard-vnf-vm/nlp-upload-dialog/nlp-upload-dialog.component.html b/usecaseui-portal/src/app/views/onboard-vnf-vm/nlp-upload-dialog/nlp-upload-dialog.component.html new file mode 100644 index 00000000..9e7f669b --- /dev/null +++ b/usecaseui-portal/src/app/views/onboard-vnf-vm/nlp-upload-dialog/nlp-upload-dialog.component.html @@ -0,0 +1,30 @@ + +
+
+ + + Type + + + + + + + + +
+
+
diff --git a/usecaseui-portal/src/app/views/onboard-vnf-vm/nlp-upload-dialog/nlp-upload-dialog.component.less b/usecaseui-portal/src/app/views/onboard-vnf-vm/nlp-upload-dialog/nlp-upload-dialog.component.less new file mode 100644 index 00000000..0cf44fad --- /dev/null +++ b/usecaseui-portal/src/app/views/onboard-vnf-vm/nlp-upload-dialog/nlp-upload-dialog.component.less @@ -0,0 +1,56 @@ +.subnet_params_container{ + padding-left: 3%; + .text-form-class{ + margin-bottom: 20px; + } + .subnet_params_area{ + margin-right: 5px; + } + .ant-btn-icon-only{ + padding: 0 5px !important; + } + .subnet_params_button{ + margin-top: 7px; + margin-left: 10px; + } + .subnet_params_icon{ + font-size: 14px; + } + .audio_class{ + height: 130px; + .recode_class{ + margin-top: 30px; + position: relative; + span{ + font-size: 17px; + } + .audioBtn{ + font-size: 20px; + position: absolute; + top: 5px; + left: 142px; + } + .anticon-pause-circle-o{ + color: red; + } + } + .play_class{ + font-size: 17px; + margin-top: 20px; + button { + margin-left: 2px; + } + } + } +} +.ant-form-item { + margin-top: 20px; + margin-bottom: -5px; +} + +.validateRules{ + color: red; +} +.error-input-border{ + border-color: red!important; +} \ No newline at end of file diff --git a/usecaseui-portal/src/app/views/onboard-vnf-vm/nlp-upload-dialog/nlp-upload-dialog.component.spec.ts b/usecaseui-portal/src/app/views/onboard-vnf-vm/nlp-upload-dialog/nlp-upload-dialog.component.spec.ts new file mode 100644 index 00000000..ffdd130f --- /dev/null +++ b/usecaseui-portal/src/app/views/onboard-vnf-vm/nlp-upload-dialog/nlp-upload-dialog.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { InputBusinessOrderComponent } from './input-business-order.component'; + +describe('InputBusinessOrderComponent', () => { + let component: InputBusinessOrderComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ InputBusinessOrderComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(InputBusinessOrderComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/usecaseui-portal/src/app/views/onboard-vnf-vm/nlp-upload-dialog/nlp-upload-dialog.component.ts b/usecaseui-portal/src/app/views/onboard-vnf-vm/nlp-upload-dialog/nlp-upload-dialog.component.ts new file mode 100644 index 00000000..64b1973a --- /dev/null +++ b/usecaseui-portal/src/app/views/onboard-vnf-vm/nlp-upload-dialog/nlp-upload-dialog.component.ts @@ -0,0 +1,37 @@ +import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import { NzMessageService } from 'ng-zorro-antd'; +import { Recorder } from '../../../shared/utils/recorder'; +import { Util } from '../../../shared/utils/utils'; + +@Component({ + selector: 'app-nlp-upload-dialog', + templateUrl: './nlp-upload-dialog.component.html', + styleUrls: ['./nlp-upload-dialog.component.less'] +}) +export class NlpUploadDialogComponent implements OnInit { + + constructor( + private Util: Util, + private Recorder: Recorder, + private msg: NzMessageService + ) { } + + @Input() isShowFlag: boolean; + @Output() returnNlpType = new EventEmitter(); + nlpType: String = "nlp"; + + ngOnInit() {} + + ngOnChange() {} + + handleCancel(): void { + this.isShowFlag = false; + this.returnNlpType.emit({ "cancel": true }); + } + + handleOk(): void { + this.isShowFlag = false; + this.returnNlpType.emit({ "cancel": false, nlpType: this.nlpType }); + } + +} diff --git a/usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.html b/usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.html index 34e78e60..2c7b11a5 100644 --- a/usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.html +++ b/usecaseui-portal/src/app/views/onboard-vnf-vm/onboard-vnf-vm.component.html @@ -89,11 +89,12 @@ - {{"i18nTextDefine_NO" | translate}} - {{"i18nTextDefine_Name" | translate}} - {{"i18nTextDefine_Size" | translate}} - {{"i18nTextDefine_CreateTime" | translate}} - {{"i18nTextDefine_Status" | translate}} + {{"i18nTextDefine_NO" | translate}} + {{"i18nTextDefine_Name" | translate}} + {{"i18nTextDefine_Size" | translate}} + {{"i18nTextDefine_CreateTime" | translate}} + {{"i18nTextDefine_Status" | translate}} + {{"i18nTextDefine_Type" | translate}} {{"i18nTextDefine_Operation" | translate}} @@ -150,6 +151,7 @@ {{item.size}} {{item.createTime}} {{item.active ? 'Active' : 'Inactive'}} + {{item.type || '--'}}