<commit_before>$(document).ready(function() {
  $.getJSON('https://status.app.dnt.no/api/v1/checks').done(status);

  var $panel = $('#panel');
  var $categories = {
    app: $('#apps'),
    service: $('#services'),
    payment: $('#payments'),
  };

  function status(data) {
    data.checks = data.checks.map(function(check) {
      check.class = check.status === 'up' ? 'operational' : 'major outage';
      check.text = check.status === 'up' ? 'operativ' : 'driftsavbrudd';
      check.category = check.tags.reduce(function(cat, tag) {
        switch (tag.name) {
          case 'payment':
            return 'payment';
          case 'service':
            return 'service';
          default:
            return cat;
        }
      }, 'app');

      // check time since last outage
      if (check.status === 'up' && Date.now() - (check.lasterrortime * 1000) <= 86400000) {
        check.class = 'degraded performance';
        check.text = 'ustabil';
      }

      return check;
    });

    var status = data.checks.reduce(function(status, check) {<commit_msg>Rename ustabil to degradert ytelse<commit_after>$(document).ready(function() {
  $.getJSON('https://status.app.dnt.no/api/v1/checks').done(status);

  var $panel = $('#panel');
  var $categories = {
    app: $('#apps'),
    service: $('#services'),
    payment: $('#payments'),
  };

  function status(data) {
    data.checks = data.checks.map(function(check) {
      check.class = check.status === 'up' ? 'operational' : 'major outage';
      check.text = check.status === 'up' ? 'operativ' : 'driftsavbrudd';
      check.category = check.tags.reduce(function(cat, tag) {
        switch (tag.name) {
          case 'payment':
            return 'payment';
          case 'service':
            return 'service';
          default:
            return cat;
        }
      }, 'app');

      // check time since last outage
      if (check.status === 'up' && Date.now() - (check.lasterrortime * 1000) <= 86400000) {
        check.class = 'degraded performance';
        check.text = 'degradert ytelse';
      }

      return check;
    });

    var status = data.checks.reduce(function(status, check) {
{'fraction_non_alphanumeric': 0.17419354838709677, 'fraction_numerical': 0.011981566820276499, 'mean_word_length': 2.3816199376947043, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5480778', 'n_tokens_mistral': 700, 'n_tokens_neox': 660, 'n_words': 141}