<commit_before>ds.actions.register('presentation-actions', [
  ds.models.action({
    name:    'time-spans',
    display: 'View across time spans...',
    icon:    'fa fa-clock-o',
    hide: ds.app.Mode.TRANSFORM,
    handler: function(action, item) {
      ds.manager.apply_transform(ds.models.transform.TimeSpans(), item)
    }
  }),
  ds.models.action({
    name:    'time-shifts',
    display: 'Time shift...',
    icon:    'fa fa-clock-o',
    hide: ds.app.Mode.TRANSFORM,
    handler: function(action, item) {
      ds.manager.apply_transform(ds.models.transform.TimeShift(), item)
    }
  }),
  ds.models.action({
    name:    'isolate',
    display: 'Isolate...',
    icon:    'fa fa-eye',
    hide: ds.app.Mode.TRANSFORM,
    handler: function(action, item) {
      ds.manager.apply_transform(ds.models.transform.Isolate(), item)
    }
  }),
  ds.models.action({
    hide: ds.app.Mode.TRANSFORM,
    divider: true
  }),
  ds.models.action({
    name:    'open-in-graphite',
    display: 'Open in Graphite...',
    icon:    'fa fa-bar-chart-o',
    handler: function(action, item) {
      var composer_url = ds.charts.graphite.composer_url(item, { showTitle: true });
      window.open(composer_url);
    }
  }),
  ds.models.action({
    name:    'export-png',
    display: 'Export PNG...',
    icon:    'fa fa-picture-o',
    handler: function(action, item) {
      var image_url = ds.charts.graphite.chart_url(item, { showTitle: true });
      window.open(image_url);
    }
  }),
  ds.models.action({
    name:    'export-png',
    display: 'Export SVG...',
    icon:    'fa fa-code',
    handler: function(action, item) {
      var image_url = ds.charts.graphite.chart_url(item, { showTitle: true, format: 'svg' });
      window.open(image_url);
    }
  }),
  ds.models.action({
    name:    'export-csv',
    display: 'Export CSV...',
    icon:    'fa fa-table',
    handler: function(action, item) {
      var image_url = ds.charts.graphite.chart_url(item, { showTitle: true, format: 'csv' });
      window.open(image_url);
    }
  })
])

$(document).on('click', 'ul.ds-action-menu li', function(event) {

  var presentation_id = $(this).parent().parent().parent().parent().parent()[0].id;
  var item = ds.manager.current.dashboard.get_item(presentation_id);

  var action = ds.actions.get('presentation-actions', this.getAttribute('data-ds-action'))
  action.handler(action, item)

  /* prevents resetting scroll position */
  return false
});<commit_msg>Update export icons<commit_after>ds.actions.register('presentation-actions', [
  ds.models.action({
    name:    'time-spans',
    display: 'View across time spans...',
    icon:    'fa fa-clock-o',
    hide: ds.app.Mode.TRANSFORM,
    handler: function(action, item) {
      ds.manager.apply_transform(ds.models.transform.TimeSpans(), item)
    }
  }),
  ds.models.action({
    name:    'time-shifts',
    display: 'Time shift...',
    icon:    'fa fa-clock-o',
    hide: ds.app.Mode.TRANSFORM,
    handler: function(action, item) {
      ds.manager.apply_transform(ds.models.transform.TimeShift(), item)
    }
  }),
  ds.models.action({
    name:    'isolate',
    display: 'Isolate...',
    icon:    'fa fa-eye',
    hide: ds.app.Mode.TRANSFORM,
    handler: function(action, item) {
      ds.manager.apply_transform(ds.models.transform.Isolate(), item)
    }
  }),
  ds.models.action({
    hide: ds.app.Mode.TRANSFORM,
    divider: true
  }),
  ds.models.action({
    name:    'open-in-graphite',
    display: 'Open in Graphite...',
    icon:    'fa fa-bar-chart-o',
    handler: function(action, item) {
      var composer_url = ds.charts.graphite.composer_url(item, { showTitle: true });
      window.open(composer_url);
    }
  }),
  ds.models.action({
    name:    'export-png',
    display: 'Export PNG...',
    icon:    'fa fa-file-image-o',
    handler: function(action, item) {
      var image_url = ds.charts.graphite.chart_url(item, { showTitle: true });
      window.open(image_url);
    }
  }),
  ds.models.action({
    name:    'export-svg',
    display: 'Export SVG...',
    icon:    'fa fa-file-code-o',
    handler: function(action, item) {
      var image_url = ds.charts.graphite.chart_url(item, { showTitle: true, format: 'svg' });
      window.open(image_url);
    }
  }),
  ds.models.action({
    name:    'export-csv',
    display: 'Export CSV...',
    icon:    'fa fa-file-excel-o',
    handler: function(action, item) {
      var image_url = ds.charts.graphite.chart_url(item, { showTitle: true, format: 'csv' });
      window.open(image_url);
    }
  })
])

$(document).on('click', 'ul.ds-action-menu li', function(event) {

  var presentation_id = $(this).parent().parent().parent().parent().parent()[0].id;
  var item = ds.manager.current.dashboard.get_item(presentation_id);

  var action = ds.actions.get('presentation-actions', this.getAttribute('data-ds-action'))
  action.handler(action, item)

  /* prevents resetting scroll position */
  return false
});
{'fraction_non_alphanumeric': 0.17355371900826447, 'fraction_numerical': 0.00040314452731304173, 'mean_word_length': 2.870514820592824, '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': '6015104', 'n_tokens_mistral': 1713, 'n_tokens_neox': 1693, 'n_words': 310}