mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 23:25:24 +00:00
Fixed #3
This commit is contained in:
parent
d91de06e0c
commit
ba556c2272
3 changed files with 21 additions and 8 deletions
|
@ -48,10 +48,10 @@ def create_instance(request, compute_id):
|
||||||
|
|
||||||
if conn:
|
if conn:
|
||||||
if not storages:
|
if not storages:
|
||||||
msg = _("You haven't defined have any storage pools")
|
msg = _("You haven't defined any storage pools")
|
||||||
error_messages.append(msg)
|
error_messages.append(msg)
|
||||||
if not networks:
|
if not networks:
|
||||||
msg = _("You haven't defined have any network pools")
|
msg = _("You haven't defined any network pools")
|
||||||
error_messages.append(msg)
|
error_messages.append(msg)
|
||||||
|
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
|
|
|
@ -18,9 +18,13 @@
|
||||||
<label class="col-sm-4 control-label">{% trans "Compute" %}</label>
|
<label class="col-sm-4 control-label">{% trans "Compute" %}</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<select class="form-control" id="compute_select">
|
<select class="form-control" id="compute_select">
|
||||||
|
{% if computes %}
|
||||||
{% for compute in computes %}
|
{% for compute in computes %}
|
||||||
<option value="{{ compute.id }}">{{ compute.name }}</option>
|
<option value="{{ compute.id }}">{{ compute.name }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<option value="None">{% trans "None" %}</option>
|
||||||
|
{% endif %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,9 +34,15 @@
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">
|
<button type="button" class="btn btn-default" data-dismiss="modal">
|
||||||
{% trans "Close" %}
|
{% trans "Close" %}
|
||||||
</button>
|
</button>
|
||||||
|
{% if computes %}
|
||||||
<button type="submit" class="btn btn-primary" name="chose" onclick='goto_compute()'>
|
<button type="submit" class="btn btn-primary" name="chose" onclick='goto_compute()'>
|
||||||
{% trans "Chose" %}
|
{% trans "Chose" %}
|
||||||
</button>
|
</button>
|
||||||
|
{% else %}
|
||||||
|
<button class="btn btn-primary disabled">
|
||||||
|
{% trans "Chose" %}
|
||||||
|
</button>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- /.modal-content -->
|
</div> <!-- /.modal-content -->
|
||||||
</div> <!-- /.modal-dialog -->
|
</div> <!-- /.modal-dialog -->
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
<!-- Page Heading -->
|
<!-- Page Heading -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
|
{% if request.user.is_superuser %}
|
||||||
|
{% include 'create_inst_block.html' %}
|
||||||
|
{% endif %}
|
||||||
{% if all_host_vms %}
|
{% if all_host_vms %}
|
||||||
{% include 'create_inst_block.html' %}
|
{% include 'create_inst_block.html' %}
|
||||||
<div class="pull-right search">
|
<div class="pull-right search">
|
||||||
|
|
Loading…
Reference in a new issue