capsul-flask/capsulflask/templates/create-capsul.html

96 lines
3.5 KiB
HTML
Raw Permalink Normal View History

{% extends 'base.html' %}
{% block title %}Create{% endblock %}
2020-05-11 16:57:39 +00:00
{% block content %}
2020-05-13 05:28:53 +00:00
<div class="row third-margin">
<h1>Create Capsul</h1>
</div>
<div class="row third-margin">
<div>
2020-05-21 04:01:14 +00:00
<pre>
CAPSUL SIZES
============
type monthly* cpus mem ssd net*
----- ------- ---- --- --- ---
2020-06-05 18:26:25 +00:00
f1-xs $5.00 1 512M 25G .5TB
f1-s $7.50 1 1024M 25G 1TB
f1-m $12.50 1 2048M 25G 2TB
f1-l $20.00 2 3072M 25G 3TB
f1-x $27.50 3 4096M 25G 4TB
f1-xx $50.00 4 8192M 25G 5TB
2020-05-21 04:01:14 +00:00
* net is calculated as a per-month average
* vms are billed for a minimum of 24 hours upon creation
* all VMs come standard with one public IPv4 address</pre>
<pre>
Your <a href="/console/account-balance">account balance</a>: ${{ account_balance }}
</pre>
{% if cant_afford %}
2020-05-21 04:01:14 +00:00
<p>Please <a href="/console/account-balance">fund your account</a> in order to create Capsuls</p>
<p>(At least one month of funding is required)</p>
2020-05-13 18:56:43 +00:00
{% elif no_ssh_public_keys %}
<p>You don't have any ssh public keys yet.</p>
<p>You must <a href="/console/ssh">upload one</a> before you can create a Capsul.</p>
{% elif not capacity_avaliable %}
<p>Host(s) at capacity. No capsuls can be created at this time. sorry. </p>
{% else %}
2020-05-11 16:57:39 +00:00
2020-05-13 18:56:43 +00:00
<form method="post">
<input type="hidden" name="csrf-token" value="{{ csrf_token }}"/>
2020-05-13 18:56:43 +00:00
<div class="row justify-start">
<label class="align" for="size">Capsul Size</label>
<select id="size" name="size">
{% for size in vm_sizes.keys() %}<option value="{{ size }}">{{ size }}</option>{% endfor %}
</select>
</div>
<div class="row justify-start">
<label class="align" for="os">Operating System</label>
<select id="os" name="os">
{% for os_id, os in operating_systems.items() %}
<option value="{{ os_id }}">{{ os.description }}</option>
{% endfor %}
</select>
</div>
<div class="row justify-start">
<input type="hidden" name="ssh_authorized_key_count" value="{{ ssh_authorized_key_count}}"/>
2020-05-13 18:56:43 +00:00
<label class="align" for="ssh_keys">SSH Public Keys</label>
<div id="ssh_keys">
{% for key in ssh_authorized_keys %}
2020-05-13 18:56:43 +00:00
<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>
2020-05-13 18:56:43 +00:00
</div>
<div class="row justify-end">
<input id="submit-button" type="submit" value="Create">
<span id="submit-button-clicked" class="display-none">..Creating...</span>
2020-05-13 18:56:43 +00:00
</div>
<script src="{{ url_for('static', filename='create-capsul.js') }}"></script>
2020-05-13 18:56:43 +00:00
</form>
{% endif %}
</div>
</div>
{% endblock %}
{% block subcontent %}
{% if not cant_afford and not no_ssh_public_keys %}
<p>
Using our services implies that you agree to our terms of service & privacy policy.
</p>
<ul>
<li>
<a href="https://git.cyberia.club/congress/terms-of-service/plain/README">git.cyberia.club/congress/terms-of-service</a>
</li>
<li>
<a href="https://git.cyberia.club/congress/privacy-policy/plain/README">git.cyberia.club/congress/privacy-policy</a>
</li>
</ul>
{% endif %}
{% endblock %}
2020-05-11 16:57:39 +00:00
{% block pagesource %}/templates/create-capsul.html{% endblock %}