Fix alignment issues for nav-tabs and ul on details panels
Added space between the nav-tabs and tab content on details panels. Removed the bullet points in front of instance IP addresses and security groups. Change-Id: I426e73eca0ef8ac57434631da75cb602674be893 Closes-bug: #1625310
This commit is contained in:
parent
f321f6c1a6
commit
a21b51e34a
@ -14,6 +14,7 @@
|
||||
|
||||
# Importing non-modules that are not used explicitly
|
||||
|
||||
from horizon.tabs.base import DetailTabsGroup # noqa
|
||||
from horizon.tabs.base import Tab # noqa
|
||||
from horizon.tabs.base import TabGroup # noqa
|
||||
from horizon.tabs.base import TableTab # noqa
|
||||
|
@ -478,3 +478,7 @@ class TableTab(Tab):
|
||||
|
||||
def has_more_data(self, table):
|
||||
return False
|
||||
|
||||
|
||||
class DetailTabsGroup(TabGroup):
|
||||
template_name = "horizon/common/_detail_tab_group.html"
|
||||
|
2
horizon/templates/horizon/common/_detail_tab_group.html
Normal file
2
horizon/templates/horizon/common/_detail_tab_group.html
Normal file
@ -0,0 +1,2 @@
|
||||
{% extends "horizon/common/_tab_group.html" %}
|
||||
{% block additional_classes %}detail-tabs{% endblock %}
|
@ -15,7 +15,7 @@
|
||||
{# Tab Content #}
|
||||
<div class="tab-content">
|
||||
{% for tab in tabs %}
|
||||
<div id="{{ tab.get_id }}" class="tab-pane{% if tab.is_active %} active{% endif %}">
|
||||
<div id="{{ tab.get_id }}" class="tab-pane{% if tab.is_active %} active{% endif %} {% block additional_classes %}{% endblock %}">
|
||||
{{ tab.render }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
@ -63,6 +63,6 @@ class ContentsTab(tabs.Tab):
|
||||
"namespace_contents": namespace.as_json()}
|
||||
|
||||
|
||||
class NamespaceDetailTabs(tabs.TabGroup):
|
||||
class NamespaceDetailTabs(tabs.DetailTabsGroup):
|
||||
slug = "namespace_details"
|
||||
tabs = (OverviewTab, ContentsTab)
|
||||
|
@ -146,7 +146,7 @@ class UpdateView(user_views.UpdateView):
|
||||
'external': network['router__external']}
|
||||
|
||||
|
||||
class NetworkDetailsTabs(tabs.TabGroup):
|
||||
class NetworkDetailsTabs(tabs.DetailTabsGroup):
|
||||
slug = "network_tabs"
|
||||
tabs = (OverviewTab, subnets_tables.SubnetsTab, ports_tables.PortsTab,
|
||||
agents_tabs.DHCPAgentsTab, )
|
||||
|
@ -21,6 +21,6 @@ class OverviewTab(r_tabs.OverviewTab):
|
||||
failure_url = "horizon:admin:routers:index"
|
||||
|
||||
|
||||
class PortDetailTabs(tabs.TabGroup):
|
||||
class PortDetailTabs(tabs.DetailTabsGroup):
|
||||
slug = "port_details"
|
||||
tabs = (OverviewTab,)
|
||||
|
@ -42,7 +42,7 @@ class ProtocolsTab(tabs.TableTab):
|
||||
return self.tab_group.kwargs['protocols']
|
||||
|
||||
|
||||
class IdPDetailTabs(tabs.TabGroup):
|
||||
class IdPDetailTabs(tabs.DetailTabsGroup):
|
||||
slug = "idp_details"
|
||||
tabs = (OverviewTab, ProtocolsTab)
|
||||
sticky = True
|
||||
|
@ -108,7 +108,7 @@ class AuditTab(tabs.TableTab):
|
||||
return sorted(actions, reverse=True, key=lambda y: y.start_time)
|
||||
|
||||
|
||||
class InstanceDetailTabs(tabs.TabGroup):
|
||||
class InstanceDetailTabs(tabs.DetailTabsGroup):
|
||||
slug = "instance_details"
|
||||
tabs = (OverviewTab, LogTab, ConsoleTab, AuditTab)
|
||||
sticky = True
|
||||
|
@ -78,7 +78,7 @@
|
||||
{% for group in instance.security_groups %}
|
||||
<dt>{{ group.name }}</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<ul class="list-unstyled">
|
||||
{% for rule in group.rules %}
|
||||
<li>{{ rule }}</li>
|
||||
{% empty %}
|
||||
|
@ -3,14 +3,14 @@
|
||||
{% if ip_groups.keys|length > 1 %}
|
||||
<h4>{{ ip_group }}</h4>
|
||||
{% endif %}
|
||||
<ul>
|
||||
<ul class="list-unstyled">
|
||||
{% for address in ips.non_floating %}
|
||||
<li>{{ address.addr }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if ips.floating|length > 0 %}
|
||||
<h5>{% trans 'Floating IPs:' %}</h5>
|
||||
<ul>
|
||||
<ul class="list-unstyled">
|
||||
{% for address in ips.floating %}
|
||||
<li>{{ address.addr }}</li>
|
||||
{% endfor %}
|
||||
|
@ -34,7 +34,7 @@ class OverviewTab(tabs.Tab):
|
||||
return {'port': port}
|
||||
|
||||
|
||||
class PortDetailTabs(tabs.TabGroup):
|
||||
class PortDetailTabs(tabs.DetailTabsGroup):
|
||||
slug = "port_details"
|
||||
tabs = (OverviewTab, addr_pairs_tabs.AllowedAddressPairsTab)
|
||||
sticky = True
|
||||
|
@ -64,7 +64,7 @@ class OverviewTab(tabs.Tab):
|
||||
return context
|
||||
|
||||
|
||||
class NetworkDetailsTabs(tabs.TabGroup):
|
||||
class NetworkDetailsTabs(tabs.DetailTabsGroup):
|
||||
slug = "network_tabs"
|
||||
tabs = (OverviewTab, subnets_tabs.SubnetsTab, ports_tabs.PortsTab, )
|
||||
sticky = True
|
||||
|
@ -1,7 +1,5 @@
|
||||
{% load i18n sizeformat %}
|
||||
|
||||
<h3>{% trans "Network Overview" %}</h3>
|
||||
|
||||
<div class="info detail">
|
||||
<dl class="dl-horizontal">
|
||||
<dt title="{% trans 'Name' %}">{% trans "Name" %}</dt>
|
||||
|
@ -44,7 +44,7 @@ class InterfacesTab(tabs.TableTab):
|
||||
return self.tab_group.kwargs['ports']
|
||||
|
||||
|
||||
class RouterDetailTabs(tabs.TabGroup):
|
||||
class RouterDetailTabs(tabs.DetailTabsGroup):
|
||||
slug = "router_details"
|
||||
tabs = (OverviewTab, InterfacesTab, er_tabs.ExtraRoutesTab)
|
||||
sticky = True
|
||||
|
@ -0,0 +1,3 @@
|
||||
.detail-tabs {
|
||||
margin-top: $padding-large-vertical;
|
||||
}
|
@ -43,6 +43,7 @@
|
||||
@import "components/selection_menu";
|
||||
@import "components/selects";
|
||||
@import "components/sidebar";
|
||||
@import "components/tab";
|
||||
@import "components/tables";
|
||||
@import "components/transfer_tables";
|
||||
@import "components/wizard";
|
||||
|
Loading…
Reference in New Issue
Block a user