<commit_before><!-- Hosts table widget -->
%# embedded is True if the widget is got from an external application
%setdefault('embedded', False)
%from bottle import request
%setdefault('links', request.params.get('links', ''))
%setdefault('identifier', 'widget')
%setdefault('credentials', None)

%from alignak_webui.utils.helper import Helper
%from alignak_webui.objects.item_command import Command

%if not elements:
   <center>
      <h3>{{_('No hosts matching the filter...')}}</h3>
   </center>
%else:
   <table class="table table-condensed">
      <thead><tr>
         <th style="width: 40px"></th>
         <th>{{_('Host name')}}</th>
         <th>{{_('Business impact')}}</th>
         <th>{{_('Check command')}}</th>
      </tr></thead>
      <tbody>
         %for host in elements:
         <tr id="{{host.id}}">
            <td title="{{host.alias}}">
            %label = "%s - %s (%s)" % (host.status, Helper.print_duration(host.last_check, duration_only=True, x_elts=0), host.output)
            {{! host.get_html_state(text=None, title=label)}}
            </td>

            %if not embedded:
            <td>
               <small>{{! host.get_html_link(links)}}</small>
            </td>
            %else:
            <td>
               <small>{{! host.get_html_link(links) if links else host.alias}}</small>
            </td>
            %end

            <td>
               <small>{{! Helper.get_html_business_impact(host.business_impact)}}</small>
            </td>

            <td>
               %if host.check_command and host.check_command != 'command':
               <small>{{! host.check_command.get_html_link(links) if links else host.check_command.alias}}</small>
               %else:
               {{_('Command not fetched from the backend')}}
               %end
            </td>

            <td>
               %if current_user.is_power():
                  {{! Helper.get_html_commands_buttons(service, title='Buttons')}}
               %end
            </td>
         </tr><commit_msg>Add commands buttons in host view<commit_after><!-- Hosts table widget -->
%# embedded is True if the widget is got from an external application
%setdefault('embedded', False)
%from bottle import request
%setdefault('links', request.params.get('links', ''))
%setdefault('identifier', 'widget')
%setdefault('credentials', None)

%from alignak_webui.utils.helper import Helper
%from alignak_webui.objects.item_command import Command

%if not elements:
   <center>
      <h3>{{_('No hosts matching the filter...')}}</h3>
   </center>
%else:
   <table class="table table-condensed">
      <thead><tr>
         <th style="width: 40px"></th>
         <th>{{_('Host name')}}</th>
         <th>{{_('Business impact')}}</th>
         <th>{{_('Check command')}}</th>
      </tr></thead>
      <tbody>
         %for host in elements:
         <tr id="{{host.id}}">
            <td title="{{host.alias}}">
            %label = "%s - %s (%s)" % (host.status, Helper.print_duration(host.last_check, duration_only=True, x_elts=0), host.output)
            {{! host.get_html_state(text=None, title=label)}}
            </td>

            %if not embedded:
            <td>
               <small>{{! host.get_html_link(links)}}</small>
            </td>
            %else:
            <td>
               <small>{{! host.get_html_link(links) if links else host.alias}}</small>
            </td>
            %end

            <td>
               <small>{{! Helper.get_html_business_impact(host.business_impact)}}</small>
            </td>

            <td>
               %if host.check_command and host.check_command != 'command':
               <small>{{! host.check_command.get_html_link(links) if links else host.check_command.alias}}</small>
               %else:
               {{_('Command not fetched from the backend')}}
               %end
            </td>

            <td>
               %if current_user.is_power():
                  {{! Helper.get_html_commands_buttons(host, title='Buttons')}}
               %end
            </td>
         </tr>
{'fraction_non_alphanumeric': 0.16359616801768606, 'fraction_numerical': 0.0024563989191844758, 'mean_word_length': 2.0342771982116243, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 85, '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': '4902929', 'n_tokens_mistral': 1247, 'n_tokens_neox': 1194, 'n_words': 268}