forked from 3wordchant/capsul-flask
capacity limiter and general cleanup
This commit is contained in:
@ -27,12 +27,13 @@
|
||||
(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>
|
||||
{% 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 %}
|
||||
{% if 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>
|
||||
{% else %}
|
||||
<pre>
|
||||
<pre>
|
||||
CAPSUL SIZES
|
||||
============
|
||||
type monthly cpus mem ssd net*
|
||||
@ -46,44 +47,42 @@
|
||||
|
||||
* net is calculated as a per-month average
|
||||
* all VMs come standard with one public IPv4 addr</pre>
|
||||
<pre>
|
||||
<pre>
|
||||
Your <a href="/console/account-balance">account balance</a>: ${{ account_balance }}
|
||||
</pre>
|
||||
</pre>
|
||||
|
||||
<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>
|
||||
<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 %}
|
||||
</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 %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-end">
|
||||
<input type="submit" value="Create">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div class="row justify-end">
|
||||
<input type="submit" value="Create">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user