<commit_before>(function () {
    'use strict';

    angular
        .module('jass.layout.controllers')
        .controller('RequestsController', RequestsController);

    RequestsController.$inject = ['$scope', '$location', 'InputRequests', 'RequestIcons', 'Snackbar'];

    function RequestsController($scope, $location, InputRequests, RequestIcons, Snackbar) {
        var vm = this;

        $scope.inputrequests = [];
        $scope.is_paginated = false;
        $scope.number_of_pages = 0;
        $scope.range = new Array(100);

        activate();

        function activate() {
            $scope.viewLoading = true;
            if ($location.path() == "/streamsenseevents") {
                InputRequests.all("ns_st_sp=1").then(inputrequestsSuccessFn, inputrequestsErrorFn);
            }
            else {
                InputRequests.all().then(inputrequestsSuccessFn, inputrequestsErrorFn);
            }

            function inputrequestsSuccessFn(response, status, headers, config) {
                $scope.viewLoading = false;

                var json_data = response.data;
                if (json_data.results !== undefined && json_data.count !== undefined) { // paginated data
                    $scope.is_paginated = true;
                    $scope.number_of_pages = json_data.count / json_data.results.length;
                    $scope.inputrequests = json_data.results;
                }
                else {
                    $scope.is_paginated = false;
                    $scope.number_of_pages = 0;
                    $scope.inputrequests = json_data;
                }

                var ws = new WebSocket('ws://127.0.0.1:8000/ws/ws1?subscribe-broadcast&echo');
                ws.onopen = function() {
                    console.log("websocket connected");
                };
                ws.onmessage = function(e) {
                    console.log("Received: " + e.data);
                    if (e.data !== "--heartbeat--") {
                        var newrequest = JSON.parse(e.data);
                        parseRequestURLArguments(newrequest);
                        if (newrequest['ns_st_ev'] !== undefined) {
                            $scope.inputrequests.unshift(newrequest);
                            $scope.$apply();
                        }
                    }<commit_msg>No need to filter out event more<commit_after>(function () {
    'use strict';

    angular
        .module('jass.layout.controllers')
        .controller('RequestsController', RequestsController);

    RequestsController.$inject = ['$scope', '$location', 'InputRequests', 'RequestIcons', 'Snackbar'];

    function RequestsController($scope, $location, InputRequests, RequestIcons, Snackbar) {
        var vm = this;

        $scope.inputrequests = [];
        $scope.is_paginated = false;
        $scope.number_of_pages = 0;
        $scope.range = new Array(100);

        activate();

        function activate() {
            $scope.viewLoading = true;
            if ($location.path() == "/streamsenseevents") {
                InputRequests.all("ns_st_sp=1").then(inputrequestsSuccessFn, inputrequestsErrorFn);
            }
            else {
                InputRequests.all().then(inputrequestsSuccessFn, inputrequestsErrorFn);
            }

            function inputrequestsSuccessFn(response, status, headers, config) {
                $scope.viewLoading = false;

                var json_data = response.data;
                if (json_data.results !== undefined && json_data.count !== undefined) { // paginated data
                    $scope.is_paginated = true;
                    $scope.number_of_pages = json_data.count / json_data.results.length;
                    $scope.inputrequests = json_data.results;
                }
                else {
                    $scope.is_paginated = false;
                    $scope.number_of_pages = 0;
                    $scope.inputrequests = json_data;
                }

                var ws = new WebSocket('ws://127.0.0.1:8000/ws/ws1?subscribe-broadcast&echo');
                ws.onopen = function() {
                    console.log("websocket connected");
                };
                ws.onmessage = function(e) {
                    console.log("Received: " + e.data);
                    if (e.data !== "--heartbeat--") {
                        var newrequest = JSON.parse(e.data);
                        parseRequestURLArguments(newrequest);
                        $scope.inputrequests.unshift(newrequest);
                        $scope.$apply();
                    }
{'fraction_non_alphanumeric': 0.1158443816561617, 'fraction_numerical': 0.00738969789176266, 'mean_word_length': 1.589758019133371, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6203340', 'n_tokens_mistral': 1221, 'n_tokens_neox': 1133, 'n_words': 199}