cubicweb/pyramid/debugtoolbar_panels.py
author Laurent Peuch <cortex@worlddomination.be>
Tue, 26 Nov 2019 20:26:58 +0100
changeset 12777 7c4216ed7497
parent 12776 3cbcbaead477
child 12795 30448f475a35
permissions -rw-r--r--
[debug-toolbar/display_source_code] add links to files in tracebacks
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12760
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
     1
# copyright 2019 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
     2
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
     3
#
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
     4
# This file is part of CubicWeb.
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
     5
#
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
     6
# CubicWeb is free software: you can redistribute it and/or modify it under the
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
     7
# terms of the GNU Lesser General Public License as published by the Free
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
     8
# Software Foundation, either version 2.1 of the License, or (at your option)
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
     9
# any later version.
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
    10
#
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
    11
# CubicWeb is distributed in the hope that it will be useful, but WITHOUT
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
    13
# FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
    14
# details.
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
    15
#
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
    16
# You should have received a copy of the GNU Lesser General Public License along
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
    17
# with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
    18
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
    19
from pyramid_debugtoolbar.panels import DebugPanel
12776
3cbcbaead477 [debug-toolbar] link to source code of all objects/classes
Laurent Peuch <cortex@worlddomination.be>
parents: 12768
diff changeset
    20
12760
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
    21
from cubicweb.debug import subscribe_to_debug_channel, unsubscribe_to_debug_channel
12777
7c4216ed7497 [debug-toolbar/display_source_code] add links to files in tracebacks
Laurent Peuch <cortex@worlddomination.be>
parents: 12776
diff changeset
    22
from cubicweb.misc.source_highlight import highlight_html, generate_css, has_pygments
7c4216ed7497 [debug-toolbar/display_source_code] add links to files in tracebacks
Laurent Peuch <cortex@worlddomination.be>
parents: 12776
diff changeset
    23
from cubicweb.pyramid.debug_source_code import source_code_url, source_code_url_in_stack
12760
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
    24
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
    25
12764
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    26
class CubicWebDebugPanel(DebugPanel):
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    27
    """
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    28
    CubicWeb general debug panel
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    29
    """
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    30
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    31
    """
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    32
    Excepted formats:
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    33
    Controller: {
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    34
        "kind": ctrlid,
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    35
        "request": req,
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    36
        "path": req.path,
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    37
        "controller": controller,
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    38
    }
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    39
    """
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    40
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    41
    name = 'CubicWeb'
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    42
    nav_title = 'CubicWeb'
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    43
    title = 'CubicWeb general panel'
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    44
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    45
    has_content = True
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    46
    template = 'cubicweb.pyramid:debug_toolbar_templates/cw.dbtmako'
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    47
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    48
    def __init__(self, request):
12776
3cbcbaead477 [debug-toolbar] link to source code of all objects/classes
Laurent Peuch <cortex@worlddomination.be>
parents: 12768
diff changeset
    49
        self.data = {
3cbcbaead477 [debug-toolbar] link to source code of all objects/classes
Laurent Peuch <cortex@worlddomination.be>
parents: 12768
diff changeset
    50
            'controller': None,
3cbcbaead477 [debug-toolbar] link to source code of all objects/classes
Laurent Peuch <cortex@worlddomination.be>
parents: 12768
diff changeset
    51
            'source_code_url': source_code_url,
3cbcbaead477 [debug-toolbar] link to source code of all objects/classes
Laurent Peuch <cortex@worlddomination.be>
parents: 12768
diff changeset
    52
        }
3cbcbaead477 [debug-toolbar] link to source code of all objects/classes
Laurent Peuch <cortex@worlddomination.be>
parents: 12768
diff changeset
    53
12764
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    54
        subscribe_to_debug_channel("controller", self.collect_controller)
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    55
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    56
    def collect_controller(self, controller):
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    57
        self.data["controller"] = controller
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    58
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    59
    def process_response(self, response):
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    60
        unsubscribe_to_debug_channel("controller", self.collect_controller)
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    61
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
    62
