Add "Open Port" button (#362)

This commit is contained in:
Michael Irwin
2019-10-22 11:21:19 -04:00
committed by Marcos Nils
parent d0ff81cc98
commit bacf00e658
2 changed files with 12 additions and 1 deletions

View File

@@ -389,6 +389,14 @@
});
}
$scope.openPort = function(instance) {
var port = prompt('What port would you like to open?');
if (!port) return;
var url = $scope.getProxyUrl(instance, port);
window.open(url, '_blank');
}
$scope.getProxyUrl = function(instance, port) {
var url = 'http://' + instance.proxy_host + '-' + port + '.direct.' + $scope.host;