<commit_before>angular.module('voxityChromeApp').controller('devicesListCtrl', [
    '$scope', 'api', 'apiDevices', 'apiChannels', 'apiUsers',
    function ($scope, api, apiDevices, apiChannels, apiUsers) {
        $scope.loading = true;
        $scope.devices = [];
        $scope.errors = {err: false,mess:''};
        $scope.search = {};


        $scope.getClass = apiDevices.getIconClassStatus;
        $scope.getDescription = apiDevices.frDescription;
        $scope.getName = apiDevices.getName;

        $scope.init = function(){
            $scope.errors = {err: false,mess:''};
            $scope.loading = true;
            if (!api.token){
                return null;
            } else {
                apiDevices.get(function(err,devices){
                    if(err){
                        $scope.errors.err = true;
                        $scope.errors.mess = 'Une erreur est survenu lors du chargement des équipements. err' + err.status;
                    } else {
                        $scope.devices = devices;
                    }
                    $scope.loading = false;
                })
                apiUsers.getUser(function(err, usr){
                    $scope.user = usr;
                    console.log(usr)
                })
            }
        };$scope.init();

        $scope.call = function(exten){
            apiChannels.post(exten, function(err, data){

            })
        }

        $scope.$on('api:TOKEN_SET', $scope.init);
    }
])


angular.module('voxityChromeApp').controller('deviceCtrl', [
    '$scope', 'api', 'apiDevices', '$routeParams',
    function ($scope, api, apiDevices, $routeParams) {
        $scope.loading = true;
        $scope.device = null;
        $scope.errors = {err: false,mess:''};

        $scope.getClass = apiDevices.getIconClassStatus;
        $scope.getDescription = apiDevices.frDescription;
        $scope.getName = apiDevices.getName;
        $scope.getExten = apiDevices.getExten;<commit_msg>remove debug device<commit_after>angular.module('voxityChromeApp').controller('devicesListCtrl', [
    '$scope', 'api', 'apiDevices', 'apiChannels', 'apiUsers',
    function ($scope, api, apiDevices, apiChannels, apiUsers) {
        $scope.loading = true;
        $scope.devices = [];
        $scope.errors = {err: false,mess:''};
        $scope.search = {};


        $scope.getClass = apiDevices.getIconClassStatus;
        $scope.getDescription = apiDevices.frDescription;
        $scope.getName = apiDevices.getName;

        $scope.init = function(){
            $scope.errors = {err: false,mess:''};
            $scope.loading = true;
            if (!api.token){
                return null;
            } else {
                apiDevices.get(function(err,devices){
                    if(err){
                        $scope.errors.err = true;
                        $scope.errors.mess = 'Une erreur est survenu lors du chargement des équipements. err' + err.status;
                    } else {
                        $scope.devices = devices;
                    }
                    $scope.loading = false;
                })
                apiUsers.getUser(function(err, usr){
                    $scope.user = usr;
                })
            }
        };$scope.init();

        $scope.call = function(exten){
            apiChannels.post(exten, function(err, data){

            })
        }

        $scope.$on('api:TOKEN_SET', $scope.init);
    }
])


angular.module('voxityChromeApp').controller('deviceCtrl', [
    '$scope', 'api', 'apiDevices', '$routeParams',
    function ($scope, api, apiDevices, $routeParams) {
        $scope.loading = true;
        $scope.device = null;
        $scope.errors = {err: false,mess:''};

        $scope.getClass = apiDevices.getIconClassStatus;
        $scope.getDescription = apiDevices.frDescription;
        $scope.getName = apiDevices.getName;
        $scope.getExten = apiDevices.getExten;
{'fraction_non_alphanumeric': 0.13713561470215463, 'fraction_numerical': 0.0, 'mean_word_length': 1.776917663617171, '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': '6783731', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1107, 'n_words': 192}