This is an automated email from the ASF dual-hosted git repository.

mcgilman pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new 8919955bfc [NIFI-13656] allow enter button to submit create PG and 
create Port form (#9181)
8919955bfc is described below

commit 8919955bfca81cb6131fd9aa137623b3019d4165
Author: Scott Aslan <[email protected]>
AuthorDate: Tue Aug 20 12:50:03 2024 -0400

    [NIFI-13656] allow enter button to submit create PG and create Port form 
(#9181)
    
    * [NIFI-13656] allow enter button to submit create PG and create Port form
    
    * restore scrolling for hints in codemirrors in update attribute
    
    * fix unit tests
    
    * update unit test
    
    * remove duplicate imports
    
    This closes #9181
---
 .../js/jquery/nfeditor/languages/nfeditor.css      |  4 +++
 .../ui/canvas/canvas.component.spec.ts             |  7 +++--
 .../port/create-port/create-port.component.html    |  2 +-
 .../create-process-group.component.html            |  2 +-
 .../combo-editor/combo-editor.component.spec.ts    | 32 ++++++++++++++++++++--
 5 files changed, 40 insertions(+), 7 deletions(-)

diff --git 
a/nifi-extension-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/jquery/nfeditor/languages/nfeditor.css
 
b/nifi-extension-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/jquery/nfeditor/languages/nfeditor.css
index abf9437ef9..24093e000a 100644
--- 
a/nifi-extension-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/jquery/nfeditor/languages/nfeditor.css
+++ 
b/nifi-extension-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/jquery/nfeditor/languages/nfeditor.css
@@ -15,6 +15,10 @@
  * limitations under the License.
  */
 
+ul.CodeMirror-hints {
+    overflow-y: scroll;
+}
+
 div.el-section {
     margin: 5px 0;
 }
diff --git 
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/canvas.component.spec.ts
 
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/canvas.component.spec.ts
index 7ae42d3448..1076af4bce 100644
--- 
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/canvas.component.spec.ts
+++ 
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/canvas.component.spec.ts
@@ -16,7 +16,8 @@
  */
 
 import { ComponentFixture, TestBed } from '@angular/core/testing';
-
+import { MatSidenavModule } from '@angular/material/sidenav';
+import { NoopAnimationsModule } from '@angular/platform-browser/animations';
 import { Canvas } from './canvas.component';
 import { provideMockStore } from '@ngrx/store/testing';
 import { initialState } from '../../state/flow/flow.reducer';
@@ -30,9 +31,7 @@ import { HeaderComponent } from './header/header.component';
 import { FooterComponent } from './footer/footer.component';
 import { canvasFeatureKey } from '../../state';
 import { flowFeatureKey } from '../../state/flow';
-import { MatSidenavModule } from '@angular/material/sidenav';
 import { FlowAnalysisDrawerComponent } from 
'./header/flow-analysis-drawer/flow-analysis-drawer.component';
-import { NoopAnimationsModule } from '@angular/platform-browser/animations';
 import { CanvasActionsService } from '../../service/canvas-actions.service';
 
 describe('Canvas', () => {
@@ -60,6 +59,8 @@ describe('Canvas', () => {
                 ContextMenu,
                 MatSidenavModule,
                 NoopAnimationsModule,
+                MatSidenavModule,
+                NoopAnimationsModule,
                 MockComponent(GraphControls),
                 MockComponent(HeaderComponent),
                 MockComponent(FooterComponent),
diff --git 
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/port/create-port/create-port.component.html
 
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/port/create-port/create-port.component.html
index 51a7ac722e..a13c350a10 100644
--- 
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/port/create-port/create-port.component.html
+++ 
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/port/create-port/create-port.component.html
@@ -61,7 +61,7 @@
             <button mat-button mat-dialog-close>Cancel</button>
             <button
                 [disabled]="!createPortForm.dirty || createPortForm.invalid || 
saving.value"
-                type="button"
+                type="submit"
                 color="primary"
                 (click)="createPort()"
                 mat-button>
diff --git 
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/process-group/create-process-group/create-process-group.component.html
 
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/process-group/create-process-group/create-process-group.component.html
index 737e4027ac..65b9b0ee51 100644
--- 
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/process-group/create-process-group/create-process-group.component.html
+++ 
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/process-group/create-process-group/create-process-group.component.html
@@ -77,7 +77,7 @@
             <button mat-button mat-dialog-close>Cancel</button>
             <button
                 [disabled]="!createProcessGroupForm.dirty || 
createProcessGroupForm.invalid || saving.value"
-                type="button"
+                type="submit"
                 color="primary"
                 (click)="createProcessGroup()"
                 mat-button>
diff --git 
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/property-table/editors/combo-editor/combo-editor.component.spec.ts
 
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/property-table/editors/combo-editor/combo-editor.component.spec.ts
index 38424a9e29..ed839d76b8 100644
--- 
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/property-table/editors/combo-editor/combo-editor.component.spec.ts
+++ 
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/property-table/editors/combo-editor/combo-editor.component.spec.ts
@@ -122,6 +122,11 @@ describe('ComboEditor', () => {
     it('should create', () => {
         if (item) {
             component.item = item;
+            component.parameterConfig = {
+                supportsParameters: false,
+                parameters: null
+            };
+
             fixture.detectChanges();
 
             expect(component).toBeTruthy();
@@ -131,6 +136,11 @@ describe('ComboEditor', () => {
     it('verify combo value', () => {
         if (item) {
             component.item = item;
+            component.parameterConfig = {
+                supportsParameters: false,
+                parameters: null
+            };
+
             fixture.detectChanges();
 
             const formValue = component.comboEditorForm.get('value')?.value;
@@ -149,6 +159,11 @@ describe('ComboEditor', () => {
             item.descriptor.required = false;
 
             component.item = item;
+            component.parameterConfig = {
+                supportsParameters: false,
+                parameters: null
+            };
+
             fixture.detectChanges();
 
             const formValue = component.comboEditorForm.get('value')?.value;
@@ -168,6 +183,11 @@ describe('ComboEditor', () => {
             item.descriptor.defaultValue = undefined;
 
             component.item = item;
+            component.parameterConfig = {
+                supportsParameters: false,
+                parameters: null
+            };
+
             fixture.detectChanges();
 
             const formValue = component.comboEditorForm.get('value')?.value;
@@ -185,7 +205,11 @@ describe('ComboEditor', () => {
             item.value = '#{one}';
 
             component.item = item;
-            component.parameters = parameters;
+            component.parameterConfig = {
+                supportsParameters: true,
+                parameters
+            };
+
             fixture.detectChanges();
             await fixture.whenStable();
 
@@ -207,7 +231,11 @@ describe('ComboEditor', () => {
             item.value = '#{three}';
 
             component.item = item;
-            component.parameters = parameters;
+            component.parameterConfig = {
+                supportsParameters: true,
+                parameters
+            };
+
             fixture.detectChanges();
             await fixture.whenStable();
 

Reply via email to