cubicweb/pyramid/debug_toolbar_templates/cw.dbtmako
author Philippe Pepiot <ph@itsalwaysdns.eu>
Tue, 31 Mar 2020 18:22:05 +0200
changeset 12966 6cd938c29ca3
parent 12929 edfee40475bb
permissions -rw-r--r--
[server] Make connection pooler configurable and set better default values Drop the configuration connections-pool-size and add new configurations options: * connections-pool-min-size. Set to 0 by default so we open connections only when needed. This avoid opening min-size*processes connections at startup, which is, it think, a good default. * connections-pool-max-size. Set to 0 (unlimited) by default, so we move the bottleneck to postgresql. * connections-idle-timeout. Set to 10 minutes. I don't have arguments about this except that this is the default in pgbouncer.

% 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