<commit_before>/ Copyright (c) 2012-2014 Epimorphics Ltd. Released under Apache License 2.0 http://www.apache.org/licenses/
%form.qonsole.form-inline{:role => "form", action: qonsole_rails.query_path}
  .col-md-12.well
    %h2 Example queries
    %ul.list-inline.examples
      = render_examples( @qconfig )

  .col-md-12.well.vertical
    %h2 Prefixes
    %ul.list-inline.prefixes
      = render_prefixes( @qconfig )
      %li.keep
        %button{type: :submit, title: "Add a SPARQL prefix", name: "add-prefix"}
          %i.fa.fa-plus

  .col-md-12.well
    .query-edit
      #query-edit-cm

    .query-chrome
      .row
        .form-group.col-md-2
          %label{:for => "sparqlEndpoint"} &nbsp;
          .dropdown
            %a.btn.btn-custom2{"data-toggle" => "dropdown", :href => "#"}
              Select endpoint
              %i.icon-collapse
            %ul.dropdown-menu.endpoints{"aria-labelledby" => "dropdownMenu1", :role => "menu"}
              = render_endpoints( @qconfig )
        .form-group.col-md-5
          .col-sm-8
            %label{:for => "sparqlEndpoint"} SPARQL endpoint
          %br
          .col-xs-12
            %input#sparqlEndpoint.form-control{:type => "text", style: "width: 100%", value: @qconfig.default_endpoint}/
        .form-group.col-md-2
          %label{:for => "displayFormat"}
            Results
            %br
          .dropdown
            %a.btn.btn-custom2.display-format{"data-toggle" => "dropdown", "data-value" => "tsv", :href => "#"}
              %span table
              %i.icon-collapse
            %ul.dropdown-menu.formats{"aria-labelledby" => "dropdownMenu2", :role => "menu"}
              %li{:role => "presentation"}
                %a{"data-value" => "tsv", :href => "#", :role => "menuitem", :tabindex => "-1"} table
              %li{:role => "presentation"}
                %a{"data-value" => "text", :href => "#", :role => "menuitem", :tabindex => "-1"} plain text
              %li{:role => "presentation"}
                %a{"data-value" => "json", :href => "#", :role => "menuitem", :tabindex => "-1"} JSON
              %li{:role => "presentation"}
                %a{"data-value" => "xml", :href => "#", :role => "menuitem", :tabindex => "-1"} XML
        .form-group.col-md-3
          %label
            &nbsp;
            %br
          %br
          %input.btn.btn-success.run-query.form-control{:href => "#", type: :submit, value: "perform query"}

  #results-block.row.sparql.sparql-results
    .col-md-12
      .well
        .row
          .col-md-12
            %span.loadingSpinner.hidden
              %img{:alt => "waiting for server action to complete", :src => "#{asset_path "qonsole_rails/wait30.gif"}"}/
            %span.timeTaken.hidden
        .row
          #results.col-md-12
            %h2.col-md-12 Query results

/ modal dialogue
#prefixEditor.modal.fade{"aria-hidden" => "true", "aria-labelledby" => "myModalLabel", :role => "dialog", :tabindex => "-1"}
  .modal-dialog
    .modal-content
      .modal-header
        %button.close{"aria-hidden" => "true", "data-dismiss" => "modal", :type => "button"} &times;
        %h4.modal-title Add a SPARQL prefix
      .modal-body
        %form.form-horizontal{:role => "form"}
          .form-group
            %label.col-lg-2.control-label{:for => "inputPrefix"} Prefix
            .col-lg-10
              %input#inputPrefix.form-control{:autofocus => "", :placeholder => "Prefix", :type => "text"}/
          .form-group
            .col-lg-offset-2.col-lg-10
              %button#lookupPrefix.btn.btn-sm.btn-primary
                Lookup
                %span
                on prefix.cc
          .form-group
            %label.col-lg-2.control-label{:for => "inputURI"} URI
            .col-lg-10
              %input#inputURI.form-control{:placeholder => "URI", :type => "text"}/
      .modal-footer
        %button.btn.btn-default{"data-dismiss" => "modal", :type => "button"} cancel
        %button#addPrefix.btn.btn-primary{"data-dismiss" => "modal", :type => "button"} add prefix

:javascript
  $( qonsole.init );
