create capsul and capsuls list page working

This commit is contained in:
2020-05-11 15:13:20 -05:00
parent 452f236c6b
commit 231d1ed7c0
11 changed files with 210 additions and 124 deletions

View File

@ -1,11 +1,26 @@
{% extends 'console-base.html' %}
{% extends 'base.html' %}
{% block title %}Create{% endblock %}
{% block consoletitle %}Console - Create Capsul{% endblock %}
{% block consolecontent %}
{% if ssh_public_keys[0] is defined %}
{% block content %}
<div class="third-margin">
<h1>Create Capsul</h1>
</div>
<div class="third-margin">
{% if created_os %}
<p>
Your Capsul was successfully created! You should already see it listed on the
<a href="/console/">Capsuls page</a>, but it may not have obtained an IP address yet.
Its IP address should become visible once the machine has booted and taken a DHCP lease.
</p>
{% if created_os == 'debian10' %}
<p>
Note: because Debian delays fully booting until after entropy has been generated, Debian Capsuls
may take an extra-long time to obtain an IP address, like up to 10 minutes. Be patient.
</p>
{% endif %}
{% else %}
{% if has_ssh_public_keys %}
<pre>
CAPSUL SIZES
============
@ -36,6 +51,18 @@ f1-xxx $57.58 8 16G 25G 16TB
{% endfor %}
</select>
</div>
<div class="row justify-start">
<input type="hidden" name="ssh_public_key_count" value="{{ ssh_public_key_count}}"/>
<label class="align" for="ssh_keys">SSH Public Keys</label>
<div id="ssh_keys">
{% for key in ssh_public_keys %}
<label for="ssh_key_{{ loop.index - 1 }}">
<input type="checkbox" id="ssh_key_{{ loop.index - 1 }}" name="ssh_key_{{ loop.index - 1 }}" value="{{ key['name'] }}"/>
{{ key['name'] }}
</label>
{% endfor %}
</div>
</div>
<div class="row justify-end">
<input type="submit" value="Create">
</div>
@ -44,7 +71,9 @@ f1-xxx $57.58 8 16G 25G 16TB
<p>You don't have any ssh public keys yet.</p>
<p>You must <a href="/console/ssh/upload">upload one</a> before you can create a Capsul.</p>
{% endif %}
{% endif %}
</div>
{% endblock %}
{% block subcontent %}