<commit_before><template lang='jade'>
div
  h3 Select a dataset
  .txt--center.my2(v-if='datasetScanstate === "idle"')
    a.w100--s.btn--blue.scan-btn(href='#', v-on:click.prevent='scan') scan available data
  .txt--center.my2(v-if='datasetScanstate === "scanning"')
    spinner
  .my2(v-if='datasetScanstate === "scanned"')
    table.full
      thead
        tr
          th 
          th exchange
          th currency
          th asset
          th from
          th to
          th duration
      tbody
        tr(v-for='(set, i) in datasets')
          td.radio
            input(type='radio', name='dataset', :value='i', v-model='setIndex', v-bind:id='set.id')
          td 
            label(v-bind:for='set.id') {{ set.exchange }}
          td 
            label(v-bind:for='set.id') {{ set.currency }}
          td
            label(v-bind:for='set.id') {{ set.asset }}
          td 
            label(v-bind:for='set.id') {{ fmt(set.from) }}
          td 
            label(v-bind:for='set.id') {{ fmt(set.to) }}
          td
            label(v-bind:for='set.id') {{ humanizeDuration(set.to.diff(set.from)) }}
    em
      a(href='#', v-on:click.prevent='openRange', v-if='!rangeVisible') Adjust range
    template(v-if='rangeVisible')
      div
        label(for='customFrom') From:
        input(v-model='customFrom')
      div
        label(for='customTo') To:
        input(v-model='customTo')

</template>

<script>

import _ from 'lodash'
import Vue from 'vue'

import { post } from '../../../tools/ajax'
import spinner from '../../global/blockSpinner.vue'
import dataset from '../../global/mixins/dataset'

export default {
  components: {
    spinner
  },
  data: () => {
    return {
      setIndex: -1,
      customTo: false,
      customFrom: false,
      rangeVisible: false,
      set: false
    };<commit_msg>Add empty state to backfull no data. This felt clunky on first run<commit_after><template lang='jade'>
div
  h3 Select a dataset
  .txt--center.my2(v-if='datasetScanstate === "idle"')
    a.w100--s.btn--blue.scan-btn(href='#', v-on:click.prevent='scan') scan available data
  .txt--center.my2(v-if='datasetScanstate === "scanning"')
    spinner
  .my2(v-if='datasetScanstate === "scanned"')

    div(v-if='datasets.length != 0')
      table.full
        thead
          tr
            th 
            th exchange
            th currency
            th asset
            th from
            th to
            th duration
        tbody
          tr(v-for='(set, i) in datasets')
            td.radio
              input(type='radio', name='dataset', :value='i', v-model='setIndex', v-bind:id='set.id')
            td 
              label(v-bind:for='set.id') {{ set.exchange }}
            td 
              label(v-bind:for='set.id') {{ set.currency }}
            td
              label(v-bind:for='set.id') {{ set.asset }}
            td 
              label(v-bind:for='set.id') {{ fmt(set.from) }}
            td 
              label(v-bind:for='set.id') {{ fmt(set.to) }}
            td
              label(v-bind:for='set.id') {{ humanizeDuration(set.to.diff(set.from)) }}
      
      em
        a(href='#', v-on:click.prevent='openRange', v-if='!rangeVisible') Adjust range
      template(v-if='rangeVisible')
        div
          label(for='customFrom') From:
          input(v-model='customFrom')
        div
          label(for='customTo') To:
          input(v-model='customTo')

    em(v-else) No Data found 
      a(href='#/data/importer') Lets add some

</template>

<script>

import _ from 'lodash'
import Vue from 'vue'

import { post } from '../../../tools/ajax'
import spinner from '../../global/blockSpinner.vue'
import dataset from '../../global/mixins/dataset'

export default {
  components: {
    spinner
  },
  data: () => {
    return {
      setIndex: -1,
      customTo: false,
      customFrom: false,
      rangeVisible: false,
      set: false
    };
{'fraction_non_alphanumeric': 0.16466683686494765, 'fraction_numerical': 0.004340056165432729, 'mean_word_length': 1.910846953937593, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '2559574', 'n_tokens_mistral': 1278, 'n_tokens_neox': 1257, 'n_words': 254}