[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2018-01-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16313929#comment-16313929
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

Github user mattyb149 commented on the issue:

https://github.com/apache/nifi/pull/2269
  
wait, I did see the following in the log, not sure if that was my fault or 
an error or just an extra logging statement:

`2018-01-05 16:25:29,613 WARN [NiFi Web Server-91] 
org.eclipse.jetty.server.HttpChannel 
/nifi-scripting-ui-1.5.0-SNAPSHOT/api/standard/reporting-task/details
javax.servlet.ServletException: javax.servlet.ServletException: 
org.apache.nifi.web.ResourceNotFoundException: Unable to locate reporting task 
with id 'c836dd00-0160-1000-cd91-07430d3d159b'.
at 
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:138)`


> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2018-01-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16313926#comment-16313926
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

Github user mattyb149 commented on the issue:

https://github.com/apache/nifi/pull/2269
  
+1 from me on the Java side, I also tried out the dialog(s) on the various 
scripting processors and all looks well. @scottyaslan if you're good with the 
rest, feel free to merge :) Thanks for this improvement!


> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2018-01-05 Thread Yuri (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16313617#comment-16313617
 ] 

Yuri commented on NIFI-4400:


OK, [~joewitt] I'll try to resolve the remaining open points.

[~scottyaslan], the current Advanced UI version, based on the 
nifi-jolt-transform-json-ui, reuses assets (eg. angular.js, nf-storage.js, 
CodeMirror.js, NiFi stylesheets) from nifi-web-ui. It simply links those 
resources from the web UI in the main JSP. I guess, all those resources should 
be somehow separated to the Advanced UI in order to implement the unit test 
suite and minification properly. Is this correct?

> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2018-01-05 Thread Joseph Witt (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16313481#comment-16313481
 ] 

Joseph Witt commented on NIFI-4400:
---

This would be an extremely cool one to try and include with nifi 1.5.0.  Is 
there someone that can help review/and get this across the finish line if 
possible?  Need to ensure L is covered, it properly escapes input/etc..  But 
this would be awesome.

> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294679#comment-16294679
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

Github user yuri1969 commented on the issue:

https://github.com/apache/nifi/pull/2269
  
About that _close/done/ok_ button, currently the advanced UI is implemented 
as an `iframe` inside `nfShell`. The close 'X' button is a part of to the 
`nfShell`. So for closing down the advanced UI you need to close the `nfShell` 
too. I guess it can be done by traversing to the `nfShell` via the standard 
`window` object. Is this approach ok? Since it feels, it introduces another 
coupling element.


> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-12-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16284981#comment-16284981
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

Github user yuri1969 commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2269#discussion_r155931362
  
--- Diff: 
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-ui/src/main/frontend/package.json
 ---
