<commit_before>function createMachineTable() {
    $.ajax({
        url: "/ui/view/machine", success: function (response) {
            if (response.length == 0) {
                return
            }
            $("#machine-nb").text(response.length);
            var machine_table = $("#machine_table");
            var thead, tbody, row

            thead = $("<thead>").appendTo(machine_table);
            row = $("<tr>").appendTo(thead);

            for (var i = 0; i < response[i].length; i++) {
                $("<th>").appendTo(row).text(response[0][i]);
            }

            tbody = $("<tbody>").appendTo(machine_table);
            for (var j = 1; j < response.length; j++) {
                row = $("<tr>").appendTo(tbody);
                for (var k = 0; k < response[k].length; k++) {
                    $("<td>").appendTo(row).text(response[j][k]);
                }
            }
            machine_table.DataTable();
        }, async: true
    });
}

function recurseHealth(object, parent) {
    var label, li, new_parent;

    for (var key in object) {
        if (object.hasOwnProperty(key)) {
            if (typeof(object[key]) != "boolean") {
                li = $("<li>").appendTo(parent);
                $("<span class=\"label label-default\">").appendTo(li).text(key);
                new_parent = $("<ul>").appendTo(parent);
                recurseHealth(object[key], new_parent);
                continue
            }
            li = $("<li>").appendTo(parent);
            if (object[key] == true) {
                $("<span class=\"label label-success\">").appendTo(li).text(key);
            } else {
                $("<span class=\"label label-danger\">").appendTo(li).text(key);
            }
        }
    }
}

function createHealth() {
    $.ajax({
        url: "/healthz", success: function (response) {
            recurseHealth(response, $("<ul>").appendTo($("#health_status")));
        }, async: true
    });
}

function main() {
    createMachineTable();
    createHealth();
}

main();

$(document).ready(function(){
    $("#refresh-button").click(function () {
        console.log("click catch");
    });
});<commit_msg>Fix the display of the tab<commit_after>function createMachineTable() {
    $.ajax({
        url: "/ui/view/machine", success: function (response) {
            if (response.length == 0) {
                return
            }
            $("#machine-nb").text(response.length - 1);
            var machine_table = $("#machine_table");
            var thead, tbody, row;

            thead = $("<thead>").appendTo(machine_table);
            row = $("<tr>").appendTo(thead);

            for (var i = 0; i < response[0].length; i++) {
                $("<th>").appendTo(row).text(response[0][i]);
            }

            tbody = $("<tbody>").appendTo(machine_table);
            for (var j = 1; j < response.length; j++) {
                row = $("<tr>").appendTo(tbody);
                for (var k = 0; k < response[k].length; k++) {
                    $("<td>").appendTo(row).text(response[j][k]);
                }
            }
            machine_table.DataTable();
        }, async: true
    });
}

function recurseHealth(object, parent) {
    var label, li, new_parent;

    for (var key in object) {
        if (object.hasOwnProperty(key)) {
            if (typeof(object[key]) != "boolean") {
                li = $("<li>").appendTo(parent);
                $("<span class=\"label label-default\">").appendTo(li).text(key);
                new_parent = $("<ul>").appendTo(parent);
                recurseHealth(object[key], new_parent);
                continue
            }
            li = $("<li>").appendTo(parent);
            if (object[key] == true) {
                $("<span class=\"label label-success\">").appendTo(li).text(key);
            } else {
                $("<span class=\"label label-danger\">").appendTo(li).text(key);
            }
        }
    }
}

function createHealth() {
    $.ajax({
        url: "/healthz", success: function (response) {
            recurseHealth(response, $("<ul>").appendTo($("#health_status")));
        }, async: true
    });
}

function main() {
    createMachineTable();
    createHealth();
}

main();

$(document).ready(function(){
    $("#refresh-button").click(function () {
        console.log("click catch");
    });
});
{'fraction_non_alphanumeric': 0.18947368421052632, 'fraction_numerical': 0.002745995423340961, 'mean_word_length': 1.8109324758842444, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4582553', 'n_tokens_mistral': 1284, 'n_tokens_neox': 1248, 'n_words': 234}