summaryrefslogtreecommitdiff
path: root/openstack_dashboard/dashboards/admin/info/tabs.py
diff options
context:
space:
mode:
Diffstat (limited to 'openstack_dashboard/dashboards/admin/info/tabs.py')
-rw-r--r--openstack_dashboard/dashboards/admin/info/tabs.py27
1 files changed, 1 insertions, 26 deletions
diff --git a/openstack_dashboard/dashboards/admin/info/tabs.py b/openstack_dashboard/dashboards/admin/info/tabs.py
index cdda728..5cd265f 100644
--- a/openstack_dashboard/dashboards/admin/info/tabs.py
+++ b/openstack_dashboard/dashboards/admin/info/tabs.py
@@ -18,7 +18,6 @@ from horizon import exceptions
18from horizon import tabs 18from horizon import tabs
19from openstack_dashboard.api import base 19from openstack_dashboard.api import base
20from openstack_dashboard.api import cinder 20from openstack_dashboard.api import cinder
21from openstack_dashboard.api import heat
22from openstack_dashboard.api import neutron 21from openstack_dashboard.api import neutron
23from openstack_dashboard.api import nova 22from openstack_dashboard.api import nova
24from openstack_dashboard.dashboards.admin.info import constants 23from openstack_dashboard.dashboards.admin.info import constants
@@ -118,32 +117,8 @@ class NetworkAgentsTab(tabs.TableTab):
118 return agents 117 return agents
119 118
120 119
121class HeatServiceTab(tabs.TableTab):
122 table_classes = (tables.HeatServiceTable,)
123 name = tables.HeatServiceTable.Meta.verbose_name
124 slug = tables.HeatServiceTable.Meta.name
125 template_name = constants.INFO_DETAIL_TEMPLATE_NAME
126
127 def allowed(self, request):
128 try:
129 return base.is_service_enabled(request, 'orchestration')
130 except Exception:
131 exceptions.handle(request, _('Orchestration service is disabled.'))
132 return False
133
134 def get_heat_services_data(self):
135 try:
136 services = heat.service_list(self.tab_group.request)
137 except Exception:
138 msg = _('Unable to get Orchestration service list.')
139 exceptions.check_message(["Connection", "refused"], msg)
140 exceptions.handle(self.request, msg)
141 services = []
142 return services
143
144
145class SystemInfoTabs(tabs.TabGroup): 120class SystemInfoTabs(tabs.TabGroup):
146 slug = "system_info" 121 slug = "system_info"
147 tabs = (ServicesTab, NovaServicesTab, CinderServicesTab, 122 tabs = (ServicesTab, NovaServicesTab, CinderServicesTab,
148 NetworkAgentsTab, HeatServiceTab) 123 NetworkAgentsTab)
149 sticky = True 124 sticky = True