diff --git a/esp/src/src-react/components/Frame.tsx b/esp/src/src-react/components/Frame.tsx index 35c1392b87a..58967d6ff4d 100644 --- a/esp/src/src-react/components/Frame.tsx +++ b/esp/src/src-react/components/Frame.tsx @@ -90,42 +90,6 @@ export const Frame: React.FunctionComponent = () => { return () => unlisten(); }, []); - React.useEffect(() => { - initSession(); - - topic.subscribe("hpcc/session_management_status", function (publishedMessage) { - if (publishedMessage.status === "Unlocked") { - unlock(); - } else if (publishedMessage.status === "Locked") { - lock(); - } else if (publishedMessage.status === "DoIdle") { - fireIdle(); - } else if (publishedMessage.status === "Idle") { - window.localStorage.setItem("pageOnLock", window.location.hash.substring(1)); - setUserSession({ ...userSession, Status: "Locked" }); - window.location.reload(); - } - }); - }, [setUserSession, userSession]); - - React.useEffect(() => { - initSession(); - - topic.subscribe("hpcc/session_management_status", function (publishedMessage) { - if (publishedMessage.status === "Unlocked") { - unlock(); - } else if (publishedMessage.status === "Locked") { - lock(); - } else if (publishedMessage.status === "DoIdle") { - fireIdle(); - } else if (publishedMessage.status === "Idle") { - window.localStorage.setItem("pageOnLock", window.location.hash.substring(1)); - setUserSession({ ...userSession, Status: "Locked" }); - window.location.reload(); - } - }); - }, [setUserSession, userSession]); - React.useEffect(() => { document.title = `${showEnvironmentTitle && environmentTitle.length ? environmentTitle : "ECL Watch "}${locationPathname.split("/").join(" | ")}`; }, [environmentTitle, locationPathname, showEnvironmentTitle]); diff --git a/esp/src/src/ESPUtil.ts b/esp/src/src/ESPUtil.ts index 8c8a94e4abc..43cf058435d 100644 --- a/esp/src/src/ESPUtil.ts +++ b/esp/src/src/ESPUtil.ts @@ -314,10 +314,10 @@ export function goToPageUserPreference(gridName, key) { export const MonitorLockClick = dojo.declare([Evented], { unlocked() { - this.emit("Unlocked", {}); + this.emit("unlocked", {}); }, locked() { - this.emit("Locked", {}); + this.emit("locked", {}); } });