<commit_before>ds.register_dashboard_item('comparison_summation_table', {

  constructor: function(data) {
    'use strict'

    var self = limivorous.observable()
                         .property('striped', {init: false})
                         .property('format', {init: ',.3s'})
                         .property('title')
                         .property('query2')
                         .extend(ds.models.item, {item_type: 'comparison_summation_table'})
                         .build()
    Object.defineProperty(self, 'requires_data', {value: true})

    if (data) {
      self.striped = data.striped !== false
      self.title = data.title
      self.format = data.format || self.format
      self.query2 = data.query2
    }
    ds.models.item.init(self, data)

    self.toJSON = function() {
      var data = ds.models.item.json(self)
      if (self.format)
        data.format = self.format
      if (self.striped)
        data.striped = self.striped
      if (self.title)
        data.title = self.title
      if (self.query2)
        data.query2 = self.query2
      return data
    }

    return self
  },

  data_handler: function(query, item) {
    var body = $('#' + item.item_id + ' tbody')
//    body.empty()
//    query.data.forEach(function(series) {
//      body.append(ds.templates.models.comparison_summation_table_row({series:series, item:item}))
//    })
  },

  template: ds.templates.models.comparison_summation_table,

  interactive_properties: [
    { id: 'striped', type: 'boolean' },
    'format',
    'title',
  ].concat(ds.models.item.interactive_properties)
})<commit_msg>Don't need 'height' property for table<commit_after>ds.register_dashboard_item('comparison_summation_table', {

  constructor: function(data) {
    'use strict'

    var self = limivorous.observable()
                         .property('striped', {init: false})
                         .property('format', {init: ',.3s'})
                         .property('title')
                         .property('query2')
                         .extend(ds.models.item, {item_type: 'comparison_summation_table'})
                         .build()
    Object.defineProperty(self, 'requires_data', {value: true})

    if (data) {
      self.striped = data.striped !== false
      self.title = data.title
      self.format = data.format || self.format
      self.query2 = data.query2
    }
    ds.models.item.init(self, data)

    self.toJSON = function() {
      var data = ds.models.item.json(self)
      if (self.format)
        data.format = self.format
      if (self.striped)
        data.striped = self.striped
      if (self.title)
        data.title = self.title
      if (self.query2)
        data.query2 = self.query2
      return data
    }

    return self
  },

  data_handler: function(query, item) {
    var body = $('#' + item.item_id + ' tbody')
//    body.empty()
//    query.data.forEach(function(series) {
//      body.append(ds.templates.models.comparison_summation_table_row({series:series, item:item}))
//    })
  },

  template: ds.templates.models.comparison_summation_table,

  interactive_properties: [
    { id: 'striped', type: 'boolean' },
    'format',
    'title',
    'query',
    { id: 'css_class', category: 'base' }
  ]
})
{'fraction_non_alphanumeric': 0.1401840490797546, 'fraction_numerical': 0.004294478527607362, 'mean_word_length': 2.1265580057526368, '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': '7387910', 'n_tokens_mistral': 1030, 'n_tokens_neox': 994, 'n_words': 177}