Custom Javascript in UI Without Custom Build

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

Custom Javascript in UI Without Custom Build

Peter Wicks (pwicks)
I have some custom Javascript, used for application monitoring, that I'd like to put in the UI. I know how to do this if I'm willing to run a custom build of NiFi.  Is there anyway to do this without a custom build of NiFi?

My first thought was creating a dummy processor with an Advanced UI, and seeing if maybe I could get Javascript for that Advanced UI to run when the NiFi UI is loaded. This is a bit of work, so I thought I'd ask before trying this.

My second thought was to try and abuse the nifi.ui.banner.text setting, but this uses `text()` to set the banner text, so would not work for a block of Javascript.

I ran across this article by Scott Aslan, https://community.hortonworks.com/articles/134888/an-apache-nifi-frontend-developers-cookbook-part-1.html, but it was focused on core NiFi UI (great read, just not the direction I'm trying to go).

Thanks,
  Peter
Reply | Threaded
Open this post in threaded view
|

RE: Custom Javascript in UI Without Custom Build

Peter Wicks (pwicks)
Pinging to see if anyone has a work around for this?

-----Original Message-----
From: Peter Wicks (pwicks) <[hidden email]>
Sent: Wednesday, April 17, 2019 8:22 AM
To: [hidden email]
Subject: Custom Javascript in UI Without Custom Build

I have some custom Javascript, used for application monitoring, that I'd like to put in the UI. I know how to do this if I'm willing to run a custom build of NiFi.  Is there anyway to do this without a custom build of NiFi?

My first thought was creating a dummy processor with an Advanced UI, and seeing if maybe I could get Javascript for that Advanced UI to run when the NiFi UI is loaded. This is a bit of work, so I thought I'd ask before trying this.

My second thought was to try and abuse the nifi.ui.banner.text setting, but this uses `text()` to set the banner text, so would not work for a block of Javascript.

I ran across this article by Scott Aslan, https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.hortonworks.com%2Farticles%2F134888%2Fan-apache-nifi-frontend-developers-cookbook-part-1.html&amp;data=02%7C01%7Cpwicks%40micron.com%7C65be6350469d4b0f3c5a08d6c3402698%7Cf38a5ecd28134862b11bac1d563c806f%7C0%7C1%7C636911077628346348&amp;sdata=0gUO3oMynAPBTPTdDyE2uJ5n%2BTNY9P4HmDZm%2BdLhmDg%3D&amp;reserved=0, but it was focused on core NiFi UI (great read, just not the direction I'm trying to go).

Thanks,
  Peter
Reply | Threaded
Open this post in threaded view
|

Re: Custom Javascript in UI Without Custom Build

Joe Witt
Peter,

I'm not aware of any plans to provide/support what you're suggesting at
this point.

Can you describe more what you mean and would be doing with this?  Is what
you are trying to do something that the UI should just enable?

Thanks

On Thu, Apr 25, 2019 at 3:26 PM Peter Wicks (pwicks) <[hidden email]>
wrote:

> Pinging to see if anyone has a work around for this?
>
> -----Original Message-----
> From: Peter Wicks (pwicks) <[hidden email]>
> Sent: Wednesday, April 17, 2019 8:22 AM
> To: [hidden email]
> Subject: Custom Javascript in UI Without Custom Build
>
> I have some custom Javascript, used for application monitoring, that I'd
> like to put in the UI. I know how to do this if I'm willing to run a custom
> build of NiFi.  Is there anyway to do this without a custom build of NiFi?
>
> My first thought was creating a dummy processor with an Advanced UI, and
> seeing if maybe I could get Javascript for that Advanced UI to run when the
> NiFi UI is loaded. This is a bit of work, so I thought I'd ask before
> trying this.
>
> My second thought was to try and abuse the nifi.ui.banner.text setting,
> but this uses `text()` to set the banner text, so would not work for a
> block of Javascript.
>
> I ran across this article by Scott Aslan,
> https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.hortonworks.com%2Farticles%2F134888%2Fan-apache-nifi-frontend-developers-cookbook-part-1.html&amp;data=02%7C01%7Cpwicks%40micron.com%7C65be6350469d4b0f3c5a08d6c3402698%7Cf38a5ecd28134862b11bac1d563c806f%7C0%7C1%7C636911077628346348&amp;sdata=0gUO3oMynAPBTPTdDyE2uJ5n%2BTNY9P4HmDZm%2BdLhmDg%3D&amp;reserved=0,
> but it was focused on core NiFi UI (great read, just not the direction I'm
> trying to go).
>
> Thanks,
>   Peter
>
Reply | Threaded
Open this post in threaded view
|

RE: [EXT] Re: Custom Javascript in UI Without Custom Build

Peter Wicks (pwicks)
Joe,

We are testing out a product called AppDynamics for application monitoring/user experience tracking. We've hooked it into NiFi as an javaagent, but it also has an option where you can inject some JavaScript into the frontend and monitor UX there.

Doesn't really feel like something that NiFi needs to support, unless there was going to be a generic function to add .js files to make them globally accessible, like we do with jar's in the lib folder.

--Peter

-----Original Message-----
From: Joe Witt <[hidden email]>
Sent: Thursday, April 25, 2019 1:42 PM
To: [hidden email]
Subject: [EXT] Re: Custom Javascript in UI Without Custom Build

Peter,

I'm not aware of any plans to provide/support what you're suggesting at this point.

Can you describe more what you mean and would be doing with this?  Is what you are trying to do something that the UI should just enable?

Thanks

On Thu, Apr 25, 2019 at 3:26 PM Peter Wicks (pwicks) <[hidden email]>
wrote:

> Pinging to see if anyone has a work around for this?
>
> -----Original Message-----
> From: Peter Wicks (pwicks) <[hidden email]>
> Sent: Wednesday, April 17, 2019 8:22 AM
> To: [hidden email]
> Subject: Custom Javascript in UI Without Custom Build
>
> I have some custom Javascript, used for application monitoring, that
> I'd like to put in the UI. I know how to do this if I'm willing to run
> a custom build of NiFi.  Is there anyway to do this without a custom build of NiFi?
>
> My first thought was creating a dummy processor with an Advanced UI,
> and seeing if maybe I could get Javascript for that Advanced UI to run
> when the NiFi UI is loaded. This is a bit of work, so I thought I'd
> ask before trying this.
>
> My second thought was to try and abuse the nifi.ui.banner.text
> setting, but this uses `text()` to set the banner text, so would not
> work for a block of Javascript.
>
> I ran across this article by Scott Aslan,
> https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcomm
> unity.hortonworks.com%2Farticles%2F134888%2Fan-apache-nifi-frontend-de
> velopers-cookbook-part-1.html&amp;data=02%7C01%7Cpwicks%40micron.com%7
> C5020dcc7439e41a117e508d6c9b88039%7Cf38a5ecd28134862b11bac1d563c806f%7
> C0%7C0%7C636918191599225831&amp;sdata=VwL6qUgXToeorwY4K4VxV%2FtHW%2B0H
> hdJbhHBXHgWoXV4%3D&amp;reserved=0,
> but it was focused on core NiFi UI (great read, just not the direction
> I'm trying to go).
>
> Thanks,
>   Peter
>