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