<commit_before>var gems = angular.module('gems');

gems.controller('contentController', function ($scope, $http, $filter) {
    $scope.ContactGroups = {};

    $scope.group_id;

    $scope.sorting = {
        order: 'name',
        reverse: {
            name: false,
            createdOn: false,
            rules: false
        }
    }

    $scope.filteredGroups = [];
    $scope.pagedGroups = [];
    $scope.currentPage = 1;
    $scope.itemsPerPage = 10;
    $scope.maxSize = 6;

    $scope.setGroupId =  function setGroupId(id){
        $scope.group_id = id;
    }

    $scope.getContactGroups = function getContactGroups() {
        $http.get('/contactgroup/').
            success(function(data) {
                $scope.ContactGroups = data;
                $scope.search();
            }).
            error(function(data) {
                alert("failed to retreive data.");
            });
    };

    $scope.deleteContactGroup = function deleteContactGroup(){
        $http.post('/delete_contactgroup/', {group_id : $scope.group_id}).
            success(function(status){
                if(status  == "FAILED")<commit_msg>fixed the contact group fetching<commit_after>var gems = angular.module('gems');

gems.controller('contentController', function ($scope, $http, $filter) {
    $scope.ContactGroups = {};

    $scope.group_id;

    $scope.sorting = {
        order: 'name',
        reverse: {
            name: false,
            createdOn: false,
            rules: false
        }
    }

    $scope.filteredGroups = [];
    $scope.pagedGroups = [];
    $scope.currentPage = 1;
    $scope.itemsPerPage = 10;
    $scope.maxSize = 6;

    $scope.setGroupId =  function setGroupId(id){
        $scope.group_id = id;
    }

    $scope.getContactGroups = function getContactGroups() {
        $http.get('/contactgroup/?page_size=1000').
            success(function(data) {
                $scope.ContactGroups = data.results;
                $scope.search();
            }).
            error(function(data) {
                alert("failed to retreive data.");
            });
    };

    $scope.deleteContactGroup = function deleteContactGroup(){
        $http.post('/delete_contactgroup/', {group_id : $scope.group_id}).
            success(function(status){
                if(status  == "FAILED")
{'fraction_non_alphanumeric': 0.1404494382022472, 'fraction_numerical': 0.005185825410544511, 'mean_word_length': 1.9909560723514212, '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': '3819110', 'n_tokens_mistral': 691, 'n_tokens_neox': 652, 'n_words': 113}