''')
if False:
_("Type:")
_v = VFFSL(SL,"_",False)("Type:") # '$_("Type:")' on line 310, col 12
if _v is not None: write(_filter(_v, rawExpr='$_("Type:")')) # from line 310, col 12.
write('''
''')
if VFFSL(SL,"correlation_alert_view",True): # generated from line 312, col 7
disabled = "disabled=\"disabled\""
else: # generated from line 314, col 7
disabled = ""
write('''
''')
if False:
N_("Alert")
if False:
N_("CorrelationAlert")
if False:
N_("OverflowAlert")
if False:
N_("ToolAlert")
for name, path in ((VFFSL(SL,"N_",False)("Alert"), "alert.create_time"), (VFFSL(SL,"N_",False)("CorrelationAlert"), "alert.correlation_alert.name"),
(VFFSL(SL,"N_",False)("OverflowAlert"), "alert.overflow_alert.program"), (VFFSL(SL,"N_",False)("ToolAlert"), "alert.tool_alert.name")): # generated from line 318, col 7
if path in VFFSL(SL,"alert.type",True): # generated from line 320, col 9
checked = "checked='checked'"
else: # generated from line 322, col 9
checked = ""
write('''
''')
if False:
_(VFFSL(SL,"name",True))
_v = VFFSL(SL,"_",False)(VFFSL(SL,"name",True)) # '$_($name)' on line 326, col 13
if _v is not None: write(_filter(_v, rawExpr='$_($name)')) # from line 326, col 13.
write('''
''')
write('''
''')
if False:
_("Severity:")
_v = VFFSL(SL,"_",False)("Severity:") # '$_("Severity:")' on line 332, col 12
if _v is not None: write(_filter(_v, rawExpr='$_("Severity:")')) # from line 332, col 12.
write('''
''')
if False:
N_("info")
if False:
N_("low")
if False:
N_("medium")
if False:
N_("high")
if False:
N_("none")
for item in VFFSL(SL,"N_",False)("info"), VFFSL(SL,"N_",False)("low"), VFFSL(SL,"N_",False)("medium"), VFFSL(SL,"N_",False)("high"), VFFSL(SL,"N_",False)("none"): # generated from line 333, col 7
if VFFSL(SL,"item",True) in VFFSL(SL,"alert.assessment.impact.severity",True): # generated from line 334, col 9
checked = "checked='checked'"
else: # generated from line 336, col 9
checked = ""
write('''
''')
if False:
_(VFFSL(SL,"item",True))
_v = VFFSL(SL,"_",False)(VFFSL(SL,"item",True)) # '$_($item)' on line 339, col 13
if _v is not None: write(_filter(_v, rawExpr='$_($item)')) # from line 339, col 13.
write('''
''')
write('''
''')
if False:
_("Completion:")
_v = VFFSL(SL,"_",False)("Completion:") # '$_("Completion:")' on line 344, col 12
if _v is not None: write(_filter(_v, rawExpr='$_("Completion:")')) # from line 344, col 12.
write('''
''')
if False:
N_("succeeded")
if False:
N_("failed")
if False:
N_("none")
for item in VFFSL(SL,"N_",False)("succeeded"), VFFSL(SL,"N_",False)("failed"), VFFSL(SL,"N_",False)("none"): # generated from line 347, col 7
if item in VFFSL(SL,"alert.assessment.impact.completion",True): # generated from line 348, col 9
checked = "checked='checked'"
else: # generated from line 350, col 9
checked = ""
write('''
''')
if False:
_(VFFSL(SL,"item",True))
_v = VFFSL(SL,"_",False)(VFFSL(SL,"item",True)) # '$_($item)' on line 353, col 13
if _v is not None: write(_filter(_v, rawExpr='$_($item)')) # from line 353, col 13.
write('''
''')
write('''
''')
if VFFSL(SL,"classification_filtered",True): # generated from line 378, col 5
write(''' *
''')
write('''
''')
if VFFSL(SL,"analyzer_filtered",True): # generated from line 464, col 5
write(''' *
''')
write('''
''')
if False:
_("Time")
_v = VFFSL(SL,"_",False)("Time") # '$_("Time")' on line 469, col 7
if _v is not None: write(_filter(_v, rawExpr='$_("Time")')) # from line 469, col 7.
write('''
''')
########################################
## END - generated method body
return _dummyTrans and trans.response().getvalue() or ""
def message_fields(self, **KWS):
## CHEETAH: generated from #block message_fields at line 475, col 1.
trans = KWS.get("trans")
if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
trans = self.transaction # is None unless self.awake() was called
if not trans:
trans = DummyTransaction()
_dummyTrans = True
else: _dummyTrans = False
write = trans.response().write
SL = self._CHEETAH__searchList
_filter = self._CHEETAH__currentFilter
########################################
## START - generated method body
_orig_filter_42046745 = _filter
filterName = 'CleanOutput'
if self._CHEETAH__filters.has_key("CleanOutput"):
_filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName]
else:
_filter = self._CHEETAH__currentFilter = \
self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter
write('''
''')
if VFFSL(SL,"message.sub_alert_name",True): # generated from line 479, col 3
write(''' ''')
_v = VFFSL(SL,"message.sub_alert_type",True) # '$message.sub_alert_type' on line 480, col 8
if _v is not None: write(_filter(_v, rawExpr='$message.sub_alert_type')) # from line 480, col 8.
if VFFSL(SL,"message.sub_alert_display",True): # generated from line 481, col 5
write(''' ''')
if False:
ngettext("alert", "alerts", VFFSL(SL,"message.sub_alert_number",True))
string = VFFSL(SL,"ngettext",False)("alert", "alerts", VFFSL(SL,"message.sub_alert_number",True))
write(''' (''')
_v = VFFSL(SL,"message.sub_alert_number",True) # '$message.sub_alert_number' on line 483, col 45
if _v is not None: write(_filter(_v, rawExpr='$message.sub_alert_number')) # from line 483, col 45.
write(''' ''')
_v = VFFSL(SL,"string",True) # '$string' on line 483, col 75
if _v is not None: write(_filter(_v, rawExpr='$string')) # from line 483, col 75.
write(''')''')
write(''':''')
_v = VFFSL(SL,"message.sub_alert_name",True) # '$message.sub_alert_name' on line 485, col 44
if _v is not None: write(_filter(_v, rawExpr='$message.sub_alert_name')) # from line 485, col 44.
write(''' ''')
write('''
''')
if VFFSL(SL,"message.aggregated",True) and VFFSL(SL,"message.aggregated_classifications_hidden",True) > 0: # generated from line 488, col 3
write(''' ''')
if False:
_("%(hidden)d of %(total)d alerts not shown...")
string = VFFSL(SL,"_",False)("%(hidden)d of %(total)d alerts not shown...")
write(''' (''')
_v = VFFSL(SL,"str",False)(VFFSL(SL,"string",True) % { "hidden": VFFSL(SL,"message.aggregated_classifications_hidden",True), "total": VFFSL(SL,"message.aggregated_classifications_total",True) }) # '$str($string % { "hidden": $message.aggregated_classifications_hidden, "total": $message.aggregated_classifications_total })' on line 490, col 9
if _v is not None: write(_filter(_v, rawExpr='$str($string % { "hidden": $message.aggregated_classifications_hidden, "total": $message.aggregated_classifications_total })')) # from line 490, col 9.
write('''
''')
if False:
_("expand")
_v = VFFSL(SL,"_",False)("expand") # '$_("expand")' on line 491, col 65
if _v is not None: write(_filter(_v, rawExpr='$_("expand")')) # from line 491, col 65.
write(''')
''')
write('''
''')
for info in VFFSL(SL,"message.infos",True): # generated from line 495, col 3
if VFFSL(SL,"message.aggregated",True) and (len(VFFSL(SL,"message.infos",True)) > 1 or VFFSL(SL,"info.count",True) > 1): # generated from line 496, col 5
write(''' ''')
_v = VFFSL(SL,"info.count",True) # '$info.count' on line 497, col 7
if _v is not None: write(_filter(_v, rawExpr='$info.count')) # from line 497, col 7.
write(''' x
''')
write('''
''')
if VFFSL(SL,"info.classification.value",True): # generated from line 500, col 5
write(''' ''')
_v = VFFSL(SL,"info.classification.value",True) # '$info.classification.value' on line 501, col 76
if _v is not None: write(_filter(_v, rawExpr='$info.classification.value')) # from line 501, col 76.
write('''
''')
else: # generated from line 502, col 5
write(''' n/a
''')
write('''
''')
if VFFSL(SL,"info.completion.value",True): # generated from line 506, col 5
write(''' (''')
_v = VFFSL(SL,"info.completion.value",True) # '$info.completion.value' on line 507, col 63
if _v is not None: write(_filter(_v, rawExpr='$info.completion.value')) # from line 507, col 63.
write(''')
''')
write('''
''')
sep = "("
for url, name in VFFSL(SL,"info.classification_references",True): # generated from line 512, col 1
if VFFSL(SL,"url",True): # generated from line 513, col 1
_v = VFFSL(SL,"sep",True) # '$sep' on line 513, col 10
if _v is not None: write(_filter(_v, rawExpr='$sep')) # from line 513, col 10.
write('''''')
_v = VFFSL(SL,"name",True) # '$name' on line 513, col 69
if _v is not None: write(_filter(_v, rawExpr='$name')) # from line 513, col 69.
write('''''')
else: # generated from line 513, col 78
_v = VFFSL(SL,"sep",True) # '$sep' on line 513, col 84
if _v is not None: write(_filter(_v, rawExpr='$sep')) # from line 513, col 84.
_v = VFFSL(SL,"name",True) # '$name' on line 513, col 88
if _v is not None: write(_filter(_v, rawExpr='$name')) # from line 513, col 88.
sep = ", "
if VFFSL(SL,"info.classification_references",True): # generated from line 515, col 10
write(''')''')
write('''
''')
write('''
''')
if False:
_("source")
if False:
_("target")
for name, direction, hidden, total, expand in (VFFSL(SL,"_",False)("source"), VFFSL(SL,"message.source",True), VFFSL(SL,"message.aggregated_source_hidden",True), VFFSL(SL,"message.aggregated_source_total",True), VFFSL(SL,"message.aggregated_source_expand",True)), (VFFSL(SL,"_",False)("target"), VFFSL(SL,"message.target",True), VFFSL(SL,"message.aggregated_target_hidden",True), VFFSL(SL,"message.aggregated_target_total",True), VFFSL(SL,"message.aggregated_target_expand",True)): # generated from line 519, col 1
write('''
''')
if VFFSL(SL,"message.aggregated",True): # generated from line 607, col 3
if VFFSL(SL,"message.time_min.value",True) == VFFSL(SL,"message.time_max.value",True): # generated from line 608, col 5
write(''' ''')
_v = VFFSL(SL,"message.time_min.value",True) # '$message.time_min.value' on line 609, col 7
if _v is not None: write(_filter(_v, rawExpr='$message.time_min.value')) # from line 609, col 7.
write('''
''')
else: # generated from line 610, col 5
write(''' ''')
_v = VFFSL(SL,"message.time_max.value",True) # '$message.time_max.value' on line 611, col 7
if _v is not None: write(_filter(_v, rawExpr='$message.time_max.value')) # from line 611, col 7.
write(''' -
''')
_v = VFFSL(SL,"message.time_min.value",True) # '$message.time_min.value' on line 612, col 7
if _v is not None: write(_filter(_v, rawExpr='$message.time_min.value')) # from line 612, col 7.
write('''
''')
else: # generated from line 614, col 3
write(''' ''')
_v = VFFSL(SL,"message.time.value",True) # '$message.time.value' on line 615, col 5
if _v is not None: write(_filter(_v, rawExpr='$message.time.value')) # from line 615, col 5.
write('''
''')
if VFFSL(SL,"message.analyzer_time.value",True): # generated from line 616, col 5
write(''' (sent at ''')
_v = VFFSL(SL,"message.analyzer_time.value",True) # '$message.analyzer_time.value' on line 617, col 16
if _v is not None: write(_filter(_v, rawExpr='$message.analyzer_time.value')) # from line 617, col 16.
write(''')
''')
write('''
''')
_filter = _orig_filter_42046745
_orig_filter_41942449 = _filter
filterName = 'Filter'
if self._CHEETAH__filters.has_key("Filter"):
_filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName]
else:
_filter = self._CHEETAH__currentFilter = \
self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter
_filter = _orig_filter_41942449
########################################
## END - generated method body
return _dummyTrans and trans.response().getvalue() or ""
def timeline_extra_content(self, **KWS):
## CHEETAH: generated from #block timeline_extra_content at line 626, col 1.
trans = KWS.get("trans")
if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
trans = self.transaction # is None unless self.awake() was called
if not trans:
trans = DummyTransaction()
_dummyTrans = True
else: _dummyTrans = False
write = trans.response().write
SL = self._CHEETAH__searchList
_filter = self._CHEETAH__currentFilter
########################################
## START - generated method body
_orig_filter_43759620 = _filter
filterName = 'CleanOutput'
if self._CHEETAH__filters.has_key("CleanOutput"):
_filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName]
else:
_filter = self._CHEETAH__currentFilter = \
self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter
write('''
''')
if False:
_("Filter")
_v = VFFSL(SL,"_",False)("Filter") # '$_("Filter")' on line 629, col 33
if _v is not None: write(_filter(_v, rawExpr='$_("Filter")')) # from line 629, col 33.
write('''
''')
_filter = _orig_filter_43759620
_orig_filter_85742821 = _filter
filterName = 'Filter'
if self._CHEETAH__filters.has_key("Filter"):
_filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName]
else:
_filter = self._CHEETAH__currentFilter = \
self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter
_filter = _orig_filter_85742821
########################################
## END - generated method body
return _dummyTrans and trans.response().getvalue() or ""
def writeBody(self, **KWS):
## CHEETAH: main method generated for this template
trans = KWS.get("trans")
if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
trans = self.transaction # is None unless self.awake() was called
if not trans:
trans = DummyTransaction()
_dummyTrans = True
else: _dummyTrans = False
write = trans.response().write
SL = self._CHEETAH__searchList
_filter = self._CHEETAH__currentFilter
########################################
## START - generated method body
write('''
''')
self.head_extra_content(trans=trans)
write('''
''')
self.message_fields_header(trans=trans)
write('''
''')
self.message_fields(trans=trans)
write('''
''')
self.timeline_extra_content(trans=trans)
########################################
## END - generated method body
return _dummyTrans and trans.response().getvalue() or ""
##################################################
## CHEETAH GENERATED ATTRIBUTES
_CHEETAH__instanceInitialized = False
_CHEETAH_version = __CHEETAH_version__
_CHEETAH_versionTuple = __CHEETAH_versionTuple__
_CHEETAH_genTime = __CHEETAH_genTime__
_CHEETAH_genTimestamp = __CHEETAH_genTimestamp__
_CHEETAH_src = __CHEETAH_src__
_CHEETAH_srcLastModified = __CHEETAH_srcLastModified__
_mainCheetahMethod_for_AlertListing= 'writeBody'
## END CLASS DEFINITION
if not hasattr(AlertListing, '_initCheetahAttributes'):
templateAPIClass = getattr(AlertListing, '_CHEETAH_templateClass', Template)
templateAPIClass._addCheetahPlumbingCodeToClass(AlertListing)
# CHEETAH was developed by Tavis Rudd and Mike Orr
# with code, advice and input from many other volunteers.
# For more information visit http://www.CheetahTemplate.org/
##################################################
## if run from command line:
if __name__ == '__main__':
from Cheetah.TemplateCmdLineIface import CmdLineIface
CmdLineIface(templateObj=AlertListing()).run()