<commit_before>define([
  'angular',
  'bms.func',
  'bms.session',
  'bms.view',
  'bms.standalone.tabs',
  'ng-electron'
], function(angular, bms) {

  return angular.module('bms.standalone.ctrl.session', ['bms.session', 'bms.view', 'bms.standalone.tabs', 'ngElectron'])
    .controller('bmsSessionCtrl', ['$scope', '$rootScope', '$routeParams', '$location', 'electron', 'bmsViewService', 'bmsSessionService', 'bmsTabsService', 'bmsVisualizationService', 'bmsModalService',
      function($scope, $rootScope, $routeParams, $location, electron, bmsViewService, bmsSessionService, bmsTabsService, bmsVisualizationService, bmsModalService) {

        // Load session by id
        bmsModalService.loading("Initializing visualization ...");

        $scope.sessionId = $routeParams.sessionId;
        $scope.session = bmsSessionService.getSession($scope.sessionId); // Get fresh session instance
        $scope.id = bms.uuid(); // Visualization
        $scope.view = $scope.session.getView($scope.id); // Get fresh view instance

        bmsViewService.clearViews();
        $scope.views = bmsViewService.getViews();
        $scope.svgs = $scope.session.getSvgData();

        $scope.$watch(function() {
          return bmsViewService.getViews();
        }, function(newValue) {
          $scope.views = newValue;
        }, true);<commit_msg>added listener for log messages coming from groovy (server side)<commit_after>define([
  'angular',
  'bms.func',
  'bms.session',
  'bms.view',
  'bms.standalone.tabs',
  'bms.common',
  'bms.ws',
  'ng-electron'
], function(angular, bms) {

  return angular.module('bms.standalone.ctrl.session', ['bms.session', 'bms.view', 'bms.standalone.tabs', 'bms.common', 'bms.ws', 'ngElectron'])
    .controller('bmsSessionCtrl', ['$scope', '$rootScope', '$routeParams', '$location', 'electron', 'bmsViewService', 'bmsSessionService', 'bmsTabsService', 'bmsVisualizationService', 'bmsModalService', 'bmsErrorService', 'ws',
      function($scope, $rootScope, $routeParams, $location, electron, bmsViewService, bmsSessionService, bmsTabsService, bmsVisualizationService, bmsModalService, bmsErrorService, ws) {

        // Load session by id
        bmsModalService.loading("Initializing visualization ...");

        $scope.sessionId = $routeParams.sessionId;
        $scope.session = bmsSessionService.getSession($scope.sessionId); // Get fresh session instance
        $scope.id = bms.uuid(); // Visualization
        $scope.view = $scope.session.getView($scope.id); // Get fresh view instance

        bmsViewService.clearViews();
        $scope.views = bmsViewService.getViews();
        $scope.svgs = $scope.session.getSvgData();

        ws.on('log', function(msg) {
          console.log("Groovy logs", msg);
        });

        $scope.$watch(function() {
          return bmsViewService.getViews();
        }, function(newValue) {
          $scope.views = newValue;
        }, true);
{'fraction_non_alphanumeric': 0.15857826384142173, 'fraction_numerical': 0.0, 'mean_word_length': 3.690705128205128, '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': '6266976', 'n_tokens_mistral': 921, 'n_tokens_neox': 893, 'n_words': 163}