<commit_before><h2 data-i18n="certificate.title"></h2>


<table id="cert-table" class="table table-condensed table-striped">
    <thead>
        <tr>
            <th data-i18n="certificate.commonname"></th>
            <th data-i18n="certificate.expires"></th>
            <th data-i18n="certificate.expiration_date"></th>
            <th data-i18n="certificate.issuer"></th>
            <th data-i18n="certificate.location"></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td colspan="2" data-i18n="listing.loading"></td>
        </tr>
    </tbody>
</table>

<script>


$(document).on('appReady', function(e, lang) {

    // Get certificate data
    $.getJSON( appUrl + '/module/certificate/get_data/' + serialNumber, function( data ) {
        if(data.length)
        {
            var tbl = $('#cert-table tbody');

            tbl.empty();

            // Load data
            $.each(data, function(index, cert){
                tbl.append($('<tr>')
                    .attr('title', cert.rs.cert_path)
                    .append($('<td>')
                        .text(cert.rs.cert_cn))
                    .append($('<td>')
                        .html(function(){
                            var date = new Date(cert.rs.cert_exp_time * 1000);
                            var diff = moment().diff(date, 'days');
                            var cls = diff > 0 ? 'danger' : (diff > -90 ? 'warning' : 'success');
                            return('<span class="label label-'+cls+'">'+moment(date).fromNow()+'</span>')
                            }))
                    .append($('<td>')
                        .html(function(){
                            var date = new Date(cert.rs.cert_exp_time * 1000);
                            return moment(date).format('LLLL');
                            }))
                    .append($('<td>')
                        .text(cert.rs.issuer))                        <commit_msg>Tab view change for 1 month "soon" value (#779)<commit_after><h2 data-i18n="certificate.title"></h2>


<table id="cert-table" class="table table-condensed table-striped">
    <thead>
        <tr>
            <th data-i18n="certificate.commonname"></th>
            <th data-i18n="certificate.expires"></th>
            <th data-i18n="certificate.expiration_date"></th>
            <th data-i18n="certificate.issuer"></th>
            <th data-i18n="certificate.location"></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td colspan="2" data-i18n="listing.loading"></td>
        </tr>
    </tbody>
</table>

<script>


$(document).on('appReady', function(e, lang) {

    // Get certificate data
    $.getJSON( appUrl + '/module/certificate/get_data/' + serialNumber, function( data ) {
        if(data.length)
        {
            var tbl = $('#cert-table tbody');

            tbl.empty();

            // Load data
            $.each(data, function(index, cert){
                tbl.append($('<tr>')
                    .attr('title', cert.rs.cert_path)
                    .append($('<td>')
                        .text(cert.rs.cert_cn))
                    .append($('<td>')
                        .html(function(){
                            var date = new Date(cert.rs.cert_exp_time * 1000);
                            var diff = moment().diff(date, 'days');
                            var cls = diff > 0 ? 'danger' : (diff > -30 ? 'warning' : 'success');
                            return('<span class="label label-'+cls+'">'+moment(date).fromNow()+'</span>')
                            }))
                    .append($('<td>')
                        .html(function(){
                            var date = new Date(cert.rs.cert_exp_time * 1000);
                            return moment(date).format('LLLL');
                            }))
                    .append($('<td>')
                        .text(cert.rs.issuer))                        
{'fraction_non_alphanumeric': 0.16556795131845842, 'fraction_numerical': 0.015212981744421906, 'mean_word_length': 1.3274336283185841, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 71, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4548381', 'n_tokens_mistral': 1180, 'n_tokens_neox': 1091, 'n_words': 192}