<commit_before>$.ajaxPrefilter(function(options, originalOptions, jqXHR) {
    jqXHR.setRequestHeader('X-CSRF-Token', $('meta[name="token"]').attr('content'));
});

var app = app || {};

(function ($) {
    var PENDING = 1;
    var RUNNING = 2;

    app.listener = io.connect('http://deploy.app:6001');

    // Navbar deployment status
    // FIXME: Convert these menus to backbone
    app.listener.on('deployment-status', function (data) {

        data.time = moment(data.started.date).format('h:mm:ss A');;
        data.url = '/deployments/' + data.id;

        $('#deployment_info_' + data.id).remove();
        $('#pending_menu, #deploying_menu').show();

        var template = _.template($('#deployment_list_template').html());
        var html = template(data);

        if (data.status === PENDING) {
            $('#pending_menu ul.menu').append(html);
        }
        else if (data.status === RUNNING) {
            $('#deploying_menu ul.menu').append(html);
        }

        var pending = $('#pending_menu ul.menu li').length;
        var deploying = $('#deploying_menu ul.menu li').length;

        var pending_label = Lang.nav.multi_pending.replace('%s', pending);
        if (pending === 0) {<commit_msg>Changing to use the correct hostname in the JS<commit_after>$.ajaxPrefilter(function(options, originalOptions, jqXHR) {
    jqXHR.setRequestHeader('X-CSRF-Token', $('meta[name="token"]').attr('content'));
});

var app = app || {};

(function ($) {
    var PENDING = 1;
    var RUNNING = 2;

    app.listener = io.connect(window.location.protocol + '//' + window.location.hostname + ':6001');

    // Navbar deployment status
    // FIXME: Convert these menus to backbone
    app.listener.on('deployment-status', function (data) {

        data.time = moment(data.started.date).format('h:mm:ss A');;
        data.url = '/deployments/' + data.id;

        $('#deployment_info_' + data.id).remove();
        $('#pending_menu, #deploying_menu').show();

        var template = _.template($('#deployment_list_template').html());
        var html = template(data);

        if (data.status === PENDING) {
            $('#pending_menu ul.menu').append(html);
        }
        else if (data.status === RUNNING) {
            $('#deploying_menu ul.menu').append(html);
        }

        var pending = $('#pending_menu ul.menu li').length;
        var deploying = $('#deploying_menu ul.menu li').length;

        var pending_label = Lang.nav.multi_pending.replace('%s', pending);
        if (pending === 0) {
{'fraction_non_alphanumeric': 0.17875544986127626, 'fraction_numerical': 0.005548949663099485, 'mean_word_length': 2.847560975609756, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1045332', 'n_tokens_mistral': 806, 'n_tokens_neox': 768, 'n_words': 156}