12768
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    63
class RegistryDecisionsDebugPanel(DebugPanel):
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    64
    """
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    65
    CubicWeb registry decisions debug panel
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    66
    """
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    67
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    68
    name = 'RegistryDecisions'
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    69
    title = 'Registry Decisions'
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    70
    nav_title = 'Registry Decisions'
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    71
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    72
    has_content = True
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    73
    template = 'cubicweb.pyramid:debug_toolbar_templates/registry_decisions.dbtmako'
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    74
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    75
    def __init__(self, request):
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    76
        # clear on every new response
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    77
        self.data = {
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    78
            'registry_decisions': [],
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    79
            'vreg': None,
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    80
            'highlight': highlight_html,
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    81
            'generate_css': generate_css,
12776
3cbcbaead477 [debug-toolbar] link to source code of all objects/classes
Laurent Peuch <cortex@worlddomination.be>
parents: 12768
diff changeset
    82
            'source_code_url': source_code_url,
12768
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    83
        }
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    84
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    85
        subscribe_to_debug_channel("vreg", self.collect_vreg)
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    86
        subscribe_to_debug_channel("registry_decisions", self.collect_registry_decisions)
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    87
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    88
    def collect_vreg(self, message):
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    89
        self.data["vreg"] = message["vreg"]
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    90
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    91
    def collect_registry_decisions(self, decision):
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    92
        # decision = {
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    93
        #     "all_objects": [],
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    94
        #     "end_score": int,
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    95
        #     "winners": [],
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    96
        #     "registry": obj,
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    97
        #     "args": args,
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    98
        #     "kwargs": kwargs,
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
    99
        # }
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   100
        decision["key"] = None
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   101
        self.data["registry_decisions"].append(decision)
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   102
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   103
    def link_registry_to_their_key(self):
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   104
        if self.data["vreg"]:
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   105
            # use "id" here to be hashable
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   106
            registry_to_key = {id(registry): key for key, registry in self.data["vreg"].items()}
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   107
            for decision in self.data["registry_decisions"]:
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   108
                decision["key"] = registry_to_key.get(id(decision["self"]))
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   109
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   110
    def process_response(self, response):
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   111
        unsubscribe_to_debug_channel("registry_decisions", self.collect_registry_decisions)
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   112
        unsubscribe_to_debug_channel("vreg", self.collect_vreg)
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   113
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   114
        self.link_registry_to_their_key()
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   115
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   116
12766
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   117
class RegistryDebugPanel(DebugPanel):
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   118
    """
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   119
    CubicWeb registry content and decisions debug panel
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   120
    """
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   121
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   122
    name = 'Registry'
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   123
    title = 'Registry Store'
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   124
    nav_title = 'Registry Store'
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   125
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   126
    has_content = True
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   127
    template = 'cubicweb.pyramid:debug_toolbar_templates/registry.dbtmako'
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   128
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   129
    def __init__(self, request):
12776
3cbcbaead477 [debug-toolbar] link to source code of all objects/classes
Laurent Peuch <cortex@worlddomination.be>
parents: 12768
diff changeset
   130
        self.data = {
3cbcbaead477 [debug-toolbar] link to source code of all objects/classes
Laurent Peuch <cortex@worlddomination.be>
parents: 12768
diff changeset
   131
            'vreg': None,
3cbcbaead477 [debug-toolbar] link to source code of all objects/classes
Laurent Peuch <cortex@worlddomination.be>
parents: 12768
diff changeset
   132
            'source_code_url': source_code_url,
3cbcbaead477 [debug-toolbar] link to source code of all objects/classes
Laurent Peuch <cortex@worlddomination.be>
parents: 12768
diff changeset
   133
        }
12766
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   134
        subscribe_to_debug_channel("vreg", self.collect_vreg)
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   135
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   136
    def collect_vreg(self, message):
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   137
        self.data["vreg"] = message["vreg"]
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   138
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   139
    def process_response(self, response):
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   140
        unsubscribe_to_debug_channel("vreg", self.collect_vreg)
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   141
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   142
12760
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   143
class RQLDebugPanel(DebugPanel):
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   144
    """
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   145
    CubicWeb RQL debug panel
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   146
    """
12761
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   147
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   148
    """
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   149
    Excepted formats:
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   150
    SQL: {
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   151
        'rql_query_tracing_token': 'some_token',
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   152
        'args': {dict with some args},
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   153
        'rollback': False|True,
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   154
        'time': time_in_float,
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   155
        'sql':_sql_query_as_a_string,
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   156
    }
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   157
    """
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   158
12760
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   159
    name = 'RQL'
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   160
    title = 'RQL queries'
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   161
    nav_title = 'RQL'
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   162
    nav_subtitle_style = 'progress-bar-info'
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   163
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   164
    has_content = True
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   165
    template = 'cubicweb.pyramid:debug_toolbar_templates/rql.dbtmako'
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   166
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   167
    def __init__(self, request):
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   168
        self.data = {
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   169
            'rql_queries': [],
12761
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   170
            'sql_queries': [],
12760
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   171
            'highlight': highlight_html,
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   172
            'generate_css': generate_css,
12777
7c4216ed7497 [debug-toolbar/display_source_code] add links to files in tracebacks
Laurent Peuch <cortex@worlddomination.be>
parents: 12776
diff changeset
   173
            'has_pygments': has_pygments,
7c4216ed7497 [debug-toolbar/display_source_code] add links to files in tracebacks
Laurent Peuch <cortex@worlddomination.be>
parents: 12776
diff changeset
   174
            'source_code_url_in_stack': source_code_url_in_stack,
12760
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   175
        }
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   176
        subscribe_to_debug_channel("rql", self.collect_rql_queries)
12761
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   177
        subscribe_to_debug_channel("sql", self.collect_sql_queries)
