Skip to content

Commit 794db3e

Browse files
authored
NIFI-13710: Rebuilding Update Attribute Custom UI. (#9561)
* NIFI-13710: Rebuilding Update Attribute Custom UI. * NIFI-13710: Removing unnecessary codemirror import. * NIFI-13710: Addressing review feedback. - Adding editor hint so users know how to use EL. - Fixing issue with rule payload when managing conditions and actions. - Accounting for user permissions when setting the editable flag. - Preventing editors from displaying offscreen. - Showing snackbars following successfully saving. - Adding validators to the condition and actions table. * NIFI-13710: Addressing review feedback. - Ensuring that the revision is saved after all actions. - Ensuring that the evaluation criteria is reloaded when rules are added/removed. - Updating additional details to reflect the new UI. * NIFI-13710: Fixing text overflow issues. * NIFI-13710: Applying text-base to the body. * NIFI-13710: Addressing review feeback. - Fixing imports. - Disabling menu in tables when not editable. - Fixing background color in dark mode. * NIFI-13710: Requiring rules to be saved or discard once edited. * NIFI-13710: Fixing import style which could result in circular imports. - Fixing bug when evaluating open/closed rule when deciding if reordering should be allowed. * NIFI-13710: Unpacking UI in prepare-package phase.
1 parent 19bac11 commit 794db3e

File tree

339 files changed

+7185
-9439
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

339 files changed

+7185
-9439
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ nb-configuration.xml
1010

1111
# Intellij
1212
.idea/
13+
.run/
1314
*.iml
1415
*.iws
1516
*.ipr

nifi-assembly/LICENSE

Lines changed: 3 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -440,163 +440,6 @@ For details see http://qtip2.com
440440
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
441441
OTHER DEALINGS IN THE SOFTWARE.
442442

443-
This product bundles 'json2.js' which is available in the 'public domain'.
444-
For details see https://github.com/douglascrockford/JSON-js
445-
446-
This product bundles 'reset.css' which is available in the 'public domain'.
447-
For details see http://meyerweb.com/eric/tools/css/reset/
448-
449-
This product bundles 'Angular' which is available under an MIT license.
450-
451-
Copyright (c) 2010-2016 Google, Inc. http://angularjs.org
452-
453-
Permission is hereby granted, free of charge, to any person obtaining a copy
454-
of this software and associated documentation files (the "Software"), to deal
455-
in the Software without restriction, including without limitation the rights
456-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
457-
copies of the Software, and to permit persons to whom the Software is
458-
furnished to do so, subject to the following conditions:
459-
460-
The above copyright notice and this permission notice shall be included in
461-
all copies or substantial portions of the Software.
462-
463-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
464-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
465-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
466-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
467-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
468-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
469-
THE SOFTWARE.
470-
471-
This product bundles 'Angular Material' which is available under an MIT license.
472-
473-
Copyright (c) 2014-2016 Google, Inc. http://angularjs.org
474-
475-
Permission is hereby granted, free of charge, to any person obtaining a copy
476-
of this software and associated documentation files (the "Software"), to deal
477-
in the Software without restriction, including without limitation the rights
478-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
479-
copies of the Software, and to permit persons to whom the Software is
480-
furnished to do so, subject to the following conditions:
481-
482-
The above copyright notice and this permission notice shall be included in
483-
all copies or substantial portions of the Software.
484-
485-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
486-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
487-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
488-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
489-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
490-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
491-
THE SOFTWARE.
492-
493-
This product bundles 'Angular Aria' which is available under an MIT license.
494-
495-
Copyright (c) 2010-2016 Google, Inc. http://angularjs.org
496-
497-
Permission is hereby granted, free of charge, to any person obtaining a copy
498-
of this software and associated documentation files (the "Software"), to deal
499-
in the Software without restriction, including without limitation the rights
500-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
501-
copies of the Software, and to permit persons to whom the Software is
502-
furnished to do so, subject to the following conditions:
503-
504-
The above copyright notice and this permission notice shall be included in
505-
all copies or substantial portions of the Software.
506-
507-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
508-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
509-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
510-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
511-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
512-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
513-
514-
This product bundles 'Angular Animate' which is available under an MIT license.
515-
516-
Copyright (c) 2010-2016 Google, Inc. http://angularjs.org
517-
518-
Permission is hereby granted, free of charge, to any person obtaining a copy
519-
of this software and associated documentation files (the "Software"), to deal
520-
in the Software without restriction, including without limitation the rights
521-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
522-
copies of the Software, and to permit persons to whom the Software is
523-
furnished to do so, subject to the following conditions:
524-
525-
The above copyright notice and this permission notice shall be included in
526-
all copies or substantial portions of the Software.
527-
528-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
529-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
530-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
531-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
532-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
533-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
534-
535-
This product bundles 'Angular Messages' which is available under an MIT license.
536-
537-
Copyright (c) 2010-2016 Google, Inc. http://angularjs.org
538-
539-
Permission is hereby granted, free of charge, to any person obtaining a copy
540-
of this software and associated documentation files (the "Software"), to deal
541-
in the Software without restriction, including without limitation the rights
542-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
543-
copies of the Software, and to permit persons to whom the Software is
544-
furnished to do so, subject to the following conditions:
545-
546-
The above copyright notice and this permission notice shall be included in
547-
all copies or substantial portions of the Software.
548-
549-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
550-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
551-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
552-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
553-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
554-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
555-
556-
This product bundles 'AngularUI Codemirror' which is available under an MIT license.
557-
558-
Copyright (c) 2012 the AngularUI Team, http://angular-ui.github.com
559-
560-
Permission is hereby granted, free of charge, to any person obtaining a copy
561-
of this software and associated documentation files (the "Software"), to deal
562-
in the Software without restriction, including without limitation the rights
563-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
564-
copies of the Software, and to permit persons to whom the Software is
565-
furnished to do so, subject to the following conditions:
566-
567-
The above copyright notice and this permission notice shall be included in
568-
all copies or substantial portions of the Software.
569-
570-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
571-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
572-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
573-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
574-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
575-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
576-
THE SOFTWARE.
577-
578-
This product bundles 'AngularUI Router' which is available under an MIT license.
579-
580-
Copyright (c) 2013-2015 The AngularUI Team, Karsten Sperling
581-
582-
Permission is hereby granted, free of charge, to any person obtaining a copy
583-
of this software and associated documentation files (the "Software"), to deal
584-
in the Software without restriction, including without limitation the rights
585-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
586-
copies of the Software, and to permit persons to whom the Software is
587-
furnished to do so, subject to the following conditions:
588-
589-
The above copyright notice and this permission notice shall be included in
590-
all copies or substantial portions of the Software.
591-
592-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
593-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
594-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
595-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
596-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
597-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
598-
THE SOFTWARE.
599-
600443
This product bundles 'Fontello' which is available under an MIT license.
601444

602445
Copyright (C) 2011 by Vitaly Puzrin
@@ -619,29 +462,6 @@ This product bundles 'Fontello' which is available under an MIT license.
619462
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
620463
THE SOFTWARE.
621464

622-
This product bundles HexViewJS available under an MIT License
623-
624-
Copyright (c) 2010 Nick McVeity <[email protected]>
625-
626-
Permission is hereby granted, free of charge, to any person
627-
obtaining a copy of this software and associated documentation
628-
files (the "Software"), to deal in the Software without restriction,
629-
including without limitation the rights to use, copy, modify, merge,
630-
publish, distribute, sublicense, and/or sell copies of the Software,
631-
and to permit persons to whom the Software is furnished to do so,
632-
subject to the following conditions:
633-
634-
The above copyright notice and this permission notice shall be
635-
included in all copies or substantial portions of the Software.
636-
637-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
638-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
639-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
640-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
641-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
642-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
643-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
644-
645465
The binary distribution of this product includes modules from Groovy which bundles ANTLR
646466
SOFTWARE RIGHTS
647467

@@ -2872,4 +2692,7 @@ For the binary distribution of nifi-jolt-transform-json-ui see its 3rdpartylicen
28722692
for additional license and notice information.
28732693

28742694
For the binary distribution of nifi-standard-content-viewer see its 3rdpartylicenses.txt
2695+
for additional license and notice information.
2696+
2697+
For the binary distribution of nifi-update-attribute-ui see its 3rdpartylicenses.txt
28752698
for additional license and notice information.

nifi-assembly/NOTICE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2581,4 +2581,7 @@ For the binary distribution of nifi-jolt-transform-json-ui see its 3rdpartylicen
25812581
for additional license and notice information.
25822582

25832583
For the binary distribution of nifi-standard-content-viewer see its 3rdpartylicenses.txt
2584+
for additional license and notice information.
2585+
2586+
For the binary distribution of nifi-update-attribute-ui see its 3rdpartylicenses.txt
25842587
for additional license and notice information.

nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-transform-json-ui/src/main/webapp/WEB-INF/web.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<url-pattern>/api/*</url-pattern>
3636
</servlet-mapping>
3737

38-
<!-- login filter -->
38+
<!-- fragment filter -->
3939
<filter>
4040
<filter-name>FragmentFilter</filter-name>
4141
<filter-class>org.apache.nifi.web.servlet.filter.QueryStringToFragmentFilter</filter-class>

nifi-extension-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/resources/META-INF/LICENSE

Lines changed: 4 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -206,47 +206,7 @@ APACHE NIFI SUBCOMPONENTS:
206206
The Apache NiFi project contains subcomponents with separate copyright
207207
notices and license terms. Your use of the source code for the these
208208
subcomponents is subject to the terms and conditions of the following
209-
licenses.
210-
211-
This product bundles 'CodeMirror' which is available under an MIT style license.
212-
213-
Copyright (C) 2014 by Marijn Haverbeke <[email protected]> and others
214-
215-
Permission is hereby granted, free of charge, to any person obtaining a copy
216-
of this software and associated documentation files (the "Software"), to deal
217-
in the Software without restriction, including without limitation the rights
218-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
219-
copies of the Software, and to permit persons to whom the Software is
220-
furnished to do so, subject to the following conditions:
221-
222-
The above copyright notice and this permission notice shall be included in
223-
all copies or substantial portions of the Software.
224-
225-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
226-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
227-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
228-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
229-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
230-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
231-
THE SOFTWARE.
232-
233-
This product bundles 'JQuery' which is available under and MIT style license.
234-
(c) 2005, 2014 jQuery Foundation, Inc.
235-
236-
Permission is hereby granted, free of charge, to any person obtaining a copy
237-
of this software and associated documentation files (the "Software"), to deal
238-
in the Software without restriction, including without limitation the rights
239-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
240-
copies of the Software, and to permit persons to whom the Software is
241-
furnished to do so, subject to the following conditions:
242-
243-
The above copyright notice and this permission notice shall be included in
244-
all copies or substantial portions of the Software.
245-
246-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
247-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
248-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
249-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
250-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
251-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
252-
THE SOFTWARE.
209+
licenses.
210+
211+
For the binary distribution of nifi-standard-content-viewer see its 3rdpartylicenses.txt
212+
for additional license and notice information.

nifi-extension-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/resources/META-INF/NOTICE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Copyright 2014-2024 The Apache Software Foundation
44
This product includes software developed at
55
The Apache Software Foundation (http://www.apache.org/).
66

7+
For the binary distribution of nifi-standard-content-viewer see its 3rdpartylicenses.txt
8+
for additional license and notice information.
9+
710
===========================================
811
Apache Software License v2
912
===========================================

nifi-extension-bundles/nifi-update-attribute-bundle/nifi-update-attribute-processor/src/main/resources/docs/org.apache.nifi.processors.attributes.UpdateAttribute/additionalDetails.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,18 @@ The preceding examples illustrate how to make changes to every FlowFile that goe
7979
UpdateAttribute processor may also be used to make conditional changes.
8080

8181
To change attributes based on some condition, use the Advanced User Interface (UI) in the processor by clicking the *
82-
*Advanced** button in the lower right corner.
82+
*Advanced** menu item in the Canvas context menu.
8383

84-
Clicking the Advanced button displays the Advanced UI. In the Advanced UI, Conditions and their associated Actions are
84+
Clicking the Advanced menu item displays the Advanced UI. In the Advanced UI, Conditions and their associated Actions are
8585
entered as "Rules". Each rule basically says, "If these conditions are met, then do this action." One or more conditions
8686
may be used in a given rule, and they all must be met in order for the designated action(s) to be taken.
8787

8888
**Adding Rules**
8989

90-
To add rules and their associated conditions and actions, click on the buttons with the plus symbol located to the right
91-
of the "Rules", "Conditions", and "Actions" labels.
92-
93-
Upon adding a rule with its condition(s) and action(s), it is important to save it by clicking the **Save** button in
94-
the lower right corner. If you do not do so and attempt to add or navigate to another rule, an error message will
95-
appear, asking you if you want to save your changes.
90+
To add the first rule, click on the "Create Rule" button in center of the screen. The Edit Rule form will display where
91+
the name, comments, conditions, and actions for the rule can be entered. Once the rule is defined, click the **Add**
92+
button. Additional rules can be added by clicking the button with the plus symbol located to the top right of the
93+
Rule listing.
9694

9795
**Example Rules**
9896

@@ -116,9 +114,9 @@ Taken together, this rule says:
116114
**Adding another Rule**
117115

118116
Continuing with this example, we can add another rule to check for files that are larger than one gigabyte. When we add
119-
this second rule, we can use the previous rule as a template, so to speak, by taking advantage of the "Copy from
120-
existing rule" option in the New Rule window. Simply start typing the name of an existing rule, and it will show up in a
121-
dropdown menu below the entry field.
117+
this second rule, we can use the previous rule as a template, so to speak, by taking advantage of the "Clone Rule" option
118+
in the menu for the Rule that you wan to clone. This will open with new Rule form with the exisitng Rules criteria
119+
pre-populated.
122120

123121
In this example, the CheckForGiantFiles rule has these conditions:
124122

@@ -159,8 +157,8 @@ The delete attributes function does not produce a Provenance Event if the **alte
159157
**FlowFile Policy**
160158

161159
Another setting in the Advanced UI is the FlowFile Policy. It is located in the upper-left corner of the UI, and it
162-
defines the processor's behavior when multiple rules match. It may be changed using the dropdown menu. By default, the
163-
FlowFile Policy is set to "use clone".
160+
defines the processor's behavior when multiple rules match. It may be changed using the slide toggle. By default, the
161+
FlowFile Policy is set to use a clone of the original FlowFile for each matching rule.
164162

165163
If the FlowFile policy is set to "use clone", and multiple rules match, then a copy of the incoming FlowFile is created,
166164
such that the number of outgoing FlowFiles is equal to the number of rules that match. In other words, if two rules (A
@@ -172,7 +170,8 @@ If the FlowFile policy is set to "use original", then all matching rules are app
172170
there is only one outgoing FlowFile with all the attribute changes applied. In this case, the order of the rules matters
173171
and the action for each rule that matches will be applied in that order. If multiple rules contain actions that update
174172
the same attribute, the action from the last matching rule will take precedence. Notably, you can drag and drop the
175-
rules into a certain order within the Rules list.
173+
rules into a certain order within the Rules list once the FlowFile Policy is set to "use original" and the user has
174+
toggled the "Reorder rules" control. While in this reordering mode, other Rule modifications are not allowed.
176175

177176
**Filtering Rules**
178177

@@ -182,7 +181,7 @@ in the name, condition, or action.
182181

183182
**Closing the Advanced UI**
184183

185-
Once all changes have been saved in the Advanced UI, the UI can be closed using the X in the top right corner.
184+
Once all changes have been saved in the Advanced UI, you can navigate back to the Canvas using the navigation at the top.
186185

187186
**Stateful Usage**
188187

0 commit comments

Comments
 (0)