cubicweb/pyramid/debug_toolbar_templates/cw.dbtmako
author Philippe Pepiot <ph@itsalwaysdns.eu>
Tue, 31 Mar 2020 19:15:03 +0200
changeset 12957 0c973204033a
parent 12929 edfee40475bb
permissions -rw-r--r--
[server] prevent returning closed cursor to the database pool In since c8c6ad8 init_repository use repo.internal_cnx() instead of repo.system_source.get_connection() so it use the pool and we should not close cursors from the pool before returning it back. Otherwise we may have "connection already closed" error. This bug only trigger when connection-pool-size = 1. Since we are moving to use a dynamic pooler we need to get this fixed. This does not occur with sqlite since the connection wrapper instantiate new cursor everytime, but this occur with other databases.

% if controller:

<h3>Controller</h3>

<table class="table table-striped table-condensed">
    <thead>
        <tr>
            <th>Kind</th>
            <th>Request</th>
            <th>Path</th>
            <th>Controller</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>${controller["kind"]}</td>
            <td>${controller["request"]} ${source_code_url(controller["request"]) | n}</td>
            <td>${controller["path"]}</td>
            <td>${controller["controller"]} ${source_code_url(controller["controller"]) | n}</td>
        </tr>
    </tbody>
</table>

<h3>Configuration</h3>

<table class="table table-striped table-condensed">
    <thead>
        <tr>
            <th>Key</th>
            <th>Value</th>
            <th>Default</th>
            <th>Help</th>
        </tr>
    </thead>
    <tbody>
        % for key, metadata in sorted(controller["config"].options, key=lambda x: x[0]):
            % if hasattr(controller["config"].config, key.replace("-", "_")):
            <% value = getattr(controller["config"].config, key.replace("-", "_")) %>
            <tr>
                <td>${key}</td>
                % if value != metadata["default"]:
                <td><b>${value}</b></td>
                % else:
                <td>${value}</td>
                % endif
                <td>${metadata["default"]}</td>
                <td>${metadata["help"]}</td>
            </tr>
            % endif
        % endfor
    </tbody>
</table>



<h3>Useful links</h3>

<!-- link on the default home as an admin -->
<ul>
    <li><a href="/siteconfig">site configuration</a></li>
    <li><a href="/schema">data model schema</a></li>
    <li><a href="/cwuser">users and groups</a></li>
    <li><a href="/cwsource">data sources</a></li>
    <li><a href="/siteinfo">Site information</a></li>
</ul>
% else:
<p>No controller store got collected.</p>
% endif