Loading services/webapp/code/rosetta/core_app/management/commands/core_app_populate.py +32 −1 Original line number Diff line number Diff line Loading @@ -175,6 +175,37 @@ to provide help, news and informations on your deployment. Or you can just ignor supports_interface_auth = True, interface_auth_user = None) # Official Jupyter Lab Container.objects.create(user = None, name = 'Jupyter Lab', description = 'The official Jupyter Lab. The Scipy variant, which includes popular packages from the scientific Python ecosystem.', registry = 'docker.io', image = 'jupyter/scipy-notebook', tag = 'lab-3.2.2', arch = 'amd64,arm64', os = 'linux', interface_port = '8888', interface_protocol = 'http', interface_transport = 'tcp/ip', supports_custom_interface_port = True, supports_interface_auth = True) Container.objects.create(user = None, name = 'Jupyter Lab', description = 'The official Jupyter Lab. Includes popular packages from the scientific Python ecosystem.', registry = 'docker.io', image = 'jupyter/scipy-notebook', tag = 'lab-3.1.17', arch = 'amd64,arm64', os = 'linux', interface_port = '8888', interface_protocol = 'http', interface_transport = 'tcp/ip', supports_custom_interface_port = True, supports_interface_auth = True) # SSH server Container.objects.create(user = None, name = 'SSH server', Loading services/webapp/code/rosetta/core_app/models.py +1 −2 Original line number Diff line number Diff line Loading @@ -144,10 +144,9 @@ class Container(models.Model): user_str = self.user.email if self.user else None return str('Container "{}" of user "{}" with image "{}" and tag "{}" on registry "{}" '.format(self.name, user_str, self.image, self.tag, self.registry)) @ property def color(self): string_int_hash = hash_string_to_int(self.image + self.tag + self.registry) string_int_hash = hash_string_to_int(self.name + self.registry + self.image) color_map_index = string_int_hash % len(color_map) return color_map[color_map_index] Loading services/webapp/code/rosetta/core_app/templates/components/computing.html +1 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ {% csrf_token %} <input type="hidden" name="step" value="{{ data.next_step }}" /> <input type="hidden" name="task_container_uuid" value="{{container.uuid}}"> <input type="hidden" name="task_container_arch" value="{{container_arch}}"> <input type="hidden" name="task_computing_uuid" value="{{computing.uuid}}"> <input type="submit" value="Choose" class="btn btn-connect"> </form> Loading services/webapp/code/rosetta/core_app/templates/components/container.html +3 −3 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ <div style="padding:10px; margin-top:5px; text-align:center; border-bottom: {{container.color}} solid 10px; "> <a href="/software/?uuid={{ container.uuid }}">{{ container.name }}</a> <a href="/software/container_?uuid={{ container.uuid }}">{{ container.name }}</a> </div> <div style="padding:10px; height: 110px; vertical-align: middle; "> Loading @@ -125,7 +125,7 @@ <div class="image-version-box"> <!-- <font style="font-family:monospace; font-size:1.2em"></font> --> <b>Image:</b> <code>{{ container.image }}</code><br/> <b>Tag:</b> {{ container.tag }} <b>Tag:</b> {{ container.tag }} <b>Arch:</b> {{container_arch}} </div> </div> Loading services/webapp/code/rosetta/core_app/templates/components/container_family.html 0 → 100644 +78 −0 Original line number Diff line number Diff line {% if data.details %} {% for container in container_family.members %} {% include "components/container.html" with container=container details=data.details %} {% endfor %} {% else %} <div style="width:300px; float:left; border: #e0e0e0 solid 1px; margin:10px; background:#f8f8f8; margin-bottom:15px"> <form action="/new_task" method=GET> <input type="hidden" name="step" value="two"> <div style="padding:10px; margin-top:5px; text-align:center; border-bottom: {{container_family.color}} solid 10px; "> <a href="/software/?container_family_id={{ container_family_id }}&details=True">{{ container_family.name }}</a> </div> <div style="padding:10px; height: 125px; "> <!-- <div style="position: relative; top: 50%; transform: translateY(-50%);"> --> {% if container_family.description %} <div class="description-box" title="{{ container_family.description }}"> {{ container_family.description }} </div> {% else %} <br/> {% endif %} <div class="image-version-box"> <b>Image:</b> <code>{{ container_family.image }}</code><br/> <div style="margin-top:2px"> <span style="vertical-align:top;"><b>Tag:</b> </span> <select name="task_container_uuid" style="font-size:0.8em"> {% for container in container_family.members %} <option value="{{ container.uuid }}">{{ container.tag }}</option> {% endfor %} </select> <span style="vertical-align:top; margin-left:5px"><b>Arch:</b> </span> <select name="task_container_arch" style="font-size:0.8em"> <option value="auto" selected>auto</option> {% for arch in container_family.all_archs %} <option value="{{ arch }}">{{ arch }}</option> {% endfor %} </select> </div> </div> <!-- </div> --> </div> <div style="margin-bottom:8px; margin-top: 3px; text-align:center"> {% if not disable_play_button %} <button type="submit" onclick="myFunction()" class="btn-link btn btn-light" style="border: #c0c0c0 1px solid"> <i class="fa fa-play" style="color:green"></i> </button> {% endif %} </form> </div> </div> {% endif %} No newline at end of file Loading
services/webapp/code/rosetta/core_app/management/commands/core_app_populate.py +32 −1 Original line number Diff line number Diff line Loading @@ -175,6 +175,37 @@ to provide help, news and informations on your deployment. Or you can just ignor supports_interface_auth = True, interface_auth_user = None) # Official Jupyter Lab Container.objects.create(user = None, name = 'Jupyter Lab', description = 'The official Jupyter Lab. The Scipy variant, which includes popular packages from the scientific Python ecosystem.', registry = 'docker.io', image = 'jupyter/scipy-notebook', tag = 'lab-3.2.2', arch = 'amd64,arm64', os = 'linux', interface_port = '8888', interface_protocol = 'http', interface_transport = 'tcp/ip', supports_custom_interface_port = True, supports_interface_auth = True) Container.objects.create(user = None, name = 'Jupyter Lab', description = 'The official Jupyter Lab. Includes popular packages from the scientific Python ecosystem.', registry = 'docker.io', image = 'jupyter/scipy-notebook', tag = 'lab-3.1.17', arch = 'amd64,arm64', os = 'linux', interface_port = '8888', interface_protocol = 'http', interface_transport = 'tcp/ip', supports_custom_interface_port = True, supports_interface_auth = True) # SSH server Container.objects.create(user = None, name = 'SSH server', Loading
services/webapp/code/rosetta/core_app/models.py +1 −2 Original line number Diff line number Diff line Loading @@ -144,10 +144,9 @@ class Container(models.Model): user_str = self.user.email if self.user else None return str('Container "{}" of user "{}" with image "{}" and tag "{}" on registry "{}" '.format(self.name, user_str, self.image, self.tag, self.registry)) @ property def color(self): string_int_hash = hash_string_to_int(self.image + self.tag + self.registry) string_int_hash = hash_string_to_int(self.name + self.registry + self.image) color_map_index = string_int_hash % len(color_map) return color_map[color_map_index] Loading
services/webapp/code/rosetta/core_app/templates/components/computing.html +1 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ {% csrf_token %} <input type="hidden" name="step" value="{{ data.next_step }}" /> <input type="hidden" name="task_container_uuid" value="{{container.uuid}}"> <input type="hidden" name="task_container_arch" value="{{container_arch}}"> <input type="hidden" name="task_computing_uuid" value="{{computing.uuid}}"> <input type="submit" value="Choose" class="btn btn-connect"> </form> Loading
services/webapp/code/rosetta/core_app/templates/components/container.html +3 −3 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ <div style="padding:10px; margin-top:5px; text-align:center; border-bottom: {{container.color}} solid 10px; "> <a href="/software/?uuid={{ container.uuid }}">{{ container.name }}</a> <a href="/software/container_?uuid={{ container.uuid }}">{{ container.name }}</a> </div> <div style="padding:10px; height: 110px; vertical-align: middle; "> Loading @@ -125,7 +125,7 @@ <div class="image-version-box"> <!-- <font style="font-family:monospace; font-size:1.2em"></font> --> <b>Image:</b> <code>{{ container.image }}</code><br/> <b>Tag:</b> {{ container.tag }} <b>Tag:</b> {{ container.tag }} <b>Arch:</b> {{container_arch}} </div> </div> Loading
services/webapp/code/rosetta/core_app/templates/components/container_family.html 0 → 100644 +78 −0 Original line number Diff line number Diff line {% if data.details %} {% for container in container_family.members %} {% include "components/container.html" with container=container details=data.details %} {% endfor %} {% else %} <div style="width:300px; float:left; border: #e0e0e0 solid 1px; margin:10px; background:#f8f8f8; margin-bottom:15px"> <form action="/new_task" method=GET> <input type="hidden" name="step" value="two"> <div style="padding:10px; margin-top:5px; text-align:center; border-bottom: {{container_family.color}} solid 10px; "> <a href="/software/?container_family_id={{ container_family_id }}&details=True">{{ container_family.name }}</a> </div> <div style="padding:10px; height: 125px; "> <!-- <div style="position: relative; top: 50%; transform: translateY(-50%);"> --> {% if container_family.description %} <div class="description-box" title="{{ container_family.description }}"> {{ container_family.description }} </div> {% else %} <br/> {% endif %} <div class="image-version-box"> <b>Image:</b> <code>{{ container_family.image }}</code><br/> <div style="margin-top:2px"> <span style="vertical-align:top;"><b>Tag:</b> </span> <select name="task_container_uuid" style="font-size:0.8em"> {% for container in container_family.members %} <option value="{{ container.uuid }}">{{ container.tag }}</option> {% endfor %} </select> <span style="vertical-align:top; margin-left:5px"><b>Arch:</b> </span> <select name="task_container_arch" style="font-size:0.8em"> <option value="auto" selected>auto</option> {% for arch in container_family.all_archs %} <option value="{{ arch }}">{{ arch }}</option> {% endfor %} </select> </div> </div> <!-- </div> --> </div> <div style="margin-bottom:8px; margin-top: 3px; text-align:center"> {% if not disable_play_button %} <button type="submit" onclick="myFunction()" class="btn-link btn btn-light" style="border: #c0c0c0 1px solid"> <i class="fa fa-play" style="color:green"></i> </button> {% endif %} </form> </div> </div> {% endif %} No newline at end of file