#!/usr/bin/env python




##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
    import builtins as builtin
except ImportError:
    import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
from Cheetah.Template import Template
from Cheetah.DummyTransaction import *
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
VFFSL=valueFromFrameOrSearchList
VFSL=valueFromSearchList
VFN=valueForName
currentTime=time.time
__CHEETAH_version__ = '2.4.4'
__CHEETAH_versionTuple__ = (2, 4, 4, 'development', 0)
__CHEETAH_genTime__ = 1313541191.631764
__CHEETAH_genTimestamp__ = 'Tue Aug 16 18:33:11 2011'
__CHEETAH_src__ = 'prewikka/templates/AlertListing.tmpl'
__CHEETAH_srcLastModified__ = 'Fri Jul  3 08:59:48 2009'
__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):

        super(AlertListing, self).__init__(*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_72038637 = _filter
        filterName = u'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(u'''
<script type="text/javascript">
<!--
''')
        _filter = self._CHEETAH__currentFilter = _orig_filter_72038637
        _orig_filter_61998499 = _filter
        filterName = u'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
        write(u'''
var global_id = 0;
var value_array = Array();
var operator_array = Array();

var title_array = Array();
title_array["="] = "''')
        if False:
            _("Equal")
        _v = VFFSL(SL,"_",False)("Equal") # u'$_("Equal")' on line 17, col 21
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Equal")')) # from line 17, col 21.
        write(u'''";
title_array["!="] = "''')
        if False:
            _("Not equal")
        _v = VFFSL(SL,"_",False)("Not equal") # u'$_("Not equal")' on line 18, col 22
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Not equal")')) # from line 18, col 22.
        write(u'''";
title_array["<"] = "''')
        if False:
            _("Lesser than")
        _v = VFFSL(SL,"_",False)("Lesser than") # u'$_("Lesser than")' on line 19, col 21
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Lesser than")')) # from line 19, col 21.
        write(u'''";
title_array[">"] = "''')
        if False:
            _("Greater than")
        _v = VFFSL(SL,"_",False)("Greater than") # u'$_("Greater than")' on line 20, col 21
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Greater than")')) # from line 20, col 21.
        write(u'''";
title_array["<="] = "''')
        if False:
            _("Lesser or equal")
        _v = VFFSL(SL,"_",False)("Lesser or equal") # u'$_("Lesser or equal")' on line 21, col 22
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Lesser or equal")')) # from line 21, col 22.
        write(u'''";
title_array[">="] = "''')
        if False:
            _("Greater or equal")
        _v = VFFSL(SL,"_",False)("Greater or equal") # u'$_("Greater or equal")' on line 22, col 22
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Greater or equal")')) # from line 22, col 22.
        write(u'''";
title_array["<>"] = "''')
        if False:
            _("Substring")
        _v = VFFSL(SL,"_",False)("Substring") # u'$_("Substring")' on line 23, col 22
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Substring")')) # from line 23, col 22.
        write(u'''";
title_array["<>*"] = "''')
        if False:
            _("Substring (case-insensitive)")
        _v = VFFSL(SL,"_",False)("Substring (case-insensitive)") # u'$_("Substring (case-insensitive)")' on line 24, col 23
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Substring (case-insensitive)")')) # from line 24, col 23.
        write(u'''";
title_array["~"] = "''')
        if False:
            _("Regular expression")
        _v = VFFSL(SL,"_",False)("Regular expression") # u'$_("Regular expression")' on line 25, col 21
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Regular expression")')) # from line 25, col 21.
        write(u'''";
title_array["~*"] = "''')
        if False:
            _("Regular expression (case-insensitive)")
        _v = VFFSL(SL,"_",False)("Regular expression (case-insensitive)") # u'$_("Regular expression (case-insensitive)")' on line 26, col 22
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Regular expression (case-insensitive)")')) # from line 26, col 22.
        write(u'''";


 var saved_state = [ "classification", "source", "target", "analyzer" ];

 var saved_forms = Array();
 saved_forms["classification"] = [ "default", "saved", "current" ];
 saved_forms["source"] = [ "default", "saved", "current" ];
 saved_forms["target"] = [ "default", "saved", "current" ];
 saved_forms["analyzer"] = [ "default", "saved", "current" ];

function cloneForm(form) {
        var clone = $(form).clone();
        var selvals = [];

        $(form).filter("select").each(function() {
                selvals.push($(this).val());
        });

        $(clone).filter("select").each(function() {
                $(this).val(selvals.shift());
        });

        return clone;
}


function input_equal(a, b) {
        if ( a.type == "button" && b.type == "button" )
                return true;

        if ( a.name != b.name )
                return false;

        if ( a.checked != b.checked )
                return false;

        if ( a.selected != b.selected )
                return false;

        if ( a.value != b.value )
                return false;

        return true;
}

function Equals(a, b) {
  if( ! a || ! b )
        return false;

  if ( a.length != b.length )
        return false;

  for ( var k = 0; k < a.length; k++ ) {
        r = input_equal(a[k], b[k]);
        if ( r == false )
                return false;
  }

  return true;
}


function get_next_state(id, cstate) {
        var nextstate = null;
        var selector = "#" + id + " :input";

        if ( cstate == "current" ) {
                if ( saved_forms[id]["saved"] && ! Equals($(selector), saved_forms[id]["saved"]) )
                        nextstate = "saved";

                else if ( saved_forms[id]["default"] && ! Equals($(selector), saved_forms[id]["default"]) )
                        nextstate = "default";
        }

        else if ( cstate == "saved" ) {
                if ( saved_forms[id]["default"] && ! Equals($(selector), saved_forms[id]["default"]) )
                        nextstate = "default";

                else if ( saved_forms[id]["current"] && ! Equals($(selector), saved_forms[id]["current"]) )
                        nextstate = "current";
        }

        else if ( cstate == "default" ) {
                if ( saved_forms[id]["current"] && ! Equals($(selector), saved_forms[id]["current"]) )
                        nextstate = "current";

                else if ( saved_forms[id]["saved"] && ! Equals($(selector), saved_forms[id]["saved"]) )
                        nextstate = "saved";

                else nextstate = "default";
        }

        return nextstate;
}


function createSelectFromArray(varray, sclass, name_attr, selected) {
        var elem;
        var select = document.createElement("select");

        for (elem in varray) {
                option = document.createElement("option")
                option.setAttribute("value", varray[elem]);

                if ( title_array[varray[elem]] )
                        option.setAttribute("title", title_array[varray[elem]]);

                if ( varray[elem] == selected )
                        option.setAttribute("selected", "selected");

                option.appendChild(document.createTextNode(varray[elem]))
                select.appendChild(option)
        }

        select.setAttribute("name", name_attr);
        select.setAttribute("class", sclass);

        return select;
}



''')
        # # Generate special classification function
        for state, type, severity, completion in ("current", VFFSL(SL,"alert.type",True), VFFSL(SL,"alert.assessment.impact.severity",True), VFFSL(SL,"alert.assessment.impact.completion",True)), ("saved", VFFSL(SL,"alert.type_saved",True), VFFSL(SL,"alert.assessment.impact.severity_saved",True), VFFSL(SL,"alert.assessment.impact.completion_saved",True)), ("default", VFFSL(SL,"alert.type_default",True), VFFSL(SL,"alert.assessment.impact.severity_default",True), VFFSL(SL,"alert.assessment.impact.completion_default",True)),: # generated from line 152, col 1
            write(u'''
function classification_special_''')
            _v = VFFSL(SL,"state",True) # u'${state}' on line 154, col 33
            if _v is not None: write(_filter(_v, rawExpr=u'${state}')) # from line 154, col 33.
            write(u'''() {
''')
            for path in "alert.create_time", "alert.correlation_alert.name", "alert.overflow_alert.program", "alert.tool_alert.name": # generated from line 155, col 2
                if path in VFFSL(SL,"type",True): # generated from line 156, col 3
                    write(u'''   $("input[value=\'''')
                    _v = VFFSL(SL,"path",True) # u'${path}' on line 157, col 21
                    if _v is not None: write(_filter(_v, rawExpr=u'${path}')) # from line 157, col 21.
                    write(u'''\']").attr("checked", "checked");
''')
                else: # generated from line 158, col 3
                    write(u'''   $("input[value=\'''')
                    _v = VFFSL(SL,"path",True) # u'${path}' on line 159, col 21
                    if _v is not None: write(_filter(_v, rawExpr=u'${path}')) # from line 159, col 21.
                    write(u'''\']").removeAttr("checked");
''')
            write(u'''
 var input = $("#classification input[name=\'alert.assessment.impact.severity\']");

 ''')
            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 165, col 2
                if VFFSL(SL,"item",True) in VFFSL(SL,"severity",True): # generated from line 166, col 3
                    write(u'''  $(input).filter("[value=\'''')
                    _v = VFFSL(SL,"item",True) # u'$item' on line 167, col 29
                    if _v is not None: write(_filter(_v, rawExpr=u'$item')) # from line 167, col 29.
                    write(u'''\']").attr("checked", "checked");
''')
                else: # generated from line 168, col 3
                    write(u'''  $(input).filter("[value=\'''')
                    _v = VFFSL(SL,"item",True) # u'$item' on line 169, col 29
                    if _v is not None: write(_filter(_v, rawExpr=u'$item')) # from line 169, col 29.
                    write(u'''\']").removeAttr("checked");
''')
            write(u'''
 input = $("#classification input[name=\'alert.assessment.impact.completion\']");
 ''')
            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 174, col 2
                if item in VFFSL(SL,"completion",True): # generated from line 175, col 3
                    write(u'''  $(input).filter("[value=\'''')
                    _v = VFFSL(SL,"item",True) # u'$item' on line 176, col 29
                    if _v is not None: write(_filter(_v, rawExpr=u'$item')) # from line 176, col 29.
                    write(u'''\']").attr("checked", "checked");
''')
                else: # generated from line 177, col 3
                    write(u'''  $(input).filter("[value=\'''')
                    _v = VFFSL(SL,"item",True) # u'$item' on line 178, col 29
                    if _v is not None: write(_filter(_v, rawExpr=u'$item')) # from line 178, col 29.
                    write(u'''\']").removeAttr("checked");
''')
            write(u'''}

''')
        write(u'''


''')
        for type, table_current, table_saved, table_aggreg_current, table_aggreg_saved, table_aggreg_default in ("classification", VFFSL(SL,"classification",True), VFFSL(SL,"classification_saved",True), VFFSL(SL,"aggregated_classification",True), VFFSL(SL,"aggregated_classification_saved",True), VFFSL(SL,"aggregated_classification_default",True)), ("source", VFFSL(SL,"source",True), VFFSL(SL,"source_saved",True), VFFSL(SL,"aggregated_source",True), VFFSL(SL,"aggregated_source_saved",True), VFFSL(SL,"aggregated_source_default",True)), ("target", VFFSL(SL,"target",True), VFFSL(SL,"target_saved",True), VFFSL(SL,"aggregated_target",True), VFFSL(SL,"aggregated_target_saved",True), VFFSL(SL,"aggregated_target_default",True)), ("analyzer", VFFSL(SL,"analyzer",True), VFFSL(SL,"analyzer_saved",True), VFFSL(SL,"aggregated_analyzer",True), VFFSL(SL,"aggregated_analyzer_saved",True), VFFSL(SL,"aggregated_analyzer_default",True)): # generated from line 187, col 1
            write(u'''
function ''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 189, col 10
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 189, col 10.
            write(u'''_filters_set_from_string(state) {
        if ( state == "saved" )
                ''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 191, col 17
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 191, col 17.
            write(u'''_set_saved();

        else if ( state == "default" )
                ''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 194, col 17
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 194, col 17.
            write(u'''_set_default()

        else if ( state == "current" )
                ''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 197, col 17
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 197, col 17.
            write(u'''_set_current();
}

function ''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 200, col 10
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 200, col 10.
            write(u'''_zero() {
 var filter_table = $("#''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 201, col 26
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 201, col 26.
            write(u''' table.filter_table > tbody");
 filter_table.find("tr:not(\':first\')").remove()
 filter_table.find("input[type=text]").val("")
 $("#''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 204, col 7
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 204, col 7.
            write(u''' table.aggregation_table tr:not(\':first\')").remove()

''')
            #  reset to non expert mode.
            write(u''' if ( filter_table.find(".td_container_path").children().is(":visible") )
   filter_table.find(".expert_mode").click();
}

function ''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 211, col 10
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 211, col 10.
            write(u'''_set_default() {
 ''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 212, col 2
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 212, col 2.
            write(u'''_zero();
 var table = $("#''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 213, col 19
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 213, col 19.
            write(u''' table.aggregation_table > tbody");

''')
            if VFFSL(SL,"type",True) == "classification": # generated from line 215, col 3
                write(u'''   ''')
                _v = VFFSL(SL,"type",True) # u'${type}' on line 216, col 4
                if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 216, col 4.
                write(u'''_special_default();
''')
            write(u'''

''')
            # # Aggregation stuff
            cnt = 0
            for path in VFFSL(SL,"table_aggreg_default",True): # generated from line 222, col 3
                write(u'''
''')
                if VFFSL(SL,"cnt",True) > 0: # generated from line 224, col 4
                    write(u'''    table.find("tr:last a.append_entry").trigger(\'click\');
''')
                cnt += 1
                write(u'''
   table.find("tr:last .popup_input_field option[value=\'''')
                _v = VFFSL(SL,"path",True) # u'$path' on line 229, col 57
                if _v is not None: write(_filter(_v, rawExpr=u'$path')) # from line 229, col 57.
                write(u'''\']").attr("selected", "selected");
''')
            write(u'''}

''')
            for state, table, table_aggreg in ("current", VFFSL(SL,"table_current",True), VFFSL(SL,"table_aggreg_current",True)), ("saved", VFFSL(SL,"table_saved",True), VFFSL(SL,"table_aggreg_saved",True)): # generated from line 233, col 1
                write(u'''function ''')
                _v = VFFSL(SL,"type",True) # u'${type}' on line 234, col 10
                if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 234, col 10.
                write(u'''_set_''')
                _v = VFFSL(SL,"state",True) # u'${state}' on line 234, col 22
                if _v is not None: write(_filter(_v, rawExpr=u'${state}')) # from line 234, col 22.
                write(u'''() {
  ''')
                _v = VFFSL(SL,"type",True) # u'${type}' on line 235, col 3
                if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 235, col 3.
                write(u'''_zero();
  var table = $("#''')
                _v = VFFSL(SL,"type",True) # u'${type}' on line 236, col 20
                if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 236, col 20.
                write(u''' table.filter_table > tbody");
  var agtable = $("#''')
                _v = VFFSL(SL,"type",True) # u'${type}' on line 237, col 22
                if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 237, col 22.
                write(u''' table.aggregation_table > tbody");

''')
                if VFFSL(SL,"type",True) == "classification": # generated from line 239, col 3
                    write(u'''   ''')
                    _v = VFFSL(SL,"type",True) # u'${type}' on line 240, col 4
                    if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 240, col 4.
                    write(u'''_special_''')
                    _v = VFFSL(SL,"state",True) # u'${state}' on line 240, col 20
                    if _v is not None: write(_filter(_v, rawExpr=u'${state}')) # from line 240, col 20.
                    write(u'''();
''')
                write(u'''
''')
                cnt = 0
                got_append = 0
                write(u'''
''')
                for path, operator, value in VFFSL(SL,"table",True): # generated from line 246, col 3
                    write(u'''
''')
                    if VFFSL(SL,"cnt",True) > 0: # generated from line 248, col 4
                        got_append = 1
                        write(u'''    table.find("tr:last a.append_entry").trigger(\'click\');
''')
                    cnt += 1
                    write(u'''
''')
                    if not VFFSL(SL,"path",True): # generated from line 254, col 3
                        continue
                    write(u'''
  table.find("tr:last .popup_input_field").attr("value", "''')
                    _v = VFN(VFFSL(SL,"utils",True),"escape_attribute",False)(VFFSL(SL,"value",True)) # u'$utils.escape_attribute($value)' on line 258, col 59
                    if _v is not None: write(_filter(_v, rawExpr=u'$utils.escape_attribute($value)')) # from line 258, col 59.
                    write(u'''");
  table.find("tr:last .popup_input_field option[value=\'''')
                    _v = VFFSL(SL,"value",True) # u'$value' on line 259, col 56
                    if _v is not None: write(_filter(_v, rawExpr=u'$value')) # from line 259, col 56.
                    write(u'''\']").attr("selected", "selected");

''')
                    if VFFSL(SL,"path",True) != "__all__": # generated from line 261, col 3
                        write(u'''   table.find("tr:last .popup_select_field option[value=\'''')
                        _v = VFFSL(SL,"path",True) # u'$path' on line 262, col 58
                        if _v is not None: write(_filter(_v, rawExpr=u'$path')) # from line 262, col 58.
                        write(u'''\']").attr("selected", "selected");

''')
                        #  the option might not exist at this time, so we have to explicitly create it (otherwise,
                        #  using Equals() later on will always return false since there is no operator selected).
                        #  The other fields will be populated on the .trigger("change").
                        write(u'''   table.find("tr:last .popup_operator_select").html("<option value=\'''')
                        _v = VFFSL(SL,"operator",True) # u'$operator' on line 267, col 70
                        if _v is not None: write(_filter(_v, rawExpr=u'$operator')) # from line 267, col 70.
                        write(u'''\' selected=\'selected\' />");

''')
                        if VFFSL(SL,"got_append",True) == 0: # generated from line 269, col 4
                            write(u'''    table.find("tr:last .expert_mode").trigger("click");
''')
                        else: # generated from line 271, col 4
                            write(u'''    table.find("tr:last .popup_select_field").trigger("change");
''')
                    else: # generated from line 274, col 3
                        write(u'''   table.find("tr:last .popup_select_field").hide();
   table.find("tr:last .popup_select_field").attr("disabled", "disabled");
   table.find("tr:last .popup_select_field").trigger("change");
''')
                write(u'''
''')
                # # Aggregation stuff
                cnt = 0
                for path in VFFSL(SL,"table_aggreg",True): # generated from line 283, col 3
                    write(u'''
''')
                    if VFFSL(SL,"cnt",True) > 0: # generated from line 285, col 4
                        write(u'''    agtable.find("tr:last a.append_entry").trigger(\'click\');
''')
                    cnt += 1
                    write(u'''
   agtable.find("tr:last .popup_input_field option[value=\'''')
                    _v = VFFSL(SL,"path",True) # u'$path' on line 290, col 59
                    if _v is not None: write(_filter(_v, rawExpr=u'$path')) # from line 290, col 59.
                    write(u'''\']").attr("selected", "selected");
''')
                write(u''' }
''')
        write(u'''


$(document).ready(function() {
 $(".expert_mode").live("click", function() {
        var tr = $(this).parent().parent();
        var td_container_path = $(tr).children(".td_container_path");
        var td_container_operator = $(tr).children(".td_container_operator");

        if ( ! $(td_container_path).children().is(":visible") ) {
                $(this).text("simple");
                $(this).parent().parent().children(".td_container_operator").children().show()
                $(td_container_path).children("select").show()
                $(td_container_path).children("input").attr("disabled", "disabled")
                $(td_container_path).children("select").removeAttr("disabled")
                $(td_container_operator).children("select").removeAttr("disabled");
        } else {
                $(this).text("advanced");
                $(td_container_path).children().hide()
                $(this).parent().parent().children(".td_container_operator").children().hide()
                $(td_container_path).children("input").removeAttr("disabled")
                $(td_container_path).children("select").attr("disabled", "disabled")
                $(td_container_operator).children("select").attr("disabled", "disabled");
        }

''')
        #  This is required so that the input is changed (from/to enum) when required.
        write(u'''        $(td_container_path).children("select").trigger("change");
});

 $(".remove_entry").live("click", function() {
        $(this).parent().parent().remove();
 });

 $(".append_entry").live("click", function() {
   var tr = cloneForm($(this).parent().parent());
   var select = $(tr).children("td.td_container_path").children();
   var div_id = $(this).parent().parent().parent().parent().parent().parent().parent().parent().parent().attr("id");

   if ( $(this).parent().parent().parent().parent().is("table.aggregation_table") )
        $(select).attr("name", "aggregated_" + div_id);

   else {
        global_id += 1;

        var input = $(tr).children("td.td_container_value").children();
        $(tr).children("td.td_container_operator").children().attr("name", div_id + "_operator_" + global_id);
        $(input).attr("name", div_id + "_value_" + global_id);
        $(input).attr("value", "");
        $(input).find("option[value=\'none\']").attr("selected", "selected");
        $(select).attr("name", div_id + "_object_" + global_id);
   }

   $(this).parents(".inline_filter").after(tr);
   $(select).trigger("change");
   $(tr).children("td.td_container_remove").html("<a class=\\"remove_entry\\">-</a>");
 });


 $(".popup_select_field").live("change", function() {
          var td = $(this).parent();
          var str = $(this, "> option:selected").attr("value");
          var input = $(td).siblings(".td_container_value").children();

          // do not use visible here, this is called before the parent element is visible
          var advanced_mode = $(this).css("display") != "none";

          if ( operator_array[str] && advanced_mode ) {
                var old_select = $(td).siblings(".td_container_operator").children();
                var old_value = $(old_select).children(":selected").attr("value");

                select = createSelectFromArray(operator_array[str], "popup_operator_select", $(old_select).attr("name"), old_value);
                $(old_select).replaceWith(select);
          }

          if ( value_array[str] && advanced_mode ) {
                  select = createSelectFromArray(value_array[str], "popup_input_field", $(input).attr("name"), $(input).attr("value"));
                  $(input).replaceWith(select);
          }

          else {
                var n = document.createElement("input");
                n.setAttribute("type", "text");
                n.setAttribute("name", $(input).attr("name"));
                n.setAttribute("class", "popup_input_field");

                if ( $(input).attr("type") != "select-one" )
                        n.setAttribute("value", $(input).attr("value"));

                $(input).replaceWith(n);
          }
 });



''')
        for type in "classification", "source", "target", "analyzer": # generated from line 389, col 2
            write(u'''
 ''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 391, col 2
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 391, col 2.
            write(u'''_set_saved();
 saved_forms["''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 392, col 15
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 392, col 15.
            write(u'''"]["saved"] = cloneForm($("#''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 392, col 51
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 392, col 51.
            write(u''' :input"));

 ''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 394, col 2
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 394, col 2.
            write(u'''_set_default();
 saved_forms["''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 395, col 15
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 395, col 15.
            write(u'''"]["default"] = cloneForm($("#''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 395, col 53
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 395, col 53.
            write(u''' :input"));

 ''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 397, col 2
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 397, col 2.
            write(u'''_set_current();
 var form = $("#''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 398, col 18
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 398, col 18.
            write(u''' :input");
 saved_forms["''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 399, col 15
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 399, col 15.
            write(u'''"]["current"] = cloneForm(form);

 if ( Equals(saved_forms["''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 401, col 27
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 401, col 27.
            write(u'''"]["default"], saved_forms["''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 401, col 62
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 401, col 62.
            write(u'''"]["saved"]) )
        saved_forms["''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 402, col 22
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 402, col 22.
            write(u'''"]["saved"] = null;

 if ( Equals(saved_forms["''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 404, col 27
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 404, col 27.
            write(u'''"]["current"], saved_forms["''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 404, col 62
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 404, col 62.
            write(u'''"]["default"]) )
        saved_forms["''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 405, col 22
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 405, col 22.
            write(u'''"]["current"] = null;

 if ( Equals(saved_forms["''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 407, col 27
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 407, col 27.
            write(u'''"]["current"], saved_forms["''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 407, col 62
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 407, col 62.
            write(u'''"]["saved"]) )
        saved_forms["''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 408, col 22
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 408, col 22.
            write(u'''"]["current"] = null;

''')
            #  Set the current state
            write(u''' if ( Equals(form, saved_forms["''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 411, col 33
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 411, col 33.
            write(u'''"]["default"]) )
        saved_state["''')
            _v = VFFSL(SL,"type",True) # u'$type' on line 412, col 22
            if _v is not None: write(_filter(_v, rawExpr=u'$type')) # from line 412, col 22.
            write(u'''"] = "default";

 else if ( Equals(form, saved_forms["''')
            _v = VFFSL(SL,"type",True) # u'$type' on line 414, col 38
            if _v is not None: write(_filter(_v, rawExpr=u'$type')) # from line 414, col 38.
            write(u'''"]["saved"]) )
        saved_state["''')
            _v = VFFSL(SL,"type",True) # u'$type' on line 415, col 22
            if _v is not None: write(_filter(_v, rawExpr=u'$type')) # from line 415, col 22.
            write(u'''"] = "saved";

 else if ( Equals(form, saved_forms["''')
            _v = VFFSL(SL,"type",True) # u'$type' on line 417, col 38
            if _v is not None: write(_filter(_v, rawExpr=u'$type')) # from line 417, col 38.
            write(u'''"]["current"]) )
        saved_state["''')
            _v = VFFSL(SL,"type",True) # u'$type' on line 418, col 22
            if _v is not None: write(_filter(_v, rawExpr=u'$type')) # from line 418, col 22.
            write(u'''"] = "current";

 $("#''')
            _v = VFFSL(SL,"type",True) # u'${type}' on line 420, col 7
            if _v is not None: write(_filter(_v, rawExpr=u'${type}')) # from line 420, col 7.
            write(u''' input.reset_filter").val("Reset to " + get_next_state("''')
            _v = VFFSL(SL,"type",True) # u'$type' on line 420, col 70
            if _v is not None: write(_filter(_v, rawExpr=u'$type')) # from line 420, col 70.
            write(u'''", saved_state["''')
            _v = VFFSL(SL,"type",True) # u'$type' on line 420, col 91
            if _v is not None: write(_filter(_v, rawExpr=u'$type')) # from line 420, col 91.
            write(u'''"]));

''')
        write(u'''

$("input.reset_filter").click(function() {
        var div_id = $(this).parent().parent().parent().parent().parent().parent().parent().parent().parent().attr("id");
        saved_state[div_id] = get_next_state(div_id, saved_state[div_id]);

''')
        for t in "classification", "source", "target", "analyzer": # generated from line 429, col 9
            write(u'''                if ( div_id == "''')
            _v = VFFSL(SL,"t",True) # u'$t' on line 430, col 33
            if _v is not None: write(_filter(_v, rawExpr=u'$t')) # from line 430, col 33.
            write(u'''" )
                        ''')
            _v = VFFSL(SL,"t",True) # u'${t}' on line 431, col 25
            if _v is not None: write(_filter(_v, rawExpr=u'${t}')) # from line 431, col 25.
            write(u'''_filters_set_from_string(saved_state[div_id]);
''')
        write(u'''
        $(this).val("Reset to " + get_next_state(div_id, saved_state[div_id]));
 });
});

//--></script>

''')
        _filter = self._CHEETAH__currentFilter = _orig_filter_61998499
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        

    def define_inline_filter(self, obname, preselect, **KWS):



        ## CHEETAH: generated from #def define_inline_filter($obname, $preselect) at line 443, 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(u'''      <table class="inline_filter_content filter_table">
       <tr class="inline_filter">
        <th>''')
        if False:
            _('Filter on')
        _v = VFFSL(SL,"_",False)('Filter on') # u"$_('Filter on')" on line 446, col 13
        if _v is not None: write(_filter(_v, rawExpr=u"$_('Filter on')")) # from line 446, col 13.
        write(u''' [<a class="expert_mode">advanced</a>]:</th>
        <td class="td_container_path">
         <input type="hidden" name="''')
        _v = VFFSL(SL,"obname",True) # u'${obname}' on line 448, col 37
        if _v is not None: write(_filter(_v, rawExpr=u'${obname}')) # from line 448, col 37.
        write(u'''_object_0" value="__all__" />
         <select style="display:none;" disabled="disabled" class="popup_select_field" name="''')
        _v = VFFSL(SL,"obname",True) # u'${obname}' on line 449, col 93
        if _v is not None: write(_filter(_v, rawExpr=u'${obname}')) # from line 449, col 93.
        write(u'''_object_0">
''')
        for name, path, oplist, value in VFFSL(SL,"all_filters",True)[VFFSL(SL,"obname",True)]: # generated from line 450, col 11
            write(u'''
''')
            if VFFSL(SL,"value",True) or VFFSL(SL,"oplist",True): # generated from line 452, col 12
                write(u'''           <script type="text/javascript">
''')
                if VFFSL(SL,"value",True): # generated from line 454, col 13
                    write(u'''            value_array["''')
                    _v = VFFSL(SL,"path",True) # u'$path' on line 455, col 26
                    if _v is not None: write(_filter(_v, rawExpr=u'$path')) # from line 455, col 26.
                    write(u'''"] = ''')
                    _v = VFFSL(SL,"value",True) # u'$value' on line 455, col 36
                    if _v is not None: write(_filter(_v, rawExpr=u'$value')) # from line 455, col 36.
                    write(u''';
''')
                if VFFSL(SL,"oplist",True): # generated from line 457, col 13
                    write(u'''             operator_array["''')
                    _v = VFFSL(SL,"path",True) # u'$path' on line 458, col 30
                    if _v is not None: write(_filter(_v, rawExpr=u'$path')) # from line 458, col 30.
                    write(u'''"] = ''')
                    _v = VFFSL(SL,"oplist",True) # u'$oplist' on line 458, col 40
                    if _v is not None: write(_filter(_v, rawExpr=u'$oplist')) # from line 458, col 40.
                    write(u''';
''')
                write(u'''           </script>
''')
            write(u'''
''')
            if VFFSL(SL,"path",True) == None: # generated from line 463, col 12
                write(u'''            <option disabled="disabled" value="">''')
                _v = VFFSL(SL,"name",True) # u'$name' on line 464, col 50
                if _v is not None: write(_filter(_v, rawExpr=u'$name')) # from line 464, col 50.
                write(u'''</option>

''')
            elif VFFSL(SL,"path",True) == VFFSL(SL,"preselect",True): # generated from line 466, col 12
                write(u'''            <option value="''')
                _v = VFFSL(SL,"path",True) # u'$path' on line 467, col 28
                if _v is not None: write(_filter(_v, rawExpr=u'$path')) # from line 467, col 28.
                write(u'''" selected="selected">''')
                _v = VFFSL(SL,"name",True) # u'$name' on line 467, col 55
                if _v is not None: write(_filter(_v, rawExpr=u'$name')) # from line 467, col 55.
                write(u'''</option>

''')
            else: # generated from line 469, col 12
                write(u'''            <option value="''')
                _v = VFFSL(SL,"path",True) # u'$path' on line 470, col 28
                if _v is not None: write(_filter(_v, rawExpr=u'$path')) # from line 470, col 28.
                write(u'''">''')
                _v = VFFSL(SL,"name",True) # u'$name' on line 470, col 35
                if _v is not None: write(_filter(_v, rawExpr=u'$name')) # from line 470, col 35.
                write(u'''</option>
''')
        write(u'''         </select>
        </td>

        <td class="td_container_operator">
         <select style="display:none;" class="popup_operator_select" name="''')
        _v = VFFSL(SL,"obname",True) # u'${obname}' on line 477, col 76
        if _v is not None: write(_filter(_v, rawExpr=u'${obname}')) # from line 477, col 76.
        write(u'''_operator_0" />
        </td>

        <td class="td_container_value">
         <input class="popup_input_field" type="text" name="''')
        _v = VFFSL(SL,"obname",True) # u'${obname}' on line 481, col 61
        if _v is not None: write(_filter(_v, rawExpr=u'${obname}')) # from line 481, col 61.
        write(u'''_value_0" />
        </td>

        <td class="td_container_remove">&nbsp;</td>
        <td class="td_container_add"><a class="append_entry">+</a></td>
       </tr>
      </table>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        

    def define_inline_aggreg(self, obname, **KWS):



        ## CHEETAH: generated from #def define_inline_aggreg($obname) at line 491, 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(u'''      <table class="inline_filter_content aggregation_table">
       <tr class="inline_filter">
        <th>''')
        if False:
            _('Group entry by:')
        _v = VFFSL(SL,"_",False)('Group entry by:') # u"$_('Group entry by:')" on line 494, col 13
        if _v is not None: write(_filter(_v, rawExpr=u"$_('Group entry by:')")) # from line 494, col 13.
        write(u'''</th>
        <td class="td_container_path">
         <select class="popup_input_field" name="aggregated_''')
        _v = VFFSL(SL,"obname",True) # u'${obname}' on line 496, col 61
        if _v is not None: write(_filter(_v, rawExpr=u'${obname}')) # from line 496, col 61.
        write(u'''">
''')
        for name, path, unuseda, unusedb in VFFSL(SL,"all_aggregs",True)[VFFSL(SL,"obname",True)]: # generated from line 497, col 11
            if VFFSL(SL,"path",True) == None: # generated from line 498, col 12
                write(u'''            <option disabled="disabled" value="">''')
                _v = VFFSL(SL,"name",True) # u'$name' on line 499, col 50
                if _v is not None: write(_filter(_v, rawExpr=u'$name')) # from line 499, col 50.
                write(u'''</option>
''')
            else: # generated from line 500, col 12
                write(u'''            <option value="''')
                _v = VFFSL(SL,"path",True) # u'$path' on line 501, col 28
                if _v is not None: write(_filter(_v, rawExpr=u'$path')) # from line 501, col 28.
                write(u'''">''')
                _v = VFFSL(SL,"name",True) # u'$name' on line 501, col 35
                if _v is not None: write(_filter(_v, rawExpr=u'$name')) # from line 501, col 35.
                write(u'''</option>
''')
        write(u'''         </select>
        </td>
        <td class="td_container_remove">&nbsp;</td>
        <td class="td_container_add"><a class="append_entry">+</a></td>
       </tr>
      </table>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        

    def filter_enabled_marker(self, type, **KWS):



        ## CHEETAH: generated from #def filter_enabled_marker($type) at line 512, 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(u'''  <span class="filter_enabled_marker filter_popup_link">
''')
        if VFFSL(SL,"type",True) == 2: # generated from line 514, col 4
            write(u'''    [<a class="filter_enabled_marker">''')
            if False:
                _("filtered")
            _v = VFFSL(SL,"_",False)("filtered") # u'$_("filtered")' on line 515, col 39
            if _v is not None: write(_filter(_v, rawExpr=u'$_("filtered")')) # from line 515, col 39.
            write(u'''</a>]
''')
        else: # generated from line 516, col 4
            write(u'''    [<a style="color: gray;">''')
            if False:
                _("filtered")
            _v = VFFSL(SL,"_",False)("filtered") # u'$_("filtered")' on line 517, col 30
            if _v is not None: write(_filter(_v, rawExpr=u'$_("filtered")')) # from line 517, col 30.
            write(u'''</a>]
''')
        write(u'''  </span>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        

    def filter_reset(self, **KWS):



        ## CHEETAH: generated from #def filter_reset() at line 522, 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(u'''<tr><td>
    <table class="inline_filter_content">
     <tr class="inline_filter">
      <td colspan="3">&nbsp;</td>
      <td>
       <input type="submit" value="Apply" />
       <input type="button" class="reset_filter" value="Reset" />
      </td>
     </tr>
    </table>
</td></tr>
''')
        
        ########################################
        ## 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 536, 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(u'''<thead>
 <tr style="height: 20px;">
  <th class="filter_popup">
   <a class="filter_popup_link">''')
        if False:
            _("Classification")
        _v = VFFSL(SL,"_",False)("Classification") # u'$_("Classification")' on line 540, col 33
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Classification")')) # from line 540, col 33.
        write(u'''</a>
''')
        if VFFSL(SL,"classification_filtered",True): # generated from line 541, col 5
            write(u'''     ''')
            _v = VFFSL(SL,"filter_enabled_marker",False)(VFFSL(SL,"classification_filtered",True)) # u'$filter_enabled_marker($classification_filtered)' on line 542, col 6
            if _v is not None: write(_filter(_v, rawExpr=u'$filter_enabled_marker($classification_filtered)')) # from line 542, col 6.
            write(u'''
''')
        write(u'''   <div id="classification">
    <table>
     <tr><td>''')
        _v = VFFSL(SL,"define_inline_filter",False)("classification", "alert.classification.text") # u'$define_inline_filter("classification", "alert.classification.text")' on line 546, col 14
        if _v is not None: write(_filter(_v, rawExpr=u'$define_inline_filter("classification", "alert.classification.text")')) # from line 546, col 14.
        write(u'''</td></tr>
     <tr><td>''')
        _v = VFFSL(SL,"define_inline_aggreg",False)("classification") # u'$define_inline_aggreg("classification")' on line 547, col 14
        if _v is not None: write(_filter(_v, rawExpr=u'$define_inline_aggreg("classification")')) # from line 547, col 14.
        write(u'''</td></tr>
     <tr><td><table class="inline_filter_content">
       <tr>
        <th>''')
        if False:
            _("Type:")
        _v = VFFSL(SL,"_",False)("Type:") # u'$_("Type:")' on line 550, col 13
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Type:")')) # from line 550, col 13.
        write(u'''</th>
        <td>&nbsp;</td>
''')
        if VFFSL(SL,"correlation_alert_view",True): # generated from line 552, col 9
            disabled = "disabled=\"disabled\""
        else: # generated from line 554, col 9
            disabled = ""
        write(u'''
        ''')
        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 558, col 9
            if path in VFFSL(SL,"alert.type",True): # generated from line 560, col 10
                checked = "checked='checked'"
            else: # generated from line 562, col 10
                checked = ""
            write(u'''
        <td>''')
            if False:
                _(VFFSL(SL,"name",True))
            _v = VFFSL(SL,"_",False)(VFFSL(SL,"name",True)) # u'$_($name)' on line 566, col 13
            if _v is not None: write(_filter(_v, rawExpr=u'$_($name)')) # from line 566, col 13.
            write(u'''<input class="checkbox" ''')
            _v = VFFSL(SL,"disabled",True) # u'$disabled' on line 566, col 46
            if _v is not None: write(_filter(_v, rawExpr=u'$disabled')) # from line 566, col 46.
            write(u''' type="checkbox" name="alert.type" value="''')
            _v = VFFSL(SL,"path",True) # u'$path' on line 566, col 97
            if _v is not None: write(_filter(_v, rawExpr=u'$path')) # from line 566, col 97.
            write(u'''" ''')
            _v = VFFSL(SL,"checked",True) # u'$checked' on line 566, col 104
            if _v is not None: write(_filter(_v, rawExpr=u'$checked')) # from line 566, col 104.
            write(u''' /></td>
''')
        write(u'''       </tr>

       <tr>
        <th>''')
        if False:
            _("Severity:")
        _v = VFFSL(SL,"_",False)("Severity:") # u'$_("Severity:")' on line 571, col 13
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Severity:")')) # from line 571, col 13.
        write(u'''</th>
        ''')
        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 572, col 9
            write(u'''        <td>''')
            if False:
                _(VFFSL(SL,"item",True))
            _v = VFFSL(SL,"_",False)(VFFSL(SL,"item",True)) # u'$_($item)' on line 573, col 13
            if _v is not None: write(_filter(_v, rawExpr=u'$_($item)')) # from line 573, col 13.
            write(u'''<input class="checkbox" type="checkbox" name="alert.assessment.impact.severity" value="''')
            _v = VFFSL(SL,"item",True) # u'$item' on line 573, col 109
            if _v is not None: write(_filter(_v, rawExpr=u'$item')) # from line 573, col 109.
            write(u'''" /></td>
''')
        write(u'''       </tr>

       <tr>
        <th>''')
        if False:
            _("Completion:")
        _v = VFFSL(SL,"_",False)("Completion:") # u'$_("Completion:")' on line 578, col 13
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Completion:")')) # from line 578, col 13.
        write(u'''</th>
        <td colspan="2">&nbsp;</td>

        ''')
        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 581, col 9
            write(u'''        <td>''')
            if False:
                _(VFFSL(SL,"item",True))
            _v = VFFSL(SL,"_",False)(VFFSL(SL,"item",True)) # u'$_($item)' on line 582, col 13
            if _v is not None: write(_filter(_v, rawExpr=u'$_($item)')) # from line 582, col 13.
            write(u'''<input class="checkbox" type="checkbox" name="alert.assessment.impact.completion" value="''')
            _v = VFFSL(SL,"item",True) # u'$item' on line 582, col 111
            if _v is not None: write(_filter(_v, rawExpr=u'$item')) # from line 582, col 111.
            write(u'''" /></td>
''')
        write(u'''       </tr>
      </table>
     </td></tr>
     ''')
        _v = VFFSL(SL,"filter_reset",False)() # u'$filter_reset()' on line 587, col 6
        if _v is not None: write(_filter(_v, rawExpr=u'$filter_reset()')) # from line 587, col 6.
        write(u'''
    </table>
    </div>
  </th>

  <th class="filter_popup">
   <a class="filter_popup_link">''')
        if False:
            _("Source")
        _v = VFFSL(SL,"_",False)("Source") # u'$_("Source")' on line 593, col 33
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Source")')) # from line 593, col 33.
        write(u'''</a>
''')
        if VFFSL(SL,"source_filtered",True): # generated from line 594, col 4
            write(u'''     ''')
            _v = VFFSL(SL,"filter_enabled_marker",False)(VFFSL(SL,"source_filtered",True)) # u'$filter_enabled_marker($source_filtered)' on line 595, col 6
            if _v is not None: write(_filter(_v, rawExpr=u'$filter_enabled_marker($source_filtered)')) # from line 595, col 6.
            write(u'''
''')
        write(u'''   <div id="source">
    <table>
     <tr><td>''')
        _v = VFFSL(SL,"define_inline_filter",False)("source", "alert.source.node.address.address") # u'$define_inline_filter("source", "alert.source.node.address.address")' on line 599, col 14
        if _v is not None: write(_filter(_v, rawExpr=u'$define_inline_filter("source", "alert.source.node.address.address")')) # from line 599, col 14.
        write(u'''</td></tr>
     <tr><td>''')
        _v = VFFSL(SL,"define_inline_aggreg",False)("source") # u'$define_inline_aggreg("source")' on line 600, col 14
        if _v is not None: write(_filter(_v, rawExpr=u'$define_inline_aggreg("source")')) # from line 600, col 14.
        write(u'''</td></tr>
     ''')
        _v = VFFSL(SL,"filter_reset",False)() # u'$filter_reset()' on line 601, col 6
        if _v is not None: write(_filter(_v, rawExpr=u'$filter_reset()')) # from line 601, col 6.
        write(u'''
    </table>
   </div>
  </th>

  <th class="filter_popup">
   <a class="filter_popup_link">''')
        if False:
            _("Target")
        _v = VFFSL(SL,"_",False)("Target") # u'$_("Target")' on line 607, col 33
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Target")')) # from line 607, col 33.
        write(u'''</a>
''')
        if VFFSL(SL,"target_filtered",True): # generated from line 608, col 4
            write(u'''     ''')
            _v = VFFSL(SL,"filter_enabled_marker",False)(VFFSL(SL,"target_filtered",True)) # u'$filter_enabled_marker($target_filtered)' on line 609, col 6
            if _v is not None: write(_filter(_v, rawExpr=u'$filter_enabled_marker($target_filtered)')) # from line 609, col 6.
            write(u'''
''')
        write(u'''   <div id="target">
    <table>
     <tr><td>''')
        _v = VFFSL(SL,"define_inline_filter",False)("target", "alert.target.node.address.address") # u'$define_inline_filter("target", "alert.target.node.address.address")' on line 613, col 14
        if _v is not None: write(_filter(_v, rawExpr=u'$define_inline_filter("target", "alert.target.node.address.address")')) # from line 613, col 14.
        write(u'''</td></tr>
     <tr><td>''')
        _v = VFFSL(SL,"define_inline_aggreg",False)("target") # u'$define_inline_aggreg("target")' on line 614, col 14
        if _v is not None: write(_filter(_v, rawExpr=u'$define_inline_aggreg("target")')) # from line 614, col 14.
        write(u'''</td></tr>
     ''')
        _v = VFFSL(SL,"filter_reset",False)() # u'$filter_reset()' on line 615, col 6
        if _v is not None: write(_filter(_v, rawExpr=u'$filter_reset()')) # from line 615, col 6.
        write(u'''
    </table>
   </div>
  </th>

  <th class="filter_popup">
   <a class="filter_popup_link">''')
        if False:
            _("Analyzer")
        _v = VFFSL(SL,"_",False)("Analyzer") # u'$_("Analyzer")' on line 621, col 33
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Analyzer")')) # from line 621, col 33.
        write(u'''</a>
''')
        if VFFSL(SL,"analyzer_filtered",True): # generated from line 622, col 4
            write(u'''     ''')
            _v = VFFSL(SL,"filter_enabled_marker",False)(VFFSL(SL,"analyzer_filtered",True)) # u'$filter_enabled_marker($analyzer_filtered)' on line 623, col 6
            if _v is not None: write(_filter(_v, rawExpr=u'$filter_enabled_marker($analyzer_filtered)')) # from line 623, col 6.
            write(u'''
''')
        write(u'''   <div id="analyzer">
    <table>
     <tr><td>''')
        _v = VFFSL(SL,"define_inline_filter",False)("analyzer", "alert.analyzer.name") # u'$define_inline_filter("analyzer", "alert.analyzer.name")' on line 627, col 14
        if _v is not None: write(_filter(_v, rawExpr=u'$define_inline_filter("analyzer", "alert.analyzer.name")')) # from line 627, col 14.
        write(u'''</td></tr>
     <tr><td>''')
        _v = VFFSL(SL,"define_inline_aggreg",False)("analyzer") # u'$define_inline_aggreg("analyzer")' on line 628, col 14
        if _v is not None: write(_filter(_v, rawExpr=u'$define_inline_aggreg("analyzer")')) # from line 628, col 14.
        write(u'''</td></tr>
     ''')
        _v = VFFSL(SL,"filter_reset",False)() # u'$filter_reset()' on line 629, col 6
        if _v is not None: write(_filter(_v, rawExpr=u'$filter_reset()')) # from line 629, col 6.
        write(u'''
    </table>
   </div>
  </th>

  <td>''')
        if False:
            _("Time")
        _v = VFFSL(SL,"_",False)("Time") # u'$_("Time")' on line 634, col 7
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Time")')) # from line 634, col 7.
        write(u'''</td>
</tr>
</thead>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        

    def writeInlineFilter(self, inline_filter, optval=None, cl="", **KWS):



        ## CHEETAH: generated from #def writeInlineFilter(inline_filter, optval=None, cl="") at line 640, 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
        
        if optval: # generated from line 641, col 1
            if VFFSL(SL,"inline_filter.already_filtered",True): # generated from line 642, col 1
                write(u'''<span class="''')
                _v = VFFSL(SL,"cl",True) # u'$cl' on line 643, col 14
                if _v is not None: write(_filter(_v, rawExpr=u'$cl')) # from line 643, col 14.
                write(u'''">''')
                _v = VFFSL(SL,"optval",True) # u'$optval' on line 643, col 19
                if _v is not None: write(_filter(_v, rawExpr=u'$optval')) # from line 643, col 19.
                write(u'''</span>''')
            else: # generated from line 644, col 1
                write(u'''<a class="''')
                _v = VFFSL(SL,"cl",True) # u'$cl' on line 645, col 11
                if _v is not None: write(_filter(_v, rawExpr=u'$cl')) # from line 645, col 11.
                write(u'''" href="''')
                _v = VFFSL(SL,"inline_filter.inline_filter",True) # u'$inline_filter.inline_filter' on line 645, col 22
                if _v is not None: write(_filter(_v, rawExpr=u'$inline_filter.inline_filter')) # from line 645, col 22.
                write(u'''">''')
                _v = VFFSL(SL,"optval",True) # u'$optval' on line 645, col 52
                if _v is not None: write(_filter(_v, rawExpr=u'$optval')) # from line 645, col 52.
                write(u'''</a>''')
        else: # generated from line 647, col 1
            if VFFSL(SL,"inline_filter.already_filtered",True): # generated from line 648, col 1
                write(u'''<span class="''')
                _v = VFFSL(SL,"cl",True) # u'$cl' on line 649, col 14
                if _v is not None: write(_filter(_v, rawExpr=u'$cl')) # from line 649, col 14.
                write(u'''">''')
                _v = VFFSL(SL,"inline_filter.value",True) # u'$inline_filter.value' on line 649, col 19
                if _v is not None: write(_filter(_v, rawExpr=u'$inline_filter.value')) # from line 649, col 19.
                write(u'''</span>''')
            else: # generated from line 650, col 1
                write(u'''<a class="''')
                _v = VFFSL(SL,"cl",True) # u'$cl' on line 651, col 11
                if _v is not None: write(_filter(_v, rawExpr=u'$cl')) # from line 651, col 11.
                write(u'''" href="''')
                _v = VFFSL(SL,"inline_filter.inline_filter",True) # u'$inline_filter.inline_filter' on line 651, col 22
                if _v is not None: write(_filter(_v, rawExpr=u'$inline_filter.inline_filter')) # from line 651, col 22.
                write(u'''">''')
                _v = VFFSL(SL,"inline_filter.value",True) # u'$inline_filter.value' on line 651, col 52
                if _v is not None: write(_filter(_v, rawExpr=u'$inline_filter.value')) # from line 651, col 52.
                write(u'''</a>''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        

    def classificationWrite(self, info, text, **KWS):



        ## CHEETAH: generated from #def classificationWrite(info, text) at line 656, 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(u'''<a class="impact_severity_''')
        _v = VFFSL(SL,"info.severity.value",True) # u'$info.severity.value' on line 657, col 27
        if _v is not None: write(_filter(_v, rawExpr=u'$info.severity.value')) # from line 657, col 27.
        write(u''' popup_menu_toggle">''')
        _v = VFFSL(SL,"text",True) # u'$text' on line 657, col 67
        if _v is not None: write(_filter(_v, rawExpr=u'$text')) # from line 657, col 67.
        write(u'''</a><span class="popup_menu">
- <a href="''')
        _v = VFFSL(SL,"info.display",True) # u'$info.display' on line 658, col 12
        if _v is not None: write(_filter(_v, rawExpr=u'$info.display')) # from line 658, col 12.
        write(u'''">''')
        if False:
            _("See alert detail")
        _v = VFFSL(SL,"_",False)("See alert detail") # u'$_("See alert detail")' on line 658, col 27
        if _v is not None: write(_filter(_v, rawExpr=u'$_("See alert detail")')) # from line 658, col 27.
        write(u'''</a><br />
- <a href="''')
        _v = VFFSL(SL,"info.classification.inline_filter",True) # u'$info.classification.inline_filter' on line 659, col 12
        if _v is not None: write(_filter(_v, rawExpr=u'$info.classification.inline_filter')) # from line 659, col 12.
        write(u'''">''')
        if False:
            _("Filter on this classification.text")
        _v = VFFSL(SL,"_",False)("Filter on this classification.text") # u'$_("Filter on this classification.text")' on line 659, col 48
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Filter on this classification.text")')) # from line 659, col 48.
        write(u'''</a><br />
</span>''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        

    def writeService(self, hstr, direction, **KWS):



        ## CHEETAH: generated from #def writeService($hstr, $direction) at line 663, 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
        
        if VFFSL(SL,"direction.protocol.value",True): # generated from line 664, col 1
            protocol = VFN(VFFSL(SL,"direction.protocol.value",True),"upper",False)()
        else: # generated from line 666, col 1
            protocol = ""
        if VFFSL(SL,"direction.service.value",True) != None: # generated from line 669, col 1
            _v = VFFSL(SL,"hstr",True) # u'$hstr' on line 669, col 38
            if _v is not None: write(_filter(_v, rawExpr=u'$hstr')) # from line 669, col 38.
            write(u'''<a class="popup_menu_toggle">''')
            _v = VFFSL(SL,"unicode",False)(VFFSL(SL,"direction.service.value",True)) # u'$unicode($direction.service.value)' on line 669, col 72
            if _v is not None: write(_filter(_v, rawExpr=u'$unicode($direction.service.value)')) # from line 669, col 72.
        write(u'''
</a>
       <span class="popup_menu">
        ''')
        _orig_filter_13919798 = _filter
        filterName = u'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
        write(u'''- ''')
        if False:
            _("Filter on this port/protocol")
        _v = VFFSL(SL,"writeInlineFilter",False)(VFFSL(SL,"direction.service",True), VFFSL(SL,"_",False)("Filter on this port/protocol")) # u'$writeInlineFilter($direction.service, $_("Filter on this port/protocol"))' on line 672, col 26
        if _v is not None: write(_filter(_v, rawExpr=u'$writeInlineFilter($direction.service, $_("Filter on this port/protocol"))')) # from line 672, col 26.
        write(u'''<br/> ''')
        _filter = self._CHEETAH__currentFilter = _orig_filter_13919798
        write(u'''
''')
        if VFFSL(SL,"direction.port.value",True): # generated from line 673, col 9
            write(u'''        - <a target="''')
            _v = VFFSL(SL,"prewikka.external_link_target",True) # u'$prewikka.external_link_target' on line 674, col 22
            if _v is not None: write(_filter(_v, rawExpr=u'$prewikka.external_link_target')) # from line 674, col 22.
            write(u'''" href="https://www.prelude-ids.com/port_details.php?port=''')
            _v = VFFSL(SL,"unicode",False)(VFFSL(SL,"direction.port.value",True)) # u'$unicode($direction.port.value)' on line 674, col 110
            if _v is not None: write(_filter(_v, rawExpr=u'$unicode($direction.port.value)')) # from line 674, col 110.
            write(u'''&amp;protocol=''')
            _v = VFFSL(SL,"protocol",True) # u'$protocol' on line 674, col 155
            if _v is not None: write(_filter(_v, rawExpr=u'$protocol')) # from line 674, col 155.
            write(u'''">''')
            if False:
                _("Port/protocol information")
            _v = VFFSL(SL,"_",False)("Port/protocol information") # u'$_("Port/protocol information")' on line 674, col 166
            if _v is not None: write(_filter(_v, rawExpr=u'$_("Port/protocol information")')) # from line 674, col 166.
            write(u'''</a>
''')
        else: # generated from line 675, col 9
            write(u'''        - <span>''')
            if False:
                _("Port/protocol information")
            _v = VFFSL(SL,"_",False)("Port/protocol information") # u'$_("Port/protocol information")' on line 676, col 17
            if _v is not None: write(_filter(_v, rawExpr=u'$_("Port/protocol information")')) # from line 676, col 17.
            write(u'''</span>
''')
        write(u'''       </span>''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        

    def message_fields(self, **KWS):



        ## CHEETAH: generated from #block message_fields at line 682, 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_48765295 = _filter
        filterName = u'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(u'''
<td>
''')
        if VFFSL(SL,"message.sub_alert_name",True): # generated from line 686, col 3
            write(u'''    <b>''')
            _v = VFFSL(SL,"message.sub_alert_type",True) # u'$message.sub_alert_type' on line 687, col 8
            if _v is not None: write(_filter(_v, rawExpr=u'$message.sub_alert_type')) # from line 687, col 8.
            if VFFSL(SL,"message.sub_alert_display",True): # generated from line 688, col 5
                write(u'''      ''')
                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(u'''      (<a href="''')
                _v = VFFSL(SL,"message.sub_alert_display",True) # u'$message.sub_alert_display' on line 690, col 17
                if _v is not None: write(_filter(_v, rawExpr=u'$message.sub_alert_display')) # from line 690, col 17.
                write(u'''">''')
                _v = VFFSL(SL,"message.sub_alert_number",True) # u'$message.sub_alert_number' on line 690, col 45
                if _v is not None: write(_filter(_v, rawExpr=u'$message.sub_alert_number')) # from line 690, col 45.
                write(u'''</a> ''')
                _v = VFFSL(SL,"string",True) # u'$string' on line 690, col 75
                if _v is not None: write(_filter(_v, rawExpr=u'$string')) # from line 690, col 75.
                write(u''')''')
            write(u''':</b> <i><a href="''')
            _v = VFFSL(SL,"message.sub_alert_link",True) # u'$message.sub_alert_link' on line 692, col 19
            if _v is not None: write(_filter(_v, rawExpr=u'$message.sub_alert_link')) # from line 692, col 19.
            write(u'''">''')
            _v = VFFSL(SL,"message.sub_alert_name",True) # u'$message.sub_alert_name' on line 692, col 44
            if _v is not None: write(_filter(_v, rawExpr=u'$message.sub_alert_name')) # from line 692, col 44.
            write(u'''</a></i><br/>''')
        write(u'''
''')
        if VFFSL(SL,"message.aggregated",True) and VFFSL(SL,"message.aggregated_classifications_hidden",True) > 0: # generated from line 695, col 3
            write(u'''    ''')
            if False:
                _("%(hidden)d of %(total)d alerts not shown...")
            string = VFFSL(SL,"_",False)("%(hidden)d of %(total)d alerts not shown...")
            write(u'''    <b>(''')
            _v = VFFSL(SL,"unicode",False)(VFFSL(SL,"string",True) % { "hidden": VFFSL(SL,"message.aggregated_classifications_hidden",True), "total": VFFSL(SL,"message.aggregated_classifications_total",True) }) # u'$unicode($string % { "hidden": $message.aggregated_classifications_hidden, "total": $message.aggregated_classifications_total })' on line 697, col 9
            if _v is not None: write(_filter(_v, rawExpr=u'$unicode($string % { "hidden": $message.aggregated_classifications_hidden, "total": $message.aggregated_classifications_total })')) # from line 697, col 9.
            write(u'''
    <a href="''')
            _v = VFFSL(SL,"message.aggregated_classifications_hidden_expand",True) # u'$message.aggregated_classifications_hidden_expand' on line 698, col 14
            if _v is not None: write(_filter(_v, rawExpr=u'$message.aggregated_classifications_hidden_expand')) # from line 698, col 14.
            write(u'''">''')
            if False:
                _("expand")
            _v = VFFSL(SL,"_",False)("expand") # u'$_("expand")' on line 698, col 65
            if _v is not None: write(_filter(_v, rawExpr=u'$_("expand")')) # from line 698, col 65.
            write(u'''</a>)</b>
    <br/>
''')
        write(u'''
''')
        for info in VFFSL(SL,"message.infos",True): # generated from line 702, col 3
            if VFFSL(SL,"info.classification.value",True): # generated from line 703, col 5
                text = VFFSL(SL,"info.classification.value",True)
            else: # generated from line 705, col 5
                text = "n/a"
            write(u'''
''')
            if VFFSL(SL,"message.aggregated",True) and (len(VFFSL(SL,"message.infos",True)) > 1 or VFFSL(SL,"info.count",True) > 1): # generated from line 709, col 5
                if VFFSL(SL,"info.count",True) == 1: # generated from line 710, col 7
                    write(u'''       ''')
                    _v = VFFSL(SL,"info.count",True) # u'$info.count' on line 711, col 8
                    if _v is not None: write(_filter(_v, rawExpr=u'$info.count')) # from line 711, col 8.
                    write(u''' x
        ''')
                    _orig_filter_54510720 = _filter
                    filterName = u'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
                    _v = VFFSL(SL,"classificationWrite",False)(VFFSL(SL,"info",True), VFFSL(SL,"text",True)) # u'$classificationWrite($info, $text)' on line 712, col 24
                    if _v is not None: write(_filter(_v, rawExpr=u'$classificationWrite($info, $text)')) # from line 712, col 24.
                    write(u''' ''')
                    _filter = self._CHEETAH__currentFilter = _orig_filter_54510720
                    write(u'''
''')
                else: # generated from line 713, col 7
                    write(u'''      <a href="''')
                    _v = VFFSL(SL,"info.display",True) # u'$info.display' on line 714, col 16
                    if _v is not None: write(_filter(_v, rawExpr=u'$info.display')) # from line 714, col 16.
                    write(u'''">''')
                    _v = VFFSL(SL,"info.count",True) # u'$info.count' on line 714, col 31
                    if _v is not None: write(_filter(_v, rawExpr=u'$info.count')) # from line 714, col 31.
                    write(u'''</a> x
''')
                    if VFFSL(SL,"info.classification.already_filtered",True): # generated from line 715, col 8
                        write(u'''        <span class="impact_severity_''')
                        _v = VFFSL(SL,"info.severity.value",True) # u'$info.severity.value' on line 716, col 38
                        if _v is not None: write(_filter(_v, rawExpr=u'$info.severity.value')) # from line 716, col 38.
                        write(u'''">''')
                        _v = VFFSL(SL,"text",True) # u'$text' on line 716, col 60
                        if _v is not None: write(_filter(_v, rawExpr=u'$text')) # from line 716, col 60.
                        write(u'''</span>
''')
                    else: # generated from line 717, col 8
                        write(u'''        <a class="impact_severity_''')
                        _v = VFFSL(SL,"info.severity.value",True) # u'$info.severity.value' on line 718, col 35
                        if _v is not None: write(_filter(_v, rawExpr=u'$info.severity.value')) # from line 718, col 35.
                        write(u'''" href="''')
                        _v = VFFSL(SL,"info.classification.inline_filter",True) # u'$info.classification.inline_filter' on line 718, col 63
                        if _v is not None: write(_filter(_v, rawExpr=u'$info.classification.inline_filter')) # from line 718, col 63.
                        write(u'''">''')
                        _v = VFFSL(SL,"text",True) # u'$text' on line 718, col 99
                        if _v is not None: write(_filter(_v, rawExpr=u'$text')) # from line 718, col 99.
                        write(u'''</a>
''')
            else: # generated from line 721, col 5
                if VFFSL(SL,"info.classification.already_filtered",True): # generated from line 722, col 7
                    write(u'''      <a class="impact_severity_''')
                    _v = VFFSL(SL,"info.severity.value",True) # u'$info.severity.value' on line 723, col 33
                    if _v is not None: write(_filter(_v, rawExpr=u'$info.severity.value')) # from line 723, col 33.
                    write(u'''" href="''')
                    _v = VFFSL(SL,"info.display",True) # u'$info.display' on line 723, col 61
                    if _v is not None: write(_filter(_v, rawExpr=u'$info.display')) # from line 723, col 61.
                    write(u'''">''')
                    _v = VFFSL(SL,"text",True) # u'$text' on line 723, col 76
                    if _v is not None: write(_filter(_v, rawExpr=u'$text')) # from line 723, col 76.
                    write(u'''</a>
''')
                else: # generated from line 724, col 7
                    write(u'''       ''')
                    _orig_filter_12582166 = _filter
                    filterName = u'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
                    _v = VFFSL(SL,"classificationWrite",False)(VFFSL(SL,"info",True), VFFSL(SL,"text",True)) # u'$classificationWrite($info, $text)' on line 725, col 23
                    if _v is not None: write(_filter(_v, rawExpr=u'$classificationWrite($info, $text)')) # from line 725, col 23.
                    write(u''' ''')
                    _filter = self._CHEETAH__currentFilter = _orig_filter_12582166
                    write(u'''
''')
            write(u'''
''')
            if VFFSL(SL,"info.completion.value",True): # generated from line 729, col 5
                write(u'''      (''')
                _orig_filter_52982740 = _filter
                filterName = u'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
                _v = VFFSL(SL,"writeInlineFilter",False)(VFFSL(SL,"info.completion",True), cl="impact_completion_" + VFFSL(SL,"info.completion.value",True)) # u'$writeInlineFilter($info.completion, cl="impact_completion_" + $info.completion.value)' on line 730, col 22
                if _v is not None: write(_filter(_v, rawExpr=u'$writeInlineFilter($info.completion, cl="impact_completion_" + $info.completion.value)')) # from line 730, col 22.
                _filter = self._CHEETAH__currentFilter = _orig_filter_52982740
                write(u''')
''')
            write(u'''
    <br/>
''')
            sep = "("
            write(u'''
''')
            for url, name in VFFSL(SL,"info.classification_references",True): # generated from line 736, col 1
                _v = VFFSL(SL,"sep",True) # u'$sep' on line 737, col 1
                if _v is not None: write(_filter(_v, rawExpr=u'$sep')) # from line 737, col 1.
                if VFFSL(SL,"url",True): # generated from line 737, col 5
                    write(u'''<a class="popup_menu_toggle">''')
                    _v = VFFSL(SL,"name.value",True) # u'$name.value' on line 737, col 43
                    if _v is not None: write(_filter(_v, rawExpr=u'$name.value')) # from line 737, col 43.
                    write(u'''</a>''')
                else: # generated from line 737, col 58
                    _orig_filter_67278631 = _filter
                    filterName = u'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
                    _v = VFFSL(SL,"writeInlineFilter",False)(VFFSL(SL,"name",True)) # u'$writeInlineFilter($name)' on line 737, col 79
                    if _v is not None: write(_filter(_v, rawExpr=u'$writeInlineFilter($name)')) # from line 737, col 79.
                    _filter = self._CHEETAH__currentFilter = _orig_filter_67278631
                sep = ", "
                write(u'''<span class="popup_menu">
 - ''')
                _orig_filter_74950757 = _filter
                filterName = u'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
                if False:
                    _("Filter on this reference")
                _v = VFFSL(SL,"writeInlineFilter",False)(VFFSL(SL,"name",True), VFFSL(SL,"_",False)("Filter on this reference")) # u'$writeInlineFilter($name, $_("Filter on this reference"))' on line 740, col 19
                if _v is not None: write(_filter(_v, rawExpr=u'$writeInlineFilter($name, $_("Filter on this reference"))')) # from line 740, col 19.
                _filter = self._CHEETAH__currentFilter = _orig_filter_74950757
                write(u'''<br />
 - <a target="''')
                _v = VFFSL(SL,"prewikka.external_link_target",True) # u'$prewikka.external_link_target' on line 741, col 15
                if _v is not None: write(_filter(_v, rawExpr=u'$prewikka.external_link_target')) # from line 741, col 15.
                write(u'''" href="''')
                _v = VFFSL(SL,"url",True) # u'$url' on line 741, col 53
                if _v is not None: write(_filter(_v, rawExpr=u'$url')) # from line 741, col 53.
                write(u'''">Reference information</a>
</span>''')
            if VFFSL(SL,"info.classification_references",True): # generated from line 742, col 17
                write(u''')''')
            write(u'''

''')
        write(u'''

</td>

''')
        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 749, col 1
            write(u'''<td>
''')
            if len(VFFSL(SL,"direction",True)) == 0: # generated from line 751, col 1
                write(u'''       n/a
''')
            write(u'''
''')
            need_hr = 0
            write(u'''
''')
            if VFFSL(SL,"hidden",True) > 0: # generated from line 757, col 1
                write(u'''       ''')
                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(u'''       <b>(''')
                _v = VFFSL(SL,"unicode",False)(VFFSL(SL,"string",True) % { "hidden": VFFSL(SL,"hidden",True), "total": VFFSL(SL,"total",True), "name": VFFSL(SL,"name",True) }) # u'$unicode($string % { "hidden": $hidden, "total": $total, "name": $name })' on line 759, col 12
                if _v is not None: write(_filter(_v, rawExpr=u'$unicode($string % { "hidden": $hidden, "total": $total, "name": $name })')) # from line 759, col 12.
                write(u'''
       <a href="''')
                _v = VFFSL(SL,"expand",True) # u'$expand' on line 760, col 17
                if _v is not None: write(_filter(_v, rawExpr=u'$expand')) # from line 760, col 17.
                write(u'''">''')
                if False:
                    _("expand")
                _v = VFFSL(SL,"_",False)("expand") # u'$_("expand")' on line 760, col 26
                if _v is not None: write(_filter(_v, rawExpr=u'$_("expand")')) # from line 760, col 26.
                write(u'''</a>)</b>
       <br/>
''')
            write(u'''
''')
            for direction in VFFSL(SL,"direction",True): # generated from line 764, col 1
                if VFFSL(SL,"need_hr",True): # generated from line 765, col 7
                    write(u'''        <hr style="border: 1px dashed #808080; margin-top: 3px; margin-bottom: 0px;" />
''')
                write(u'''
''')
                need_hr = 1
                write(u'''
''')
                for address in VFFSL(SL,"direction.addresses",True): # generated from line 771, col 7
                    write(u'''       <a class="popup_menu_toggle">''')
                    _v = VFFSL(SL,"address.hostname",True) # u'$address.hostname' on line 772, col 37
                    if _v is not None: write(_filter(_v, rawExpr=u'$address.hostname')) # from line 772, col 37.
                    write(u'''</a><span class="popup_menu">
         - ''')
                    _orig_filter_27998194 = _filter
                    filterName = u'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
                    if False:
                        _("Filter on this %s")
                    _v = VFFSL(SL,"writeInlineFilter",False)(VFFSL(SL,"address",True), VFFSL(SL,"unicode",False)(VFFSL(SL,"_",False)("Filter on this %s") % (VFFSL(SL,"name",True)))) # u'$writeInlineFilter($address, $unicode($_("Filter on this %s") % ($name)))' on line 773, col 27
                    if _v is not None: write(_filter(_v, rawExpr=u'$writeInlineFilter($address, $unicode($_("Filter on this %s") % ($name)))')) # from line 773, col 27.
                    write(u''' ''')
                    _filter = self._CHEETAH__currentFilter = _orig_filter_27998194
                    write(u'''
         <br />

''')
                    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 776, col 8
                        write(u'''         - <a target="''')
                        _v = VFFSL(SL,"prewikka.external_link_target",True) # u'$prewikka.external_link_target' on line 777, col 23
                        if _v is not None: write(_filter(_v, rawExpr=u'$prewikka.external_link_target')) # from line 777, col 23.
                        write(u'''" href="https://www.prelude-ids.com/host_details.php?host=''')
                        _v = VFFSL(SL,"address.value",True) # u'$address.value' on line 777, col 111
                        if _v is not None: write(_filter(_v, rawExpr=u'$address.value')) # from line 777, col 111.
                        write(u'''">''')
                        if False:
                            _("%s information")
                        _v = VFN(VFFSL(SL,"unicode",False)(VFFSL(SL,"_",False)("%s information") % (VFFSL(SL,"name",True))),"capitalize",False)() # u'$unicode($_("%s information") % ($name)).capitalize()' on line 777, col 127
                        if _v is not None: write(_filter(_v, rawExpr=u'$unicode($_("%s information") % ($name)).capitalize()')) # from line 777, col 127.
                        write(u'''</a><br />

''')
                        for cmdname, link in VFFSL(SL,"address.host_commands",True): # generated from line 779, col 11
                            write(u'''         - <a href="''')
                            _v = VFFSL(SL,"link",True) # u'$link' on line 780, col 21
                            if _v is not None: write(_filter(_v, rawExpr=u'$link')) # from line 780, col 21.
                            write(u'''">''')
                            _v = VFFSL(SL,"cmdname",True) # u'$cmdname' on line 780, col 28
                            if _v is not None: write(_filter(_v, rawExpr=u'$cmdname')) # from line 780, col 28.
                            write(u'''</a><br />
''')
                    write(u'''       </span>''')
                    _orig_filter_68539287 = _filter
                    filterName = u'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
                    _v = VFFSL(SL,"writeService",False)(":", VFFSL(SL,"direction",True)) # u'$writeService(":", $direction)' on line 784, col 16
                    if _v is not None: write(_filter(_v, rawExpr=u'$writeService(":", $direction)')) # from line 784, col 16.
                    write(u''' ''')
                    _filter = self._CHEETAH__currentFilter = _orig_filter_68539287
                    write(u'''
<br />
''')
                write(u'''
''')
                if VFFSL(SL,"len",False)(VFFSL(SL,"direction.addresses",True)) == 0: # generated from line 788, col 7
                    write(u'''        ''')
                    _orig_filter_65857971 = _filter
                    filterName = u'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
                    _v = VFFSL(SL,"writeService",False)("service:", VFFSL(SL,"direction",True)) # u'$writeService("service:", $direction)' on line 789, col 24
                    if _v is not None: write(_filter(_v, rawExpr=u'$writeService("service:", $direction)')) # from line 789, col 24.
                    write(u''' ''')
                    _filter = self._CHEETAH__currentFilter = _orig_filter_65857971
                    write(u'''
''')
                write(u'''
''')
                cnt = 0
                for name, value, extra in VFFSL(SL,"direction.listed_values",True): # generated from line 793, col 6
                    if VFFSL(SL,"cnt",True) > 0: # generated from line 794, col 10
                        write(u'''          <br />
''')
                    write(u'''
         ''')
                    _v = VFFSL(SL,"name",True) # u'$name' on line 798, col 10
                    if _v is not None: write(_filter(_v, rawExpr=u'$name')) # from line 798, col 10.
                    write(u''': ''')
                    _orig_filter_42646059 = _filter
                    filterName = u'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
                    _v = VFFSL(SL,"writeInlineFilter",False)(VFFSL(SL,"value",True)) # u'$writeInlineFilter($value)' on line 798, col 32
                    if _v is not None: write(_filter(_v, rawExpr=u'$writeInlineFilter($value)')) # from line 798, col 32.
                    write(u''' ''')
                    _filter = self._CHEETAH__currentFilter = _orig_filter_42646059
                    write(u'''
''')
                    if VFFSL(SL,"extra",True) != None: # generated from line 799, col 10
                        write(u'''          (''')
                        _v = VFFSL(SL,"extra",True) # u'$extra' on line 800, col 12
                        if _v is not None: write(_filter(_v, rawExpr=u'$extra')) # from line 800, col 12.
                        write(u''')
''')
                    write(u'''
''')
                    cnt += 1
            write(u'''
</td>
''')
        write(u'''
<td>
''')
        for sensor in VFFSL(SL,"message.sensors",True): # generated from line 811, col 3
            if VFFSL(SL,"sensor.name.value",True): # generated from line 812, col 5
                write(u'''     ''')
                _orig_filter_77411152 = _filter
                filterName = u'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
                _v = VFFSL(SL,"writeInlineFilter",False)(VFFSL(SL,"sensor.name",True)) # u'$writeInlineFilter($sensor.name)' on line 813, col 20
                if _v is not None: write(_filter(_v, rawExpr=u'$writeInlineFilter($sensor.name)')) # from line 813, col 20.
                _filter = self._CHEETAH__currentFilter = _orig_filter_77411152
                write(u'''
''')
            if VFFSL(SL,"sensor.node_name.value",True): # generated from line 815, col 5
                write(u'''      (''')
                _orig_filter_29616844 = _filter
                filterName = u'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
                _v = VFFSL(SL,"writeInlineFilter",False)(VFFSL(SL,"sensor.node_name",True)) # u'$writeInlineFilter($sensor.node_name)' on line 816, col 22
                if _v is not None: write(_filter(_v, rawExpr=u'$writeInlineFilter($sensor.node_name)')) # from line 816, col 22.
                _filter = self._CHEETAH__currentFilter = _orig_filter_29616844
                write(u''')
''')
            write(u'''    <br/>
''')
        write(u'''</td>
<td>
''')
        if VFFSL(SL,"message.aggregated",True): # generated from line 822, col 3
            if VFFSL(SL,"message.time_min.value",True) == VFFSL(SL,"message.time_max.value",True): # generated from line 823, col 5
                write(u'''      ''')
                _v = VFFSL(SL,"message.time_min.value",True) # u'$message.time_min.value' on line 824, col 7
                if _v is not None: write(_filter(_v, rawExpr=u'$message.time_min.value')) # from line 824, col 7.
                write(u'''
''')
            else: # generated from line 825, col 5
                write(u'''      ''')
                _v = VFFSL(SL,"message.time_max.value",True) # u'$message.time_max.value' on line 826, col 7
                if _v is not None: write(_filter(_v, rawExpr=u'$message.time_max.value')) # from line 826, col 7.
                write(u''' -
      ''')
                _v = VFFSL(SL,"message.time_min.value",True) # u'$message.time_min.value' on line 827, col 7
                if _v is not None: write(_filter(_v, rawExpr=u'$message.time_min.value')) # from line 827, col 7.
                write(u'''
''')
        else: # generated from line 829, col 3
            write(u'''    ''')
            _v = VFFSL(SL,"message.time.value",True) # u'$message.time.value' on line 830, col 5
            if _v is not None: write(_filter(_v, rawExpr=u'$message.time.value')) # from line 830, col 5.
            write(u'''
''')
            if VFFSL(SL,"message.analyzer_time.value",True): # generated from line 831, col 5
                write(u'''      (sent at ''')
                _v = VFFSL(SL,"message.analyzer_time.value",True) # u'$message.analyzer_time.value' on line 832, col 16
                if _v is not None: write(_filter(_v, rawExpr=u'$message.analyzer_time.value')) # from line 832, col 16.
                write(u''')
''')
        write(u'''</td>
''')
        _filter = self._CHEETAH__currentFilter = _orig_filter_48765295
        _orig_filter_31822101 = _filter
        filterName = u'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 = self._CHEETAH__currentFilter = _orig_filter_31822101
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        

    def orderby_option(self, **KWS):



        ## CHEETAH: generated from #block orderby_option at line 842, 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(u'''     <option value="time_desc" ''')
        _v = VFFSL(SL,"timeline.time_desc_selected",True) # u'$timeline.time_desc_selected' on line 843, col 32
        if _v is not None: write(_filter(_v, rawExpr=u'$timeline.time_desc_selected')) # from line 843, col 32.
        write(u'''>By time (descending)</option>
     <option value="time_asc" ''')
        _v = VFFSL(SL,"timeline.time_asc_selected",True) # u'$timeline.time_asc_selected' on line 844, col 31
        if _v is not None: write(_filter(_v, rawExpr=u'$timeline.time_asc_selected')) # from line 844, col 31.
        write(u'''>By time (ascending)</option>
     <option value="count_desc" ''')
        _v = VFFSL(SL,"timeline.count_desc_selected",True) # u'$timeline.count_desc_selected' on line 845, col 33
        if _v is not None: write(_filter(_v, rawExpr=u'$timeline.count_desc_selected')) # from line 845, col 33.
        write(u'''>By count (descending)</option>
     <option value="count_asc" ''')
        _v = VFFSL(SL,"timeline.count_asc_selected",True) # u'$timeline.count_asc_selected' on line 846, col 32
        if _v is not None: write(_filter(_v, rawExpr=u'$timeline.count_asc_selected')) # from line 846, col 32.
        write(u'''>By count (ascending)</option>
''')
        
        ########################################
        ## 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 850, 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_65498458 = _filter
        filterName = u'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(u'''<tr>
  <th id="filter_control_label">''')
        if False:
            _("Filter")
        _v = VFFSL(SL,"_",False)("Filter") # u'$_("Filter")' on line 853, col 33
        if _v is not None: write(_filter(_v, rawExpr=u'$_("Filter")')) # from line 853, col 33.
        write(u'''</th>
  <td colspan="2">
   <select name="filter" size="1" class="filter_control_select">
    <option value="">&nbsp;</option>
''')
        for fltr in VFFSL(SL,"filters",True): # generated from line 857, col 3
            write(u'''    <option value="''')
            _v = VFFSL(SL,"fltr",True) # u'$fltr' on line 858, col 20
            if _v is not None: write(_filter(_v, rawExpr=u'$fltr')) # from line 858, col 20.
            write(u'''" ''')
            if VFFSL(SL,"fltr",True) == VFFSL(SL,"current_filter",True): # generated from line 858, col 27
                write(u''' selected="selected" ''')
            write(u'''>''')
            _v = VFFSL(SL,"fltr",True) # u'$fltr' on line 858, col 86
            if _v is not None: write(_filter(_v, rawExpr=u'$fltr')) # from line 858, col 86.
            write(u'''</option>
''')
        write(u'''  </select>
 </td>
</tr>
''')
        _filter = self._CHEETAH__currentFilter = _orig_filter_65498458
        _orig_filter_33256047 = _filter
        filterName = u'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 = self._CHEETAH__currentFilter = _orig_filter_33256047
        
        ########################################
        ## 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(u'''
''')
        self.head_extra_content(trans=trans)
        write(u'''





''')
        self.message_fields_header(trans=trans)
        write(u'''





''')
        self.message_fields(trans=trans)
        write(u'''

''')
        self.orderby_option(trans=trans)
        write(u'''

''')
        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()


