<commit_before>= content_for :main_toolbar do
  Monitoring
= render partial: 'tabs', locals: { tab: 'overview' }

.overview
  .row
    .col-md-4
      %svg#States{style:"width:350px; height:350px;"}
      %span.help-block.pie-description
        All triggered alarms with there states.
    .col-md-4
      %svg#Alarm{style:"width:350px; height:350px;"}
      %span.help-block.pie-description
        All triggered alarms with severity in status alarm.
    .col-md-4
      %svg#Undetermined{style:"width:350px; height:350px;"}
      %span.help-block.pie-description
        All triggered alarms with severity in status undetermined (missing metrics data).

:javascript

  $(function() {
    render_overview_pie('States',#{@states_pie_data.to_json},#{@states_cnt});
    render_overview_pie('Alarm',#{@state_alarm_pie_data.to_json},#{@state_alarm_cnt});
    render_overview_pie('Undetermined',#{@state_undetermined_pie_data.to_json},#{@state_undetermined_cnt});
  });

  function render_overview_pie(TYPE,DATA,CNT,W,S) {
  
    var width =  W || 350;
    var height = W || 350;
    var scale =  S || 1;
  
    // from inner 0,5 (100%) to outer 1.05 (0%)
    // not used but maybe it is later userfull so I keep it here ;-)
    /*
    var multiplicator = 0.45 / CNT;
    var arcRadius = [];
    $.each(DATA, function(index, data) {
      var count = data['count'];
      var inner =  1-(multiplicator*count)
      arcRadius.push({inner: inner, outer:1.05});<commit_msg>adjust wording<commit_after>= content_for :main_toolbar do
  Monitoring
= render partial: 'tabs', locals: { tab: 'overview' }

.overview
  .row
    .col-md-4
      %svg#States{style:"width:350px; height:350px;"}
      %span.help-block.pie-description
        All triggered alarms by there states.
    .col-md-4
      %svg#Alarm{style:"width:350px; height:350px;"}
      %span.help-block.pie-description
        All triggered alarms by severity in status strong alarm.
    .col-md-4
      %svg#Undetermined{style:"width:350px; height:350px;"}
      %span.help-block.pie-description
        All triggered alarms by severity in status undetermined (missing metrics data).

:javascript

  $(function() {
    render_overview_pie('States',#{@states_pie_data.to_json},#{@states_cnt});
    render_overview_pie('Alarm',#{@state_alarm_pie_data.to_json},#{@state_alarm_cnt});
    render_overview_pie('Undetermined',#{@state_undetermined_pie_data.to_json},#{@state_undetermined_cnt});
  });

  function render_overview_pie(TYPE,DATA,CNT,W,S) {
  
    var width =  W || 350;
    var height = W || 350;
    var scale =  S || 1;
  
    // from inner 0,5 (100%) to outer 1.05 (0%)
    // not used but maybe it is later userfull so I keep it here ;-)
    /*
    var multiplicator = 0.45 / CNT;
    var arcRadius = [];
    $.each(DATA, function(index, data) {
      var count = data['count'];
      var inner =  1-(multiplicator*count)
      arcRadius.push({inner: inner, outer:1.05});
{'fraction_non_alphanumeric': 0.1432469304229195, 'fraction_numerical': 0.030013642564802184, 'mean_word_length': 3.384155455904335, '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': '1087702', 'n_tokens_mistral': 1072, 'n_tokens_neox': 976, 'n_words': 217}