<commit_before>// Toggle the display of IP addresses under interfaces
$('button.toggle-ips').click(function() {
    var selected = $(this).attr('selected');
    if (selected) {
        $('#interfaces_table tr.interface:visible + tr.ipaddresses').hide();
    } else {
        $('#interfaces_table tr.interface:visible + tr.ipaddresses').show();
    }
    $(this).attr('selected', !selected);
    $(this).children('span').toggleClass('glyphicon-check glyphicon-unchecked');
    return false;
});

// Inteface filtering
$('input.interface-filter').on('input', function() {
    var filter = new RegExp(this.value);
    var interface;

    for (interface of $('#interfaces_table > tbody > tr')) {
        // Slice off 'interface_' at the start of the ID
        if (filter.test(interface.id.slice(10))) {
            // Match the toggle in case the filter now matches the interface
            $(interface).find('input:checkbox[name=pk]').prop('checked', $('input.toggle').prop('checked'));
            $(interface).show();
        } else {
            // Uncheck to prevent actions from including it when it doesn't match
            $(interface).find('input:checkbox[name=pk]').prop('checked', false);
            $(interface).hide();
        }
    }

    // Show the ip addresses table row for the visible (matched) interfaces, if checked
    if ($('button.toggle-ips').attr('selected')) {
        $('#interfaces_table > tbody > tr:visible').next('tr.ipaddresses').show();
    }
});<commit_msg>Interface selector restricted to only interface<commit_after>// Toggle the display of IP addresses under interfaces
$('button.toggle-ips').click(function() {
    var selected = $(this).attr('selected');
    if (selected) {
        $('#interfaces_table tr.interface:visible + tr.ipaddresses').hide();
    } else {
        $('#interfaces_table tr.interface:visible + tr.ipaddresses').show();
    }
    $(this).attr('selected', !selected);
    $(this).children('span').toggleClass('glyphicon-check glyphicon-unchecked');
    return false;
});

// Inteface filtering
$('input.interface-filter').on('input', function() {
    var filter = new RegExp(this.value);
    var interface;

    for (interface of $('#interfaces_table > tbody > tr.interface')) {
        // Slice off 'interface_' at the start of the ID
        if (filter.test(interface.id.slice(10))) {
            // Match the toggle in case the filter now matches the interface
            $(interface).find('input:checkbox[name=pk]').prop('checked', $('input.toggle').prop('checked'));
            $(interface).show();
            if ($('button.toggle-ips').attr('selected')) {
                $(interface).next('tr.ipaddresses').show();
            }
        } else {
            // Uncheck to prevent actions from including it when it doesn't match
            $(interface).find('input:checkbox[name=pk]').prop('checked', false);
            $(interface).hide();
            $(interface).next('tr.ipaddresses').hide();
        }
    }
});
{'fraction_non_alphanumeric': 0.1716867469879518, 'fraction_numerical': 0.0013386880856760374, 'mean_word_length': 2.9747340425531914, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '2311', 'n_tokens_mistral': 823, 'n_tokens_neox': 806, 'n_words': 195}