summaryrefslogtreecommitdiff
path: root/openstack_dashboard/dashboards/admin/info/tables.py
diff options
context:
space:
mode:
Diffstat (limited to 'openstack_dashboard/dashboards/admin/info/tables.py')
-rw-r--r--openstack_dashboard/dashboards/admin/info/tables.py42
1 files changed, 0 insertions, 42 deletions
diff --git a/openstack_dashboard/dashboards/admin/info/tables.py b/openstack_dashboard/dashboards/admin/info/tables.py
index 44f0758..40894f0 100644
--- a/openstack_dashboard/dashboards/admin/info/tables.py
+++ b/openstack_dashboard/dashboards/admin/info/tables.py
@@ -236,45 +236,3 @@ class NetworkAgentsTable(tables.DataTable):
236 table_actions = (NetworkAgentsFilterAction, ) 236 table_actions = (NetworkAgentsFilterAction, )
237 row_actions = (NetworkL3AgentRoutersLinkAction, ) 237 row_actions = (NetworkL3AgentRoutersLinkAction, )
238 multi_select = False 238 multi_select = False
239
240
241class HeatServiceFilterAction(tables.FilterAction):
242 filter_field = 'type'
243
244 def filter(self, table, services, filter_string):
245 q = filter_string.lower()
246
247 def comp(service):
248 attr = getattr(service, self.filter_field, '')
249 if attr is not None and q in attr.lower():
250 return True
251 return False
252
253 return filter(comp, services)
254
255
256class HeatServiceTable(tables.DataTable):
257 hostname = tables.Column('hostname', verbose_name=_('Hostname'))
258 binary = tables.Column("binary", verbose_name=_('Name'))
259 engine_id = tables.Column('engine_id', verbose_name=_('Engine Id'))
260 host = tables.Column('host', verbose_name=_('Host'))
261 topic = tables.Column('topic', verbose_name=_('Topic'))
262 # For consistent with other tables in system info, set column name to
263 # 'state'
264 state = tables.Column('status', verbose_name=_('State'),
265 display_choices=SERVICE_STATE_DISPLAY_CHOICES)
266 updated_at = tables.Column('updated_at',
267 verbose_name=pgettext_lazy(
268 'Time since the last update',
269 u'Last Updated'),
270 filters=(utils_filters.parse_isotime,
271 filters.timesince))
272
273 def get_object_id(self, obj):
274 return "%s" % obj.engine_id
275
276 class Meta(object):
277 name = "heat_services"
278 verbose_name = _("Orchestration Services")
279 table_actions = (HeatServiceFilterAction,)
280 multi_select = False