Update firewall page styling

This commit is contained in:
Sunil Mohan Adapa 2014-05-12 23:28:15 +05:30
parent d8441f8964
commit 391d6298c4
2 changed files with 44 additions and 24 deletions

View File

@ -43,35 +43,47 @@ firewalld'</p>
{% else %} {% else %}
<ul> <table class='table table-autowidth'>
<thead>
<th>Service/Port</th>
<th>Status</th>
</thead>
{% for service in services %} <tbody>
<li>{{ service.name }}: {% for service in services %}
{% if service.is_enabled %} <tr>
<span class='firewall-permitted'>Enabled</span> <td><strong>{{ service.name }}</strong></td>
{% else %} <td>
<span class='firewall-blocked'>Disabled</span> {% if service.is_enabled %}
{% endif %} <span class='label label-success'>Enabled</span>
{% else %}
<span class='label label-important'>Disabled</span>
{% endif %}
</td>
</tr>
<ul>
{% for port in service.ports %} {% for port in service.ports %}
<li> {{ port }}: <tr>
{% if port in internal_enabled_services and port in external_enabled_services %} <td class='cell-indented'><em>{{ port }}</em></td>
<span class='firewall-permitted'>Permitted</span> <td>
{% elif port in internal_enabled_services %} {% if port in internal_enabled_services and port in external_enabled_services %}
<span class='firewall-permitted'>Permitted (internal only)</span> <span class='label label-success'>Permitted</span>
{% elif port in external_enabled_services %} {% elif port in internal_enabled_services %}
<span class='firewall-permitted'>Permitted (external only)</span> <span class='label label-warning'>Permitted (internal only)</span>
{% else %} {% elif port in external_enabled_services %}
<span class='firewall-blocked'>Blocked</span> <span class='label label-warning'>Permitted (external only)</span>
{% endif %} {% else %}
</li> <span class='label label-important'>Blocked</span>
{% endif %}
</td>
</tr>
{% endfor %} {% endfor %}
</ul>
</li>
{% endfor %}
</ul> {% endfor %}
</tbody>
</table>
<p><em>The operation of the firewall is automatic. When you enable a <p><em>The operation of the firewall is automatic. When you enable a
service it is automatically permitted in the firewall and you disable service it is automatically permitted in the firewall and you disable

View File

@ -47,3 +47,11 @@ body {
margin-right: 8px; margin-right: 8px;
padding-right: 5px; padding-right: 5px;
} }
.table-autowidth {
width: auto;
}
.table td.cell-indented {
padding-left: 3em;
}