Advanced UI button on Update Attributes

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Advanced UI button on Update Attributes

davidrsmith
Hi
I am looking to create a bespoke processor based very loosely on the Update Attribute processor set, I have taken a copy of the update attribute bundle and changed the name of the bundle and its components to nifi-test-build-processor, nifi-test-build-model etc, I have also amended the pom files to reference these new names. However, when I build the new test processor set, it builds and loads in NiFi 1.8.0 but the Advanced button has disappeared in the UpdateAttribute processor configuration. Can anyone tell me what I have missed, I have done this once before but I can't remember what the answer is?
Many thanksDave
Reply | Threaded
Open this post in threaded view
|

Re: Advanced UI button on Update Attributes

Koji Kawamura-2
Probably you've already found a solution, but just in case, did you
update nifi-processor-configuration file, too?
nifi-update-attribute-ui/src/main/webapp/META-INF/nifi-processor-configuration

Thanks,
Koji

On Thu, Jan 3, 2019 at 7:29 PM DAVID SMITH
<[hidden email]> wrote:
>
> Hi
> I am looking to create a bespoke processor based very loosely on the Update Attribute processor set, I have taken a copy of the update attribute bundle and changed the name of the bundle and its components to nifi-test-build-processor, nifi-test-build-model etc, I have also amended the pom files to reference these new names. However, when I build the new test processor set, it builds and loads in NiFi 1.8.0 but the Advanced button has disappeared in the UpdateAttribute processor configuration. Can anyone tell me what I have missed, I have done this once before but I can't remember what the answer is?
> Many thanksDave
Reply | Threaded
Open this post in threaded view
|

Re: Advanced UI button on Update Attributes

davidrsmith
In reply to this post by davidrsmith
Koji

Thanks for the reply, I found it about 30 minutes before I saw your answer, this now works I have Advanced UI on my test processor. I am now amending the UI to try to get it to work/look and feel slightly differently, however, I now have a couple of questions:

1) I can change the labels for Rules, Conditions, Actions for ones that I want but I cannot find out where to change the header 'Expression' in the conditions panel or Attribute & Value in the Actions panel, I have done a grep through the code and cannot find out how these are populated ?  I have amended the following couple of lines in the application.js file but it makes no difference, can anyone help?

  // initialize the actions grid
        var actionsColumns = [
            {id: "start", name: "Start", field: "start", sortable: true, cssClass: 'pointer', editor: ua.getCustomLongTextEditor, validator: ua.requiredFieldValidator},
            {id: "stop", name: "Stop", field: "stop", sortable: true, cssClass: 'pointer', editor: ua.getCustomLongTextEditor, validator: ua.requiredFieldValidator}
        ];

2) When I bring up the add actions dialog, I have changed the labels to Start and Stop, now I want to change the type of input box used for the value (now Stop) to the same type that is used for the attribute (now Start), I guess it is the way the DIV is set up in the worksheet.jsp but any help would be appreciated.



--------------------------------------------
On Mon, 7/1/19, Koji Kawamura <[hidden email]> wrote:

 Subject: Re: Advanced UI button on Update Attributes
 To: "dev" <[hidden email]>
 Date: Monday, 7 January, 2019, 3:00
 
 Probably you've already found
 a solution, but just in case, did you
 update
 nifi-processor-configuration file, too?
 nifi-update-attribute-ui/src/main/webapp/META-INF/nifi-processor-configuration
 
 Thanks,
 Koji
 
 On Thu, Jan 3, 2019 at 7:29
 PM DAVID SMITH
 <[hidden email]>
 wrote:
 >
 > Hi
 > I am looking to create a bespoke processor
 based very loosely on the Update Attribute processor set, I
 have taken a copy of the update attribute bundle and changed
 the name of the bundle and its components to
 nifi-test-build-processor, nifi-test-build-model etc, I have
 also amended the pom files to reference these new names.
 However, when I build the new test processor set, it builds
 and loads in NiFi 1.8.0 but the Advanced button has
 disappeared in the UpdateAttribute processor configuration.
 Can anyone tell me what I have missed, I have done this once
 before but I can't remember what the answer is?
 > Many thanksDave
