def params(cls, datasource, context):
te = lambda x: datasource.talesEval(x, context)
query = datasource.query
query_error = True
try:
query = te(' '.join(string_to_lines(datasource.query)))
query_error = False
except Exception:
pass
try:
xml.dom.minidom.parseString(query)
use_xml = True
except ExpatError:
use_xml = False
return dict(
eventlog=te(datasource.eventlog),
query=query,
query_error=query_error,
max_age=te(datasource.max_age),
eventid=te(datasource.id),
use_xml=use_xml,
eventClass=datasource.eventClass
)
评论列表
文章目录