<commit_before>var urllistapp = '/api/listapp';
var urllistcount = 'api/countuser/';
var meotrics = new Vue({
    el: '#tabelapp',
        data: {
            listApp: []
        },
        created: function(){
            this.getListApp();
        },
        updated: function(){
            this.addCountUsertoList(0);
        },
        methods:{
            getListApp: function(){
                _self = this;
                this.$http.get(urllistapp).then((response) => {
                    // success callback
                        for(var i in response.body){
                            response.body[i]["countuser"] = 0;
                        }
                        _self.listApp = response.body;
            }, (response) => {
        // error callback
            })
            },
            addCountUsertoList : function(i){
                _self = this;
                var appid = _self.listApp[i].code;
                _self.getCountUserinMonth(appid,function(countuser){
                    _self.listApp[i]["countuser"] = countuser;
                    i++;
                    if(i < _self.listApp.length){
                        _self.addCountUsertoList(i);
                    }
                })

            },
            getCountUserinMonth: function(appid,callback){
                var now = new Date();
                var today = parseInt(now.getTime()/1000);
                var month = now.getMonth();
                var year = now.getYear();
                var firstMonth = parseInt(new Date(year.toString(),month.toString(),1)/1000);
                var url = urllistcount+appid+"/"+firstMonth+"/"+today;
                this.$http.get(url).then((response) => {
                    // success callback
                        callback(response.body);
                    }, (response) => {
                        callback(0);
                    // error callback
                })
            },
        }
})<commit_msg>fix time for admin<commit_after>var urllistapp = '/api/listapp';
var urllistcount = 'api/countuser/';
var meotrics = new Vue({
    el: '#tabelapp',
        data: {
            listApp: []
        },
        created: function(){
            this.getListApp();
        },
        updated: function(){
            this.addCountUsertoList(0);
        },
        methods:{
            getListApp: function(){
                _self = this;
                this.$http.get(urllistapp).then((response) => {
                    // success callback
                        for(var i in response.body){
                            response.body[i]["countuser"] = 0;
                        }
                        _self.listApp = response.body;
            }, (response) => {
        // error callback
            })
            },
            addCountUsertoList : function(i){
                _self = this;
                var appid = _self.listApp[i].code;
                _self.getCountUserinMonth(appid,function(countuser){
                    _self.listApp[i]["countuser"] = countuser;
                    i++;
                    if(i < _self.listApp.length){
                        _self.addCountUsertoList(i);
                    }
                })

            },
            getCountUserinMonth: function(appid,callback){
                var now = new Date();
                var today = parseInt(now.getTime()/1000);
                var month = now.getMonth();
                var year = now.getFullYear();
                var firstMonth = parseInt(new Date(year.toString(),month.toString(),1)/1000);
                console.log(firstMonth);
                var url = urllistcount+appid+"/"+firstMonth+"/"+today;
                this.$http.get(url).then((response) => {
                    // success callback
                        callback(response.body);
                    }, (response) => {
                        callback(0);
                    // error callback
                })
            },
        }
})
{'fraction_non_alphanumeric': 0.12112112112112113, 'fraction_numerical': 0.006006006006006006, 'mean_word_length': 1.114814814814815, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1191734', 'n_tokens_mistral': 1055, 'n_tokens_neox': 983, 'n_words': 170}