create capsul and capsuls list page working
This commit is contained in:
@ -21,12 +21,14 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="nav-row half-margin">
|
||||
<div class="nav-row half-margin wrap">
|
||||
<a href="/faq">FAQ</a>
|
||||
<a href="/changelog">Changelog</a>
|
||||
|
||||
{% if session["account"] %}
|
||||
<a href="/console/">Console</a>
|
||||
<a href="/console">Capsuls</a>
|
||||
<a href="/console/ssh">SSH Public Keys</a>
|
||||
<a href="/console/billing">Account Balance</a>
|
||||
{% endif %}
|
||||
|
||||
<a href="/support">Support</a>
|
||||
|
@ -1,10 +1,16 @@
|
||||
{% extends 'console-base.html' %}
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Console{% endblock %}
|
||||
{% block consoletitle %}Console{% endblock %}
|
||||
|
||||
{% block consolecontent %}
|
||||
{% if vms[0] is defined %}
|
||||
{% block content %}
|
||||
<div class="third-margin">
|
||||
<h1>Capsuls</h1>
|
||||
</div>
|
||||
<div class="third-margin">
|
||||
{% if has_vms %}
|
||||
<div class="row third-margin justify-end">
|
||||
<a href="/console/create">Create Capsul</a>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@ -17,21 +23,20 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for vm in vms %}
|
||||
<a href="/console/{{ vm['id'] }}">
|
||||
<tr>
|
||||
<td>{{ vm["id"] }}</td>
|
||||
<td><a href="/console/{{ vm['id'] }}">{{ vm["id"] }}</a></td>
|
||||
<td>{{ vm["size"] }}</td>
|
||||
<td>{{ vm["ipv4"] }}</td>
|
||||
<td class="{{ vm['ipv4_status'] }}">{{ vm["ipv4"] }}</td>
|
||||
<td>{{ vm["os"] }}</td>
|
||||
<td>{{ vm["created"] }}</td>
|
||||
</tr>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
You don't have any Capsuls running. <a href="/console/create">Create one</a> today!
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block pagesource %}/templates/capsuls.html{% endblock %}
|
||||
|
@ -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 %}
|
||||
|
@ -1,12 +1,13 @@
|
||||
{% extends 'console-base.html' %}
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}SSH Public Keys{% endblock %}
|
||||
{% block consoletitle %}Console - SSH Public Keys{% endblock %}
|
||||
|
||||
{% block consolecontent %}
|
||||
|
||||
|
||||
{% if ssh_public_keys[0] is defined %} <hr/> {% endif %}
|
||||
{% block content %}
|
||||
<div class="third-margin">
|
||||
<h1>SSH PUBLIC KEYS</h1>
|
||||
</div>
|
||||
<div class="third-margin">
|
||||
{% if has_ssh_public_keys %} <hr/> {% endif %}
|
||||
|
||||
{% for ssh_public_key in ssh_public_keys %}
|
||||
<form method="post">
|
||||
@ -20,7 +21,7 @@
|
||||
</form>
|
||||
{% endfor %}
|
||||
|
||||
{% if ssh_public_keys[0] is defined %} <hr/> {% endif %}
|
||||
{% if has_ssh_public_keys %} <hr/> {% endif %}
|
||||
|
||||
<div class="third-margin">
|
||||
<h1>UPLOAD A NEW SSH KEY</h1>
|
||||
@ -50,6 +51,7 @@
|
||||
<input type="submit" value="Upload">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block pagesource %}/templates/ssh-public-keys.html{% endblock %}
|
||||
|
Reference in New Issue
Block a user