<commit_before>ZBase.registerView((function() {

  var query_mgr;

  var load = function(path) {
    if (query_mgr) {
      query_mgr.closeAll();
    }

    query_mgr = EventSourceHandler();

    var page = $.getTemplate(
        "views/session_tracking",
        "zbase_session_tracking_main_tpl");

    var content = $.getTemplate(
        "views/session_tracking",
        "zbase_session_tracking_journey_viewer_tpl");

    var menu = SessionTrackingMenu(path);
    menu.render($(".zbase_content_pane .session_tracking_sidebar", page));

    $(".zbase_content_pane .session_tracking_content", page).appendChild(content);

    $.handleLinks(page);
    $.replaceViewport(page);

    var query = query_mgr.get(
        "journey_fetch",
        "/api/v1/events/scan?table=sessions&limit=10");

    query.addEventListener('result', function(e) {
      renderJourney(JSON.parse(e.data));
    });

    query.addEventListener('progress', function(e) {
      var loading_bar = $(".zbase_user_journey_viewer .journeys .loading_bar");
      console.log(e);
      if (JSON.parse(e.data).status == "finished") {
        query_mgr.close("journey_fetch");
        loading_bar.remove();
      }
    });
  };

  var destroy = function() {
    if (query_mgr) {
      query_mgr.closeAll();
    }
  };

  var renderJourney = function(data) {
    console.log(data);
    var journey = document.createElement("li");

    var time = document.createElement("span");
    time.classList.add("time");
    time.innerHTML =<commit_msg>journey viewer...<commit_after>ZBase.registerView((function() {

  var query_mgr;

  var load = function(path) {
    if (query_mgr) {
      query_mgr.closeAll();
    }

    query_mgr = EventSourceHandler();

    var page = $.getTemplate(
        "views/session_tracking",
        "zbase_session_tracking_main_tpl");

    var content = $.getTemplate(
        "views/session_tracking",
        "zbase_session_tracking_journey_viewer_tpl");

    var menu = SessionTrackingMenu(path);
    menu.render($(".zbase_content_pane .session_tracking_sidebar", page));

    $(".zbase_content_pane .session_tracking_content", page).appendChild(content);

    $.handleLinks(page);
    $.replaceViewport(page);

    var query = query_mgr.get(
        "journey_fetch",
        "/api/v1/events/scan?table=sessions&limit=100");

    query.addEventListener('result', function(e) {
      renderJourney(JSON.parse(e.data));
    });

    query.addEventListener('progress', function(e) {
      var loading_bar = $(".zbase_user_journey_viewer .journeys .loading_bar");
      console.log(e);
      if (JSON.parse(e.data).status == "finished") {
        query_mgr.close("journey_fetch");
        loading_bar.remove();
      }
    });
  };

  var destroy = function() {
    if (query_mgr) {
      query_mgr.closeAll();
    }
  };

  var renderJourney = function(data) {
    console.log(data);
    var journey = document.createElement("li");

    var time = document.createElement("span");
    time.classList.add("time");
    time.innerHTML =
{'fraction_non_alphanumeric': 0.14597815292949354, 'fraction_numerical': 0.0023171135385633896, 'mean_word_length': 3.191400832177531, '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': '11346', 'n_tokens_mistral': 982, 'n_tokens_neox': 959, 'n_words': 143}