<commit_before>%helper = app.helper
%datamgr = app.datamgr

%rebase("widget")

%impacts = impacts.values()
%in_pb = [i for i in impacts if i.state_id in [1, 2, 3]]

%if len(impacts) == 0:
<span> You don't have any business apps. Maybe you should define some?</span>
%end

%if len(impacts) !=0 and len(in_pb) == 0:
<span>No business impacts! Congrats.</span>
%else:
  <table class="table table-condensed" style="margin:0;">
    <tbody style="border: none;">
      %for impact in impacts:
      <tr>
        <td>
          <div class='img_status'>
          <span class="medium-pulse aroundpulse pull-left">
            %# " We put a 'pulse' around the elements if it's an important one "
            %if impact.business_impact > 2 and impact.state_id in [1, 2, 3]:
              <span class="medium-pulse pulse"></span>
            %end
            <img class="medium-pulse" src="{{helper.get_icon_state(impact)}}" />
          </span>
          </div>
        </td>
        
        <td style="font-size: x-small; font-weight: normal;">
          {{!helper.get_link(impact)}}
        </td>
        
        <td style="font-size: x-small; font-weight: normal; width: 10%;" class="background-{{impact.state.lower()}}">
          <span class='txt_status'> {{impact.state}}</span>
        </td>
        
        <td style="font-size: x-small; font-weight: normal; width: 15%;">
          %for j in range(0, impact.business_impact-2):
          <img src='/static/images/star.png' alt="star">
          %end
        </td>
      </tr>
      %end
    </tbody>
  </table>
%end<commit_msg>Cleaned Impacts widget in dashboard<commit_after>
%helper = app.helper

%rebase("widget")

%if not impacts:
   <span>No impacts!</span>
%else:
   <table class="table table-condensed">
      <tbody>
      %for imp_id in impacts:
      %impact = impacts[imp_id]
         <tr>
            <td class="align-center">
               {{! helper.get_fa_icon_state(obj=impact)}}
            </td>
        
            <td >
               <small>{{!helper.get_link(impact)}}</small>
            </td>
        
            <td class="hidden-sm hidden-xs hidden-md">
               <small>{{!helper.get_business_impact_text(impact.business_impact)}}</small>
            </td>
        
            <!--
            <td class="hidden-sm hidden-xs hidden-md font-{{impact.state.lower()}}" align="center">
               <small>{{impact.state}}</small>
            </td>
            -->
         </tr>
      %end
      </tbody>
   </table>
%end

{'fraction_non_alphanumeric': 0.16500597847748108, 'fraction_numerical': 0.006775607811877242, 'mean_word_length': 2.0095923261390887, 'pattern_counts': {'":': 0, '<': 54, '<?xml version=': 0, '>': 55, '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': '4035046', 'n_tokens_mistral': 835, 'n_tokens_neox': 794, 'n_words': 187}