<commit_before>module ngApp.projects.models {
    import TableiciousConfig = ngApp.components.tables.directives.tableicious.TableiciousConfig;
    import TableiciousEntryDefinition = ngApp.components.tables.directives.tableicious.TableiciousEntryDefinition;

    function getParticipantSref(data_type:string) {
        return function fileSref (field: TableiciousEntryDefinition, row: TableiciousEntryDefinition[], scope, $filter: ng.IFilterService) {
            var projectCode = _.find(row, function(elem) {
                return elem.id === 'code';
            }).val;

            var filter = $filter("makeFilter")([{name: 'participants.project.code', value: projectCode},{name: 'files.data_type', value: data_type}]);
            return "search.participants({ 'filters':"+filter+"})";
        }
    }

    var projectTableModel:TableiciousConfig = {
        title: 'Projects',
        order: ['code', 'primary_site', 'program', 'participants', 'disease_type', 'file_size', 'files', 'last_update'],
        headings: [
            {
                displayName: "Code",
                id: "code",
                enabled: true,
                sref: function (field, scope) {
                    var project_id = _.result(_.findWhere(scope, { 'id': 'project_id' }), 'val');
                    return "project({projectId:'" + project_id  + "'})";
                }
            },{
                displayName: "Disease Type",
                id: "disease_type",
                enabled: true
            },{
                displayName: "Primary Site",
                id: "primary_site",
                enabled: true
            }, {
                displayName: "Program",
                id: "program.name",
                enabled: true
            },
            {
                displayName: "Participants",
                id: "summary.participant_count",
                enabled: true,
                sref: function (field:TableiciousEntryDefinition,row:TableiciousEntryDefinition[], scope, $filter: ng.IFilterService) {
                    var disease_code = _.find(row,function(elem){
                        return elem.id === 'code';
                    }).val;
<commit_msg>chore(projects): add missing number filter<commit_after>module ngApp.projects.models {
    import TableiciousConfig = ngApp.components.tables.directives.tableicious.TableiciousConfig;
    import TableiciousEntryDefinition = ngApp.components.tables.directives.tableicious.TableiciousEntryDefinition;

    function getParticipantSref(data_type:string) {
        return function fileSref (field: TableiciousEntryDefinition, row: TableiciousEntryDefinition[], scope, $filter: ng.IFilterService) {
            var projectCode = _.find(row, function(elem) {
                return elem.id === 'code';
            }).val;

            var filter = $filter("makeFilter")([{name: 'participants.project.code', value: projectCode},{name: 'files.data_type', value: data_type}]);
            return "search.participants({ 'filters':"+filter+"})";
        }
    }

    var projectTableModel:TableiciousConfig = {
        title: 'Projects',
        order: ['code', 'primary_site', 'program', 'participants', 'disease_type', 'file_size', 'files', 'last_update'],
        headings: [
            {
                displayName: "Code",
                id: "code",
                enabled: true,
                sref: function (field, scope) {
                    var project_id = _.result(_.findWhere(scope, { 'id': 'project_id' }), 'val');
                    return "project({projectId:'" + project_id  + "'})";
                }
            },{
                displayName: "Disease Type",
                id: "disease_type",
                enabled: true
            },{
                displayName: "Primary Site",
                id: "primary_site",
                enabled: true
            }, {
                displayName: "Program",
                id: "program.name",
                enabled: true
            },
            {
                displayName: "Participants",
                id: "summary.participant_count",
                enabled: true,
                template: function (field:TableiciousEntryDefinition,row,scope, $filter) {
                    var summary:TableiciousEntryDefinition = _.find(row,function(x:TableiciousEntryDefinition){
                        return x.id === 'summary';
                    }).val;

                    return $filter("number")(summary && summary.participant_count ? summary.participant_count : 0);
                },
                sref: function (field:TableiciousEntryDefinition,row:TableiciousEntryDefinition[], scope, $filter: ng.IFilterService) {
                    var disease_code = _.find(row,function(elem){
                        return elem.id === 'code';
                    }).val;

{'fraction_non_alphanumeric': 0.12146250774633341, 'fraction_numerical': 0.0002065688907250568, 'mean_word_length': 1.8855780691299167, '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': '1778952', 'n_tokens_mistral': 1275, 'n_tokens_neox': 1194, 'n_words': 244}