web/data/cubicweb.log.js
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 17 Jan 2014 09:06:40 +0100
branchstable
changeset 9427 9c13ebd45cb6
parent 7995 9a9f35ef418c
permissions -rw-r--r--
[test api] extract a context manager to temporarily disable app.error_handler monkey patch

// This contains template-specific javascript

function filterLog(domid, thresholdLevel) {
    var logLevels = ["Debug", "Info", "Warning", "Error", "Fatal"]
    var action = "hide";
    for (var idx = 0; idx < logLevels.length; idx++){
        var level = logLevels[idx];
        if (level === thresholdLevel){
            action = "show";
        }
        $('#'+domid+' .log' + level)[action]();
    }
}