<commit_before><%= select_tag :stats_query,
  options_for_select([["Select query ...","none"],
                      ["Content Statistics","contents"],
					  ["Activity Statistics","activity"],
					  ["Search Statistics","search"],
                      ["PALs", "pals"],
                      ["Administrators","admins"],
                      ["Invalid Users/Profiles", "invalid"],
                      ["Users Requiring Activation", "not_activated"],
                      ["Non-project Members", "projectless"],
                      ["Job queue","job_queue"],
                      ["Auth table consistency","auth_consistency"]
                     ],:length=>10),
    {:style=>"",
     :onchange=>remote_function(:url=>{:action=>"get_stats",:controller=>"admin",:element=>"stats_list"},
                                :with=>"'id='+this.value",
                                :update => {:success => 'stats_list'},
                                :success => "Element.show('stats_list'); new Effect.Highlight('stats_list', { duration: 1.0 });",
                                :loading => "Element.show('spinner');Element.hide('stats_list');Element.hide('refresh_button');",
                                :complete => "Element.hide('spinner');Element.show('stats_list');Element.show('refresh_button');"
                               )
     }
-%>

<%= link_to image('refresh'),
                   {:url=>{:action=>"get_stats",:controller=>"admin",:element=>"stats_list"},
                                                   :with=>"'id='+encodeURIComponent($F('stats_query'))",
                                                   :update => {:success => 'stats_list'},
                                                   :success => "Element.show('stats_list'); new Effect.Highlight('stats_list', { duration: 1.0 });",
                                                   :loading => "Element.show('spinner');Element.hide('stats_list');Element.hide('refresh_button');",
                                                   :complete => "Element.hide('spinner');Element.show('stats_list');Element.show('refresh_button');"},
                                                   {:id=>'refresh_button', :style=>'display:none;', :remote => true}
%>

<%= image_tag "ajax-loader.gif", :id => 'spinner', :style => 'display:none;' -%><br/>
<div id="stats_list">
</div><commit_msg>fix link_to which calls ajax on refresh image on stats on admin page<commit_after><%= select_tag :stats_query,
  options_for_select([["Select query ...","none"],
                      ["Content Statistics","contents"],
					  ["Activity Statistics","activity"],
					  ["Search Statistics","search"],
                      ["PALs", "pals"],
                      ["Administrators","admins"],
                      ["Invalid Users/Profiles", "invalid"],
                      ["Users Requiring Activation", "not_activated"],
                      ["Non-project Members", "projectless"],
                      ["Job queue","job_queue"],
                      ["Auth table consistency","auth_consistency"]
                     ],:length=>10),
    {:style=>"",
     :onchange=>remote_function(:url=>{:action=>"get_stats",:controller=>"admin",:element=>"stats_list"},
                                :with=>"'id='+this.value",
                                :update => {:success => 'stats_list'},
                                :success => "Element.show('stats_list'); new Effect.Highlight('stats_list', { duration: 1.0 });",
                                :loading => "Element.show('spinner');Element.hide('stats_list');Element.hide('refresh_button');",
                                :complete => "Element.hide('spinner');Element.show('stats_list');Element.show('refresh_button');"
                               )
     }
-%>


<%= link_to image('refresh'),"#",:id=>'refresh_button', :style=>'display:none;', :remote => true,
             :onclick=> remote_function(:url=>{:action=>"get_stats",:controller=>"admin",:element=>"stats_list"},
                                        :with=>"'id='+encodeURIComponent($F('stats_query'))",
                                        :update => {:success => 'stats_list'},
                                        :success => "Element.show('stats_list'); new Effect.Highlight('stats_list', { duration: 1.0 });",
                                        :loading => "Element.show('spinner');Element.hide('stats_list');Element.hide('refresh_button');",
                                        :complete => "Element.hide('spinner');Element.show('stats_list');Element.show('refresh_button');") %>

<%= image_tag "ajax-loader.gif", :id => 'spinner', :style => 'display:none;' -%><br/>
<div id="stats_list">
</div>
{'fraction_non_alphanumeric': 0.18229938598348508, 'fraction_numerical': 0.0025407579928011857, 'mean_word_length': 1.8595641646489105, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 72, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 17, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6622292', 'n_tokens_mistral': 1209, 'n_tokens_neox': 1127, 'n_words': 167}