1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 15:15:22 +00:00
This commit is contained in:
Retspen 2015-05-15 20:54:55 +03:00
parent d91de06e0c
commit ba556c2272
3 changed files with 21 additions and 8 deletions

View file

@ -48,10 +48,10 @@ def create_instance(request, compute_id):
if conn:
if not storages:
msg = _("You haven't defined have any storage pools")
msg = _("You haven't defined any storage pools")
error_messages.append(msg)
if not networks:
msg = _("You haven't defined have any network pools")
msg = _("You haven't defined any network pools")
error_messages.append(msg)
if request.method == 'POST':

View file

@ -18,9 +18,13 @@
<label class="col-sm-4 control-label">{% trans "Compute" %}</label>
<div class="col-sm-6">
<select class="form-control" id="compute_select">
{% if computes %}
{% for compute in computes %}
<option value="{{ compute.id }}">{{ compute.name }}</option>
{% endfor %}
{% else %}
<option value="None">{% trans "None" %}</option>
{% endif %}
</select>
</div>
</div>
@ -30,9 +34,15 @@
<button type="button" class="btn btn-default" data-dismiss="modal">
{% trans "Close" %}
</button>
{% if computes %}
<button type="submit" class="btn btn-primary" name="chose" onclick='goto_compute()'>
{% trans "Chose" %}
</button>
{% else %}
<button class="btn btn-primary disabled">
{% trans "Chose" %}
</button>
{% endif %}
</div>
</div> <!-- /.modal-content -->
</div> <!-- /.modal-dialog -->

View file

@ -9,6 +9,9 @@
<!-- Page Heading -->
<div class="row">
<div class="col-lg-12">
{% if request.user.is_superuser %}
{% include 'create_inst_block.html' %}
{% endif %}
{% if all_host_vms %}
{% include 'create_inst_block.html' %}
<div class="pull-right search">