<commit_before>/**
 * @author <NAME> <<EMAIL>>
 */
define(['sos-data-access', 'locale-date', 'widget-common'], function(data_access, ld, common) {
    "use strict";

    var template = [
        '<div class="panel widget">',
            '<h2></h2>',
            '<h3>Loading...</h3>',
            '<dl class="dl-horizontal"></dl>',
            '<div><span class="footnote"></span></div>',
        '</div>'
    ].join('');

    return {
        inputs: common.inputs.concat(["title", "feature", "properties"]),
        optional_inputs: common.optional_inputs,
        preferredSizes: [{w: 400, h: 400}],

        init: function(config, el) {
            // Render template
            el.innerHTML = template;
            el.querySelector("h2").innerHTML = config.title;
            var subtitle = el.querySelector("h3");
            var panel = el.querySelector("dl");

            //load widget common features
            common.init(config, el);

            // Setup SOS data access
            var data = data_access(config, redraw);
            data.read();
<commit_msg>Add refresh_interval to panel widget. Closes #45<commit_after>/**
 * @author <NAME> <<EMAIL>>
 */
define(['sos-data-access', 'locale-date', 'widget-common'], function(data_access, ld, common) {
    "use strict";

    var template = [
        '<div class="panel widget">',
            '<h2></h2>',
            '<h3>Loading...</h3>',
            '<dl class="dl-horizontal"></dl>',
            '<div><span class="footnote"></span></div>',
        '</div>'
    ].join('');

    return {
        inputs: common.inputs.concat(["title", "feature", "properties", "refresh_interval"]),
        optional_inputs: common.optional_inputs,
        preferredSizes: [{w: 400, h: 400}],

        init: function(config, el) {
            // Render template
            el.innerHTML = template;
            el.querySelector("h2").innerHTML = config.title;
            var subtitle = el.querySelector("h3");
            var panel = el.querySelector("dl");

            //load widget common features
            common.init(config, el);

            // Setup SOS data access
            var data = data_access(config, redraw);
            setInterval(data.read, config.refresh_interval * 1000);
            data.read();

{'fraction_non_alphanumeric': 0.17142857142857143, 'fraction_numerical': 0.013186813186813187, 'mean_word_length': 2.0965986394557823, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, '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': '7354576', 'n_tokens_mistral': 647, 'n_tokens_neox': 653, 'n_words': 144}