summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-01-30 05:52:18 +0000
committerGerrit Code Review <review@openstack.org>2017-01-30 05:52:18 +0000
commit06651ab01800f69b86bd9e52d675df02bf13213b (patch)
tree7bb117f243f7dc59268eafc015b31024a58246e3
parent5e5c64d87d38fa8b87a1dd93f83e892cac0ccd0f (diff)
parenta21b51e34ae9679d1d1ef2db0982392f8a081cc8 (diff)
downloadhorizon-06651ab01800f69b86bd9e52d675df02bf13213b.tar.gz
Merge "Fix alignment issues for nav-tabs and ul on details panels"
-rw-r--r--horizon/tabs/__init__.py1
-rw-r--r--horizon/tabs/base.py4
-rw-r--r--horizon/templates/horizon/common/_detail_tab_group.html2
-rw-r--r--horizon/templates/horizon/common/_tab_group.html2
-rw-r--r--openstack_dashboard/dashboards/admin/metadata_defs/tabs.py2
-rw-r--r--openstack_dashboard/dashboards/admin/networks/views.py2
-rw-r--r--openstack_dashboard/dashboards/admin/routers/ports/tabs.py2
-rw-r--r--openstack_dashboard/dashboards/identity/identity_providers/tabs.py2
-rw-r--r--openstack_dashboard/dashboards/project/instances/tabs.py2
-rw-r--r--openstack_dashboard/dashboards/project/instances/templates/instances/_detail_overview.html2
-rw-r--r--openstack_dashboard/dashboards/project/instances/templates/instances/_instance_ips.html4
-rw-r--r--openstack_dashboard/dashboards/project/networks/ports/tabs.py2
-rw-r--r--openstack_dashboard/dashboards/project/networks/tabs.py2
-rw-r--r--openstack_dashboard/dashboards/project/networks/templates/networks/_detail_overview.html2
-rw-r--r--openstack_dashboard/dashboards/project/routers/tabs.py2
-rw-r--r--openstack_dashboard/static/dashboard/scss/components/_tab.scss3
-rw-r--r--openstack_dashboard/static/dashboard/scss/horizon.scss1
17 files changed, 23 insertions, 14 deletions
diff --git a/horizon/tabs/__init__.py b/horizon/tabs/__init__.py
index e7d57b9b7..ffc03c284 100644
--- a/horizon/tabs/__init__.py
+++ b/horizon/tabs/__init__.py
@@ -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
diff --git a/horizon/tabs/base.py b/horizon/tabs/base.py
index d0a7ec42a..e06915716 100644
--- a/horizon/tabs/base.py
+++ b/horizon/tabs/base.py
@@ -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"
diff --git a/horizon/templates/horizon/common/_detail_tab_group.html b/horizon/templates/horizon/common/_detail_tab_group.html
new file mode 100644
index 000000000..71805d1a5
--- /dev/null
+++ b/horizon/templates/horizon/common/_detail_tab_group.html
@@ -0,0 +1,2 @@
+{% extends "horizon/common/_tab_group.html" %}
+{% block additional_classes %}detail-tabs{% endblock %} \ No newline at end of file
diff --git a/horizon/templates/horizon/common/_tab_group.html b/horizon/templates/horizon/common/_tab_group.html
index f09a66e8b..8f3aa47fe 100644
--- a/horizon/templates/horizon/common/_tab_group.html
+++ b/horizon/templates/horizon/common/_tab_group.html
@@ -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 %}
diff --git a/openstack_dashboard/dashboards/admin/metadata_defs/tabs.py b/openstack_dashboard/dashboards/admin/metadata_defs/tabs.py
index cb168de29..d51e7c5ca 100644
--- a/openstack_dashboard/dashboards/admin/metadata_defs/tabs.py
+++ b/openstack_dashboard/dashboards/admin/metadata_defs/tabs.py
@@ -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)
diff --git a/openstack_dashboard/dashboards/admin/networks/views.py b/openstack_dashboard/dashboards/admin/networks/views.py
index 773a342af..babbd5dac 100644
--- a/openstack_dashboard/dashboards/admin/networks/views.py
+++ b/openstack_dashboard/dashboards/admin/networks/views.py
@@ -145,7 +145,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, )
diff --git a/openstack_dashboard/dashboards/admin/routers/ports/tabs.py b/openstack_dashboard/dashboards/admin/routers/ports/tabs.py
index 60f8098f6..4c4749aaa 100644
--- a/openstack_dashboard/dashboards/admin/routers/ports/tabs.py
+++ b/openstack_dashboard/dashboards/admin/routers/ports/tabs.py
@@ -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,)
diff --git a/openstack_dashboard/dashboards/identity/identity_providers/tabs.py b/openstack_dashboard/dashboards/identity/identity_providers/tabs.py
index bd59733ae..e57f7cf7d 100644
--- a/openstack_dashboard/dashboards/identity/identity_providers/tabs.py
+++ b/openstack_dashboard/dashboards/identity/identity_providers/tabs.py
@@ -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
diff --git a/openstack_dashboard/dashboards/project/instances/tabs.py b/openstack_dashboard/dashboards/project/instances/tabs.py
index deae73395..d6004b129 100644
--- a/openstack_dashboard/dashboards/project/instances/tabs.py
+++ b/openstack_dashboard/dashboards/project/instances/tabs.py
@@ -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
diff --git a/openstack_dashboard/dashboards/project/instances/templates/instances/_detail_overview.html b/openstack_dashboard/dashboards/project/instances/templates/instances/_detail_overview.html
index 5b3ce74e0..933080b06 100644
--- a/openstack_dashboard/dashboards/project/instances/templates/instances/_detail_overview.html
+++ b/openstack_dashboard/dashboards/project/instances/templates/instances/_detail_overview.html
@@ -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 %}
diff --git a/openstack_dashboard/dashboards/project/instances/templates/instances/_instance_ips.html b/openstack_dashboard/dashboards/project/instances/templates/instances/_instance_ips.html
index 5c2a0167c..7b4226b90 100644
--- a/openstack_dashboard/dashboards/project/instances/templates/instances/_instance_ips.html
+++ b/openstack_dashboard/dashboards/project/instances/templates/instances/_instance_ips.html
@@ -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 %}
diff --git a/openstack_dashboard/dashboards/project/networks/ports/tabs.py b/openstack_dashboard/dashboards/project/networks/ports/tabs.py
index 005abef01..7f2e94664 100644
--- a/openstack_dashboard/dashboards/project/networks/ports/tabs.py
+++ b/openstack_dashboard/dashboards/project/networks/ports/tabs.py
@@ -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
diff --git a/openstack_dashboard/dashboards/project/networks/tabs.py b/openstack_dashboard/dashboards/project/networks/tabs.py
index c9278e1d5..e48378ae6 100644
--- a/openstack_dashboard/dashboards/project/networks/tabs.py
+++ b/openstack_dashboard/dashboards/project/networks/tabs.py
@@ -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
diff --git a/openstack_dashboard/dashboards/project/networks/templates/networks/_detail_overview.html b/openstack_dashboard/dashboards/project/networks/templates/networks/_detail_overview.html
index 6740dae37..1bdceddbe 100644
--- a/openstack_dashboard/dashboards/project/networks/templates/networks/_detail_overview.html
+++ b/openstack_dashboard/dashboards/project/networks/templates/networks/_detail_overview.html
@@ -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>
diff --git a/openstack_dashboard/dashboards/project/routers/tabs.py b/openstack_dashboard/dashboards/project/routers/tabs.py
index 0e6fc4e89..3ef73db87 100644
--- a/openstack_dashboard/dashboards/project/routers/tabs.py
+++ b/openstack_dashboard/dashboards/project/routers/tabs.py
@@ -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
diff --git a/openstack_dashboard/static/dashboard/scss/components/_tab.scss b/openstack_dashboard/static/dashboard/scss/components/_tab.scss
new file mode 100644
index 000000000..d74e613ec
--- /dev/null
+++ b/openstack_dashboard/static/dashboard/scss/components/_tab.scss
@@ -0,0 +1,3 @@
+.detail-tabs {
+ margin-top: $padding-large-vertical;
+}
diff --git a/openstack_dashboard/static/dashboard/scss/horizon.scss b/openstack_dashboard/static/dashboard/scss/horizon.scss
index c87d1e73c..64bca0cbb 100644
--- a/openstack_dashboard/static/dashboard/scss/horizon.scss
+++ b/openstack_dashboard/static/dashboard/scss/horizon.scss
@@ -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";