<commit_before>-#
-# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
-# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
-# Created By: <EMAIL>
-# Maintained By: <EMAIL>
-#
!!! 5

%html{ lang:"en" }
  %head
    %meta{ content:"text/html; charset=utf-8", 'http-equiv':"Content-Type" }
    %meta{ charset:"utf-8" }
    %meta{ content: "width=device-width, initial-scale=1.0", name: "viewport" }
    -#FIXME: (?) META tags for author, description

    %title
      -block title
        Governance, Risk and Compliance

    -assets "dashboard-css"
      %link{ rel:'stylesheet', type:'text/css', href:"={ASSET_URL|with_static_subdomain}" }
    -endassets

    %script
      GGRC = window.GGRC || {};
      -include "scripts/tracker-prefix.js"
      window.st=Date.now();
      -block extra_javascript

    -assets "dashboard-js"
      %script{ type:'text/javascript', src:"={ASSET_URL|with_static_subdomain}" }
    -endassets

    :javascript
      GGRC.Tracker.timing("dashboard", "exec_scripts", Date.now() - st, "dashboard.js finished executing");
      window.st=Date.now();

    -assets "dashboard-js-templates"
      %script{ type:'text/javascript', src:"={ASSET_URL|with_static_subdomain}" }
    -endassets

    :javascript
      GGRC.Tracker.timing("dashboard", "load_templates", Date.now() - st, "dashboard-templates.js finished loading and executing");
      $(function() {
        $(function() {
          GGRC.Tracker.timing("dashboard", "exec_ready_handlers", Date.now() - st, "last document.ready handler fired");
        });
      })
      

    -#csrf_meta_tag

    %link{ 'href': '={ url_for("static", filename="favicon.ico") }', 'rel':'icon', 'type':'image/x-icon' }

    -# Google Web Font(s)
    -#NOTE: This resource occasionally hangs and prevents page from rendering, so loaded after the fact via jquery
    :javascript
      jQuery(function($) { $('head').append("<link href='https://fonts.googleapis.com/css?family=Titillium+Web' rel='stylesheet' type='text/css'></link>"); });
      window.onerror = function(message, url, linenumber) {
        if(window.$) {
          $(document.body).trigger("ajax:flash", {"error" : message});
        }
        if(window.GGRC && window.GGRC.Tracker) {
          GGRC.Tracker.exception(message + " (at " + url + ":" + linenumber + ")");
        }
      };

    -if config.get("GOOGLE_ANALYTICS_ID")
      :javascript<commit_msg>Adds back support for original window.onerror<commit_after>-#
-# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
-# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
-# Created By: <EMAIL>
-# Maintained By: <EMAIL>
-#
!!! 5

%html{ lang:"en" }
  %head
    %meta{ content:"text/html; charset=utf-8", 'http-equiv':"Content-Type" }
    %meta{ charset:"utf-8" }
    %meta{ content: "width=device-width, initial-scale=1.0", name: "viewport" }
    -#FIXME: (?) META tags for author, description

    %title
      -block title
        Governance, Risk and Compliance

    -assets "dashboard-css"
      %link{ rel:'stylesheet', type:'text/css', href:"={ASSET_URL|with_static_subdomain}" }
    -endassets

    %script
      GGRC = window.GGRC || {};
      -include "scripts/tracker-prefix.js"
      window.st=Date.now();
      -block extra_javascript

    -assets "dashboard-js"
      %script{ type:'text/javascript', src:"={ASSET_URL|with_static_subdomain}" }
    -endassets

    :javascript
      GGRC.Tracker.timing("dashboard", "exec_scripts", Date.now() - st, "dashboard.js finished executing");
      window.st=Date.now();

    -assets "dashboard-js-templates"
      %script{ type:'text/javascript', src:"={ASSET_URL|with_static_subdomain}" }
    -endassets

    :javascript
      GGRC.Tracker.timing("dashboard", "load_templates", Date.now() - st, "dashboard-templates.js finished loading and executing");
      $(function() {
        GGRC.Tracker.timing("dashboard", "exec_ready_handlers", Date.now() - st, "last document.ready handler fired");
      });

    -#csrf_meta_tag

    %link{ 'href': '={ url_for("static", filename="favicon.ico") }', 'rel':'icon', 'type':'image/x-icon' }

    -# Google Web Font(s)
    -#NOTE: This resource occasionally hangs and prevents page from rendering, so loaded after the fact via jquery
    :javascript
      jQuery(function($) { $('head').append("<link href='https://fonts.googleapis.com/css?family=Titillium+Web' rel='stylesheet' type='text/css'></link>"); });
      (function (win, doc, GGRC, $) {
        var originalError = win.onerror;
        win.onerror = function (message, url, linenumber) {
          if ($) {
            $(doc.body).trigger("ajax:flash", {"error" : message});
          }
          if (GGRC && GGRC.Tracker) {
            GGRC.Tracker.exception(message + " (at " + url + ":" + linenumber + ")");
          }
          originalError && originalError.apply(this, arguments);
        };
      })(window, document, window.GGRC, jQuery);

    -if config.get("GOOGLE_ANALYTICS_ID")
      :javascript
{'fraction_non_alphanumeric': 0.17035573122529643, 'fraction_numerical': 0.004347826086956522, 'mean_word_length': 3.168863261943987, 'pattern_counts': {'":': 2, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '1349798', 'n_tokens_mistral': 1672, 'n_tokens_neox': 1618, 'n_words': 337}