Commit dcca6cd3 authored by Jérome Perrin's avatar Jérome Perrin

some administration scripts

parent 5047b752
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
print \'<html><head><meta http-equiv="refresh" content="%s"></head><body>\' % refresh_interval\n
\n
for table in \'message\', \'message_queue\':\n
q = """SELECT count(*) AS %(table)s, method_id, processing, processing_node AS node, min(priority) AS min_pri, max(priority) AS max_pri\n
FROM %(table)s GROUP BY method_id, processing, processing_node ORDER BY node""" % dict(table=table)\n
\n
print "<table border=\\"\\" style=\\"font-size:XX-small;\\"><tbody> <tr><th>%s</th> <th>method_id</th> <th>processing</th> <th>node</th> <th>min_pri</th> <th>max_pri</th> </tr>" % table\n
for row in context.cmf_activity_sql_connection.manage_test(q):\n
print \'<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td</tr>\' % (row[table], row[\'method_id\'], row[\'processing\'], row[\'node\'], row[\'min_pri\'], row[\'max_pri\'])\n
print \'</tbody> </table> <br/>\'\n
\n
return printed\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>refresh_interval=5</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ActivityTool_watchActivities</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<?xml version="1.0" encoding="utf-8"?>\n
<rss version="2.0">\n
<channel xmlns:tal="http://xml.zope.org/namespaces/tal"\n
tal:define="error_log python:context.getPortalObject().error_log;\n
dummy python:request.RESPONSE.setHeader(\'Content-Type\', \'text/html;; charset=utf-8\')">\n
<title tal:content="string:Errors from ${error_log/absolute_url}"></title>\n
<description>Zope Error Log</description>\n
<link tal:content="error_log/absolute_url"></link>\n
<item tal:repeat="error error_log/getLogEntries">\n
<tal:block tal:define="error_time python:modules[\'DateTime\'].DateTime(error[\'time\'])">\n
<title tal:content="string:${error/userid} ${error/type} ${error/value} ${error_time}"></title>\n
<link tal:content="string:${error_log/absolute_url}/showEntry?id=${error/id}"/>\n
<description>\n
&lt;table&gt;\n
&lt;tr&gt;&lt;th&gt;Login&lt;/th&gt;&lt;td&gt;<tal:block tal:replace="error/userid"/>&lt;/td&gt;&lt;/tr&gt;\n
&lt;tr&gt;&lt;th&gt;Date&lt;/th&gt;&lt;td&gt;<tal:block tal:replace="error_time"/>&lt;/td&gt;&lt;/tr&gt;\n
&lt;tr&gt;&lt;th&gt;URL&lt;/th&gt;&lt;td&gt;<tal:block tal:replace="error/url"/>&lt;/td&gt;&lt;/tr&gt;\n
&lt;tr&gt;&lt;th&gt;Error Type&lt;/th&gt;&lt;td&gt;<tal:block tal:replace="error/type"/>&lt;/td&gt;&lt;/tr&gt;\n
&lt;tr&gt;&lt;th&gt;Error Value&lt;/th&gt;&lt;td&gt;<tal:block tal:replace="error/value"/>&lt;/td&gt;&lt;/tr&gt;\n
&lt;tr&gt;&lt;th&gt;Traceback&lt;/th&gt;&lt;td&gt;<tal:block tal:replace="error/tb_html"/>&lt;/td&gt;&lt;/tr&gt;\n
&lt;tr&gt;&lt;th&gt;Request&lt;/th&gt;&lt;td&gt;<tal:block tal:replace="error/req_html"/>&lt;/td&gt;&lt;/tr&gt;\n
&lt;/table&gt;\n
</description>\n
<guid tal:content="string:${error_log/absolute_url}/showEntry?id=${error/id}"></guid>\n
</tal:block>\n
</item>\n
</channel>\n
</rss>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/xml</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_getErrorLogAsRSS</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
161
\ No newline at end of file
162
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment