From e141fe94f1aa06accec05cfa240e8f8dbb333828 Mon Sep 17 00:00:00 2001 From: Rob Raymond Date: Fri, 30 May 2014 09:55:01 -0600 Subject: [PATCH] Make delete alarm last action in menu. Remove demo data --- monitoring/tables.py | 5 ++--- monitoring/views.py | 13 ++----------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/monitoring/tables.py b/monitoring/tables.py index 0e0b4e56..0b68be73 100644 --- a/monitoring/tables.py +++ b/monitoring/tables.py @@ -155,10 +155,10 @@ class AlarmsTable(tables.DataTable): verbose_name = _("Alarms") row_actions = (ShowAlarmHistory, ShowAlarmMeters, + EditAlarm, DeleteAlarm, - EditAlarm, ) + ) table_actions = (CreateNotification, CreateAlarm, ) - status_columns = ['status'] class AlarmHistoryTable(tables.DataTable): @@ -179,4 +179,3 @@ class AlarmHistoryTable(tables.DataTable): name = "users" verbose_name = _("Alarm History") row_actions = (ShowAlarmMeters,) - status_columns = ['status'] diff --git a/monitoring/views.py b/monitoring/views.py index 45020b65..82ed0855 100644 --- a/monitoring/views.py +++ b/monitoring/views.py @@ -334,17 +334,8 @@ class AlarmHistoryView(tables.DataTableView): return super(AlarmHistoryView, self).dispatch(*args, **kwargs) def get_data(self): - results = [ - {'Host': 'Compute1', 'Service': 'Nova', 'Status': 'CRITICAL', - 'Last_Check': 'Feb 12 2014 2:34 CST', - 'Status_Information': 'API Response Time'}, - {'Host': 'Compute1', 'Service': 'Nova', 'Status': 'OK', - 'Last_Check': 'Feb 12 2014 2:45 CST', - 'Status_Information': 'API Response Time'}, - {'Host': 'Compute1', 'Service': 'Nova', 'Status': 'WARNING', - 'Last_Check': 'April 18 2014 8:45 CST', - 'Status_Information': 'API Response Time'} - ] + # to be implemented + results = [] return results