<commit_before>export default function(ngapp) {
    ngapp.directive('resolveModal', function () {
        return {
            restrict: 'E',
            templateUrl: 'directives/resolveModal.html',
            controller: 'resolveModalController',
            scope: false
        }
    });

    ngapp.controller('resolveModalController', function ($scope, errorsService, formUtils) {
        $scope.unfocusResolveModal = formUtils.unfocusModal($scope.toggleResolveModal);

        $scope.setError = function() {
            if ($scope.errorIndex >= $scope.errorsToResolve.length) {
                $scope.toggleResolveModal();
                return;
            }
            $scope.error = $scope.errorsToResolve[$scope.errorIndex];
            $scope.errorMessage = errorsService.getErrorMessage($scope.error);
            $scope.resolutions = errorsService.getErrorResolutions($scope.error);
            $scope.selectedIndex = $scope.resolutions.indexOf($scope.error.resolution);
        };

        $scope.selectResolution = function(resolution) {
            $scope.error.resolution = resolution;
            $scope.nextError();
        };

        $scope.nextError = function() {
            $scope.errorIndex++;
            $scope.setError();
        };

        $scope.previousError = function() {
            $scope.errorIndex--;
            $scope.setError();
        };
<commit_msg>hooked up some javascript so error group detail displays properly on the resolve modal<commit_after>export default function(ngapp) {
    ngapp.directive('resolveModal', function () {
        return {
            restrict: 'E',
            templateUrl: 'directives/resolveModal.html',
            controller: 'resolveModalController',
            scope: false
        }
    });

    ngapp.controller('resolveModalController', function ($scope, errorsService, xelibService, formUtils) {
        $scope.unfocusResolveModal = formUtils.unfocusModal($scope.toggleResolveModal);
        $scope.errorGroups = errorsService.errorGroups();

        $scope.setError = function() {
            if ($scope.errorIndex >= $scope.errorsToResolve.length) {
                $scope.toggleResolveModal();
                return;
            }
            $scope.error = $scope.errorsToResolve[$scope.errorIndex];
            $scope.group = $scope.errorGroups[$scope.error.group];
            $scope.resolutions = errorsService.getErrorResolutions($scope.error);
            $scope.selectedIndex = $scope.resolutions.indexOf($scope.error.resolution);
        };

        $scope.selectResolution = function(resolution) {
            $scope.error.resolution = resolution;
            $scope.nextError();
        };

        $scope.nextError = function() {
            $scope.errorIndex++;
            $scope.setError();
        };

        $scope.previousError = function() {
            $scope.errorIndex--;
            $scope.setError();
        };

{'fraction_non_alphanumeric': 0.12170940170940171, 'fraction_numerical': 0.0, 'mean_word_length': 2.1908396946564888, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4601736', 'n_tokens_mistral': 748, 'n_tokens_neox': 737, 'n_words': 114}