Revision a2fa6a5b
Export CSV alertes de VigiBoard (#954).
Permet l'export des alertes (événements corrélés) affichés à l'écran au
format CSV. L'export tient compte des critères de recherche
éventuellement appliqués.
Refs: #954.
Change-Id: I3c6639dbef9ca53043d45d8a683f5c77619af23a
Reviewed-on: https://vigilo-dev.si.c-s.fr/review/1017
Tested-by: Build system <qa@vigilo-dev.si.c-s.fr>
Reviewed-by: Thomas BURGUIERE <thomas.burguiere@c-s.fr>
vigiboard/controllers/plugins/priority.py | ||
---|---|---|
25 | 25 |
import tw.forms as twf |
26 | 26 |
from pylons.i18n import lazy_ugettext as l_ |
27 | 27 |
|
28 |
from vigilo.models.tables import CorrEvent |
|
28 |
from vigilo.models.tables import CorrEvent, StateName
|
|
29 | 29 |
from vigiboard.controllers.plugins import VigiboardRequestPlugin, ITEMS |
30 | 30 |
|
31 | 31 |
from tw.forms.fields import ContainerMixin, FormField |
... | ... | |
130 | 130 |
query.add_filter(CorrEvent.priority < value) |
131 | 131 |
elif op == 'lte': |
132 | 132 |
query.add_filter(CorrEvent.priority <= value) |
133 |
|
|
134 |
def get_data(self, event): |
|
135 |
state = StateName.value_to_statename(event[0].cause.current_state) |
|
136 |
return { |
|
137 |
'state': state, |
|
138 |
'priority': event[0].priority, |
|
139 |
} |
Also available in: Unified diff