Fixing the edit security group rules form
bug 898862 Change-Id: I8273dee3d49d655073a7a0818150b1ba960bcca4
This commit is contained in:
parent
56dd28bb52
commit
4a4c983c01
|
@ -1,35 +1,28 @@
|
||||||
{% extends "horizon/common/_modal_form.html" %}
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block form_id %}security_group_rule_form{% endblock %}
|
|
||||||
{% block form_action %}{% url horizon:nova:access_and_security:security_groups:edit_rules security_group.id %}{% endblock %}
|
|
||||||
|
|
||||||
{% block modal_id %}security_group_rule_modal{% endblock %}
|
<div id="security_group_rule_modal" class="{% block modal_class %}modal{% if hide %} hide {% else %} static_page{% endif %}{% endblock %}">
|
||||||
{% block modal-header %}Edit Security Group Rules{% endblock %}
|
<div class="modal-header">
|
||||||
|
{% if hide %}<a href="#" class="close">×</a>{% endif %}
|
||||||
{% block modal-body %}
|
<h3>Edit Security Group Rules</h3>
|
||||||
<div class="left">
|
</div>
|
||||||
<fieldset>
|
<div class="modal-body clearfix">
|
||||||
<h3>{% trans "Add a rule"%}</h3>
|
<div class="right">
|
||||||
{% include "horizon/common/_form_fields.html" %}
|
<h3> {% trans "Rules for Security Group" %} '{{security_group.name}}'</h3>
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
<div class="right">
|
|
||||||
<h3> {% trans "Rules for Security Group"%} '{{security_group.name}}'</h3>
|
|
||||||
<table id="security_groups" class="zebra-striped">
|
<table id="security_groups" class="zebra-striped">
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "IP Protocol"%}</th>
|
<th>{% trans "IP Protocol" %}</th>
|
||||||
<th>{% trans "From Port"%}</th>
|
<th>{% trans "From Port" %}</th>
|
||||||
<th>{% trans "To Port"%}</th>
|
<th>{% trans "To Port" %}</th>
|
||||||
<th>{% trans "CIDR"%}</th>
|
<th>{% trans "CIDR" %}</th>
|
||||||
<th>{% trans "Actions"%}</th>
|
<th>{% trans "Actions" %}</th>
|
||||||
</tr>
|
</tr>
|
||||||
{% for rule in security_group.rules %}
|
{% for rule in security_group.rules %}
|
||||||
<tr class="{% cycle 'odd' 'even' %}">
|
<tr class="{% cycle 'odd' 'even' %}">
|
||||||
<td>{{ rule.ip_protocol }}</td>
|
<td>{{ rule.ip_protocol }}</td>
|
||||||
<td>{{ rule.from_port }}</td>
|
<td>{{ rule.from_port }}</td>
|
||||||
<td>{{ rule.to_port }}</td>
|
<td>{{ rule.to_port }}</td>
|
||||||
<td>{{rule.ip_range.cidr}}</td>
|
<td>{{ rule.ip_range.cidr }}</td>
|
||||||
<td id="actions">
|
<td id="actions">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="form">{% include "nova/access_and_security/security_groups/_delete_rule.html" with form=delete_form %}</li>
|
<li class="form">{% include "nova/access_and_security/security_groups/_delete_rule.html" with form=delete_form %}</li>
|
||||||
|
@ -39,15 +32,24 @@
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="100%">
|
<td colspan="100%">
|
||||||
{% trans "No rules for this security group"%}
|
{% trans "No rules for this security group" %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
<form id="edit_security_group_rule_form" action="{% url horizon:nova:access_and_security:security_groups:edit_rules security_group.id %}" method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
<fieldset>
|
||||||
|
{% include "horizon/common/_form_fields.html" %}
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<input class="btn primary pull-right" type="submit" value="{% trans "Add Rule" %}" />
|
||||||
|
<a href="{% url horizon:nova:access_and_security:index %}" class="btn secondary cancel close">Cancel</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block modal-footer %}
|
{% block modal-footer %}
|
||||||
<input class="btn primary pull-right" type="submit" value="{%trans "Add Rule"%}" />
|
|
||||||
<a href="{% url horizon:nova:access_and_security:index %}" class="btn secondary cancel close">Cancel</a>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -643,12 +643,11 @@ table form {
|
||||||
margin-bottom: 115px;
|
margin-bottom: 115px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#edit_security_group_rule_form {
|
||||||
#security_group_rule_modal .left input, #security_group_rule_modal .left select, #security_group_rule_modal .left {
|
float: right;
|
||||||
width: 150px;
|
width: 163px;
|
||||||
}
|
}
|
||||||
|
#edit_security_group_rule_form fieldset {
|
||||||
#security_group_rule_modal .left fieldset {
|
|
||||||
width: 163px;
|
width: 163px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -658,12 +657,13 @@ table form {
|
||||||
|
|
||||||
#security_group_rule_modal .right {
|
#security_group_rule_modal .right {
|
||||||
width: 475px;
|
width: 475px;
|
||||||
|
float: right;
|
||||||
|
margin-left: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#security_group_rule_modal .right table {
|
#security_group_rule_modal .right table {
|
||||||
margin-top: 31px;
|
margin-top: 31px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table tr.odd.good td { border: 1px solid #92fd75; }
|
table tr.odd.good td { border: 1px solid #92fd75; }
|
||||||
table tr.even.good td { border: 1px solid #88f06d; }
|
table tr.even.good td { border: 1px solid #88f06d; }
|
||||||
table tr.odd.bad td { border: 1px solid #ffb7b8; }
|
table tr.odd.bad td { border: 1px solid #ffb7b8; }
|
||||||
|
|
Loading…
Reference in New Issue