Loading services/webapp/code/rosetta/core_app/management/commands/core_app_populate.py +7 −4 Original line number Diff line number Diff line Loading @@ -155,7 +155,8 @@ to provide help, news and informations on your deployment. Or you can just ignor interface_protocol = 'http', interface_transport = 'tcp/ip', supports_custom_interface_port = True, supports_interface_auth = True) supports_interface_auth = True, interface_auth_user = None) # Jupyter Notebook Loading @@ -171,12 +172,13 @@ to provide help, news and informations on your deployment. Or you can just ignor interface_protocol = 'http', interface_transport = 'tcp/ip', supports_custom_interface_port = True, supports_interface_auth = True) supports_interface_auth = True, interface_auth_user = None) # SSH server Container.objects.create(user = None, name = 'SSH server', description = 'A SSH server supporting X forwarding as well.', description = 'An SSH server supporting X forwarding as well.', registry = 'docker.io', image = 'sarusso/ssh', tag = 'v0.2.0', Loading @@ -186,7 +188,8 @@ to provide help, news and informations on your deployment. Or you can just ignor interface_protocol = 'ssh', interface_transport = 'tcp/ip', supports_custom_interface_port = True, supports_interface_auth = True) supports_interface_auth = True, interface_auth_user = 'metauser') #===================== # Testuser containers Loading services/webapp/code/rosetta/core_app/migrations/0021_container_interface_auth_user.py 0 → 100644 +18 −0 Original line number Diff line number Diff line # Generated by Django 2.2.1 on 2021-11-16 00:44 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core_app', '0020_profile_auth'), ] operations = [ migrations.AddField( model_name='container', name='interface_auth_user', field=models.CharField(blank=True, max_length=36, null=True, verbose_name='Interface auth fixed user if any'), ), ] services/webapp/code/rosetta/core_app/models.py +1 −0 Original line number Diff line number Diff line Loading @@ -135,6 +135,7 @@ class Container(models.Model): # Capabilities supports_custom_interface_port = models.BooleanField('Supports custom interface port', default=False) # BASE_PORT supports_interface_auth = models.BooleanField('Supports interface auth', default=False) # AUTH_USER / AUTH_PASS interface_auth_user = models.CharField('Interface auth fixed user if any', max_length=36, blank=True, null=True) class Meta: ordering = ['name'] Loading services/webapp/code/rosetta/core_app/templates/task_connect.html +17 −0 Original line number Diff line number Diff line Loading @@ -13,7 +13,16 @@ <h2> Connecting to task <b>{{ data.task.name }}</b></h2> <p style="font-size: 16px;"> <br /> {% if not data.task.requires_proxy_auth %} {% if data.task.container.interface_auth_user %} User: <input style="margin-bottom:15px;" type="username" class="form-control" value="{{ data.task.container.interface_auth_user }}"name='username' readonly > {% else %} {% endif %} {% else %} User: <input style="margin-bottom:15px;" type="username" class="form-control" value="{{ request.user.email }}"name='username' readonly > {% endif %} {% if data.task.requires_proxy_auth %} Loading @@ -34,13 +43,21 @@ Password: <input type="text" class="form-control" placeholder="" value="{{data.task.auth_token}}" name='password' readonly> <p style="margin-left:10px; font-size:0.9em; color:#484848"> <i class="fa fa-info-circle" style="color:#337ab7"></i> {% if not data.task.requires_proxy_auth and data.task.container.interface_auth_user %} This task will require to manually enter the above user and password token {% else %} This task will require to manually enter the above password token {% endif %} </p> {% else %} Password: <input type="password" class="form-control" placeholder="" value="placeholder" name='password' readonly> <p style="margin-left:10px; font-size:0.9em; color:#484848"> <i class="fa fa-info-circle" style="color:#337ab7"></i> {% if not data.task.requires_proxy_auth and data.task.container.interface_auth_user %} This task will require to manually enter the above user and the password set up when creating the task {% else %} This task will require to manually enter the password set up when creating the task {% endif %} </p> {% endif %} Loading Loading
services/webapp/code/rosetta/core_app/management/commands/core_app_populate.py +7 −4 Original line number Diff line number Diff line Loading @@ -155,7 +155,8 @@ to provide help, news and informations on your deployment. Or you can just ignor interface_protocol = 'http', interface_transport = 'tcp/ip', supports_custom_interface_port = True, supports_interface_auth = True) supports_interface_auth = True, interface_auth_user = None) # Jupyter Notebook Loading @@ -171,12 +172,13 @@ to provide help, news and informations on your deployment. Or you can just ignor interface_protocol = 'http', interface_transport = 'tcp/ip', supports_custom_interface_port = True, supports_interface_auth = True) supports_interface_auth = True, interface_auth_user = None) # SSH server Container.objects.create(user = None, name = 'SSH server', description = 'A SSH server supporting X forwarding as well.', description = 'An SSH server supporting X forwarding as well.', registry = 'docker.io', image = 'sarusso/ssh', tag = 'v0.2.0', Loading @@ -186,7 +188,8 @@ to provide help, news and informations on your deployment. Or you can just ignor interface_protocol = 'ssh', interface_transport = 'tcp/ip', supports_custom_interface_port = True, supports_interface_auth = True) supports_interface_auth = True, interface_auth_user = 'metauser') #===================== # Testuser containers Loading
services/webapp/code/rosetta/core_app/migrations/0021_container_interface_auth_user.py 0 → 100644 +18 −0 Original line number Diff line number Diff line # Generated by Django 2.2.1 on 2021-11-16 00:44 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core_app', '0020_profile_auth'), ] operations = [ migrations.AddField( model_name='container', name='interface_auth_user', field=models.CharField(blank=True, max_length=36, null=True, verbose_name='Interface auth fixed user if any'), ), ]
services/webapp/code/rosetta/core_app/models.py +1 −0 Original line number Diff line number Diff line Loading @@ -135,6 +135,7 @@ class Container(models.Model): # Capabilities supports_custom_interface_port = models.BooleanField('Supports custom interface port', default=False) # BASE_PORT supports_interface_auth = models.BooleanField('Supports interface auth', default=False) # AUTH_USER / AUTH_PASS interface_auth_user = models.CharField('Interface auth fixed user if any', max_length=36, blank=True, null=True) class Meta: ordering = ['name'] Loading
services/webapp/code/rosetta/core_app/templates/task_connect.html +17 −0 Original line number Diff line number Diff line Loading @@ -13,7 +13,16 @@ <h2> Connecting to task <b>{{ data.task.name }}</b></h2> <p style="font-size: 16px;"> <br /> {% if not data.task.requires_proxy_auth %} {% if data.task.container.interface_auth_user %} User: <input style="margin-bottom:15px;" type="username" class="form-control" value="{{ data.task.container.interface_auth_user }}"name='username' readonly > {% else %} {% endif %} {% else %} User: <input style="margin-bottom:15px;" type="username" class="form-control" value="{{ request.user.email }}"name='username' readonly > {% endif %} {% if data.task.requires_proxy_auth %} Loading @@ -34,13 +43,21 @@ Password: <input type="text" class="form-control" placeholder="" value="{{data.task.auth_token}}" name='password' readonly> <p style="margin-left:10px; font-size:0.9em; color:#484848"> <i class="fa fa-info-circle" style="color:#337ab7"></i> {% if not data.task.requires_proxy_auth and data.task.container.interface_auth_user %} This task will require to manually enter the above user and password token {% else %} This task will require to manually enter the above password token {% endif %} </p> {% else %} Password: <input type="password" class="form-control" placeholder="" value="placeholder" name='password' readonly> <p style="margin-left:10px; font-size:0.9em; color:#484848"> <i class="fa fa-info-circle" style="color:#337ab7"></i> {% if not data.task.requires_proxy_auth and data.task.container.interface_auth_user %} This task will require to manually enter the above user and the password set up when creating the task {% else %} This task will require to manually enter the password set up when creating the task {% endif %} </p> {% endif %} Loading