<commit_before>/**
 * # ResultsView widget for nodeGame
 * Copyright(c) 2014 <NAME>
 * MIT Licensed
 *
 * Shows current, previous and next state.
 *
 * www.nodegame.org
 * ---
 */
(function(node) {

    "use strict";

    node.widgets.register('ResultsView', ResultsView);

    var JSUS = node.JSUS;

    // ## Meta-data

    ResultsView.version = '0.0.1';
    ResultsView.description = 'Visually display results of games.'; 

    ResultsView.className = 'resultsView';

    // ## Dependencies
    ResultsView.dependencies = {
        JSUS: {},
    };

    function ResultsView(options) {
        var that;

        that = this;

        this.id = options.id;

    }

    ResultsView.prototype.refresh = function() {
        // Ask server for games:
        node.socket.send(node.msg.create({
            target: 'SERVERCOMMAND',
            text:   'INFO',
            data: {
                type: 'RESULTS'
            }
        }));

    };

    ResultsView.prototype.append = function() {

        // Query server:
        this.refresh();
    };

    ResultsView.prototype.listeners = function() {
        var that;

        that = this;

        // Listen for server reply:
        node.on.data('INFO_RESULTS', function(msg) {
        });
    };

})(node);<commit_msg>Displaying links to data in monitor<commit_after>/**
 * # ResultsView widget for nodeGame
 * Copyright(c) 2014 <NAME>
 * MIT Licensed
 *
 * Shows current, previous and next state.
 *
 * www.nodegame.org
 * ---
 */
(function(node) {

    "use strict";

    node.widgets.register('ResultsView', ResultsView);

    var JSUS = node.JSUS;

    // ## Meta-data

    ResultsView.version = '0.0.1';
    ResultsView.description = 'Visually display results of games.'; 

    ResultsView.className = 'resultsView';

    // ## Dependencies
    ResultsView.dependencies = {
        JSUS: {},
    };

    function ResultsView(options) {
        var that;

        that = this;

        this.id = options.id;
        this.links = document.createElement('div');

    }

    ResultsView.prototype.refresh = function() {
        // Ask server for games:
        node.socket.send(node.msg.create({
            target: 'SERVERCOMMAND',
            text:   'INFO',
            data: {
                type: 'RESULTS'
            }
        }));

    };

    ResultsView.prototype.append = function() {
        this.bodyDiv.appendChild(this.links);
        // Query server:
        this.refresh();
    };

    ResultsView.prototype.listeners = function() {
        var that;

        that = this;

        // Listen for server reply:
        node.on.data('INFO_RESULTS', function(msg) {
            that.displayData(msg.data);
        });
    };

    ResultsView.prototype.displayData = function(files) {
        var i, element, dataDir;
        for (i = 0; i < files.length; ++i) {
            element = document.createElement('a');
            // TODO: replace with basedir + 'data/'
            element.href = '../data/' + files[i];
            element.innerHTML = files[i];
            this.links.appendChild(element);
            this.links.appendChild(document.createElement('br'));
        }
    };

})(node);
{'fraction_non_alphanumeric': 0.13798547521313545, 'fraction_numerical': 0.00473634354278497, 'mean_word_length': 1.8773841961852862, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1746552', 'n_tokens_mistral': 944, 'n_tokens_neox': 886, 'n_words': 192}