Commit 2e60251e authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Fixes.

parent d4776b81
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -126,7 +126,7 @@ class Command(BaseCommand):
                                     supports_custom_interface_port = True,
                                     supports_interface_auth = True)

            # Jupyter Notebook 
            # SSH server
            Container.objects.create(user     = None,
                                     name     = 'SSH server',
                                     description = 'A SSH server supporting X forwarding as well.',
@@ -136,7 +136,7 @@ class Command(BaseCommand):
                                     arch = 'x86_64',
                                     os = 'linux',
                                     interface_port     = '22',
                                     interface_protocol = 'http',
                                     interface_protocol = 'ssh',
                                     interface_transport = 'tcp/ip',
                                     supports_custom_interface_port = True,
                                     supports_interface_auth = True)
+5 −3
Original line number Diff line number Diff line
@@ -52,9 +52,11 @@
        {% 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' />
        {% else %}
        To connect, open the program suitable for this task interface protocol ({{data.task.container.interface_protocol}}) with:<br />
        IP: <code>{{ data.task.tcp_tunnel_host}}</code><br />
        Port: <code>{{ data.task.tcp_tunnel_port}}</code>
        To connect, use a program suitable for this task interface protocol ({{data.task.container.interface_protocol}}) with:<br />
        <p style="margin-top:5px; line-height:1.8em">
        <b>Host:</b> <code>{{ data.task.tcp_tunnel_host}}</code><br />
        <b>Port:</b> <code>{{ data.task.tcp_tunnel_port}}</code>
        </p>
        {% endif %}
        
        
+5 −3
Original line number Diff line number Diff line
@@ -994,12 +994,14 @@ def task_connect(request):


    # Get the task     
    #task = Task.objects.get(uuid__startswith=short_uuid)
    task = Task.objects.get(uuid=task_uuid)
    
    if task.user != request.user:
        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['task'] = task
    
@@ -1020,7 +1022,7 @@ def direct_connection_handler(request, uuid):
    if task.user != request.user:
        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)
    
    # Get task and tunnel proxy host