Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fgh url enhancements #61

Closed
wants to merge 12 commits into from
Prev Previous commit
Plumb return from novnc for autologin case - should just return to lo…
…go page, not full main page
fghalasz committed Mar 16, 2025
commit 8d2741abd408496e08902d7263ef972885996f9a
4 changes: 3 additions & 1 deletion web-portal/client/js/main.js
Original file line number Diff line number Diff line change
@@ -113,7 +113,7 @@ window.addEventListener('load', (event) => {
dlg.showModal();
}
}
if(isAutoLogin) startSession("interlisp");
if(isAutoLogin && (! fromvnc)) startSession("interlisp");
});

function startSession (interlispOrXterm) {
@@ -182,6 +182,7 @@ function startSession (interlispOrXterm) {
+ `&rooms=${runRooms || "false"}`
+ `&sftp=${startSftp || "false"}`
+ `&exec=${medleyExec || "inter"}`
+ ( isAutoLogin ? "&autologin" : "")
);
}
);
@@ -198,6 +199,7 @@ function startSession (interlispOrXterm) {
+ `&rooms=${runRooms || "false"}`
+ `&sftp=${startSftp || "false"}`
+ `&exec=${medleyExec || "inter"}`
+ ( isAutoLogin ? "&autologin" : "")
);
}
},
5 changes: 4 additions & 1 deletion web-portal/client/novnc_oio/ui.js
Original file line number Diff line number Diff line change
@@ -1161,7 +1161,10 @@ const UI = {
//
// UI.openControlbar();
// UI.openConnectPanel();
window.location.assign(window.location.origin + "/main?fromvnc=1");
if(document.location.href.match(/autologin/))
window.location.assign(window.location.origin + "/main?fromvnc=1&autologin=1");
else
window.location.assign(window.location.origin + "/main?fromvnc=1");
},

securityFailed(e) {
1 change: 1 addition & 0 deletions web-portal/server/js/medley.js
Original file line number Diff line number Diff line change
@@ -272,6 +272,7 @@ function goToVnc(req, res, next) {
var url = `/client/go?target=${req.oioTarget}&port=${req.oioPort}&autoconnect=1&view_only=0`;
url = `${url}${config.supportHttps ? "&encrypt=1" : ""}&u=${req.user.uname}&p=${req.sftpPwd}`;
if(config.isNCO(req)) url = `${url}&nco=1`;
if(req.query.autologin != undefined) url = `${url}&autologin=1`;
res.redirect(url);
}