<commit_before><script type="text/ecmascript-6">
    import moment from 'moment';
    import datePicker from 'vue-bootstrap-datetimepicker';


    export default {
        components: {datePicker},
        data() {
            return {
                start: null,
                end: null,
                show: false,
                max: moment().format('MM/DD/YYYY')
            }
        },
        created() {
            this.$http.get('/accountant/filters')
                .then(response => {
                    this.start = moment(response.data.start);
                    this.end = moment(response.data.end);
                });
        },
        methods: {
            applyFilter: function () {
                this.$http.post('/accountant/data', {
                    start: this.start.unix(),
                    end: this.end.unix()
                })
                    .then(response => {
                        this.setData(response.data);
                        this.toggle();
                    });
            },
            setData: function (data) {
                this.$parent.setData(data);
            },
            toggle: function () {
                this.show = !this.show;
            }
        },
        watch: {
            'end': function () {
                this.applyFilter();
            },
            'start': function () {
                this.applyFilter();
            }
        }
    }
</script>

<template>
    <div class="row data-actions" v-cloak>
        <div class="col-sm-4 col-sm-offset-8" v-if="show">
            <div class="col-sm-11">
                <div class="input-group"><commit_msg>reset the end date if any errors are thrown and remove the format from the max date<commit_after><script type="text/ecmascript-6">
    import moment from 'moment';
    import datePicker from 'vue-bootstrap-datetimepicker';


    export default {
        components: {datePicker},
        data() {
            return {
                start: null,
                end: null,
                show: false,
                max: moment()
            }
        },
        created() {
            this.$http.get('/accountant/filters')
                .then(response => {
                    this.start = moment(response.data.start);
                    this.end = moment(response.data.end);
                });
        },
        methods: {
            applyFilter: function () {
                this.$http.post('/accountant/data', {
                    start: this.start.unix(),
                    end: this.end.unix()
                })
                .then(response => {
                    this.setData(response.data);
                    this.toggle();
                })
                .catch(error => {
                    this.end = moment();
                });
            },
            setData: function (data) {
                this.$parent.setData(data);
            },
            toggle: function () {
                this.show = !this.show;
            }
        },
        watch: {
            'end': function () {
                this.applyFilter();
            },
            'start': function () {
                this.applyFilter();
            }
        }
    }
</script>

<template>
    <div class="row data-actions" v-cloak>
        <div class="col-sm-4 col-sm-offset-8" v-if="show">
            <div class="col-sm-11">
                <div class="input-group">
{'fraction_non_alphanumeric': 0.12947337794588304, 'fraction_numerical': 0.002909514111143439, 'mean_word_length': 1.0673481659651232, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 22, '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': '4247484', 'n_tokens_mistral': 903, 'n_tokens_neox': 851, 'n_words': 160}