Forum Discussion
rafaelbn
Jun 17, 2019Cirrostratus
APM Policy to auto-connect VPN and then open webtop
Hello Devs! I'm trying to design a policy that a client would auto connect to the VPN and the webtop, with the internal apps links, did not have the VPN link. Let me show an image: ...
Jun 20, 2019
Hi Rafael,
You can use the APM Advanced Customization to make the '/Common/vpn-network-resource' button on your website to be hidden. To achieve this add the following javascript code to the footer.inc file of your access policy.
I've tested this code with version 14.1.0.3.
<script>
if (window.location.href.indexOf('vdesk/webtop.eui?webtop') > 0 ) {
document.getElementById("webtop_favorites_inner_container2").style.display = "none";
document.addEventListener('readystatechange', event => {
const sleep = (milliseconds) => {
return new Promise(resolve => setTimeout(resolve, milliseconds))
}
if (event.target.readyState === "interactive") { //same as: document.addEventListener("DOMContentLoaded"... // same as jQuery.ready
//alert("All HTML DOM elements are accessible");
}
if (event.target.readyState === "complete") {
//alert("Now external resources are loaded too, like css,src etc... ");
sleep(500).then(() => {
document.getElementById('/Common/vpn-network-resource').style.display = 'none';
document.getElementById("webtop_favorites_inner_container2").style.display = "block";
})
}
});
}
</script>
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects