Skip to content
Snippets Groups Projects
Commit 6850cd98 authored by Jan Mach's avatar Jan Mach
Browse files

Added new action button for searching related events from report detail view.

(Redmine issue: #3734)
parent 7f4e035f
No related branches found
No related tags found
No related merge requests found
......@@ -228,6 +228,29 @@ class ShowView(hawat.base.HawatItemShowView):
"""
action_menu = hawat.menu.HawatMenu()
related_events_search_params = {
'st_from': item.dt_from,
'st_to': item.dt_to,
'severities': item.severity,
'categories': 'Test',
'groups': [item.group.name],
'submit': gettext('Search')
}
if not item.flag_testdata:
related_events_search_params.update(
{
'not_categories': 'True'
}
)
action_menu.add_entry(
'endpoint',
'search',
endpoint = 'events.search',
title = lazy_gettext('Search'),
legend = lazy_gettext('Search for all events related to report "%(item)s"', item = item.label),
link = flask.url_for('events.search', **related_events_search_params)
)
action_menu.add_entry(
'endpoint',
'delete',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment