<commit_before>/*globals d3*/
isic.views.ImagesViewSubViews = isic.views.ImagesViewSubViews || {};

isic.views.ImagesViewSubViews.PagingPane = Backbone.View.extend({
    events: {
        'click #isic-images-seekFirst': 'seekFirst',
        'click #isic-images-seekPrev': 'seekPrev',
        'click #isic-images-seekNext': 'seekNext',
        'click #isic-images-seekLast': 'seekLast',
        'click #isic-images-download-zip': function () {
            window.location.assign(girder.apiRoot + '/image/download?filter=' +
                JSON.stringify(this.model.getFilterAstTree()));
        }
    },
    /**
     * @param {isic.views.ImagesViewSubViews.ImagesViewModel} settings.model
     */
    initialize: function (settings) {
        this.listenTo(this.model.images, 'g:changed', this.render);
        this.listenTo(this.model, 'change:filteredSetHistogram', this.render);
        this.listenTo(this.model, 'change:offset', this.updateControls);
        this.listenTo(this.model, 'change:limit', this.updateControls);
    },
    renderBars: function () {
        var pageDetails = this.model.getPageDetails(true);

        // Scale for the bars
        var pageScale = d3.scale.linear()
          .domain([0, pageDetails.filteredSetCount])<commit_msg>Do not add empty filters to images ZIP URL<commit_after>/*globals d3*/
isic.views.ImagesViewSubViews = isic.views.ImagesViewSubViews || {};

isic.views.ImagesViewSubViews.PagingPane = Backbone.View.extend({
    events: {
        'click #isic-images-seekFirst': 'seekFirst',
        'click #isic-images-seekPrev': 'seekPrev',
        'click #isic-images-seekNext': 'seekNext',
        'click #isic-images-seekLast': 'seekLast',
        'click #isic-images-download-zip': function () {
            var downloadUrl = girder.apiRoot + '/image/download';
            var filter = this.model.getFilterAstTree();
            if (filter) {
                downloadUrl += '?filter=' + JSON.stringify(filter);
            }
            window.location.assign(downloadUrl);
        }
    },
    /**
     * @param {isic.views.ImagesViewSubViews.ImagesViewModel} settings.model
     */
    initialize: function (settings) {
        this.listenTo(this.model.images, 'g:changed', this.render);
        this.listenTo(this.model, 'change:filteredSetHistogram', this.render);
        this.listenTo(this.model, 'change:offset', this.updateControls);
        this.listenTo(this.model, 'change:limit', this.updateControls);
    },
    renderBars: function () {
        var pageDetails = this.model.getPageDetails(true);

        // Scale for the bars
        var pageScale = d3.scale.linear()
          .domain([0, pageDetails.filteredSetCount])
{'fraction_non_alphanumeric': 0.14269746646795828, 'fraction_numerical': 0.0022354694485842027, 'mean_word_length': 2.8577586206896552, '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': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4999121', 'n_tokens_mistral': 812, 'n_tokens_neox': 797, 'n_words': 131}