mirror of
https://github.com/unraid/webgui.git
synced 2026-01-06 01:29:54 -06:00
Merge pull request #2210 from Squidly271/Terminal
Feat: Terminal - Add button to manually open if popup blocked
This commit is contained in:
@@ -163,6 +163,9 @@ function openTerminal(tag,name,more) {
|
||||
// open terminal window (run in background)
|
||||
name = name.replace(/[ #]/g,"_");
|
||||
tty_window = makeWindow(name+(more=='.log'?more:''),Math.min(screen.availHeight,800),Math.min(screen.availWidth,1200));
|
||||
if ( tty_window === null ) {
|
||||
throw new Error('Failed to open terminal window');
|
||||
}
|
||||
var socket = ['ttyd','syslog'].includes(tag) ? '/webterminal/'+tag+'/' : '/logterminal/'+name+(more=='.log'?more:'')+'/';
|
||||
$.get('/webGui/include/OpenTerminal.php',{tag:tag,name:name,more:more},function(){setTimeout(function(){tty_window.location=socket; tty_window.focus();},200);});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user