@@ -0,0 +1,12 @@
+{
+  "name": "nifi-scripting-ui",
+  "dependencies": {
+"angular-ui-codemirror": "^0.3.0",
+"angular-ui-router": "^0.2.18"
--- End diff --

Fixated the versions


> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-12-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16284979#comment-16284979
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

Github user yuri1969 commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2269#discussion_r155931287
  
--- Diff: 
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-ui/src/main/resources/META-INF/NOTICE
 ---
@@ -0,0 +1,61 @@
+nifi-transform-json-ui
+Copyright 2014-2017 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+**
+Apache Software License v2
+**
+
+The following binary components are provided under the Apache Software 
License v2
+
+  (ASLv2) Apache Commons Lang
+The following NOTICE information applies:
+  Apache Commons Lang
+  Copyright 2001-2014 The Apache Software Foundation
+
+  This product includes software from the Spring Framework,
+  under the Apache License 2.0 (see: StringUtils.containsWhitespace())
+
+  (ASLv2) Jettison
+The following NOTICE information applies:
+ Copyright 2006 Envoi Solutions LLC
+
+  (ASLv2) Jolt
--- End diff --

Removed


> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-12-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16284980#comment-16284980
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

Github user yuri1969 commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2269#discussion_r155931289
  
--- Diff: 
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-ui/src/main/resources/META-INF/NOTICE
 ---
@@ -0,0 +1,61 @@
+nifi-transform-json-ui
--- End diff --

Removed


> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-11-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16258566#comment-16258566
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

Github user yuri1969 commented on the issue:

https://github.com/apache/nifi/pull/2269
  
Good points @moranr. Thanks.


> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-11-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16257272#comment-16257272
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

Github user moranr commented on the issue:

https://github.com/apache/nifi/pull/2269
  
To add to my previous comments, I also notice some styling changes, not 
only in the advanced UI but other areas of the app as well. For example:

- Visible elements in the toolbar, status bar, and canvas palettes now have 
a border-radius being applied; previously they had square corners (i.e., no 
border-radius)

- Other areas such as shells and dialogs where the same canvas palette 
style buttons appear are being affected as well (e.g., 'Open in New Window', 
'Close', 'Refresh', etc.)

- Scott noted the fa-align icon sitting a pixel or two higher - I think 
this is occurring on many other 'fa-...' icons. I notice shifted positions in 
the canvas palette buttons, dialogs, and shells too

I would suggest that unless a new UI component is being introduced, we use 
established styles to maintain a consistent look. From what I've seen I don't 
believe there is a need to introduce anything new.

In the advanced UIs:

- the primary buttons (e.g., 'SAVE') have a border-radius now and also as 
Scott noted some position shifting occurs on hover

- select/combo box styling is completely different, including the menu that 
is shown when it is clicked on

- the 'Format' button should be square as are others that share the same 
look

I would also suggest capitalizing 'ruby', 'lua', and 'python' --> Ruby, 
Lua, Python


> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-11-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16257260#comment-16257260
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

Github user moranr commented on the issue:

https://github.com/apache/nifi/pull/2269
  
@yuri1969 the behavior of the code editor addition looks good! Changes made 
between the Script Engine/Body properties stay in place as changes are made and 
as you move between the standard/advanced editors. I did not experience 
anything odd there.

I agree with others about how closing it should return to point from which 
you came.

Regarding the save/close behavior - I would not expect 'SAVE' to close as 
well. It is, however, not very intuitive to save then have to go up the the 'X' 
button to close it out. Ideally I'd suggest an auto-save behavior that 
continuously notifies the user their work has been saved after a certain amount 
of time. Then place a close/done/ok button at the bottom right to close it out. 
Alternatively, and probably easier, group a separate 'Save' button with the 
code editor and add a close/done/ok button at the bottom right. There is more 
of a natural flow that way, working from the top left to the bottom right of 
the dialog.

Also, another idea, with the exception of Jolt these advanced UIs are 
pretty simple in that you're only choosing a type (engine) then entering code 
(body). It would be nice to simply have access the code editor directly from 
the property list when you click the cell to edit the value. This would 
eliminate the need for the advanced UI.


> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-11-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16251846#comment-16251846
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

Github user scottyaslan commented on the issue:

https://github.com/apache/nifi/pull/2269
  
@yuri1969 you are welcome.

I agree moving to Angular 2+ right now is probably out of scope for this 
PR. I just wanted to get the discussion moving forward about how we can offer a 
consistent quality UX across the nifi suite of web apps.

For the JS unit tests you should be able to use the nifi registry as an 
example. It uses npm and the frontend-maven-plugin to run the karma.conf.js 
(https://github.com/apache/nifi-registry/blob/master/nifi-registry-web-ui/pom.xml#L442
 and also 
https://github.com/apache/nifi-registry/blob/master/nifi-registry-web-ui/src/main/frontend/package.json#L7).

As for optimizing/minifying/bundling the JS/CSS/HTML there are a few 
different ways you could go about it. The nifi web site and the nifi registry 
both use grunt so there are some options there. The nifi registry uses grunt 
along with SystemJS to bundle and minify the client code 
(https://github.com/apache/nifi-registry/blob/master/nifi-registry-web-ui/pom.xml#L344).
 Nifi itself, however, uses maven and the YUI compressor to produce a client 
bundle 
(https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml#L418).
 You will most likely want to follow the way nifi does it.


> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-11-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16251790#comment-16251790
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

Github user yuri1969 commented on the issue:

https://github.com/apache/nifi/pull/2269
  
@scottyaslan Thank you for the kind words. I'll check the issues you 
mentioned.

The AngularJS choice was made in order to keep it consistent with the rest 
of the existing advanced UI components and not to introduce unnecessary 
dependencies. Also, it allowed me to reuse a lot of the code-base from the Jolt 
transform component.

Moving to Angular 2+ for the Registry and the shared lib makes sense. 
However, in the context of the existing advanced UI components it still feels a 
bit inconsistent.

Introducing any kind of tests and code style for the UI is a good idea. 
I'll try to integrate a test suite to this UI.

Using the advanced UI extensively made me think about optimizing the 
loading times of the UIs (AngularJS mini-apps). I guess a combination of 
minify/gz should help here. 



> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-11-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16251440#comment-16251440
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

Github user scottyaslan commented on the issue:

https://github.com/apache/nifi/pull/2269
  
@yuri1969 Thank you for this contribution! I must say, I very much enjoy 
your coding style. During the review, though, I did notice a few things. 

- The `^` characters for the version numbers in the package.json should be 
removed. 
- The fa-align-left icon on the 'Format' editor button does not appear to 
be centered. It seems to be 1px too high. 
- When a user hovers over the 'Save' button that the 'Changes saved 
successfully' text seems to shift a few pixels.
- Documentation/code comments. Please add JS doc to all methods.

I would also like to see if @moranr or @mattyb149 have any other 
suggestions for the styling of the components in this UI (for consistency with 
nifi) or any other functionality we may want to add with this UI/UX.

I have a few other concerns with this advanced UI that I think we should 
discuss here. At first @yuri1969 , I was wondering why you chose to use Angular 
1.x. These advanced UI's are web applications in and of themselves so you could 
have chosen any front end libraries you like. Then I realized that you probably 
chose to use Angular v1.5.x because that is what Nifi (and the Jolt advance UI) 
use and those libraries are already available in the nifi-web-ui. While I agree 
that this is a practical approach (and follows what has already been 
implemented previously in Nifi) I question whether this is a good long term 
solution. We need a high quality and enforceable way to provide Nifi UI 
developers with a set of reusable UI/UX components that can be leveraged in 
nifi, any advanced nifi processor UI's, and the new nifi registry so that we 
can deliver a consistent UX to our users across all our various 'web apps'.

There is a Jira out there (somewhere, although I cant find it right now) to 
upgrade Angular to the latest and greatest and to move away from Angular 1.x.  
There is also a lot of work being done right now for the upcoming nifi registry 
release that will provide an NgModule called "Fluid Design System" that is 
meant to be this "high quality reusable UI/UX component" module that will help 
to provide a consistent UX. @mcgilman  I would like your take on this as 
wellI my mind I would really like to see this advanced UI be developed as 
an Angular 4.x application and leverage the new FDS module.

Another concern I have is the lack of unit tests. This is not a knock 
against @yuri1969 but rather a general statement on the state of the nifi UI 
code base (and again @mcgilman I would like your input on this as I know I am 
guilty of not providing unit tests for new nifi UI features as well). I feel 
strongly that if we are going to introduce an entirely new web application (as 
we are doing with the nifi registry and here with this advanced UI) that we 
should hold it to the same quality standards we expect with any Java code 
(including code formatting, code documentation, unit tests, and integration 
tests). @yuri1969 whether or not we decide to use angular 1.x or 4.x It should 
be fairly straight forward to include a karma.conf.js file and to leverage the 
frontend-maven-plugin in the pom to run karma/jasmine tests for this advanced 
UI.

@yuri1969 what do you think?


> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-11-13 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16250607#comment-16250607
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

Github user mattyb149 commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2269#discussion_r150711592
  
--- Diff: 
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-ui/src/main/resources/META-INF/NOTICE
 ---
@@ -0,0 +1,61 @@
+nifi-transform-json-ui
--- End diff --

this should match the module nifi-scripting-ui


> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-11-13 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16250606#comment-16250606
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

Github user mattyb149 commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2269#discussion_r150711513
  
--- Diff: 
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-ui/src/main/resources/META-INF/NOTICE
 ---
@@ -0,0 +1,61 @@
+nifi-transform-json-ui
+Copyright 2014-2017 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+**
+Apache Software License v2
+**
+
+The following binary components are provided under the Apache Software 
License v2
+
+  (ASLv2) Apache Commons Lang
+The following NOTICE information applies:
+  Apache Commons Lang
+  Copyright 2001-2014 The Apache Software Foundation
+
+  This product includes software from the Spring Framework,
+  under the Apache License 2.0 (see: StringUtils.containsWhitespace())
+
+  (ASLv2) Jettison
+The following NOTICE information applies:
+ Copyright 2006 Envoi Solutions LLC
+
+  (ASLv2) Jolt
--- End diff --

I assume this was copied from the Jolt UI package, but I believe can be 
removed here.


> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-11-13 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16250176#comment-16250176
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

Github user scottyaslan commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2269#discussion_r150654197
  
--- Diff: 
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-ui/src/main/frontend/package.json
 ---
@@ -0,0 +1,12 @@
+{
+  "name": "nifi-scripting-ui",
+  "dependencies": {
+"angular-ui-codemirror": "^0.3.0",
--- End diff --

Please remove the `^`



> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-11-13 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16250177#comment-16250177
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

Github user scottyaslan commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2269#discussion_r150654245
  
--- Diff: 
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-ui/src/main/frontend/package.json
 ---
@@ -0,0 +1,12 @@
+{
+  "name": "nifi-scripting-ui",
+  "dependencies": {
+"angular-ui-codemirror": "^0.3.0",
+"angular-ui-router": "^0.2.18"
--- End diff --

Please remove the ^


> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-11-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16248065#comment-16248065
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

Github user yuri1969 commented on the issue:

https://github.com/apache/nifi/pull/2269
  
Any suggestions are welcome.

I'm not sure whether the license of new CodeMirror modes is handled 
properly. Please check that, thanks.


> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-11-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16248060#comment-16248060
 ] 

ASF GitHub Bot commented on NIFI-4400:
--

GitHub user yuri1969 opened a pull request:

https://github.com/apache/nifi/pull/2269

NIFI-4400 - Advanced UI with code editor for...

...scripted processors

Enabled a simple code editor in a form of an Advanced UI based on
the nifi-jolt-transform-json-ui. The editor reuses the CodeMirror lib.

The UI is enabled for the following scripted components:
* ExecuteScript, InvokeScriptedProcessor
* ScriptedLookupService, ScriptedReader, ScriptedRecordSetWriter
* ScriptedReportingTask.

Thank you for submitting a contribution to Apache NiFi.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

### For all changes:
- [x] Is there a JIRA ticket associated with this PR? Is it referenced 
 in the commit message?

- [x] Does your PR title start with NIFI- where  is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.

- [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?

- [x] Is your initial contribution a single, squashed commit?

### For code changes:
- [x] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
- [x] Have you written or updated unit tests to verify your changes?
- [x] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
- [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
- [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
- [ ] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?

### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in 
which it is rendered?

### Note:
Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/yuri1969/nifi NIFI-4400

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/nifi/pull/2269.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2269


commit f9e52a74b342f4178c0f2677d2e0c14940865b70
Author: yuri1969 <1969yuri1...@gmail.com>
Date:   2017-10-24T19:16:18Z

NIFI-4400 - Advanced UI with code editor for...

...scripted processors

Enabled a simple code editor in a form of an Advanced UI based on
the nifi-jolt-transform-json-ui. The editor reuses the CodeMirror lib.

The UI is enabled for the following scripted components:
* ExecuteScript, InvokeScriptedProcessor
* ScriptedLookupService, ScriptedReader, ScriptedRecordSetWriter
* ScriptedReportingTask.




> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>Assignee: Yuri
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-10-09 Thread Yuri (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16197501#comment-16197501
 ] 

Yuri commented on NIFI-4400:


Oh, now I see.

The Jolt Transform UI could definitely serve as an inspiration for the "code 
editor's" one.

> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-10-09 Thread Pierre Villard (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16197466#comment-16197466
 ] 

Pierre Villard commented on NIFI-4400:
--

Hey [~yuri1969],

I was thinking about a dedicated advanced UI as we have one in UpdateAttribute 
or JoltTransformJSON processors (with an "Advanced UI" button below the 
properties list when configuring the processor). Such custom UI requires a 
specific package, examples:
- nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui
- nifi-nar-bundles/nifi-standard-bundle/nifi-jolt-transform-json-ui

> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (NIFI-4400) Advanced UI with code editor for scripted processors

2017-10-09 Thread Yuri (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16197437#comment-16197437
 ] 

Yuri commented on NIFI-4400:


Currently Processor's Properties doesn't contain a specialized way of hinting 
UI editor style. Adding an editor type attribute to the Property would be 
suitable for the "script body editor" use case.

I guess it would be useful for other classes of Properties, such as file path 
or JSONPath.

> Advanced UI with code editor for scripted processors
> 
>
> Key: NIFI-4400
> URL: https://issues.apache.org/jira/browse/NIFI-4400
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Extensions
>Reporter: Pierre Villard
>
> For the scripted processors it would nice to add an advanced UI with a "code 
> editor mode" that would provide some very useful features when typing code:
> - indentation
> - code highlighting
> - do not close the window when hitting enter
> etc
> The use of codemirror.js (as already done for EL auto-completion) sounds like 
> a good option.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)