<commit_before>﻿angular.module('webtools').controller('fmController', ['$scope', 'fmModel', 'fmService', '$interval', function ($scope, fmModel, fmService, $interval) {
    $scope.fmModel = fmModel;

    var intervalScanner;

    $scope.init = function () {
        fmService.getSettings();
        fmService.getSectionsList();

        $scope.scanStatus();
    }

    $scope.resetSettings = function () {
        fmService.resetSettings();
    }
    $scope.saveSettings = function () {
        fmService.setSettings();
    }

    $scope.scanStart = function (section) {
        fmModel.selectedSection = section;
        fmService.scanSection(fmModel.selectedSection.key);
    }

    $scope.scanStatus = function () {
        intervalScanner = $interval(function () {
            fmService.getStatus(function () {
                if (!fmModel.scanning) {
                    $interval.cancel(intervalScanner);
                }
            });
        }, 100);
    }

    $scope.scanResult = function () {
        fmService.getResult();
    }

    $scope.scanStop = function () {
        $interval.cancel(intervalScanner);
        fmService.abort();
    }

    $scope.init();
}]);<commit_msg>FM Forgot call to func...<commit_after>﻿angular.module('webtools').controller('fmController', ['$scope', 'fmModel', 'fmService', '$interval', function ($scope, fmModel, fmService, $interval) {
    $scope.fmModel = fmModel;

    var intervalScanner;

    $scope.init = function () {
        fmService.getSettings();
        fmService.getSectionsList();

        $scope.scanStatus();
    }

    $scope.resetSettings = function () {
        fmService.resetSettings();
    }
    $scope.saveSettings = function () {
        fmService.setSettings();
    }

    $scope.scanStart = function (section) {
        fmModel.selectedSection = section;
        fmService.scanSection(fmModel.selectedSection.key);

        $scope.scanStatus();
    }

    $scope.scanStatus = function () {
        intervalScanner = $interval(function () {
            fmService.getStatus(function () {
                if (!fmModel.scanning) {
                    $interval.cancel(intervalScanner);
                }
            });
        }, 100);
    }

    $scope.scanResult = function () {
        fmService.getResult();
    }

    $scope.scanStop = function () {
        $interval.cancel(intervalScanner);
        fmService.abort();
    }

    $scope.init();
}]);
{'fraction_non_alphanumeric': 0.14497528830313014, 'fraction_numerical': 0.002471169686985173, 'mean_word_length': 2.269179004037685, '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': '7133988', 'n_tokens_mistral': 724, 'n_tokens_neox': 670, 'n_words': 101}