12760
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   178
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   179
    @property
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   180
    def nav_subtitle(self):
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   181
        return '%d' % len(self.data['rql_queries'])
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   182
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   183
    def collect_rql_queries(self, rql_query):
12761
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   184
        rql_query["generated_sql_queries"] = []
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   185
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   186
        # link sql queries to rql's one
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   187
        for sql_query in self.data["sql_queries"]:
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   188
            if sql_query["rql_query_tracing_token"] == rql_query["rql_query_tracing_token"]:
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   189
                rql_query["generated_sql_queries"].append(sql_query)
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   190
12760
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   191
        self.data["rql_queries"].append(rql_query)
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   192
12761
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   193
    def collect_sql_queries(self, sql_query):
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   194
        self.data["sql_queries"].append(sql_query)
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   195
12760
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   196
    def process_response(self, response):
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   197
        unsubscribe_to_debug_channel("rql", self.collect_rql_queries)
12761
10b8352b0208 [debug-toolbar/rql] display sql queries generated by rql ones
Laurent Peuch <cortex@worlddomination.be>
parents: 12760
diff changeset
   198
        unsubscribe_to_debug_channel("sql", self.collect_sql_queries)
12760
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   199
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   200
12765
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   201
class SQLDebugPanel(DebugPanel):
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   202
    """
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   203
    CubicWeb SQL debug panel
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   204
    """
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   205
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   206
    """
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   207
    Excepted formats:
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   208
    SQL: {
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   209
        'rql_query_tracing_token': 'some_token',
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   210
        'args': {dict with some args},
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   211
        'rollback': False|True,
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   212
        'time': time_in_float,
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   213
        'sql':_sql_query_as_a_string,
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   214
    }
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   215
    """
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   216
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   217
    name = 'SQL'
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   218
    title = 'SQL queries'
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   219
    nav_title = 'SQL'
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   220
    nav_subtitle_style = 'progress-bar-info'
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   221
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   222
    has_content = True
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   223
    template = 'cubicweb.pyramid:debug_toolbar_templates/sql.dbtmako'
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   224
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   225
    def __init__(self, request):
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   226
        self.data = {
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   227
            'rql_queries': [],
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   228
            'sql_queries': [],
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   229
            'highlight': highlight_html,
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   230
            'generate_css': generate_css,
12777
7c4216ed7497 [debug-toolbar/display_source_code] add links to files in tracebacks
Laurent Peuch <cortex@worlddomination.be>
parents: 12776
diff changeset
   231
            'has_pygments': has_pygments,
7c4216ed7497 [debug-toolbar/display_source_code] add links to files in tracebacks
Laurent Peuch <cortex@worlddomination.be>
parents: 12776
diff changeset
   232
            'source_code_url_in_stack': source_code_url_in_stack,
12765
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   233
        }
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   234
        subscribe_to_debug_channel("rql", self.collect_rql_queries)
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   235
        subscribe_to_debug_channel("sql", self.collect_sql_queries)
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   236
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   237
    @property
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   238
    def nav_subtitle(self):
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   239
        return len(self.data['sql_queries'])
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   240
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   241
    def collect_rql_queries(self, rql_query):
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   242
        self.data["rql_queries"].append(rql_query)
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   243
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   244
        # link sql queries to rql's one
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   245
        for sql_query in self.data["sql_queries"]:
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   246
            if sql_query["rql_query_tracing_token"] == rql_query["rql_query_tracing_token"]:
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   247
                sql_query["from_rql_query"] = rql_query
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   248
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   249
    def collect_sql_queries(self, sql_query):
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   250
        sql_query["from_rql_query"] = None
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   251
        self.data["sql_queries"].append(sql_query)
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   252
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   253
    def process_response(self, response):
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   254
        unsubscribe_to_debug_channel("rql", self.collect_rql_queries)
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   255
        unsubscribe_to_debug_channel("sql", self.collect_sql_queries)
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   256
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   257
12760
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   258
def includeme(config):
12764
fb97669efcaa [debug-toolbar] add cw general panel with controller
Laurent Peuch <cortex@worlddomination.be>
parents: 12763
diff changeset
   259
    config.add_debugtoolbar_panel(CubicWebDebugPanel)
12768
7d2c61d40fe9 [debug-toolbar] add registry decisions debug panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12766
diff changeset
   260
    config.add_debugtoolbar_panel(RegistryDecisionsDebugPanel)
12766
682d0790997f [debug-toolbar] add registry panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12765
diff changeset
   261
    config.add_debugtoolbar_panel(RegistryDebugPanel)
12760
d5ae5abd0876 [debug-toolbar/rql] add RQL panel
Laurent Peuch <cortex@worlddomination.be>
parents:
diff changeset
   262
    config.add_debugtoolbar_panel(RQLDebugPanel)
12765
771c99f16780 [debug-toolbar] add sql panel
Laurent Peuch <cortex@worlddomination.be>
parents: 12764
diff changeset
   263
    config.add_debugtoolbar_panel(SQLDebugPanel)