[NIFI-13981] inline parameter context creation#9613
Conversation
fc7eb37 to
195072f
Compare
| <button | ||
| mat-icon-button | ||
| class="primary-icon-button mt-1 ml-1" | ||
| (click)="openNewParameterContextDialog()" | ||
| title="Create parameter context"> | ||
| <i class="fa fa-plus"></i> | ||
| </button> |
There was a problem hiding this comment.
This should only be available if the current user has canWrite for parameterContextPermissions. If the user can't modify parameter contexts, creating one will fail. We should prevent the user from getting into a situation where we know the desired outcome will fail.
| <button | ||
| mat-icon-button | ||
| class="primary-icon-button mt-1 ml-1" | ||
| (click)="openNewParameterContextDialog()" | ||
| title="Create parameter context"> | ||
| <i class="fa fa-plus"></i> | ||
| </button> |
There was a problem hiding this comment.
This should only be available if the current user has canWrite for parameterContextPermissions. If the user can't modify parameter contexts, creating one will fail. We should prevent the user from getting into a situation where we know the desired outcome will fail.
| it('should not modify the original array', () => { | ||
| const items: SortableBy[] = [{ name: 'Banana' }, { name: 'Apple' }]; | ||
| const itemsCopy = [...items]; | ||
| pipe.transform(items); | ||
| expect(items).not.toEqual(itemsCopy); | ||
| }); |
There was a problem hiding this comment.
I'm confused by this test. It suggests that the original array should not get modified however, the underlying transform uses array.sort which sorts array elements in place. In many paces we depend on it modifying the array that is passed in as we don't bother assigning a variable to the result (which is just a reference to the same array).
There was a problem hiding this comment.
I agree. This test is pretty pointless. I will remove it.
195072f to
687c008
Compare
|
@scottyaslan, One more thing that was noticed: when adding a new process group, if you hit enter after typing in the name of the pg, the new parameter context dialog opens rather than creating the pg. i think we should fix that too. |
It is done now. Thanks! |
rfellows
left a comment
There was a problem hiding this comment.
Looks good. Thanks for the changes @scottyaslan 👍
Inline parameter context creation from both the create PG and edit PG dialogs. All listings of parameter contexts are also now sorted.