You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by DAVID SMITH <da...@btinternet.com> on 2018/01/30 21:48:56 UTC

Help & advice needed on application.js in Processors

Hi
I am trying to create a processor that is partially based on the UpdateAttribute processor 0.7.3.I have cloned the UpdateAttribute source, renamed the processor and I have started by trying to amend the Advanced configuration UI. I have found that I can change labels for fields in the Advanced configuration UI in WEB-INF/jsp/worksheet.jsp, and these are reflected in the Advanced UI after a reload.
However any changes that I make in webapp/js/application.js, such as changing the label on the Rule FIlter button never gets picked up and displayed in the UI.I have unpacked the war file and the application.js looks exactly as I have edited it.
When I build the new processor  nar I am using mvn clean install, I am seeing no errors, also when NiFi loads there are no errors or warnings.Is there a developers guide for creating this type of UI in processors, or can someone help and tell me why my changes are not being picked up?
Many thanksDave

Re: Help & advice needed on application.js in Processors

Posted by Sivaprasanna <si...@gmail.com>.
Isn’t it much easier to just open in an incognito or private window to not
worry about cache and hard reload?

-
Sivaprasanna

On Thu, 1 Feb 2018 at 12:29 AM, Matt Gilman <ma...@gmail.com> wrote:

> Just wanted to add that the Custom UI's are displayed in an iframe.
> Sometimes the hard reload does not trigger the iframe to reload. You may
> need to open that frame source in a new tab and do a hard reload.
>
> Also, can you confirm that you've updated your
> META-INF/nifi-processor-configuration accordingly?
>
> Matt
>
> On Tue, Jan 30, 2018 at 9:07 PM, Koji Kawamura <ij...@gmail.com>
> wrote:
>
> > Hi Dave,
> >
> > If you can confirm the updated application.js is included in the war
> > file, then it sounds like a matter of Web browser caching. The old
> > application.js cached at the client Web browser may be used. A hard
> > reload (Ctrl + Shift + R for Chrome) may help if that's the case.
> >
> > Thanks,
> > Koji
> >
> > On Wed, Jan 31, 2018 at 6:48 AM, DAVID SMITH <davidrsmith@btinternet.com
> >
> > wrote:
> > > Hi
> > > I am trying to create a processor that is partially based on the
> > UpdateAttribute processor 0.7.3.I have cloned the UpdateAttribute source,
> > renamed the processor and I have started by trying to amend the Advanced
> > configuration UI. I have found that I can change labels for fields in the
> > Advanced configuration UI in WEB-INF/jsp/worksheet.jsp, and these are
> > reflected in the Advanced UI after a reload.
> > > However any changes that I make in webapp/js/application.js, such as
> > changing the label on the Rule FIlter button never gets picked up and
> > displayed in the UI.I have unpacked the war file and the application.js
> > looks exactly as I have edited it.
> > > When I build the new processor  nar I am using mvn clean install, I am
> > seeing no errors, also when NiFi loads there are no errors or warnings.Is
> > there a developers guide for creating this type of UI in processors, or
> can
> > someone help and tell me why my changes are not being picked up?
> > > Many thanksDave
> >
>

Re: Help & advice needed on application.js in Processors

Posted by Matt Gilman <ma...@gmail.com>.
Just wanted to add that the Custom UI's are displayed in an iframe.
Sometimes the hard reload does not trigger the iframe to reload. You may
need to open that frame source in a new tab and do a hard reload.

Also, can you confirm that you've updated your
META-INF/nifi-processor-configuration accordingly?

Matt

On Tue, Jan 30, 2018 at 9:07 PM, Koji Kawamura <ij...@gmail.com>
wrote:

> Hi Dave,
>
> If you can confirm the updated application.js is included in the war
> file, then it sounds like a matter of Web browser caching. The old
> application.js cached at the client Web browser may be used. A hard
> reload (Ctrl + Shift + R for Chrome) may help if that's the case.
>
> Thanks,
> Koji
>
> On Wed, Jan 31, 2018 at 6:48 AM, DAVID SMITH <da...@btinternet.com>
> wrote:
> > Hi
> > I am trying to create a processor that is partially based on the
> UpdateAttribute processor 0.7.3.I have cloned the UpdateAttribute source,
> renamed the processor and I have started by trying to amend the Advanced
> configuration UI. I have found that I can change labels for fields in the
> Advanced configuration UI in WEB-INF/jsp/worksheet.jsp, and these are
> reflected in the Advanced UI after a reload.
> > However any changes that I make in webapp/js/application.js, such as
> changing the label on the Rule FIlter button never gets picked up and
> displayed in the UI.I have unpacked the war file and the application.js
> looks exactly as I have edited it.
> > When I build the new processor  nar I am using mvn clean install, I am
> seeing no errors, also when NiFi loads there are no errors or warnings.Is
> there a developers guide for creating this type of UI in processors, or can
> someone help and tell me why my changes are not being picked up?
> > Many thanksDave
>

Re: Help & advice needed on application.js in Processors

Posted by Koji Kawamura <ij...@gmail.com>.
Hi Dave,

If you can confirm the updated application.js is included in the war
file, then it sounds like a matter of Web browser caching. The old
application.js cached at the client Web browser may be used. A hard
reload (Ctrl + Shift + R for Chrome) may help if that's the case.

Thanks,
Koji

On Wed, Jan 31, 2018 at 6:48 AM, DAVID SMITH <da...@btinternet.com> wrote:
> Hi
> I am trying to create a processor that is partially based on the UpdateAttribute processor 0.7.3.I have cloned the UpdateAttribute source, renamed the processor and I have started by trying to amend the Advanced configuration UI. I have found that I can change labels for fields in the Advanced configuration UI in WEB-INF/jsp/worksheet.jsp, and these are reflected in the Advanced UI after a reload.
> However any changes that I make in webapp/js/application.js, such as changing the label on the Rule FIlter button never gets picked up and displayed in the UI.I have unpacked the war file and the application.js looks exactly as I have edited it.
> When I build the new processor  nar I am using mvn clean install, I am seeing no errors, also when NiFi loads there are no errors or warnings.Is there a developers guide for creating this type of UI in processors, or can someone help and tell me why my changes are not being picked up?
> Many thanksDave