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-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-17 04:02:02 +00:00
|
|
|
|
2022-02-08 23:16:52 +00:00
|
|
|
* all VMs come standard with one public IPv4 address
|
|
|
|
* vms are billed for a minimum of 1 hour upon creation</pre>
|
2020-05-21 04:01:14 +00:00
|
|
|
<pre>
|
2022-02-08 23:44:31 +00:00
|
|
|
Your <a href="/console/account-balance">current account balance</a>: ${{ account_balance }} {% if account_balance != account_balance_in_one_month %}
|
|
|
|
|
|
|
|
Projected account balance in one month: ${{ account_balance_in_one_month }}{% endif %}
|
2020-05-21 04:01:14 +00:00
|
|
|
</pre>
|
2020-05-12 03:59:36 +00:00
|
|
|
{% 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>
|
2022-02-08 23:16:52 +00:00
|
|
|
<p>(At least two hours worth 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>
|
2020-05-12 03:59:36 +00:00
|
|
|
{% else %}
|
2020-05-11 16:57:39 +00:00
|
|
|
|
2020-05-13 18:56:43 +00:00
|
|
|
<form method="post">
|
2020-05-22 21:04:47 +00:00
|
|
|
<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">
|
2022-02-08 23:16:52 +00:00
|
|
|
{% for size in vm_sizes.keys() %}
|
|
|
|
{% if size in month_funded_vm_sizes %}
|
|
|
|
<option value="{{ size }}">{{ size }}</option>
|
|
|
|
{% else %}
|
|
|
|
<option value="{{ size }}">{{ size }} (short-term)</option>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2020-05-13 18:56:43 +00:00
|
|
|
</select>
|
|
|
|
</div>
|
2022-02-08 23:16:52 +00:00
|
|
|
<div class="row justify-start">
|
|
|
|
<pre>
|
|
|
|
<b>NEW!</b> Short-term and Long-term Capsuls:
|
|
|
|
|
2022-02-08 23:44:31 +00:00
|
|
|
You may create a capsul even if your{% if account_balance != account_balance_in_one_month %} projected{% endif %} account balance
|
|
|
|
won't fund it. It will be marked "short-term" and won't
|
2022-02-08 23:16:52 +00:00
|
|
|
be backed up.
|
|
|
|
|
|
|
|
Short-term capsuls will be deleted as soon as your account
|
|
|
|
balance reaches zero, while long-term capsuls get a
|
2022-02-09 18:11:52 +00:00
|
|
|
non-payment grace period before they're deleted.
|
2022-02-08 23:16:52 +00:00
|
|
|
</pre>
|
|
|
|
</div>
|
|
|
|
|
2020-05-13 18:56:43 +00:00
|
|
|
<div class="row justify-start">
|
|
|
|
<label class="align" for="os">Operating System</label>
|
|
|
|
<select id="os" name="os">
|
2021-12-15 11:30:26 +00:00
|
|
|
{% for os_id, os in operating_systems.items()|sort %}
|
2020-05-13 18:56:43 +00:00
|
|
|
<option value="{{ os_id }}">{{ os.description }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="row justify-start">
|
2021-02-16 01:44:26 +00:00
|
|
|
<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">
|
2021-02-16 01:44:26 +00:00
|
|
|
{% 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 %}
|
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-22 20:20:26 +00:00
|
|
|
<script src="{{ url_for('static', filename='create-capsul.js') }}"></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>
|
2021-12-14 21:47:32 +00:00
|
|
|
<a href="https://git.cyberia.club/cyberia/terms-of-service/">git.cyberia.club/cyberia/terms-of-service</a>
|
2020-05-11 06:47:14 +00:00
|
|
|
</li>
|
|
|
|
<li>
|
2021-12-14 21:47:32 +00:00
|
|
|
<a href="https://git.cyberia.club/cyberia/privacy-policy/">git.cyberia.club/cyberia/privacy-policy</a>
|
2020-05-11 06:47:14 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
|
2020-05-11 16:57:39 +00:00
|
|
|
{% block pagesource %}/templates/create-capsul.html{% endblock %}
|