web/data/cubicweb.log.js
author Julien Cristau <julien.cristau@logilab.fr>
Fri, 20 Nov 2015 18:23:17 +0100
changeset 10851 70b21cf8b45c
parent 7995 9a9f35ef418c
permissions -rw-r--r--
[web] use a redirect for /data/foo requests that don't use the instance md5 hash The actual file contents can be cached for a long time. If the request doesn't use the hash, that's wrong. Using a redirect lets keep the caching for the actual file contents while not breaking requests missing the hash.

// 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]();
    }
}