2020-05-11 20:13:20 +00:00
|
|
|
{% extends 'base.html' %}
|
2020-05-11 06:47:14 +00:00
|
|
|
|
|
|
|
{% block title %}Create{% endblock %}
|
2020-05-11 16:57:39 +00:00
|
|
|
|
2020-05-11 20:13:20 +00:00
|
|
|
{% block content %}
|
2020-05-13 05:28:53 +00:00
|
|
|
<div class="row third-margin">
|
2020-05-11 20:13:20 +00:00
|
|
|
<h1>Create Capsul</h1>
|
|
|
|
</div>
|
2020-05-17 04:02:02 +00:00
|
|
|
<div class="row third-margin">
|
|
|
|
<div>
|
|
|
|
|
|
|
|
|
2020-05-12 03:59:36 +00:00
|
|
|
{% if cant_afford %}
|
|
|
|
<p>
|
|
|
|
Your account does not have sufficient funds to create a Capsul.
|
|
|
|
(Must be funded enough to last at least one month at creation time).
|
|
|
|
</p>
|
|
|
|
<p>You must <a href="/console/account-balance">add funds to your account</a> before you can create a Capsul.</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>
|
2020-05-12 03:59:36 +00:00
|
|
|
{% else %}
|
2020-05-13 18:56:43 +00:00
|
|
|
<pre>
|
2020-05-12 03:59:36 +00:00
|
|
|
CAPSUL SIZES
|
|
|
|
============
|
|
|
|
type monthly cpus mem ssd net*
|
|
|
|
----- ------- ---- --- --- ---
|
|
|
|
f1-s $5.33 1 512M 25G .5TB
|
|
|
|
f1-m $7.16 1 1024M 25G 1TB
|
|
|
|
f1-l $8.92 1 2048M 25G 2TB
|
|
|
|
f1-x $16.16 2 4096M 25G 4TB
|
|
|
|
f1-xx $29.66 4 8096M 25G 8TB
|
|
|
|
f1-xxx $57.58 8 16G 25G 16TB
|
|
|
|
|
|
|
|
* net is calculated as a per-month average
|
|
|
|
* all VMs come standard with one public IPv4 addr</pre>
|
2020-05-13 18:56:43 +00:00
|
|
|
<pre>
|
2020-05-13 05:28:53 +00:00
|
|
|
Your <a href="/console/account-balance">account balance</a>: ${{ account_balance }}
|
2020-05-13 18:56:43 +00:00
|
|
|
</pre>
|
2020-05-11 16:57:39 +00:00
|
|
|
|
2020-05-13 18:56:43 +00:00
|
|
|
<form method="post">
|
|
|
|
<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_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 %}
|
2020-05-12 03:59:36 +00:00
|
|
|
</div>
|
2020-05-13 18:56:43 +00:00
|
|
|
</div>
|
|
|
|
<div class="row justify-end">
|
2020-05-17 04:02:02 +00:00
|
|
|
<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>
|
2020-05-17 04:02:02 +00:00
|
|
|
<script>
|
|
|
|
window.addEventListener('DOMContentLoaded', function(event) {
|
|
|
|
var submitButton = document.getElementById('submit-button');
|
|
|
|
var submitButtonClicked = document.getElementById('submit-button-clicked');
|
|
|
|
document.getElementById('submit-button').onclick = function() {
|
|
|
|
submitButton.className = "display-none";
|
|
|
|
submitButtonClicked.className = "waiting-pulse";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
2020-05-13 18:56:43 +00:00
|
|
|
</form>
|
2020-05-11 06:47:14 +00:00
|
|
|
{% endif %}
|
2020-05-11 20:13:20 +00:00
|
|
|
|
2020-05-17 04:02:02 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-05-11 06:47:14 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block subcontent %}
|
2020-05-12 03:59:36 +00:00
|
|
|
{% if not cant_afford and not no_ssh_public_keys %}
|
2020-05-11 06:47:14 +00:00
|
|
|
<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 %}
|