Forum Discussion

EvTheFuture's avatar
Nov 03, 2023

[Workaound] User required to manually start EPI and VPN in browsers

After upgrading to version 16.1.4 the users need to manually start the End Point Inspector and the Web Initiated VPN by clicking on a "Start" button. This is describe in this KB. I created a u...
  • EvTheFuture's avatar
    Jan 30, 2024

    2024-01-30: Updated to also include auto start of tunnels.

     

    define(["require", "exports", "apmui"], function (require, exports, apmui_1) {
        "use strict";
        Object.defineProperty(exports, "__esModule", { value: true });
        var app = apmui_1.App.get();

        app.subscribe(apmui_1.EventType.EPS_CHECK_PROGRESS, function (_, store) {
            var btns = document.getElementsByClassName("apmui-button");

            if (btns.length == 0) {
                console.log("Failed to find button...");
                return;
            }

            btns[0].click();
        });

        app.subscribe(apmui_1.EventType.DIALOG_OPEN, function (_, store) {
            setTimeout(function () {
                var dialog = document.getElementById("sna_auto_start_not_supported");

                if (dialog == null) {
                    try {
                        dialog = document.getElementsByClassName("restart_noautostart_action")[0];
                    } catch (e) { }
                }   
                
                if (dialog == null) {
                    console.log("Didn't find the right dialog");
                    return;
                }

                var btns = dialog.getElementsByClassName("apmui-button");

                if (btns.length == 0) {
                    console.log("Didn't find the start button");
                    return;
                }

                btns[0].click();
            }, 100);
        });
    });