<commit_before>chorus.dialogs.TabularDataPreview = chorus.dialogs.Base.extend({
    constructorName: "TabularDataPreview",

    templateName: 'tabular_data_preview',
    title: function() {return t("dataset.data_preview_title", {name: this.model.get("objectName")}); },

    events: {
        "click button.cancel": "cancelTask"
    },

    subviews: {
        '.results_console': 'resultsConsole'
    },

    setup: function() {
        _.bindAll(this, 'title');
        this.resultsConsole = new chorus.views.ResultsConsole({
            footerSize: _.bind(this.footerSize, this), 
            showDownloadDialog: true,
            tabularData: this.model
            enableResize: true,
            enableExpander: true
        });
        this.closePreviewHandle = chorus.PageEvents.subscribe("action:closePreview", this.closeModal, this);
        this.modalClosedHandle = chorus.PageEvents.subscribe("modal:closed", this.cancelTask, this);
    },

    footerSize: function() {
        return this.$('.modal_controls').outerHeight(true);
    },

    postRender: function() {
        this.task = this.model.preview();
        this.resultsConsole.execute(this.task);
    },

    cancelTask: function(e) {
        this.task && this.task.cancel();
        chorus.PageEvents.unsubscribe(this.modalClosedHandle);
    },<commit_msg>Fix missing comma in tabular data preview<commit_after>chorus.dialogs.TabularDataPreview = chorus.dialogs.Base.extend({
    constructorName: "TabularDataPreview",

    templateName: 'tabular_data_preview',
    title: function() {return t("dataset.data_preview_title", {name: this.model.get("objectName")}); },

    events: {
        "click button.cancel": "cancelTask"
    },

    subviews: {
        '.results_console': 'resultsConsole'
    },

    setup: function() {
        _.bindAll(this, 'title');
        this.resultsConsole = new chorus.views.ResultsConsole({
            footerSize: _.bind(this.footerSize, this),
            showDownloadDialog: true,
            tabularData: this.model,
            enableResize: true,
            enableExpander: true
        });
        this.closePreviewHandle = chorus.PageEvents.subscribe("action:closePreview", this.closeModal, this);
        this.modalClosedHandle = chorus.PageEvents.subscribe("modal:closed", this.cancelTask, this);
    },

    footerSize: function() {
        return this.$('.modal_controls').outerHeight(true);
    },

    postRender: function() {
        this.task = this.model.preview();
        this.resultsConsole.execute(this.task);
    },

    cancelTask: function(e) {
        this.task && this.task.cancel();
        chorus.PageEvents.unsubscribe(this.modalClosedHandle);
    },
{'fraction_non_alphanumeric': 0.1336559940431869, 'fraction_numerical': 0.0, 'mean_word_length': 2.8942028985507244, 'pattern_counts': {'":': 2, '<': 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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5563755', 'n_tokens_mistral': 771, 'n_tokens_neox': 742, 'n_words': 124}