#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path from os.path import getmtime, exists import time import types import __builtin__ from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import DummyTransaction from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka import User, utils from prewikka.templates.MessageListing import MessageListing ################################################## ## MODULE CONSTANTS try: True, False except NameError: True, False = (1==1), (1==0) VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.0' __CHEETAH_versionTuple__ = (2, 0, 0, 'final', 0) __CHEETAH_genTime__ = 1200702934.4636791 __CHEETAH_genTimestamp__ = 'Fri Jan 18 19:35:34 2008' __CHEETAH_src__ = 'prewikka/templates/AlertListing.tmpl' __CHEETAH_srcLastModified__ = 'Wed Sep 19 08:41:17 2007' __CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class AlertListing(MessageListing): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): MessageListing.__init__(self, *args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def head_extra_content(self, **KWS): ## CHEETAH: generated from #block head_extra_content at line 4, 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_46849629 = _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(''' ''') _filter = _orig_filter_40498362 _orig_filter_35669555 = _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_35669555 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def message_fields_header(self, **KWS): ## CHEETAH: generated from #block message_fields_header at line 297, 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 write(''' ''') if False: _("Classification") _v = VFFSL(SL,"_",False)("Classification") # '$_("Classification")' on line 302, col 8 if _v is not None: write(_filter(_v, rawExpr='$_("Classification")')) # from line 302, col 8. 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(''' ''') 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(''' ''') 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(''' ''') write('''
''') 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 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('''
''') 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: _(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('''
''') 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: _(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('''
''') if VFFSL(SL,"classification_filtered",True): # generated from line 378, col 5 write(''' * ''') write(''' ''') if False: _("Source") _v = VFFSL(SL,"_",False)("Source") # '$_("Source")' on line 384, col 8 if _v is not None: write(_filter(_v, rawExpr='$_("Source")')) # from line 384, col 8. write('''
''') if VFFSL(SL,"source_filtered",True): # generated from line 407, col 5 write(''' * ''') write(''' ''') if False: _("Target") _v = VFFSL(SL,"_",False)("Target") # '$_("Target")' on line 413, col 8 if _v is not None: write(_filter(_v, rawExpr='$_("Target")')) # from line 413, col 8. write('''
''') if VFFSL(SL,"target_filtered",True): # generated from line 435, col 5 write(''' * ''') write(''' ''') if False: _("Sensor") _v = VFFSL(SL,"_",False)("Sensor") # '$_("Sensor")' on line 441, col 8 if _v is not None: write(_filter(_v, rawExpr='$_("Sensor")')) # from line 441, col 8. 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 len(VFFSL(SL,"direction",True)) == 0: # generated from line 521, col 1 write(''' n/a ''') write(''' ''') need_hr = 0 write(''' ''') if VFFSL(SL,"hidden",True) > 0: # generated from line 527, col 1 write(''' ''') if False: _("%(hidden)d of %(total)d %(name)ss not shown...") string = VFFSL(SL,"_",False)("%(hidden)d of %(total)d %(name)ss not shown...") write(''' (''') _v = VFFSL(SL,"str",False)(VFFSL(SL,"string",True) % { "hidden": VFFSL(SL,"hidden",True), "total": VFFSL(SL,"total",True), "name": VFFSL(SL,"name",True) }) # '$str($string % { "hidden": $hidden, "total": $total, "name": $name })' on line 529, col 12 if _v is not None: write(_filter(_v, rawExpr='$str($string % { "hidden": $hidden, "total": $total, "name": $name })')) # from line 529, col 12. write(''' ''') if False: _("expand") _v = VFFSL(SL,"_",False)("expand") # '$_("expand")' on line 530, col 26 if _v is not None: write(_filter(_v, rawExpr='$_("expand")')) # from line 530, col 26. write(''')
''') write(''' ''') for direction in VFFSL(SL,"direction",True) : # generated from line 534, col 1 if VFFSL(SL,"need_hr",True): # generated from line 535, col 7 write('''\t
''') write(''' ''') need_hr = 1 service = "" proto_param = "" proto_str = "" write(''' ''') if VFFSL(SL,"direction.protocol.value",True) != None: # generated from line 544, col 7 proto_str = VFN(VFFSL(SL,"direction.protocol.value",True),"lower",False)() proto_param = "&protocol=" + VFN(VFFSL(SL,"direction.protocol.value",True),"upper",False)() write(''' ''') for address in VFFSL(SL,"direction.addresses",True): # generated from line 549, col 7 write(''' ''') _v = VFFSL(SL,"address.value",True) # '$address.value' on line 550, col 37 if _v is not None: write(_filter(_v, rawExpr='$address.value')) # from line 550, col 37. write(''' - ''') if False: _("Filter on this %s") _v = VFFSL(SL,"str",False)(VFFSL(SL,"_",False)("Filter on this %s") % (VFFSL(SL,"name",True))) # '$str($_("Filter on this %s") % ($name))' on line 551, col 45 if _v is not None: write(_filter(_v, rawExpr='$str($_("Filter on this %s") % ($name))')) # from line 551, col 45. write('''
''') if not VFFSL(SL,"address.category",True) or VFFSL(SL,"address.category",True) in ("ipv4-addr", "ipv4-net", "ipv6-addr", "ipv6-net"): # generated from line 553, col 8 write(''' - ''') if False: _("%s information") _v = VFN(VFFSL(SL,"str",False)(VFFSL(SL,"_",False)("%s information") % (VFFSL(SL,"name",True))),"capitalize",False)() # '$str($_("%s information") % ($name)).capitalize()' on line 554, col 127 if _v is not None: write(_filter(_v, rawExpr='$str($_("%s information") % ($name)).capitalize()')) # from line 554, col 127. write('''
''') for cmdname, link in VFFSL(SL,"address.host_commands",True): # generated from line 556, col 11 write(''' - ''') _v = VFFSL(SL,"cmdname",True) # '$cmdname' on line 557, col 28 if _v is not None: write(_filter(_v, rawExpr='$cmdname')) # from line 557, col 28. write('''
''') write('''
''') if VFFSL(SL,"direction.service.value",True) != None: # generated from line 561, col 1 write(''':''') _v = VFFSL(SL,"str",False)(VFFSL(SL,"direction.service.value",True)) # '$str($direction.service.value)' on line 561, col 182 if _v is not None: write(_filter(_v, rawExpr='$str($direction.service.value)')) # from line 561, col 182. if VFFSL(SL,"proto_str",True): # generated from line 562, col 10 write('''/''') _v = VFFSL(SL,"proto_str",True) # '$proto_str' on line 563, col 2 if _v is not None: write(_filter(_v, rawExpr='$proto_str')) # from line 563, col 2. write(''' ''') else : # generated from line 564, col 10 write(''' ''') elif VFFSL(SL,"proto_str",True): # generated from line 567, col 8 write(''':''') _v = VFFSL(SL,"proto_str",True) # '$proto_str' on line 568, col 2 if _v is not None: write(_filter(_v, rawExpr='$proto_str')) # from line 568, col 2. write(''' ''') write('''
''') write(''' ''') if VFFSL(SL,"len",False)(VFFSL(SL,"direction.addresses",True)) == 0 and VFFSL(SL,"service",True): # generated from line 573, col 7 write('''\tservice: ''') _v = VFFSL(SL,"service",True)[1:] # '$service[1:]' on line 574, col 11 if _v is not None: write(_filter(_v, rawExpr='$service[1:]')) # from line 574, col 11. write(''' ''') write(''' ''') cnt = 0 for name, value, extra in VFFSL(SL,"direction.listed_values",True): # generated from line 578, col 6 if VFFSL(SL,"cnt",True) > 0: # generated from line 579, col 10 write('''
''') write(''' ''') _v = VFFSL(SL,"name",True) # '$name' on line 583, col 10 if _v is not None: write(_filter(_v, rawExpr='$name')) # from line 583, col 10. write(''': ''') _v = VFFSL(SL,"value.value",True) # '$value.value' on line 583, col 48 if _v is not None: write(_filter(_v, rawExpr='$value.value')) # from line 583, col 48. write(''' ''') if VFFSL(SL,"extra",True) != None: # generated from line 584, col 10 write(''' (''') _v = VFFSL(SL,"extra",True) # '$extra' on line 585, col 12 if _v is not None: write(_filter(_v, rawExpr='$extra')) # from line 585, col 12. write(''') ''') write(''' ''') cnt += 1 write(''' ''') write(''' ''') for sensor in VFFSL(SL,"message.sensors",True): # generated from line 596, col 3 if VFFSL(SL,"sensor.name.value",True): # generated from line 597, col 5 write(''' ''') _v = VFFSL(SL,"sensor.name.value",True) # '$sensor.name.value' on line 598, col 44 if _v is not None: write(_filter(_v, rawExpr='$sensor.name.value')) # from line 598, col 44. write(''' ''') if VFFSL(SL,"sensor.node_name.value",True): # generated from line 600, col 5 write(''' (''') _v = VFFSL(SL,"sensor.node_name.value",True) # '$sensor.node_name.value' on line 601, col 50 if _v is not None: write(_filter(_v, rawExpr='$sensor.node_name.value')) # from line 601, col 50. write(''') ''') write('''
''') 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()