<commit_msg>Temporarily disabled the add prefix button until fully implemented<commit_after>/ Copyright (c) 2012-2014 Epimorphics Ltd. Released under Apache License 2.0 http://www.apache.org/licenses/
%form.qonsole.form-inline{:role => "form", action: qonsole_rails.query_path}
  .col-md-12.well
    %h2 Example queries
    %ul.list-inline.examples
      = render_examples( @qconfig )

  .col-md-12.well.vertical
    %h2 Prefixes
    %ul.list-inline.prefixes
      = render_prefixes( @qconfig )
      / %li.keep
      /   %button{type: :submit, title: "Add a SPARQL prefix", name: "add-prefix"}
      /     %i.fa.fa-plus

  .col-md-12.well
    .query-edit
      #query-edit-cm

    .query-chrome
      .row
        .form-group.col-md-2
          %label{:for => "sparqlEndpoint"} &nbsp;
          .dropdown
            %a.btn.btn-custom2{"data-toggle" => "dropdown", :href => "#"}
              Select endpoint
              %i.icon-collapse
            %ul.dropdown-menu.endpoints{"aria-labelledby" => "dropdownMenu1", :role => "menu"}
              = render_endpoints( @qconfig )
        .form-group.col-md-5
          .col-sm-8
            %label{:for => "sparqlEndpoint"} SPARQL endpoint
          %br
          .col-xs-12
            %input#sparqlEndpoint.form-control{:type => "text", style: "width: 100%", value: @qconfig.default_endpoint}/
        .form-group.col-md-2
          %label{:for => "displayFormat"}
            Results
            %br
          .dropdown
            %a.btn.btn-custom2.display-format{"data-toggle" => "dropdown", "data-value" => "tsv", :href => "#"}
              %span table
              %i.icon-collapse
            %ul.dropdown-menu.formats{"aria-labelledby" => "dropdownMenu2", :role => "menu"}
              %li{:role => "presentation"}
                %a{"data-value" => "tsv", :href => "#", :role => "menuitem", :tabindex => "-1"} table
              %li{:role => "presentation"}
                %a{"data-value" => "text", :href => "#", :role => "menuitem", :tabindex => "-1"} plain text
              %li{:role => "presentation"}
                %a{"data-value" => "json", :href => "#", :role => "menuitem", :tabindex => "-1"} JSON
              %li{:role => "presentation"}
                %a{"data-value" => "xml", :href => "#", :role => "menuitem", :tabindex => "-1"} XML
        .form-group.col-md-3
          %label
            &nbsp;
            %br
          %br
          %input.btn.btn-success.run-query.form-control{:href => "#", type: :submit, value: "perform query"}

  #results-block.row.sparql.sparql-results
    .col-md-12
      .well
        .row
          .col-md-12
            %span.loadingSpinner.hidden
              %img{:alt => "waiting for server action to complete", :src => "#{asset_path "qonsole_rails/wait30.gif"}"}/
            %span.timeTaken.hidden
        .row
          #results.col-md-12
            %h2.col-md-12 Query results

/ modal dialogue
#prefixEditor.modal.fade{"aria-hidden" => "true", "aria-labelledby" => "myModalLabel", :role => "dialog", :tabindex => "-1"}
  .modal-dialog
    .modal-content
      .modal-header
        %button.close{"aria-hidden" => "true", "data-dismiss" => "modal", :type => "button"} &times;
        %h4.modal-title Add a SPARQL prefix
      .modal-body
        %form.form-horizontal{:role => "form"}
          .form-group
            %label.col-lg-2.control-label{:for => "inputPrefix"} Prefix
            .col-lg-10
              %input#inputPrefix.form-control{:autofocus => "", :placeholder => "Prefix", :type => "text"}/
          .form-group
            .col-lg-offset-2.col-lg-10
              %button#lookupPrefix.btn.btn-sm.btn-primary
                Lookup
                %span
                on prefix.cc
          .form-group
            %label.col-lg-2.control-label{:for => "inputURI"} URI
            .col-lg-10
              %input#inputURI.form-control{:placeholder => "URI", :type => "text"}/
      .modal-footer
        %button.btn.btn-default{"data-dismiss" => "modal", :type => "button"} cancel
        %button#addPrefix.btn.btn-primary{"data-dismiss" => "modal", :type => "button"} add prefix

:javascript
  $( qonsole.init );

{'fraction_non_alphanumeric': 0.17541520184264758, 'fraction_numerical': 0.014062310583100982, 'mean_word_length': 1.9411764705882353, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 115, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '1887505', 'n_tokens_mistral': 2726, 'n_tokens_neox': 2633, 'n_words': 482}