mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
dont show create vm page if the user doesnt have enough resources
This commit is contained in:
parent
49fcb0b663
commit
4d0fb7ece0
4 changed files with 34 additions and 3 deletions
|
@ -9,6 +9,15 @@
|
|||
<h3 class="panel-title">Create VM</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% if full_limits %}
|
||||
<p>You have reached your limit for the following resources:</p>
|
||||
<ul>
|
||||
{% for limit in full_limits %}
|
||||
<li>{{ limit }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p>Before you can create any more VMs, you must first either power off (CPU/Memory) or delete (Disk) existing VMs until you have enough resources available.</p>
|
||||
{% else %}
|
||||
<form action="create" method="post">
|
||||
<div class="form-group">
|
||||
<label for="name">VM Name</label>
|
||||
|
@ -36,6 +45,7 @@
|
|||
</div>
|
||||
<button class="btn btn-success" type="submit" value="Create">Create</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue