One click filter on classification.
commit 4931307c288563ac9f628542ad50379cd62f2d23
Merge: 7a1b989f78f1c83188b32441648374201a3d874a 3ef7fa9519d2fb50c4ff0a36a9ffd74fd82b2576
Author: Yoann Vandoorselaere <[email protected]>
Date: Wed Jun 3 17:21:42 2009 +0200
Merge branch 'one_click_classification_filter'
commit 3ef7fa9519d2fb50c4ff0a36a9ffd74fd82b2576
Author: Yoann Vandoorselaere <[email protected]>
Date: Thu May 14 17:39:35 2009 +0200
One click filter on classification.
Improve Prewikka behavior, by making a click on classification add a filter
on the selected classification (previously, it would have unfolded aggregated
alerts for the selected entry - this can now be done clicking the alert count).
Depending on the context; the user might be presented with a choise, allowing
him to see the clicked alert details, or to set a filter on the classification.
========================================
prewikka/templates/AlertListing.tmpl | 34 +++++++++++++++++++++++++++++-----
1 files changed, 29 insertions(+), 5 deletions(-)
========================================
diff --git a/prewikka/templates/AlertListing.tmpl b/prewikka/templates/AlertListing.tmpl
index fd57324..7c52ef0 100644
--- a/prewikka/templates/AlertListing.tmpl
+++ b/prewikka/templates/AlertListing.tmpl
@@ -746,6 +746,13 @@ function ${type}_set_filter_saved() {
#end if
#end def
+#def classificationWrite(info, text)
+<a class="impact_severity_$info.severity.value popup_menu_toggle">$text</a><span class="popup_menu">
+- <a href="$info.display">$_("See alert detail")</a><br />
+- <a href="$info.classification.inline_filter">$_("Filter on this classification.text")</a><br />
+</span>#slurp
+#end def
+
#def writeService($hstr, $direction)
#if $direction.service.value != None#$hstr<a class="popup_menu_toggle">$str($direction.service.value)#end if
</a>
@@ -759,6 +766,7 @@ function ${type}_set_filter_saved() {
</span>#slurp
#end def
+
#block message_fields
#filter CleanOutput
@@ -780,14 +788,30 @@ function ${type}_set_filter_saved() {
#end if
#for $info in $message.infos
- #if $message.aggregated and (len($message.infos) > 1 or $info.count > 1)
- $info.count x
+ #if $info.classification.value
+ #set $text = $info.classification.value
+ #else
+ #set $text = "n/a"
#end if
- #if $info.classification.value
- <a class="impact_severity_$info.severity.value" href="$info.display">$info.classification.value</a>
+ #if $message.aggregated and (len($message.infos) > 1 or $info.count > 1)
+ #if $info.count == 1
+ $info.count x
+ #filter Filter $classificationWrite($info, $text) #end filter
+ #else
+ <a href="$info.display">$info.count</a> x
+ #if $info.classification.already_filtered
+ <span class="impact_severity_$info.severity.value">$text</span>
+ #else
+ <a class="impact_severity_$info.severity.value" href="$info.classification.inline_filter">$text</a>
+ #end if
+ #end if
#else
- <a class="impact_severity_$info.severity.value" href="$info.display">n/a</a>
+ #if $info.classification.already_filtered
+ <a class="impact_severity_$info.severity.value" href="$info.display">$text</a>
+ #else
+ #filter Filter $classificationWrite($info, $text) #end filter
+ #end if
#end if
#if $info.completion.value
_______________________________________________
Prelude-cvslog site list
[email protected]
http://lists.prelude-ids.org/mailman/listinfo/prelude-cvslog
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.