<commit_before>%body
  = render :haml, :'index/_css_and_js', :layout => false
  .container
    = render :haml, :'index/_navbar', :layout => false, locals: {tag_toggle: false}
    - if index_items.empty?
      = render :haml, :'index/_getting-started', :layout => false
    %h1.page-header
      Pacts
    %table.table.table-bordered.table-striped{ id: 'relationships' }
      %thead
        %tr
          %th.consumer
            Consumer
            %span.glyphicon.glyphicon-sort.relationships-sort
          %th.consumer-version-number
            Consumer<br>Version
            %span.glyphicon.glyphicon-sort.relationships-sort
          %th.pact{ style: 'width: 40px' }
          %th.provider
            Provider
            %span.glyphicon.glyphicon-sort.relationships-sort
          %th.provider-version-number
            Provider<br>Version
            %span.glyphicon.glyphicon-sort.relationships-sort
          %th
            Published
            %span.glyphicon.glyphicon-sort.relationships-sort
          %th
            Webhook<br>status
          %th
            Last<br>verified
            %span.glyphicon.glyphicon-sort.relationships-sort
          %th
      %tbody

        - index_items.each do | index_item |
          %tr
            %td.consumer
              %a{:href => index_item.consumer_group_url }
                = escape_html(index_item.consumer_name)
            %td.consumer-version-number
              %div
                = escape_html(index_item.consumer_version_number)
              - if index_item.latest?
                .tag.label.label-success
                  latest
              - index_item.consumer_version_latest_tag_names.each do | tag_name |
                .tag.label.label-primary
                  = escape_html(tag_name)
            %td.pact
              %span.pact
                %a{ href: index_item.pact_url, title: "View pact" }
              %span.pact-matrix
                %a{ href: index_item.pact_matrix_url, title: "View pact matrix" }
            %td.provider
              %a{ href: index_item.provider_group_url }
                = escape_html(index_item.provider_name)
            %td.provider-version-number
              %div
                = escape_html(index_item.provider_version_number)
              - index_item.provider_version_latest_tag_names.each do | tag_name |
                .tag.label.label-primary
                  = escape_html(tag_name)
            %td
              = index_item.publication_date_of_latest_pact.gsub("about ", "")
            %td{ class: index_item.webhook_status }
              - if index_item.show_webhook_status?
                %a{ href: index_item.webhook_url }
                  = index_item.webhook_label

            %td{ class: index_item.verification_status, title: index_item.verification_tooltip, "data-toggle": "tooltip", "data-placement": "left" }
              %div
                = index_item.last_verified_date.gsub("about ", "")
                - if index_item.warning?
                  %span.glyphicon.glyphicon-warning-sign{ 'aria-hidden': true }
            %td
              - if index_item.show_settings?
                %span.integration-settings.glyphicon.glyphicon-option-horizontal{ 'aria-hidden': true, 'data-pact-versions-url': index_item.pact_versions_url, 'data-consumer-name': index_item.consumer_name, 'data-provider-name': index_item.provider_name}
    %div.relationships-size
      = index_items.size_label

  :javascript
    $(function(){
      $("#relationships").tablesorter();
    });

    $(document).ready(function(){
      $("span.pact a").load("/images/doc-text.svg");
      $("span.pact-matrix a").load("/images/doc-matrix.svg");
      $('td[data-toggle="tooltip"]').each(function(index, td){
        //appended tooltip div screws up table if it's appended after a
        //td, so need to append it to a div<commit_msg>chore: make menus work for the show-with-tags index view<commit_after>%body
  = render :haml, :'index/_css_and_js', :layout => false
  .container
    = render :haml, :'index/_navbar', :layout => false, locals: {tag_toggle: false}
    - if index_items.empty?
      = render :haml, :'index/_getting-started', :layout => false
    %h1.page-header
      Pacts
    %table.table.table-bordered.table-striped{ id: 'relationships' }
      %thead
        %tr
          %th.consumer
            Consumer
            %span.glyphicon.glyphicon-sort.relationships-sort
          %th.consumer-version-number
            Consumer<br>Version
            %span.glyphicon.glyphicon-sort.relationships-sort
          %th.pact{ style: 'width: 40px' }
          %th.provider
            Provider
            %span.glyphicon.glyphicon-sort.relationships-sort
          %th.provider-version-number
            Provider<br>Version
            %span.glyphicon.glyphicon-sort.relationships-sort
          %th
            Published
            %span.glyphicon.glyphicon-sort.relationships-sort
          %th
            Webhook<br>status
          %th
            Last<br>verified
            %span.glyphicon.glyphicon-sort.relationships-sort
          %th
      %tbody

        - index_items.each do | index_item |
          %tr{'data-pact-versions-url': index_item.pact_versions_url, 'data-consumer-name': index_item.consumer_name, 'data-provider-name': index_item.provider_name, 'data-integration-url': index_item.integration_url}
            %td.consumer
              %a{:href => index_item.consumer_group_url }
                = escape_html(index_item.consumer_name)
            %td.consumer-version-number
              %div
                = escape_html(index_item.consumer_version_number)
              - if index_item.latest?
                .tag.label.label-success
                  latest
              - index_item.consumer_version_latest_tag_names.each do | tag_name |
                .tag.label.label-primary
                  = escape_html(tag_name)
            %td.pact
              %span.pact
                %a{ href: index_item.pact_url, title: "View pact" }
              %span.pact-matrix
                %a{ href: index_item.pact_matrix_url, title: "View pact matrix" }
            %td.provider
              %a{ href: index_item.provider_group_url }
                = escape_html(index_item.provider_name)
            %td.provider-version-number
              %div
                = escape_html(index_item.provider_version_number)
              - index_item.provider_version_latest_tag_names.each do | tag_name |
                .tag.label.label-primary
                  = escape_html(tag_name)
            %td
              = index_item.publication_date_of_latest_pact.gsub("about ", "")
            %td{ class: index_item.webhook_status }
              - if index_item.show_webhook_status?
                %a{ href: index_item.webhook_url }
                  = index_item.webhook_label

            %td{ class: index_item.verification_status, title: index_item.verification_tooltip, "data-toggle": "tooltip", "data-placement": "left" }
              %div
                = index_item.last_verified_date.gsub("about ", "")
                - if index_item.warning?
                  %span.glyphicon.glyphicon-warning-sign{ 'aria-hidden': true }
            %td
              - if index_item.show_settings?
                %span.integration-settings.glyphicon.glyphicon-option-horizontal{ 'aria-hidden': true }
    %div.relationships-size
      = index_items.size_label

  :javascript
    $(function(){
      $("#relationships").tablesorter();
    });

    $(document).ready(function(){
      $("span.pact a").load("/images/doc-text.svg");
      $("span.pact-matrix a").load("/images/doc-matrix.svg");
      $('td[data-toggle="tooltip"]').each(function(index, td){
        //appended tooltip div screws up table if it's appended after a
        //td, so need to append it to a div
{'fraction_non_alphanumeric': 0.11205800050877639, 'fraction_numerical': 0.0007631645891630628, 'mean_word_length': 1.8950662739322532, 'pattern_counts': {'":': 4, '<': 11, '<?xml version=': 0, '>': 19, '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': '2396652', 'n_tokens_mistral': 2403, 'n_tokens_neox': 2257, 'n_words': 358}