<commit_before>window.onload = function () {
    check();
}

function check() {
    var xhr = new XMLHttpRequest();
    xhr.open("GET", 'check', true);
    xhr.onload = function () {
        var hosts = JSON.parse(xhr.responseText);

        var content = document.getElementById('content');
        content.innerHTML = '';

        var h1 = document.createElement('h1');
        h1.innerHTML = hosts.name;
        content.appendChild(h1);

        hosts.group.forEach(function (group) {
            var h2 = document.createElement('h2');
            h2.innerHTML = group.name;
            content.appendChild(h2);

            var i = 0;
            var table = document.createElement('table');
            group.host.forEach(function (host) {
                var row = table.insertRow(i);
                row.className = host.status > 200 ? 'error' : 'success';
                var cellName = row.insertCell(0);
                cellName.width = 200;
                cellName.innerHTML = host.name;
                var cellUrl = row.insertCell(1);
                cellUrl.width = 300;
                var hostLink = document.createElement('a');
                hostLink.href = host.url;
                hostLink.title = host.url;<commit_msg>added exception hanling to HostController and links to website<commit_after>window.onload = function () {
    check();
}

function check() {
    var xhr = new XMLHttpRequest();
    xhr.open("GET", 'check', true);
    xhr.onload = function () {
        var hosts = JSON.parse(xhr.responseText);

        var content = document.getElementById('content');
        content.innerHTML = '';

        var h1 = document.createElement('h1');
        h1.innerHTML = hosts.name;
        content.appendChild(h1);

        hosts.group.forEach(function (group) {
            var h2 = document.createElement('h2');
            h2.innerHTML = group.name;
            content.appendChild(h2);

            var i = 0;
            var table = document.createElement('table');
            group.host.forEach(function (host) {
                var row = table.insertRow(i);
                row.className = isNaN(host.status) || host.status > 200 ? 'error' : 'success';
                var cellName = row.insertCell(0);
                cellName.width = 200;
                cellName.innerHTML = host.name;
                var cellUrl = row.insertCell(1);
                cellUrl.width = 300;
                var hostLink = document.createElement('a');
                hostLink.href = host.url;
                hostLink.title = host.url;
{'fraction_non_alphanumeric': 0.12250489236790607, 'fraction_numerical': 0.015655577299412915, 'mean_word_length': 1.8274336283185841, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2121271', 'n_tokens_mistral': 721, 'n_tokens_neox': 671, 'n_words': 148}