lib/pact_broker/ui/views/dashboard/show.haml in pact_broker-2.86.0 vs lib/pact_broker/ui/views/dashboard/show.haml in pact_broker-2.87.0

- old
+ new

@@ -83,13 +83,13 @@ = index_item.display_consumer_version_number - if index_item.display_consumer_version_number %button.clippy.invisible{ title: "Copy to clipboard" } %span.copy-icon - if view == "branch" || view == "all" - - index_item.consumer_version_branches.each do | branch_name | - %div{"class": "tag badge badge-dark"} - = "branch: " + branch_name + - index_item.consumer_version_branch_heads.each do | branch_head | + %div{"class": "tag badge badge-dark", "title": branch_head.tooltip, "data-toggle": "tooltip", "data-placement": "right"} + = "branch: " + branch_head.branch_name - if view == "tag" || view == "all" - index_item.consumer_version_latest_tag_names.each do | tag_name | .tag.badge.badge-primary = "tag: " + tag_name - if view == "environment" || view == "all" @@ -104,13 +104,13 @@ = index_item.display_provider_version_number - if index_item.display_provider_version_number %button.clippy.invisible{ title: "Copy to clipboard" } %span.copy-icon - if view == "branch" || view == "all" - - index_item.provider_version_branches.each do | branch_name | - %div{"class": "tag badge badge-dark"} - = "branch: " + branch_name + - index_item.provider_version_branch_heads.each do | branch_head | + %div{"class": "tag badge badge-dark", "title": branch_head.tooltip, "data-toggle": "tooltip", "data-placement": "right"} + = "branch: " + branch_head.branch_name - if view == "tag" || view == "all" - index_item.provider_version_latest_tag_names.each do | tag_name | .tag.badge.badge-primary = "tag: " + tag_name - if view == "environment" || view == "all" @@ -157,11 +157,18 @@ $("span.pact a").load("#{base_url}/images/doc-text.svg"); $("span.pact-matrix a").load("#{base_url}/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 - $(td).tooltip({container: $(td).first()}); + $(td).tooltip({ container: $(td).first() }); }); + + // https://www.w3schools.com/bootstrap/bootstrap_ref_js_tooltip.asp + + $('div[data-toggle="tooltip"]').each(function(index, div){ + $(div).tooltip() + }); + }); $(".reset-search").on("click", function() { const url = new URL(window.location) url.searchParams.delete('search')