<commit_before>var _$ = window.$;
jQuery.noConflict();
jQuery(function($) {
    function Insight() {
      this.current = null
      this.request_id = null
      this.panel_id = null
    }

    Insight.prototype = {
      switchCurrentPanel: function() {
        if(this.request_id && this.panel_id) {
          this.current = $('#rack-insight #request_' + this.request_id + ' #' + this.panel_id)
        }
      },
      getPanelContent: function() {
        $.get("__insight__/panels_content?request_id=" + this.request_id, function(data) {
            $('#rack-insight').append(data)
            $.insight.switchCurrentPanel()
            $.insight.openCurrent()
          })
      },
      toggleCurrent: function() {
        if(this.current) {
          if (this.current.is(':visible')) {
            $(document).trigger('close.insight');
          } else {
            this.openCurrent()
          }
        }
      },
      changeRequest: function(req_number) {
        $(document).trigger('close.insight')
        this.request_id = req_number
        this.switchCurrentPanel()
        if(this.current.length <= 0) {
          this.getPanelContent()
        } else {
          this.openCurrent()
        }
        $.get("__insight__/panels_header?request_id=" + this.request_id, function(data) {
            $('ul.panels').html(data)
          })
      },
      openCurrent: function() {
        $('#rack-insight .panel_content').hide();
        this.current.show();
        this.open();<commit_msg>Make ajax requests to root<commit_after>var _$ = window.$;
jQuery.noConflict();
jQuery(function($) {
    function Insight() {
      this.current = null
      this.request_id = null
      this.panel_id = null
    }

    Insight.prototype = {
      switchCurrentPanel: function() {
        if(this.request_id && this.panel_id) {
          this.current = $('#rack-insight #request_' + this.request_id + ' #' + this.panel_id)
        }
      },
      getPanelContent: function() {
        $.get("/__insight__/panels_content?request_id=" + this.request_id, function(data) {
            $('#rack-insight').append(data)
            $.insight.switchCurrentPanel()
            $.insight.openCurrent()
          })
      },
      toggleCurrent: function() {
        if(this.current) {
          if (this.current.is(':visible')) {
            $(document).trigger('close.insight');
          } else {
            this.openCurrent()
          }
        }
      },
      changeRequest: function(req_number) {
        $(document).trigger('close.insight')
        this.request_id = req_number
        this.switchCurrentPanel()
        if(this.current.length <= 0) {
          this.getPanelContent()
        } else {
          this.openCurrent()
        }
        $.get("/__insight__/panels_header?request_id=" + this.request_id, function(data) {
            $('ul.panels').html(data)
          })
      },
      openCurrent: function() {
        $('#rack-insight .panel_content').hide();
        this.current.show();
        this.open();
{'fraction_non_alphanumeric': 0.1506442021803766, 'fraction_numerical': 0.0006607201850016518, 'mean_word_length': 1.9657198824681685, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6430984', 'n_tokens_mistral': 900, 'n_tokens_neox': 890, 'n_words': 121}