50 def collect_controller(self, controller): |
50 def collect_controller(self, controller): |
51 self.data["controller"] = controller |
51 self.data["controller"] = controller |
52 |
52 |
53 def process_response(self, response): |
53 def process_response(self, response): |
54 unsubscribe_to_debug_channel("controller", self.collect_controller) |
54 unsubscribe_to_debug_channel("controller", self.collect_controller) |
|
55 |
|
56 |
|
57 class RegistryDebugPanel(DebugPanel): |
|
58 """ |
|
59 CubicWeb registry content and decisions debug panel |
|
60 """ |
|
61 |
|
62 name = 'Registry' |
|
63 title = 'Registry Store' |
|
64 nav_title = 'Registry Store' |
|
65 |
|
66 has_content = True |
|
67 template = 'cubicweb.pyramid:debug_toolbar_templates/registry.dbtmako' |
|
68 |
|
69 def __init__(self, request): |
|
70 self.data = {'vreg': None} |
|
71 subscribe_to_debug_channel("vreg", self.collect_vreg) |
|
72 |
|
73 def collect_vreg(self, message): |
|
74 self.data["vreg"] = message["vreg"] |
|
75 |
|
76 def process_response(self, response): |
|
77 unsubscribe_to_debug_channel("vreg", self.collect_vreg) |
55 |
78 |
56 |
79 |
57 class RQLDebugPanel(DebugPanel): |
80 class RQLDebugPanel(DebugPanel): |
58 """ |
81 """ |
59 CubicWeb RQL debug panel |
82 CubicWeb RQL debug panel |
165 unsubscribe_to_debug_channel("sql", self.collect_sql_queries) |
188 unsubscribe_to_debug_channel("sql", self.collect_sql_queries) |
166 |
189 |
167 |
190 |
168 def includeme(config): |
191 def includeme(config): |
169 config.add_debugtoolbar_panel(CubicWebDebugPanel) |
192 config.add_debugtoolbar_panel(CubicWebDebugPanel) |
|
193 config.add_debugtoolbar_panel(RegistryDebugPanel) |
170 config.add_debugtoolbar_panel(RQLDebugPanel) |
194 config.add_debugtoolbar_panel(RQLDebugPanel) |
171 config.add_debugtoolbar_panel(SQLDebugPanel) |
195 config.add_debugtoolbar_panel(SQLDebugPanel) |