INNER CODE UNIT · JavaScript

updateFieldHighlight

netnr/workers · wwwroot/loggly.js:253

    function updateFieldHighlight() {
        var items = $fieldList.querySelectorAll('li');
        items.forEach(function (li) {
            li.classList.toggle('active', li.textContent === state.activeField);
        });
    }

    function loadFieldsList(query) {
        var url = CONFIG.baseUrl + '/fields/?q=' + encodeURIComponent(query.q) +
            '&from=' + encodeURIComponent(query.from) +
            '&until=' + encodeURIComponent(query.until);

        return apiGet(url).then(function (data) {
            state.allFields = (data.fields || []).map(function (f) {
                return f.name;
            }).sort();
            $fieldTotal.textContent = state.allFields.length;
            renderFieldList(getFilteredFields());

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…