Jump to content


Photo

NetScaler 11.0.63.16 themes - additional customisation

Started by Andrew Moss , 26 November 2015 - 02:48 PM
6 replies to this topic

Andrew Moss Members

Andrew Moss
  • 326 posts

Posted 26 November 2015 - 02:48 PM

So on NetScaler 10.x I did the usual customisation of the index.html landing page.

 

In my case I added an entry just below the logon button on the default CAG page with some text and a URL link taking users to a password self service platform similar to the following.

 

"To access the selfservice password platform please click here: <URL>"

 

However in NetScaler 11 this has changed significantly and I am struggling to re-do this customisation. Within the Admin GUI the closest I can find is to add an EULA but this doesn't really fit our requirements.

 

from having a look at the various files in /netscaler/ns_gui/vpn it looks like I may need to add this somehow to the "gateway_login_form_view.js" but not really sure what I'm doing with this.

 

Anyone got any thoughts on this?



Sam Jacobs CTP Member

Sam Jacobs
  • 6,755 posts

Posted 27 November 2015 - 12:03 AM

Are you trying to do something like the attached screenshot?

 

NetScaler v11 with Symphony Theme.png



Andrew Moss Members

Andrew Moss
  • 326 posts

Posted 27 November 2015 - 01:11 AM

Yes Sam pretty much as per your screenshot.

Sam Jacobs CTP Member

Sam Jacobs
  • 6,755 posts

Posted 27 November 2015 - 02:31 AM

It actually goes into the file gateway_login_view.js.

 

The easiest way is to put it into the div called logonbelt_bottomshadow.

See the attached screenshots:

 

gateway_login_view-original.png    gateway_login_view-modified.png

 

You may also need to modify the custom.css file to make the text easier to read, or to match your color scheme.

 

I would suggest that instead of modifying the original, that you create a copy (e.g. custom_login_view.js), and then use a responder policy to redirect the call for the file.

This way, you don't need to worry about persisting changes on a reboot, since the responder policy takes care of it for you.

 

-Sam


Helpful Answer

Andrew Moss Members

Andrew Moss
  • 326 posts

Posted 27 November 2015 - 01:05 PM

Thanks Sam. I dunno how you worked that out but good work thanks :)

Its almost spot on but with a couple of issues:

1) it wouldn't recognise the plain text followed by the URL link so I had to make the whole text a URL link (see screenshot)

 

2) I had to remove the quote marks from the href URL otherwise it tried to take you to the incorrect URL https://1.2.3.4/vpnindex.html?https://pwdmgmt.local?

 

3) on the original theme the text was sited centrally below the logon form. However on the X1 theme is is below the logon form but justified left

 

4) In the custom.css file under /var/netscaler/logon/themes/<name>/css, I tried adding the folllwing to see if it worked but couldn't get it to do anything:

.pw_self_service {
 font-size : 14px;
}

 

Capture.PNG



Sam Jacobs CTP Member

Sam Jacobs
  • 6,755 posts

Posted 27 November 2015 - 07:37 PM

Andrew,

 

pw_self_service is just a JavaScript variable name.

The name you should be using for the CSS selector is div#logonbelt-bottomshadow

 

Also, when you have quotes within a quoted stringthey cannot both be the same (either single or double quotes), or it will be taken as the end of the string. For example, in your screenshot above,

"<a target="_blank" ... needs to be  "<a target='_blank' ...  (single quotes around _blank)

That might have caused issues #1 and/or #2. 

 

-Sam



Andrew Moss Members

Andrew Moss
  • 326 posts

Posted 30 November 2015 - 03:50 PM

I'm making a bit more progress Sam but its still proving a bit elusive to configure the text size, colour etc...

 

1) I tried adding the info to custom.css under the div#logonbelt-bottomshadow but I still can't get it to change the font size or color.

 

2) I tried creating a responder policy but without success using:

add responder action ns_rsp_act_CAG_JS respondwith "\"gateway_login_view_tst.js\""

add responder policy ns_rsp_pol_CAG_JS "http.req.body.contains(\"gateway_login_view.js\")" ns_rsp_act_CAG_JS

 

As I have 4 CAGs that each require their own custom URL so I previously was using a responder policy to direct them to a unique index.html file as per CTX123736. What I have tried it to modify the new index.html file instead and updated it to reference "gateway_login_view_tst.js" (row16 in the file) successfully. However as soon as you change the name of the Index.html file to anything else so I can redirect clients to it it fails and you just get a blank page.

So something else now wants index.html filename to remain unchanged...