<commit_before>'use strict';

angular.module('images', ['ngRoute'])

    .config(['$routeProvider', function ($routeProvider) {
        $routeProvider.when('/images', {
            templateUrl: 'app/images/images.html',
            controller: 'ImagesCtrl'
        });
    }])

    .controller('ImagesCtrl', ['$rootScope', '$scope', '$location', 'Images', function ($rootScope, $scope, $location, Images) {
        var images = Images.query(function () {
            $scope.images = images;
        });

        $scope.goImageDetails = function (path) {
            $location.path('/imageDetails/' + path);
        };
    }])
;<commit_msg>Adding empty host name protection to images<commit_after>'use strict';

angular.module('images', ['ngRoute'])

    .config(['$routeProvider', function ($routeProvider) {
        $routeProvider.when('/images', {
            templateUrl: 'app/images/images.html',
            controller: 'ImagesCtrl'
        });
    }])

    .controller('ImagesCtrl', ['$rootScope', '$scope', '$location', 'Helpers', 'Docker', function ($rootScope, $scope, $location, Helpers, Docker) {
        if (Helpers.isEmpty($rootScope.host)) {
            $location.path('/hosts');
        } else {
            //
            var images = Docker.images().query(function () {
                $scope.images = images;
            });

            $scope.goImageDetails = function (path) {
                $location.path('/imageDetails/' + path);
            };
        }
    }])
;
{'fraction_non_alphanumeric': 0.17461383478844864, 'fraction_numerical': 0.0, 'mean_word_length': 2.303769401330377, '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': '5175489', 'n_tokens_mistral': 410, 'n_tokens_neox': 398, 'n_words': 76}