Customizing Invite screen

I am attempting to change the signup_invited page to be more customized for our clients, however, the changes are not being reflected live even after restarting grafana-server. I have tried changing the /public/app/partials/signup_invited.html, the /public/emails/new_user_invite.html, and the /public/app/core/partials.js files. Any advice would be greatly appreciated.

Are you building from source or is it a download of Grafana? If it is a download, what version of Grafana are you using and on which OS?

It is a downloaded of Grafana v4.4.3 on an AWS Amazon linux OS. I forgot to mention that the changes I made to the email file (/public/emails/new_user_invite.html) is being reflected in the email being sent to the client so that part is working with no problems. The problem is with the screen that they go to when clicking the link from the email to the signup_invited.html page. The route this follows is /invite/.

What exactly is the problem? Not sure I understand. Do you want to change the link in email or change something in signup_invited.html?

The invite route uses the signup_invited.html page so html changes can be done but if you want to change JavaScript then you are probably going to have to fork Grafana and build your own version. Can you describe the change you want to do?

I am trying to change signup_invited.html. The problem is that the changes I make to that file are not being reflected in my live version of Grafana even after restarting it.

Current welcome phrase in signup_invited.html:

Hello {{greeting}}.

{{invitedBy}} has invited you to join Grafana and the organization {{contextSrv.user.orgName}}

Custom phrase:

Hello {{greeting}}.

{{invitedBy}} has invited you to join the {{contextSrv.user.orgName}} SMARTLINE online dashboard.

The file itself has the custom phrasing in it, but when I go to the page online, it still shows the original phrasing.

EDIT: I have also tested this by clearing my browser cache to make sure it is not loading a cached version of the page.

It’s a bit weird to be changing binaries and it sounds like you are doing this inside of a docker container. But in this case I think this partial is embedded in the main Grafana javascript file:

/usr/share/grafana/public/app/boot.xxxxxxxx.js where xxxxxxxx is a unique string ( for example e4836696).

So just search the file to find the text you want to change and save. You should not even need to restart the server.

Yes, I was doing this inside of a docker container. Any idea why it would be embedded in that file? This fixed my problem, but I did have to restart the grafana-server for the changes to take effect. I will mark your reply as the solution and would just ask that you edit it to say that the server still needs to be restarted. Thanks so much for your help!

It is embedded for performance reasons - so not so strange.

Just to be sure - you do know that this is a hacky solution?

Firstly, If you rebuild your docker container then you will lose your changes. It is a best practice to consider docker containers as immutable.

Secondly, it can be difficult to change minified JavaScript and it would be easy to introduce a bug.

Yes, I know this is a hacky solution. As soon as you mentioned the boot/binary file, I knew this was not the recommended solution. However, my server is already live with this and I didn’t want to interrupt service by recreating the container. I have modified the source files though, so for future containers, I shouldn’t have this problem or need to implement this solution. I have a modified version of Grafana source that I manage and create the docker container for. So far I haven’t found any bugs and everything is working as intended. Thanks for your help and warning/concern.

1 Like