Skip to content
Snippets Groups Projects
Commit 2e60251e authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Fixes.

parent d4776b81
No related branches found
Tags 1.0.0
No related merge requests found
...@@ -126,7 +126,7 @@ class Command(BaseCommand): ...@@ -126,7 +126,7 @@ class Command(BaseCommand):
supports_custom_interface_port = True, supports_custom_interface_port = True,
supports_interface_auth = True) supports_interface_auth = True)
# Jupyter Notebook # SSH server
Container.objects.create(user = None, Container.objects.create(user = None,
name = 'SSH server', name = 'SSH server',
description = 'A SSH server supporting X forwarding as well.', description = 'A SSH server supporting X forwarding as well.',
...@@ -136,7 +136,7 @@ class Command(BaseCommand): ...@@ -136,7 +136,7 @@ class Command(BaseCommand):
arch = 'x86_64', arch = 'x86_64',
os = 'linux', os = 'linux',
interface_port = '22', interface_port = '22',
interface_protocol = 'http', interface_protocol = 'ssh',
interface_transport = 'tcp/ip', interface_transport = 'tcp/ip',
supports_custom_interface_port = True, supports_custom_interface_port = True,
supports_interface_auth = True) supports_interface_auth = True)
......
...@@ -52,9 +52,11 @@ ...@@ -52,9 +52,11 @@
{% if data.task.container.interface_protocol == 'http' or data.task.container.interface_protocol == 'https' %} {% if data.task.container.interface_protocol == 'http' or data.task.container.interface_protocol == 'https' %}
<input type='submit' style="width:110px" class="btn btn-lg btn-success btn-block" value='Log in' /> <input type='submit' style="width:110px" class="btn btn-lg btn-success btn-block" value='Log in' />
{% else %} {% else %}
To connect, open the program suitable for this task interface protocol ({{data.task.container.interface_protocol}}) with:<br /> To connect, use a program suitable for this task interface protocol ({{data.task.container.interface_protocol}}) with:<br />
IP: <code>{{ data.task.tcp_tunnel_host}}</code><br /> <p style="margin-top:5px; line-height:1.8em">
Port: <code>{{ data.task.tcp_tunnel_port}}</code> <b>Host:</b> <code>{{ data.task.tcp_tunnel_host}}</code><br />
<b>Port:</b> <code>{{ data.task.tcp_tunnel_port}}</code>
</p>
{% endif %} {% endif %}
......
...@@ -994,12 +994,14 @@ def task_connect(request): ...@@ -994,12 +994,14 @@ def task_connect(request):
# Get the task # Get the task
#task = Task.objects.get(uuid__startswith=short_uuid)
task = Task.objects.get(uuid=task_uuid) task = Task.objects.get(uuid=task_uuid)
if task.user != request.user: if task.user != request.user:
raise ErrorMessage('You do not have access to this task.') raise ErrorMessage('You do not have access to this task.')
# Ensure that the tunnel and proxy are set up
setup_tunnel_and_proxy(task)
data ={} data ={}
data['task'] = task data['task'] = task
...@@ -1020,7 +1022,7 @@ def direct_connection_handler(request, uuid): ...@@ -1020,7 +1022,7 @@ def direct_connection_handler(request, uuid):
if task.user != request.user: if task.user != request.user:
raise ErrorMessage('You do not have access to this task.') raise ErrorMessage('You do not have access to this task.')
# First ensure that the tunnel and proxy are set up # Ensure that the tunnel and proxy are set up
setup_tunnel_and_proxy(task) setup_tunnel_and_proxy(task)
# Get task and tunnel proxy host # Get task and tunnel proxy host
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment