~ubuntu-branches/ubuntu/utopic/prewikka/utopic

« back to all changes in this revision

Viewing changes to prewikka/templates/SensorListing.py

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2009-07-06 08:39:07 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090706083907-59qlpova8dvyvm8a
Tags: 0.9.16-1ubuntu1
* Merge from debian unstable, Ubuntu remaining changes:
  - Append --install-layout=deb to setup.py install arguments.
* debian/control:
  - Bump python-all-dev, python-central, debhelper build dependencies as
    per Debian Python New Policy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
import sys
9
9
import os
10
10
import os.path
 
11
import __builtin__
11
12
from os.path import getmtime, exists
12
13
import time
13
14
import types
14
 
import __builtin__
15
15
from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
16
16
from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
17
17
from Cheetah.Template import Template
18
 
from Cheetah.DummyTransaction import DummyTransaction
 
18
from Cheetah.DummyTransaction import *
19
19
from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
20
20
from Cheetah.CacheRegion import CacheRegion
21
21
import Cheetah.Filters as Filters
27
27
 
28
28
##################################################
29
29
## MODULE CONSTANTS
30
 
try:
31
 
    True, False
32
 
except NameError:
33
 
    True, False = (1==1), (1==0)
34
30
VFFSL=valueFromFrameOrSearchList
35
31
VFSL=valueFromSearchList
36
32
VFN=valueForName
37
33
currentTime=time.time
38
 
__CHEETAH_version__ = '2.0.1'
39
 
__CHEETAH_versionTuple__ = (2, 0, 1, 'final', 0)
40
 
__CHEETAH_genTime__ = 1244966471.525084
41
 
__CHEETAH_genTimestamp__ = 'Sun Jun 14 10:01:11 2009'
 
34
__CHEETAH_version__ = '2.2.1'
 
35
__CHEETAH_versionTuple__ = (2, 2, 1, 'final', 0)
 
36
__CHEETAH_genTime__ = 1244715456.7547309
 
37
__CHEETAH_genTimestamp__ = 'Thu Jun 11 12:17:36 2009'
42
38
__CHEETAH_src__ = 'prewikka/templates/SensorListing.tmpl'
43
39
__CHEETAH_srcLastModified__ = 'Wed Jun 10 13:11:52 2009'
44
 
__CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine'
 
40
__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
45
41
 
46
42
if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
47
43
    raise AssertionError(
60
56
 
61
57
    def __init__(self, *args, **KWs):
62
58
 
63
 
        ClassicLayout.__init__(self, *args, **KWs)
 
59
        super(SensorListing, self).__init__(*args, **KWs)
64
60
        if not self._CHEETAH__instanceInitialized:
65
61
            cheetahKWArgs = {}
66
62
            allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
88
84
        ########################################
89
85
        ## START - generated method body
90
86
        
91
 
        write('''<script type="text/javascript">
 
87
        write(u'''<script type="text/javascript">
92
88
<!--
93
89
$(document).ready(function() {
94
90
 
168
164
        ########################################
169
165
        ## START - generated method body
170
166
        
171
 
        _orig_filter_56499495 = _filter
172
 
        filterName = 'CleanOutput'
 
167
        _orig_filter_62123914 = _filter
 
168
        filterName = u'CleanOutput'
173
169
        if self._CHEETAH__filters.has_key("CleanOutput"):
174
170
            _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName]
175
171
        else:
176
172
            _filter = self._CHEETAH__currentFilter = \
177
173
                        self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter
178
 
        write('''
 
174
        write(u'''
179
175
''')
180
176
        if len(VFFSL(SL,"locations",True)) > 0: # generated from line 65, col 1
181
 
            write(''' <form action="?" method="post">
 
177
            write(u''' <form action="?" method="post">
182
178
 <input type="hidden" name="view" value="sensor_messages_delete" />
183
179
''')
184
 
        write('''
 
180
        write(u'''
185
181
<div id="fieldset_page">
186
182
 
187
183
''')
188
184
        listing = VFN(VFFSL(SL,"locations",True),"keys",False)()
189
 
        _v = VFN(VFFSL(SL,"listing",True),"sort",False)() # '$listing.sort()' on line 73, col 1
190
 
        if _v is not None: write(_filter(_v, rawExpr='$listing.sort()')) # from line 73, col 1.
191
 
        write('''
 
185
        _v = VFN(VFFSL(SL,"listing",True),"sort",False)() # u'$listing.sort()' on line 73, col 1
 
186
        if _v is not None: write(_filter(_v, rawExpr=u'$listing.sort()')) # from line 73, col 1.
 
187
        write(u'''
192
188
 
193
189
''')
194
190
        for entry in VFFSL(SL,"listing",True): # generated from line 75, col 1
195
 
            write(''' <fieldset class="fieldset_heading">
 
191
            write(u''' <fieldset class="fieldset_heading">
196
192
''')
197
193
            dominant = VFFSL(SL,"getDominantStatus",False)(VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)])
198
194
            dclass = "heartbeat_analyze_sensor_status_" + VFFSL(SL,"dominant",True)
199
 
            write('''
 
195
            write(u'''
200
196
''')
201
197
            if VFFSL(SL,"dominant",True) != "online": # generated from line 80, col 3
202
198
                display = "block"
204
200
            else: # generated from line 83, col 3
205
201
                display = "none"
206
202
                display_tmp = "block"
207
 
            write('''
 
203
            write(u'''
208
204
  <legend>
209
205
   <b>
210
206
    <a href="#" class="fieldset_toggle"; return false;">''')
211
 
            _v = VFFSL(SL,"entry",True) # '$entry' on line 90, col 57
212
 
            if _v is not None: write(_filter(_v, rawExpr='$entry')) # from line 90, col 57.
213
 
            write('''</a>
 
207
            _v = VFFSL(SL,"entry",True) # u'$entry' on line 90, col 57
 
208
            if _v is not None: write(_filter(_v, rawExpr=u'$entry')) # from line 90, col 57.
 
209
            write(u'''</a>
214
210
   </b>
215
211
  </legend>
216
212
 
217
213
   <div style="display: ''')
218
 
            _v = VFFSL(SL,"display_tmp",True) # '$display_tmp' on line 94, col 25
219
 
            if _v is not None: write(_filter(_v, rawExpr='$display_tmp')) # from line 94, col 25.
220
 
            write('''" class="''')
221
 
            _v = VFFSL(SL,"dclass",True) # '$dclass' on line 94, col 46
222
 
            if _v is not None: write(_filter(_v, rawExpr='$dclass')) # from line 94, col 46.
223
 
            write(''' fieldset_toggle2">
 
214
            _v = VFFSL(SL,"display_tmp",True) # u'$display_tmp' on line 94, col 25
 
215
            if _v is not None: write(_filter(_v, rawExpr=u'$display_tmp')) # from line 94, col 25.
 
216
            write(u'''" class="''')
 
217
            _v = VFFSL(SL,"dclass",True) # u'$dclass' on line 94, col 46
 
218
            if _v is not None: write(_filter(_v, rawExpr=u'$dclass')) # from line 94, col 46.
 
219
            write(u''' fieldset_toggle2">
224
220
    <table style="border: 1px solid black;">
225
221
     <tr class="nodash" style="cursor: pointer;">
226
222
      <td style="background-color: white; width:150px;">
227
223
''')
228
224
            nlen = VFFSL(SL,"len",False)(VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)]["nodes"])
229
225
            alen = VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)]["total"]
230
 
            write('''       ''')
 
226
            write(u'''       ''')
231
227
            if False:
232
228
                ngettext("%d Node", "%d Nodes", VFFSL(SL,"nlen",True))
233
 
            _v = VFFSL(SL,"str",False)(VFFSL(SL,"ngettext",False)("%d Node", "%d Nodes", VFFSL(SL,"nlen",True)) % VFFSL(SL,"nlen",True)) # '$str($ngettext("%d Node", "%d Nodes", $nlen) % $nlen)' on line 100, col 8
234
 
            if _v is not None: write(_filter(_v, rawExpr='$str($ngettext("%d Node", "%d Nodes", $nlen) % $nlen)')) # from line 100, col 8.
235
 
            write(''', ''')
 
229
            _v = VFFSL(SL,"str",False)(VFFSL(SL,"ngettext",False)("%d Node", "%d Nodes", VFFSL(SL,"nlen",True)) % VFFSL(SL,"nlen",True)) # u'$str($ngettext("%d Node", "%d Nodes", $nlen) % $nlen)' on line 100, col 8
 
230
            if _v is not None: write(_filter(_v, rawExpr=u'$str($ngettext("%d Node", "%d Nodes", $nlen) % $nlen)')) # from line 100, col 8.
 
231
            write(u''', ''')
236
232
            if False:
237
233
                ngettext("%d Analyzer", "%d Analyzers", VFFSL(SL,"alen",True))
238
 
            _v = VFFSL(SL,"str",False)(VFFSL(SL,"ngettext",False)("%d Analyzer", "%d Analyzers", VFFSL(SL,"alen",True)) % VFFSL(SL,"alen",True)) # '$str($ngettext("%d Analyzer", "%d Analyzers", $alen) % $alen)' on line 100, col 63
239
 
            if _v is not None: write(_filter(_v, rawExpr='$str($ngettext("%d Analyzer", "%d Analyzers", $alen) % $alen)')) # from line 100, col 63.
240
 
            write('''
 
234
            _v = VFFSL(SL,"str",False)(VFFSL(SL,"ngettext",False)("%d Analyzer", "%d Analyzers", VFFSL(SL,"alen",True)) % VFFSL(SL,"alen",True)) # u'$str($ngettext("%d Analyzer", "%d Analyzers", $alen) % $alen)' on line 100, col 63
 
235
            if _v is not None: write(_filter(_v, rawExpr=u'$str($ngettext("%d Analyzer", "%d Analyzers", $alen) % $alen)')) # from line 100, col 63.
 
236
            write(u'''
241
237
      </td>
242
238
       ''')
243
239
            if False:
253
249
                    ("unknown", VFFSL(SL,"ngettext",False)("%d Unknown", "%d Unknown", VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)]["unknown"])),
254
250
                    ("missing", VFFSL(SL,"ngettext",False)("%d Missing", "%d Missing", VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)]["missing"]))): # generated from line 102, col 8
255
251
                if VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)][VFFSL(SL,"i",True)[0]] > 0: # generated from line 106, col 9
256
 
                    write('''      <td class="heartbeat_analyze_sensor_status_''')
257
 
                    _v = VFFSL(SL,"i",True)[0] # '$i[0]' on line 107, col 50
258
 
                    if _v is not None: write(_filter(_v, rawExpr='$i[0]')) # from line 107, col 50.
259
 
                    write('''">''')
260
 
                    _v = VFFSL(SL,"str",False)(VFFSL(SL,"i",True)[1] % VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)][VFFSL(SL,"i",True)[0]]) # '$str($i[1] % $locations[$entry][$i[0]])' on line 107, col 57
261
 
                    if _v is not None: write(_filter(_v, rawExpr='$str($i[1] % $locations[$entry][$i[0]])')) # from line 107, col 57.
262
 
                    write('''</td>
 
252
                    write(u'''      <td class="heartbeat_analyze_sensor_status_''')
 
253
                    _v = VFFSL(SL,"i",True)[0] # u'$i[0]' on line 107, col 50
 
254
                    if _v is not None: write(_filter(_v, rawExpr=u'$i[0]')) # from line 107, col 50.
 
255
                    write(u'''">''')
 
256
                    _v = VFFSL(SL,"str",False)(VFFSL(SL,"i",True)[1] % VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)][VFFSL(SL,"i",True)[0]]) # u'$str($i[1] % $locations[$entry][$i[0]])' on line 107, col 57
 
257
                    if _v is not None: write(_filter(_v, rawExpr=u'$str($i[1] % $locations[$entry][$i[0]])')) # from line 107, col 57.
 
258
                    write(u'''</td>
263
259
''')
264
 
            write('''     </tr>
 
260
            write(u'''     </tr>
265
261
    </table>
266
262
   </div>
267
263
 
268
264
   <div style="display: ''')
269
 
            _v = VFFSL(SL,"display",True) # '$display' on line 114, col 25
270
 
            if _v is not None: write(_filter(_v, rawExpr='$display')) # from line 114, col 25.
271
 
            write('''">
 
265
            _v = VFFSL(SL,"display",True) # u'$display' on line 114, col 25
 
266
            if _v is not None: write(_filter(_v, rawExpr=u'$display')) # from line 114, col 25.
 
267
            write(u'''">
272
268
''')
273
269
            nlisting = VFN(VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)]["nodes"],"values",False)()
274
 
            write('''   ''')
275
 
            _v = VFN(VFFSL(SL,"nlisting",True),"sort",False)(node_cmp) # '$nlisting.sort(node_cmp)' on line 116, col 4
276
 
            if _v is not None: write(_filter(_v, rawExpr='$nlisting.sort(node_cmp)')) # from line 116, col 4.
277
 
            write('''
 
270
            write(u'''   ''')
 
271
            _v = VFN(VFFSL(SL,"nlisting",True),"sort",False)(node_cmp) # u'$nlisting.sort(node_cmp)' on line 116, col 4
 
272
            if _v is not None: write(_filter(_v, rawExpr=u'$nlisting.sort(node_cmp)')) # from line 116, col 4.
 
273
            write(u'''
278
274
 
279
275
''')
280
276
            for node in VFFSL(SL,"nlisting",True): # generated from line 118, col 4
283
279
                row_class = VFFSL(SL,"row_classes",True)[VFFSL(SL,"cnt",True)%2]
284
280
                dominant = VFFSL(SL,"getDominantStatus",False)(VFFSL(SL,"node",True))
285
281
                dclass = "heartbeat_analyze_sensor_status_" + dominant
286
 
                write('''
 
282
                write(u'''
287
283
''')
288
284
                if VFFSL(SL,"dominant",True) != "online": # generated from line 125, col 5
289
285
                    display = "block"
290
286
                else: # generated from line 127, col 5
291
287
                    display = "none"
292
 
                write('''
 
288
                write(u'''
293
289
    <table style="width:100%; border: 1px solid black;">
294
290
     <thead style="width: 100%;">
295
291
      <tr class="''')
296
 
                _v = VFFSL(SL,"dclass",True) # '$dclass' on line 133, col 18
297
 
                if _v is not None: write(_filter(_v, rawExpr='$dclass')) # from line 133, col 18.
298
 
                write('''">
 
292
                _v = VFFSL(SL,"dclass",True) # u'$dclass' on line 133, col 18
 
293
                if _v is not None: write(_filter(_v, rawExpr=u'$dclass')) # from line 133, col 18.
 
294
                write(u'''">
299
295
        <th>''')
300
 
                _v = VFFSL(SL,"node.node_name",True) # '$node.node_name' on line 134, col 13
301
 
                if _v is not None: write(_filter(_v, rawExpr='$node.node_name')) # from line 134, col 13.
302
 
                write('''</th>
 
296
                _v = VFFSL(SL,"node.node_name",True) # u'$node.node_name' on line 134, col 13
 
297
                if _v is not None: write(_filter(_v, rawExpr=u'$node.node_name')) # from line 134, col 13.
 
298
                write(u'''</th>
303
299
        <th>
304
300
''')
305
301
                for addr in VFFSL(SL,"node.node_addresses",True): # generated from line 136, col 10
306
 
                    write('''          <a class="popup_menu_toggle" href="#">''')
307
 
                    _v = VFFSL(SL,"addr.value",True) # '$addr.value' on line 137, col 49
308
 
                    if _v is not None: write(_filter(_v, rawExpr='$addr.value')) # from line 137, col 49.
309
 
                    write('''</a>
 
302
                    write(u'''          <a class="popup_menu_toggle" href="#">''')
 
303
                    _v = VFFSL(SL,"addr.value",True) # u'$addr.value' on line 137, col 49
 
304
                    if _v is not None: write(_filter(_v, rawExpr=u'$addr.value')) # from line 137, col 49.
 
305
                    write(u'''</a>
310
306
          <span class="popup_menu">
311
307
           - <a href="''')
312
 
                    _v = VFFSL(SL,"addr.inline_filter",True) # '$addr.inline_filter' on line 139, col 23
313
 
                    if _v is not None: write(_filter(_v, rawExpr='$addr.inline_filter')) # from line 139, col 23.
314
 
                    write('''">''')
 
308
                    _v = VFFSL(SL,"addr.inline_filter",True) # u'$addr.inline_filter' on line 139, col 23
 
309
                    if _v is not None: write(_filter(_v, rawExpr=u'$addr.inline_filter')) # from line 139, col 23.
 
310
                    write(u'''">''')
315
311
                    if False:
316
312
                        _("Filter on address")
317
 
                    _v = VFFSL(SL,"_",False)("Filter on address") # '$_("Filter on address")' on line 139, col 44
318
 
                    if _v is not None: write(_filter(_v, rawExpr='$_("Filter on address")')) # from line 139, col 44.
319
 
                    write('''</a><br />
 
313
                    _v = VFFSL(SL,"_",False)("Filter on address") # u'$_("Filter on address")' on line 139, col 44
 
314
                    if _v is not None: write(_filter(_v, rawExpr=u'$_("Filter on address")')) # from line 139, col 44.
 
315
                    write(u'''</a><br />
320
316
           - <a target="''')
321
 
                    _v = VFFSL(SL,"prewikka.external_link_target",True) # '$prewikka.external_link_target' on line 140, col 25
322
 
                    if _v is not None: write(_filter(_v, rawExpr='$prewikka.external_link_target')) # from line 140, col 25.
323
 
                    write('''" href="https://www.prelude-ids.com/host_details.php?host=''')
324
 
                    _v = VFFSL(SL,"addr.value",True) # '$addr.value' on line 140, col 113
325
 
                    if _v is not None: write(_filter(_v, rawExpr='$addr.value')) # from line 140, col 113.
326
 
                    write('''">''')
 
317
                    _v = VFFSL(SL,"prewikka.external_link_target",True) # u'$prewikka.external_link_target' on line 140, col 25
 
318
                    if _v is not None: write(_filter(_v, rawExpr=u'$prewikka.external_link_target')) # from line 140, col 25.
 
319
                    write(u'''" href="https://www.prelude-ids.com/host_details.php?host=''')
 
320
                    _v = VFFSL(SL,"addr.value",True) # u'$addr.value' on line 140, col 113
 
321
                    if _v is not None: write(_filter(_v, rawExpr=u'$addr.value')) # from line 140, col 113.
 
322
                    write(u'''">''')
327
323
                    if False:
328
324
                        _("Address information")
329
 
                    _v = VFFSL(SL,"_",False)("Address information") # '$_("Address information")' on line 140, col 126
330
 
                    if _v is not None: write(_filter(_v, rawExpr='$_("Address information")')) # from line 140, col 126.
331
 
                    write('''</a><br />
 
325
                    _v = VFFSL(SL,"_",False)("Address information") # u'$_("Address information")' on line 140, col 126
 
326
                    if _v is not None: write(_filter(_v, rawExpr=u'$_("Address information")')) # from line 140, col 126.
 
327
                    write(u'''</a><br />
332
328
 
333
329
''')
334
330
                    for name, link in VFFSL(SL,"addr.host_commands",True): # generated from line 142, col 12
335
 
                        write('''           - <a href="''')
336
 
                        _v = VFFSL(SL,"link",True) # '$link' on line 143, col 23
337
 
                        if _v is not None: write(_filter(_v, rawExpr='$link')) # from line 143, col 23.
338
 
                        write('''">''')
339
 
                        _v = VFFSL(SL,"name",True) # '$name' on line 143, col 30
340
 
                        if _v is not None: write(_filter(_v, rawExpr='$name')) # from line 143, col 30.
341
 
                        write('''</a><br />
 
331
                        write(u'''           - <a href="''')
 
332
                        _v = VFFSL(SL,"link",True) # u'$link' on line 143, col 23
 
333
                        if _v is not None: write(_filter(_v, rawExpr=u'$link')) # from line 143, col 23.
 
334
                        write(u'''">''')
 
335
                        _v = VFFSL(SL,"name",True) # u'$name' on line 143, col 30
 
336
                        if _v is not None: write(_filter(_v, rawExpr=u'$name')) # from line 143, col 30.
 
337
                        write(u'''</a><br />
342
338
''')
343
 
                    write('''          </span>
 
339
                    write(u'''          </span>
344
340
          <br/>
345
341
''')
346
 
                write('''        </th>
347
 
        <th>''')
348
 
                _v = VFFSL(SL,"node.ostype",True) # '$node.ostype' on line 149, col 13
349
 
                if _v is not None: write(_filter(_v, rawExpr='$node.ostype')) # from line 149, col 13.
350
 
                write('''</th>
351
 
        <th>''')
352
 
                _v = VFFSL(SL,"node.osversion",True) # '$node.osversion' on line 150, col 13
353
 
                if _v is not None: write(_filter(_v, rawExpr='$node.osversion')) # from line 150, col 13.
354
 
                write('''</th>
 
342
                write(u'''        </th>
 
343
        <th>''')
 
344
                _v = VFFSL(SL,"node.ostype",True) # u'$node.ostype' on line 149, col 13
 
345
                if _v is not None: write(_filter(_v, rawExpr=u'$node.ostype')) # from line 149, col 13.
 
346
                write(u'''</th>
 
347
        <th>''')
 
348
                _v = VFFSL(SL,"node.osversion",True) # u'$node.osversion' on line 150, col 13
 
349
                if _v is not None: write(_filter(_v, rawExpr=u'$node.osversion')) # from line 150, col 13.
 
350
                write(u'''</th>
355
351
        <th>
356
352
 
357
353
         <table align="right" style="border: 1px solid black; width: 200px; text-align: center;">
360
356
            ''')
361
357
                if False:
362
358
                    _("Total:")
363
 
                _v = VFFSL(SL,"_",False)("Total:") # '$_("Total:")' on line 156, col 13
364
 
                if _v is not None: write(_filter(_v, rawExpr='$_("Total:")')) # from line 156, col 13.
365
 
                write(''' <a href="#">''')
366
 
                _v = VFFSL(SL,"node",True)["total"] # '$node["total"]' on line 156, col 38
367
 
                if _v is not None: write(_filter(_v, rawExpr='$node["total"]')) # from line 156, col 38.
368
 
                write('''</a>
 
359
                _v = VFFSL(SL,"_",False)("Total:") # u'$_("Total:")' on line 156, col 13
 
360
                if _v is not None: write(_filter(_v, rawExpr=u'$_("Total:")')) # from line 156, col 13.
 
361
                write(u''' <a href="#">''')
 
362
                _v = VFFSL(SL,"node",True)["total"] # u'$node["total"]' on line 156, col 38
 
363
                if _v is not None: write(_filter(_v, rawExpr=u'$node["total"]')) # from line 156, col 38.
 
364
                write(u'''</a>
369
365
           </td>
370
366
''')
371
367
                for i in ("online", "offline", "unknown", "missing"): # generated from line 158, col 12
372
368
                    if VFFSL(SL,"node",True)[VFFSL(SL,"i",True)] > 0: # generated from line 159, col 13
373
 
                        write('''           <td class="''')
374
 
                        _v = VFFSL(SL,"i",True) # '$i' on line 160, col 23
375
 
                        if _v is not None: write(_filter(_v, rawExpr='$i')) # from line 160, col 23.
376
 
                        write(''' heartbeat_analyze_sensor_status_''')
377
 
                        _v = VFFSL(SL,"i",True) # '$i' on line 160, col 58
378
 
                        if _v is not None: write(_filter(_v, rawExpr='$i')) # from line 160, col 58.
379
 
                        write('''" style="cursor: pointer;">
 
369
                        write(u'''           <td class="''')
 
370
                        _v = VFFSL(SL,"i",True) # u'$i' on line 160, col 23
 
371
                        if _v is not None: write(_filter(_v, rawExpr=u'$i')) # from line 160, col 23.
 
372
                        write(u''' heartbeat_analyze_sensor_status_''')
 
373
                        _v = VFFSL(SL,"i",True) # u'$i' on line 160, col 58
 
374
                        if _v is not None: write(_filter(_v, rawExpr=u'$i')) # from line 160, col 58.
 
375
                        write(u'''" style="cursor: pointer;">
380
376
            <a href="#">''')
381
 
                        _v = VFFSL(SL,"node",True)[VFFSL(SL,"i",True)] # '$node[$i]' on line 161, col 25
382
 
                        if _v is not None: write(_filter(_v, rawExpr='$node[$i]')) # from line 161, col 25.
383
 
                        write('''</a>
 
377
                        _v = VFFSL(SL,"node",True)[VFFSL(SL,"i",True)] # u'$node[$i]' on line 161, col 25
 
378
                        if _v is not None: write(_filter(_v, rawExpr=u'$node[$i]')) # from line 161, col 25.
 
379
                        write(u'''</a>
384
380
           </td>
385
381
''')
386
 
                write('''          </tr>
 
382
                write(u'''          </tr>
387
383
         </table>
388
384
 
389
385
        </th>
392
388
    </table>
393
389
 
394
390
    <div style="display: ''')
395
 
                _v = VFFSL(SL,"display",True) # '$display' on line 173, col 26
396
 
                if _v is not None: write(_filter(_v, rawExpr='$display')) # from line 173, col 26.
397
 
                write('''">
 
391
                _v = VFFSL(SL,"display",True) # u'$display' on line 173, col 26
 
392
                if _v is not None: write(_filter(_v, rawExpr=u'$display')) # from line 173, col 26.
 
393
                write(u'''">
398
394
    <table style="width: 100%; border: 1px solid black;">
399
395
     <thead>
400
396
      <tr class="tr_header ''')
401
 
                _v = VFFSL(SL,"row_classes",True)[VFFSL(SL,"cnt",True)%2] # '$row_classes[$cnt%2]' on line 176, col 28
402
 
                if _v is not None: write(_filter(_v, rawExpr='$row_classes[$cnt%2]')) # from line 176, col 28.
403
 
                write('''">
 
397
                _v = VFFSL(SL,"row_classes",True)[VFFSL(SL,"cnt",True)%2] # u'$row_classes[$cnt%2]' on line 176, col 28
 
398
                if _v is not None: write(_filter(_v, rawExpr=u'$row_classes[$cnt%2]')) # from line 176, col 28.
 
399
                write(u'''">
404
400
       <th>''')
405
401
                if False:
406
402
                    _("Delete")
407
 
                _v = VFFSL(SL,"_",False)("Delete") # '$_("Delete")' on line 177, col 12
408
 
                if _v is not None: write(_filter(_v, rawExpr='$_("Delete")')) # from line 177, col 12.
409
 
                write('''</th>
 
403
                _v = VFFSL(SL,"_",False)("Delete") # u'$_("Delete")' on line 177, col 12
 
404
                if _v is not None: write(_filter(_v, rawExpr=u'$_("Delete")')) # from line 177, col 12.
 
405
                write(u'''</th>
410
406
       <th>''')
411
407
                if False:
412
408
                    _("Name")
413
 
                _v = VFFSL(SL,"_",False)("Name") # '$_("Name")' on line 178, col 12
414
 
                if _v is not None: write(_filter(_v, rawExpr='$_("Name")')) # from line 178, col 12.
415
 
                write('''</th>
 
409
                _v = VFFSL(SL,"_",False)("Name") # u'$_("Name")' on line 178, col 12
 
410
                if _v is not None: write(_filter(_v, rawExpr=u'$_("Name")')) # from line 178, col 12.
 
411
                write(u'''</th>
416
412
       <th>''')
417
413
                if False:
418
414
                    _("Model")
419
 
                _v = VFFSL(SL,"_",False)("Model") # '$_("Model")' on line 179, col 12
420
 
                if _v is not None: write(_filter(_v, rawExpr='$_("Model")')) # from line 179, col 12.
421
 
                write('''</th>
 
415
                _v = VFFSL(SL,"_",False)("Model") # u'$_("Model")' on line 179, col 12
 
416
                if _v is not None: write(_filter(_v, rawExpr=u'$_("Model")')) # from line 179, col 12.
 
417
                write(u'''</th>
422
418
       <th>''')
423
419
                if False:
424
420
                    _("Version")
425
 
                _v = VFFSL(SL,"_",False)("Version") # '$_("Version")' on line 180, col 12
426
 
                if _v is not None: write(_filter(_v, rawExpr='$_("Version")')) # from line 180, col 12.
427
 
                write('''</th>
 
421
                _v = VFFSL(SL,"_",False)("Version") # u'$_("Version")' on line 180, col 12
 
422
                if _v is not None: write(_filter(_v, rawExpr=u'$_("Version")')) # from line 180, col 12.
 
423
                write(u'''</th>
428
424
       <th>''')
429
425
                if False:
430
426
                    _("Class")
431
 
                _v = VFFSL(SL,"_",False)("Class") # '$_("Class")' on line 181, col 12
432
 
                if _v is not None: write(_filter(_v, rawExpr='$_("Class")')) # from line 181, col 12.
433
 
                write('''</th>
 
427
                _v = VFFSL(SL,"_",False)("Class") # u'$_("Class")' on line 181, col 12
 
428
                if _v is not None: write(_filter(_v, rawExpr=u'$_("Class")')) # from line 181, col 12.
 
429
                write(u'''</th>
434
430
       <th>''')
435
431
                if False:
436
432
                    _("Last heartbeat")
437
 
                _v = VFFSL(SL,"_",False)("Last heartbeat") # '$_("Last heartbeat")' on line 182, col 12
438
 
                if _v is not None: write(_filter(_v, rawExpr='$_("Last heartbeat")')) # from line 182, col 12.
439
 
                write('''</th>
 
433
                _v = VFFSL(SL,"_",False)("Last heartbeat") # u'$_("Last heartbeat")' on line 182, col 12
 
434
                if _v is not None: write(_filter(_v, rawExpr=u'$_("Last heartbeat")')) # from line 182, col 12.
 
435
                write(u'''</th>
440
436
       <th style="text-align: center;">''')
441
437
                if False:
442
438
                    _("Status")
443
 
                _v = VFFSL(SL,"_",False)("Status") # '$_("Status")' on line 183, col 40
444
 
                if _v is not None: write(_filter(_v, rawExpr='$_("Status")')) # from line 183, col 40.
445
 
                write('''</th>
 
439
                _v = VFFSL(SL,"_",False)("Status") # u'$_("Status")' on line 183, col 40
 
440
                if _v is not None: write(_filter(_v, rawExpr=u'$_("Status")')) # from line 183, col 40.
 
441
                write(u'''</th>
446
442
      </tr>
447
443
     </thead>
448
444
''')
449
445
                alisting = VFFSL(SL,"node.analyzers",True)
450
 
                write('''     ''')
451
 
                _v = VFN(VFFSL(SL,"node.analyzers",True),"sort",False)(analyzer_cmp) # '$node.analyzers.sort(analyzer_cmp)' on line 187, col 6
452
 
                if _v is not None: write(_filter(_v, rawExpr='$node.analyzers.sort(analyzer_cmp)')) # from line 187, col 6.
453
 
                write('''
 
446
                write(u'''     ''')
 
447
                _v = VFN(VFFSL(SL,"node.analyzers",True),"sort",False)(analyzer_cmp) # u'$node.analyzers.sort(analyzer_cmp)' on line 187, col 6
 
448
                if _v is not None: write(_filter(_v, rawExpr=u'$node.analyzers.sort(analyzer_cmp)')) # from line 187, col 6.
 
449
                write(u'''
454
450
     <tbody>
455
451
''')
456
452
                for analyzer in VFFSL(SL,"node.analyzers",True): # generated from line 189, col 6
457
453
                    cnt += 1
458
 
                    write('''      <tr class="tr_''')
459
 
                    _v = VFFSL(SL,"analyzer",True)['status'] # "$analyzer['status']" on line 191, col 21
460
 
                    if _v is not None: write(_filter(_v, rawExpr="$analyzer['status']")) # from line 191, col 21.
461
 
                    write(''' ''')
462
 
                    _v = VFFSL(SL,"row_classes",True)[VFFSL(SL,"cnt",True)%2] # '$row_classes[$cnt%2]' on line 191, col 41
463
 
                    if _v is not None: write(_filter(_v, rawExpr='$row_classes[$cnt%2]')) # from line 191, col 41.
464
 
                    write('''">
 
454
                    write(u'''      <tr class="tr_''')
 
455
                    _v = VFFSL(SL,"analyzer",True)['status'] # u"$analyzer['status']" on line 191, col 21
 
456
                    if _v is not None: write(_filter(_v, rawExpr=u"$analyzer['status']")) # from line 191, col 21.
 
457
                    write(u''' ''')
 
458
                    _v = VFFSL(SL,"row_classes",True)[VFFSL(SL,"cnt",True)%2] # u'$row_classes[$cnt%2]' on line 191, col 41
 
459
                    if _v is not None: write(_filter(_v, rawExpr=u'$row_classes[$cnt%2]')) # from line 191, col 41.
 
460
                    write(u'''">
465
461
       <td style="padding-top: 0px; padding-bottom: 0px;"><input class="checkbox" type="checkbox" name="analyzerid" value="''')
466
 
                    _v = VFFSL(SL,"analyzer",True)["analyzerid"] # '$analyzer["analyzerid"]' on line 192, col 124
467
 
                    if _v is not None: write(_filter(_v, rawExpr='$analyzer["analyzerid"]')) # from line 192, col 124.
468
 
                    write('''" /></td>
 
462
                    _v = VFFSL(SL,"analyzer",True)["analyzerid"] # u'$analyzer["analyzerid"]' on line 192, col 124
 
463
                    if _v is not None: write(_filter(_v, rawExpr=u'$analyzer["analyzerid"]')) # from line 192, col 124.
 
464
                    write(u'''" /></td>
469
465
 
470
466
       <td>
471
467
        <a class="popup_menu_toggle" href="#">''')
472
 
                    _v = VFFSL(SL,"analyzer.name",True) # '$analyzer.name' on line 195, col 47
473
 
                    if _v is not None: write(_filter(_v, rawExpr='$analyzer.name')) # from line 195, col 47.
474
 
                    write('''</a>
 
468
                    _v = VFFSL(SL,"analyzer.name",True) # u'$analyzer.name' on line 195, col 47
 
469
                    if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.name')) # from line 195, col 47.
 
470
                    write(u'''</a>
475
471
        <span class="popup_menu">
476
472
         - <a href="''')
477
 
                    _v = VFFSL(SL,"analyzer.alert_listing",True) # '$analyzer.alert_listing' on line 197, col 21
478
 
                    if _v is not None: write(_filter(_v, rawExpr='$analyzer.alert_listing')) # from line 197, col 21.
479
 
                    write('''">''')
 
473
                    _v = VFFSL(SL,"analyzer.alert_listing",True) # u'$analyzer.alert_listing' on line 197, col 21
 
474
                    if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.alert_listing')) # from line 197, col 21.
 
475
                    write(u'''">''')
480
476
                    if False:
481
477
                        _("Alert listing")
482
 
                    _v = VFFSL(SL,"_",False)("Alert listing") # '$_("Alert listing")' on line 197, col 46
483
 
                    if _v is not None: write(_filter(_v, rawExpr='$_("Alert listing")')) # from line 197, col 46.
484
 
                    write('''</a><br />
 
478
                    _v = VFFSL(SL,"_",False)("Alert listing") # u'$_("Alert listing")' on line 197, col 46
 
479
                    if _v is not None: write(_filter(_v, rawExpr=u'$_("Alert listing")')) # from line 197, col 46.
 
480
                    write(u'''</a><br />
485
481
         - <a href="''')
486
 
                    _v = VFFSL(SL,"analyzer.heartbeat_listing",True) # '$analyzer.heartbeat_listing' on line 198, col 21
487
 
                    if _v is not None: write(_filter(_v, rawExpr='$analyzer.heartbeat_listing')) # from line 198, col 21.
488
 
                    write('''">''')
 
482
                    _v = VFFSL(SL,"analyzer.heartbeat_listing",True) # u'$analyzer.heartbeat_listing' on line 198, col 21
 
483
                    if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.heartbeat_listing')) # from line 198, col 21.
 
484
                    write(u'''">''')
489
485
                    if False:
490
486
                        _("Heartbeat listing")
491
 
                    _v = VFFSL(SL,"_",False)("Heartbeat listing") # '$_("Heartbeat listing")' on line 198, col 50
492
 
                    if _v is not None: write(_filter(_v, rawExpr='$_("Heartbeat listing")')) # from line 198, col 50.
493
 
                    write('''</a><br />
 
487
                    _v = VFFSL(SL,"_",False)("Heartbeat listing") # u'$_("Heartbeat listing")' on line 198, col 50
 
488
                    if _v is not None: write(_filter(_v, rawExpr=u'$_("Heartbeat listing")')) # from line 198, col 50.
 
489
                    write(u'''</a><br />
494
490
         - <a href="''')
495
 
                    _v = VFFSL(SL,"analyzer.heartbeat_analyze",True) # '$analyzer.heartbeat_analyze' on line 199, col 21
496
 
                    if _v is not None: write(_filter(_v, rawExpr='$analyzer.heartbeat_analyze')) # from line 199, col 21.
497
 
                    write('''">''')
 
491
                    _v = VFFSL(SL,"analyzer.heartbeat_analyze",True) # u'$analyzer.heartbeat_analyze' on line 199, col 21
 
492
                    if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.heartbeat_analyze')) # from line 199, col 21.
 
493
                    write(u'''">''')
498
494
                    if False:
499
495
                        _("Heartbeat analysis")
500
 
                    _v = VFFSL(SL,"_",False)("Heartbeat analysis") # '$_("Heartbeat analysis")' on line 199, col 50
501
 
                    if _v is not None: write(_filter(_v, rawExpr='$_("Heartbeat analysis")')) # from line 199, col 50.
502
 
                    write('''</a><br />
 
496
                    _v = VFFSL(SL,"_",False)("Heartbeat analysis") # u'$_("Heartbeat analysis")' on line 199, col 50
 
497
                    if _v is not None: write(_filter(_v, rawExpr=u'$_("Heartbeat analysis")')) # from line 199, col 50.
 
498
                    write(u'''</a><br />
503
499
        </span>
504
500
       </td>
505
501
       <td>''')
506
 
                    _v = VFFSL(SL,"analyzer",True)["model"] # '$analyzer["model"]' on line 202, col 12
507
 
                    if _v is not None: write(_filter(_v, rawExpr='$analyzer["model"]')) # from line 202, col 12.
508
 
                    write('''</td>
509
 
       <td>''')
510
 
                    _v = VFFSL(SL,"analyzer",True)["version"] # '$analyzer["version"]' on line 203, col 12
511
 
                    if _v is not None: write(_filter(_v, rawExpr='$analyzer["version"]')) # from line 203, col 12.
512
 
                    write('''</td>
513
 
       <td>''')
514
 
                    _v = VFFSL(SL,"analyzer",True)["class"] # '$analyzer["class"]' on line 204, col 12
515
 
                    if _v is not None: write(_filter(_v, rawExpr='$analyzer["class"]')) # from line 204, col 12.
516
 
                    write('''</td>
517
 
       <td>''')
518
 
                    _v = VFFSL(SL,"analyzer",True)["last_heartbeat_time"] # '$analyzer["last_heartbeat_time"]' on line 205, col 12
519
 
                    if _v is not None: write(_filter(_v, rawExpr='$analyzer["last_heartbeat_time"]')) # from line 205, col 12.
520
 
                    write('''</td>
 
502
                    _v = VFFSL(SL,"analyzer",True)["model"] # u'$analyzer["model"]' on line 202, col 12
 
503
                    if _v is not None: write(_filter(_v, rawExpr=u'$analyzer["model"]')) # from line 202, col 12.
 
504
                    write(u'''</td>
 
505
       <td>''')
 
506
                    _v = VFFSL(SL,"analyzer",True)["version"] # u'$analyzer["version"]' on line 203, col 12
 
507
                    if _v is not None: write(_filter(_v, rawExpr=u'$analyzer["version"]')) # from line 203, col 12.
 
508
                    write(u'''</td>
 
509
       <td>''')
 
510
                    _v = VFFSL(SL,"analyzer",True)["class"] # u'$analyzer["class"]' on line 204, col 12
 
511
                    if _v is not None: write(_filter(_v, rawExpr=u'$analyzer["class"]')) # from line 204, col 12.
 
512
                    write(u'''</td>
 
513
       <td>''')
 
514
                    _v = VFFSL(SL,"analyzer",True)["last_heartbeat_time"] # u'$analyzer["last_heartbeat_time"]' on line 205, col 12
 
515
                    if _v is not None: write(_filter(_v, rawExpr=u'$analyzer["last_heartbeat_time"]')) # from line 205, col 12.
 
516
                    write(u'''</td>
521
517
       <td style="text-align: center;" class="heartbeat_analyze_sensor_status_''')
522
 
                    _v = VFFSL(SL,"analyzer",True)["status"] # '$analyzer["status"]' on line 206, col 79
523
 
                    if _v is not None: write(_filter(_v, rawExpr='$analyzer["status"]')) # from line 206, col 79.
524
 
                    write('''">''')
525
 
                    _v = VFFSL(SL,"analyzer",True)["status_meaning"] # '$analyzer["status_meaning"]' on line 206, col 100
526
 
                    if _v is not None: write(_filter(_v, rawExpr='$analyzer["status_meaning"]')) # from line 206, col 100.
527
 
                    write('''</td>
 
518
                    _v = VFFSL(SL,"analyzer",True)["status"] # u'$analyzer["status"]' on line 206, col 79
 
519
                    if _v is not None: write(_filter(_v, rawExpr=u'$analyzer["status"]')) # from line 206, col 79.
 
520
                    write(u'''">''')
 
521
                    _v = VFFSL(SL,"analyzer",True)["status_meaning"] # u'$analyzer["status_meaning"]' on line 206, col 100
 
522
                    if _v is not None: write(_filter(_v, rawExpr=u'$analyzer["status_meaning"]')) # from line 206, col 100.
 
523
                    write(u'''</td>
528
524
      </tr>
529
525
''')
530
 
                write('''     </tbody>
 
526
                write(u'''     </tbody>
531
527
    </table>
532
528
    </div>
533
529
 
534
530
    <br />
535
531
''')
536
 
            write('''  </div>
 
532
            write(u'''  </div>
537
533
 </fieldset>
538
534
 
539
535
<br />
540
536
''')
541
 
        write('''
 
537
        write(u'''
542
538
''')
543
539
        if len(VFFSL(SL,"locations",True)) > 0: # generated from line 221, col 1
544
 
            write('''  <div style="text-align: right; vertical-align: bottom;">
 
540
            write(u'''  <div style="text-align: right; vertical-align: bottom;">
545
541
    <input class="checkbox" type="checkbox" name="alerts" /><b>''')
546
542
            if False:
547
543
                _("Alerts")
548
 
            _v = VFFSL(SL,"_",False)("Alerts") # '$_("Alerts")' on line 223, col 64
549
 
            if _v is not None: write(_filter(_v, rawExpr='$_("Alerts")')) # from line 223, col 64.
550
 
            write('''</b>
 
544
            _v = VFFSL(SL,"_",False)("Alerts") # u'$_("Alerts")' on line 223, col 64
 
545
            if _v is not None: write(_filter(_v, rawExpr=u'$_("Alerts")')) # from line 223, col 64.
 
546
            write(u'''</b>
551
547
    <input class="checkbox" type="checkbox" name="heartbeats" /><b>''')
552
548
            if False:
553
549
                _("Heartbeats")
554
 
            _v = VFFSL(SL,"_",False)("Heartbeats") # '$_("Heartbeats")' on line 224, col 68
555
 
            if _v is not None: write(_filter(_v, rawExpr='$_("Heartbeats")')) # from line 224, col 68.
556
 
            write('''</b>
 
550
            _v = VFFSL(SL,"_",False)("Heartbeats") # u'$_("Heartbeats")' on line 224, col 68
 
551
            if _v is not None: write(_filter(_v, rawExpr=u'$_("Heartbeats")')) # from line 224, col 68.
 
552
            write(u'''</b>
557
553
    &nbsp;<input type="submit" value="''')
558
554
            if False:
559
555
                _("Delete")
560
 
            _v = VFFSL(SL,"_",False)("Delete") # '$_("Delete")' on line 225, col 39
561
 
            if _v is not None: write(_filter(_v, rawExpr='$_("Delete")')) # from line 225, col 39.
562
 
            write('''" />
 
556
            _v = VFFSL(SL,"_",False)("Delete") # u'$_("Delete")' on line 225, col 39
 
557
            if _v is not None: write(_filter(_v, rawExpr=u'$_("Delete")')) # from line 225, col 39.
 
558
            write(u'''" />
563
559
  </div>
564
560
''')
565
 
        write('''
 
561
        write(u'''
566
562
</div>
567
563
</form>
568
564
 
569
565
''')
570
 
        _filter = self._CHEETAH__currentFilter = _orig_filter_56499495
 
566
        _filter = self._CHEETAH__currentFilter = _orig_filter_62123914
571
567
        
572
568
        ########################################
573
569
        ## END - generated method body
594
590
        ########################################
595
591
        ## START - generated method body
596
592
        
597
 
        write('''
 
593
        write(u'''
598
594
 
599
595
''')
600
596
        self.main_content(trans=trans)