6
##################################################
11
from os.path import getmtime, exists
15
from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
16
from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
17
from Cheetah.Template import Template
18
from Cheetah.DummyTransaction import DummyTransaction
19
from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
20
from Cheetah.CacheRegion import CacheRegion
21
import Cheetah.Filters as Filters
22
import Cheetah.ErrorCatchers as ErrorCatchers
23
from prewikka.templates.utils import utils
24
from prewikka.templates.AlertListing import AlertListing
26
##################################################
31
True, False = (1==1), (1==0)
32
VFFSL=valueFromFrameOrSearchList
33
VFSL=valueFromSearchList
36
__CHEETAH_version__ = '2.0rc7'
37
__CHEETAH_versionTuple__ = (2, 0, 0, 'candidate', 7)
38
__CHEETAH_genTime__ = 1166283668.600498
39
__CHEETAH_genTimestamp__ = 'Sat Dec 16 16:41:08 2006'
40
__CHEETAH_src__ = 'prewikka/templates/SensorAlertListing.tmpl'
41
__CHEETAH_srcLastModified__ = 'Fri Dec 15 10:49:19 2006'
42
__CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine'
44
if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
46
'This template was compiled with Cheetah version'
47
' %s. Templates compiled before version %s must be recompiled.'%(
48
__CHEETAH_version__, RequiredCheetahVersion))
50
##################################################
53
class SensorAlertListing(AlertListing):
55
##################################################
56
## CHEETAH GENERATED METHODS
59
def __init__(self, *args, **KWs):
61
AlertListing.__init__(self, *args, **KWs)
62
if not self._CHEETAH__instanceInitialized:
64
allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
65
for k,v in KWs.items():
66
if k in allowedKWs: cheetahKWArgs[k] = v
67
self._initCheetahInstance(**cheetahKWArgs)
70
def message_listing_header(self, **KWS):
74
## CHEETAH: generated from #def message_listing_header() at line 4, col 1.
75
trans = KWS.get("trans")
76
if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
77
trans = self.transaction # is None unless self.awake() was called
79
trans = DummyTransaction()
81
else: _dummyTrans = False
82
write = trans.response().write
83
SL = self._CHEETAH__searchList
84
_filter = self._CHEETAH__currentFilter
86
########################################
87
## START - generated method body
89
_v = VFN(VFFSL(SL,"utils",False)(),"display_analyzer",False)(VFFSL(SL,"analyzer_infos",True)) # '$utils().display_analyzer($analyzer_infos)' on line 5, col 1
90
if _v is not None: write(_filter(_v, rawExpr='$utils().display_analyzer($analyzer_infos)')) # from line 5, col 1.
93
########################################
94
## END - generated method body
96
return _dummyTrans and trans.response().getvalue() or ""
99
def writeBody(self, **KWS):
103
## CHEETAH: main method generated for this template
104
trans = KWS.get("trans")
105
if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
106
trans = self.transaction # is None unless self.awake() was called
108
trans = DummyTransaction()
110
else: _dummyTrans = False
111
write = trans.response().write
112
SL = self._CHEETAH__searchList
113
_filter = self._CHEETAH__currentFilter
115
########################################
116
## START - generated method body
120
########################################
121
## END - generated method body
123
return _dummyTrans and trans.response().getvalue() or ""
125
##################################################
126
## CHEETAH GENERATED ATTRIBUTES
129
_CHEETAH__instanceInitialized = False
131
_CHEETAH_version = __CHEETAH_version__
133
_CHEETAH_versionTuple = __CHEETAH_versionTuple__
135
_CHEETAH_genTime = __CHEETAH_genTime__
137
_CHEETAH_genTimestamp = __CHEETAH_genTimestamp__
139
_CHEETAH_src = __CHEETAH_src__
141
_CHEETAH_srcLastModified = __CHEETAH_srcLastModified__
143
_mainCheetahMethod_for_SensorAlertListing= 'writeBody'
145
## END CLASS DEFINITION
147
if not hasattr(SensorAlertListing, '_initCheetahAttributes'):
148
templateAPIClass = getattr(SensorAlertListing, '_CHEETAH_templateClass', Template)
149
templateAPIClass._addCheetahPlumbingCodeToClass(SensorAlertListing)
152
# CHEETAH was developed by Tavis Rudd and Mike Orr
153
# with code, advice and input from many other volunteers.
154
# For more information visit http://www.CheetahTemplate.org/
156
##################################################
157
## if run from command line:
158
if __name__ == '__main__':
159
from Cheetah.TemplateCmdLineIface import CmdLineIface
160
CmdLineIface(templateObj=SensorAlertListing()).run()