<commit_before>- breadcrumb link_to "Gqueries", data_gqueries_path
- breadcrumb "GQL Search"

%section#search_box
  = form_tag data_gql_search_path, :method => :get do
    = label_tag "query"
    = search_field_tag :q, @q
    = submit_tag "Search"

- if @q
  %h3
    Total: #{pluralize(@gqueries.size + @inputs.size + @query_table_cells.size, 'result')} / 
    Inputs: #{pluralize @inputs.size, 'item'} /
    GQueries: #{pluralize @gqueries.size, 'item'} /
    QueryTableCells: #{pluralize @query_table_cells.size, 'item'}

- if @gqueries.any?
  %table
    %thead
      %tr
        %th{:colspan => 4} GQueries
      %tr
        %th Id
        %th Key
        %th Query
        %th Deprecated key
    %tbody
      - @gqueries.each do |g|
        %tr
          %td= link_to g.id, data_gquery_path(:id => g.id)
          %td= highlight(g.key, @q)
          %td= highlight(g.query, @q)
          %td= highlight(g.deprecated_key, @q)
- if @inputs.any?
  %table
    %thead
      %tr
        %th{:colspan => 8} Inputs
      %tr
        %th Id
        %th Key
        %th Start
        %th Min
        %th Max
        %th Attr_name<commit_msg>fixed gql search in admin section<commit_after>- breadcrumb link_to "Gqueries", data_gqueries_path
- breadcrumb "GQL Search"

%section#search_box
  = form_tag data_gql_search_path, :method => :get do
    = label_tag "query"
    = search_field_tag :q, @q
    = submit_tag "Search"

- if @q
  %h3
    Total: #{pluralize(@gqueries.size + @inputs.size + @query_table_cells.size, 'result')} /
    Inputs: #{pluralize @inputs.size, 'item'} /
    GQueries: #{pluralize @gqueries.size, 'item'} /
    QueryTableCells: #{pluralize @query_table_cells.size, 'item'}

- if @gqueries.any?
  %table
    %thead
      %tr
        %th{:colspan => 4} GQueries
      %tr
        %th Key
        %th Query
        %th Deprecated key
    %tbody
      - @gqueries.each do |g|
        %tr
          %td= link_to highlight(g.key, @q), data_gquery_path(:id => g.key)
          %td= highlight(g.query, @q)
          %td= highlight(g.deprecated_key, @q) if g.deprecated_key
- if @inputs.any?
  %table
    %thead
      %tr
        %th{:colspan => 8} Inputs
      %tr
        %th Id
        %th Key
        %th Start
        %th Min
        %th Max
        %th Attr_name
{'fraction_non_alphanumeric': 0.13406593406593406, 'fraction_numerical': 0.0026373626373626374, 'mean_word_length': 2.1832167832167833, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '1193566', 'n_tokens_mistral': 866, 'n_tokens_neox': 851, 'n_words': 200}