Reply | Threaded
Open this post in threaded view
|

Re: Advanced UI button on Update Attributes

Matt Gilman
David,

If I'm understanding your question for 1 they are in the worksheet.jsp.

https://github.com/apache/nifi/blob/98aabf2c50f857efc72fd6f2bfdd9965b97fa195/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/WEB-INF/jsp/worksheet.jsp#L156
https://github.com/apache/nifi/blob/98aabf2c50f857efc72fd6f2bfdd9965b97fa195/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/WEB-INF/jsp/worksheet.jsp#L171

For 2, we are utilizing a library (CodeMirror) to make a rich editor. If
you want to just use a standard textarea, you'll need to update the
worksheet.jsp by adding a standard textarea in the corresponding div (which
CodeMirror uses to house the dynamically created rich editor) and update
the necessary places in the backing JS. Those changes would be around here.

https://github.com/apache/nifi/blob/98aabf2c50f857efc72fd6f2bfdd9965b97fa195/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js#L149

Hope this helps

Matt

On Wed, Jan 9, 2019 at 11:23 AM DAVID SMITH
<[hidden email]> wrote:

> Koji
>
> Thanks for the reply, I found it about 30 minutes before I saw your
> answer, this now works I have Advanced UI on my test processor. I am now
> amending the UI to try to get it to work/look and feel slightly
> differently, however, I now have a couple of questions:
>
> 1) I can change the labels for Rules, Conditions, Actions for ones that I
> want but I cannot find out where to change the header 'Expression' in the
> conditions panel or Attribute & Value in the Actions panel, I have done a
> grep through the code and cannot find out how these are populated ?  I have
> amended the following couple of lines in the application.js file but it
> makes no difference, can anyone help?
>
>   // initialize the actions grid
>         var actionsColumns = [
>             {id: "start", name: "Start", field: "start", sortable: true,
> cssClass: 'pointer', editor: ua.getCustomLongTextEditor, validator:
> ua.requiredFieldValidator},
>             {id: "stop", name: "Stop", field: "stop", sortable: true,
> cssClass: 'pointer', editor: ua.getCustomLongTextEditor, validator:
> ua.requiredFieldValidator}
>         ];
>
> 2) When I bring up the add actions dialog, I have changed the labels to
> Start and Stop, now I want to change the type of input box used for the
> value (now Stop) to the same type that is used for the attribute (now
> Start), I guess it is the way the DIV is set up in the worksheet.jsp but
> any help would be appreciated.
>
>
>
> --------------------------------------------
> On Mon, 7/1/19, Koji Kawamura <[hidden email]> wrote:
>
>  Subject: Re: Advanced UI button on Update Attributes
>  To: "dev" <[hidden email]>
>  Date: Monday, 7 January, 2019, 3:00
>
>  Probably you've already found
>  a solution, but just in case, did you
>  update
>  nifi-processor-configuration file, too?
>
>  nifi-update-attribute-ui/src/main/webapp/META-INF/nifi-processor-configuration
>
>  Thanks,
>  Koji
>
>  On Thu, Jan 3, 2019 at 7:29
>  PM DAVID SMITH
>  <[hidden email]>
>  wrote:
>  >
>  > Hi
>  > I am looking to create a bespoke processor
>  based very loosely on the Update Attribute processor set, I
>  have taken a copy of the update attribute bundle and changed
>  the name of the bundle and its components to
>  nifi-test-build-processor, nifi-test-build-model etc, I have
>  also amended the pom files to reference these new names.
>  However, when I build the new test processor set, it builds
>  and loads in NiFi 1.8.0 but the Advanced button has
>  disappeared in the UpdateAttribute processor configuration.
>  Can anyone tell me what I have missed, I have done this once
>  before but I can't remember what the answer is?
>  > Many thanksDave
>