<commit_before>
        <div id="page-intro">
            <h2>Dispatchers</h2>
            <p>The dispatchers spawn an XMLRPC server per scan and provide statistics for all running server instances.<br/>
                This interface allows you to "Attach" to (see the output of), pause, resume and shutdown instances.
            </p>

            <form action="/dispatchers/edit" method="get">
                <input type="submit" value="Edit dispatchers" />
            </form>



        </div>
        <%= erb :flash, {:layout => false} %>

        <div style="display: none" id="dialog_log" title="Log">
            <div id="log_progress"></div>
            <pre id="log"></pre>
        </div>

        <% i = 0 %>
        <% stats.each_pair do |d_url, dispatcher_stats| %>
        <h2><%=show_dispatcher_line( dispatcher_stats )%></h2>
        <span class="notice"> <%=show_dispatcher_node_line( dispatcher_stats ) %></span>

        <br/><br/>


        <% if !dispatcher_stats['neighbours'].empty? %>
        <div style="display: none" id="dialog_neighbours_<%=i%>" title="Neighbours">
            <ul>
            <% dispatcher_stats['neighbours'].each do |neighbour| %>
            <li><%=neighbour%></li>
            <%end%>
            </ul>
        </div>

        <form style='display: inline' action="#" onsubmit="showDialog( '#dialog_neighbours_<%=i%>' ); return;" >
            <input type="submit" value="Show neighbours" />
        </form>
        <%end%>

        <form style='display: inline' action="#" onsubmit="showLog( '<%=d_url.gsub( 'https://', '' )%>' ); return;" >
            <input type="submit" value="Show log" />
        </form>

        <% i += 1 %>

        <%if !dispatcher_stats['running_jobs'].empty? %>
        <form style='display: inline' action="/dispatchers/<%=remove_proto( d_url.dup )%>/shutdown_all" method="post">
            <%= csrf_tag %>
            <input type="submit" value="Shutdown all" />
        </form>
        <%end%>

        <% if !dispatcher_stats['running_jobs'].empty? %>
        <table>
            <tr>
                <th>PID</th><commit_msg>\"shutdown all\" button now requires confirmation<commit_after>
        <div id="page-intro">
            <h2>Dispatchers</h2>
            <p>The dispatchers spawn an XMLRPC server per scan and provide statistics for all running server instances.<br/>
                This interface allows you to "Attach" to (see the output of), pause, resume and shutdown instances.
            </p>

            <form action="/dispatchers/edit" method="get">
                <input type="submit" value="Edit dispatchers" />
            </form>



        </div>
        <%= erb :flash, {:layout => false} %>

        <div style="display: none" id="dialog_log" title="Log">
            <div id="log_progress"></div>
            <pre id="log"></pre>
        </div>

        <% i = 0 %>
        <% stats.each_pair do |d_url, dispatcher_stats| %>
        <h2><%=show_dispatcher_line( dispatcher_stats )%></h2>
        <span class="notice"> <%=show_dispatcher_node_line( dispatcher_stats ) %></span>

        <br/><br/>


        <% if !dispatcher_stats['neighbours'].empty? %>
        <div style="display: none" id="dialog_neighbours_<%=i%>" title="Neighbours">
            <ul>
            <% dispatcher_stats['neighbours'].each do |neighbour| %>
            <li><%=neighbour%></li>
            <%end%>
            </ul>
        </div>

        <form style='display: inline' action="#" onsubmit="showDialog( '#dialog_neighbours_<%=i%>' ); return;" >
            <input type="submit" value="Show neighbours" />
        </form>
        <%end%>

        <form style='display: inline' action="#" onsubmit="showLog( '<%=d_url.gsub( 'https://', '' )%>' ); return;" >
            <input type="submit" value="Show log" />
        </form>

        <% i += 1 %>

        <%if !dispatcher_stats['running_jobs'].empty? %>
        <form style='display: inline' onsubmit="return confirm( 'Are you sure that you want to kill all running instances?' )" action="/dispatchers/<%=remove_proto( d_url.dup )%>/shutdown_all" method="post">
            <%= csrf_tag %>
            <input type="submit" value="Shutdown all" />
        </form>
        <%end%>

        <% if !dispatcher_stats['running_jobs'].empty? %>
        <table>
            <tr>
                <th>PID</th>
{'fraction_non_alphanumeric': 0.17467248908296942, 'fraction_numerical': 0.002757986669731096, 'mean_word_length': 2.17201166180758, 'pattern_counts': {'":': 0, '<': 123, '<?xml version=': 0, '>': 125, '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': '1773649', 'n_tokens_mistral': 1401, 'n_tokens_neox': 1287, 'n_words': 295}