<commit_before>Application.Directives.directive('homeProcesses', homeProcessesDirective);
function homeProcessesDirective() {
    return {
        restrict: "EA",
        controller: 'homeProcessesDirectiveController',
        scope: {
            project: '=project'
        },
        templateUrl: 'application/core/projects/project/home/directives/home-processes.html'
    };
}

Application.Controllers.controller("homeProcessesDirectiveController",
    ["$scope", "pubsub",
        homeProcessesDirectiveController]);
function homeProcessesDirectiveController($scope, pubsub) {
    function segmentProcesses() {
        $scope.bk = {all: []};
        $scope.project.drafts.forEach(function (draft) {
            $scope.bk.all.push(draft);
        });
        $scope.project.processes.forEach(function (process) {
            $scope.bk.all.push(process);
        });

        var columnDefs = [
            {
                displayName: "",
                field: "name",
                width: 300,
                template: '<span ng-bind="data.name"></span>' +
                '<p><small><small  class="text-muted">{{data.mtime | toDateString}}</small></small></p>',
                cellStyle: {border: 0}
            },
            {
                displayName: "",
                field: "owner",
                width: 300,
                template: '<span ng-bind="data.owner"></span>',
                cellStyle: {border: 0}
            },
            {displayName: "", field: "", width: 300, cellStyle: {border: 0}}
        ];
        var rowData = [];
        $scope.project.processes.forEach(function (process) {
            rowData.push({name: process.name, owner: process.owner, mtime: process.mtime});
        });
        $scope.gridOptions = {
            columnDefs: columnDefs,
            rowData: rowData,
            enableColResize: true,
            headerHeight: 0,
            rowHeight: 60,<commit_msg>Sort by process name.<commit_after>Application.Directives.directive('homeProcesses', homeProcessesDirective);
function homeProcessesDirective() {
    return {
        restrict: "EA",
        controller: 'homeProcessesDirectiveController',
        scope: {
            project: '=project'
        },
        templateUrl: 'application/core/projects/project/home/directives/home-processes.html'
    };
}

Application.Controllers.controller("homeProcessesDirectiveController",
    ["$scope", "pubsub", "$filter", homeProcessesDirectiveController]);
function homeProcessesDirectiveController($scope, pubsub, $filter) {
    function segmentProcesses() {
        $scope.bk = {all: []};
        $scope.project.drafts.forEach(function (draft) {
            $scope.bk.all.push(draft);
        });
        $scope.project.processes.forEach(function (process) {
            $scope.bk.all.push(process);
        });

        var columnDefs = [
            {
                displayName: "",
                field: "name",
                width: 300,
                template: '<span ng-bind="data.name"></span>' +
                '<p><small><small  class="text-muted">{{data.mtime | toDateString}}</small></small></p>',
                cellStyle: {border: 0}
            },
            {
                displayName: "",
                field: "owner",
                width: 300,
                template: '<span ng-bind="data.owner"></span>',
                cellStyle: {border: 0}
            },
            {displayName: "", field: "", width: 300, cellStyle: {border: 0}}
        ];
        var rowData = [];
        var processes = $filter('orderBy')($scope.project.processes, 'name');
        processes.forEach(function (process) {
            rowData.push({name: process.name, owner: process.owner, mtime: process.mtime});
        });
        $scope.gridOptions = {
            columnDefs: columnDefs,
            rowData: rowData,
            enableColResize: true,
            headerHeight: 0,
            rowHeight: 60,
{'fraction_non_alphanumeric': 0.14061312389156322, 'fraction_numerical': 0.007600709399543958, 'mean_word_length': 1.95952023988006, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '2896145', 'n_tokens_mistral': 1110, 'n_tokens_neox': 1061, 'n_words': 180}