mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-10-04 09:23:21 +08:00
Change attach URL
This commit is contained in:
@@ -36,7 +36,10 @@
|
||||
$scope.showInstance($scope.instances[0]);
|
||||
}
|
||||
}, function(response) {
|
||||
console.log('error', response);
|
||||
if (response.status == 404) {
|
||||
document.write('session not found');
|
||||
return
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -40,8 +40,9 @@ function createTerminal(name) {
|
||||
term = new Terminal({
|
||||
cursorBlink: false
|
||||
});
|
||||
var sessionId = location.pathname.substr(location.pathname.lastIndexOf("/")+1);
|
||||
protocol = (location.protocol === 'https:') ? 'wss://' : 'ws://';
|
||||
socketURL = protocol + location.hostname + ((location.port) ? (':' + location.port) : '') + '/exec/' + name;
|
||||
socketURL = protocol + location.hostname + ((location.port) ? (':' + location.port) : '') + '/sessions/' + sessionId + '/instances/' + name + '/attach';
|
||||
|
||||
term.open(terminalContainer);
|
||||
|
||||
|
Reference in New Issue
Block a user