|
| 1 | +%body |
| 2 | + %link{rel: 'stylesheet', href: '/css/bootstrap.min.css'} |
| 3 | + %link{rel: 'stylesheet', href: '/stylesheets/relationships.css'} |
| 4 | + %script{type: 'text/javascript', src:'/javascripts/jquery-2.1.1.min.js'} |
| 5 | + %script{type: 'text/javascript', src:'/javascripts/jquery.tablesorter.min.js'} |
| 6 | + %script{type: 'text/javascript', src:'/js/bootstrap.min.js'} |
| 7 | + %nav.navbase-default.navbar-right{role: "navigation"} |
| 8 | + .container |
| 9 | + %ul |
| 10 | + %li.navbar-right |
| 11 | + %a{href: '/hal-browser/browser.html'} |
| 12 | + HAL Browser |
| 13 | + .container |
| 14 | + %h1.page-header |
| 15 | + Pacts |
| 16 | + %table.table.table-bordered.table-striped{id: 'relationships'} |
| 17 | + %thead |
| 18 | + %th.consumer |
| 19 | + Consumer |
| 20 | + %span.glyphicon.glyphicon-sort.relationships-sort |
| 21 | + %th.tag |
| 22 | + Version |
| 23 | + %span.glyphicon.glyphicon-sort.relationships-sort |
| 24 | + %th.pact |
| 25 | + %th.provider |
| 26 | + Provider |
| 27 | + %span.glyphicon.glyphicon-sort.relationships-sort |
| 28 | + %th.tag |
| 29 | + Version |
| 30 | + %span.glyphicon.glyphicon-sort.relationships-sort |
| 31 | + %th |
| 32 | + Published |
| 33 | + %th |
| 34 | + Webhook<br>status |
| 35 | + %th |
| 36 | + Last<br>verified |
| 37 | + %tbody |
| 38 | + |
| 39 | + - relationships.each do | relationship | |
| 40 | + %tr |
| 41 | + %td.consumer |
| 42 | + %a{:href => relationship.consumer_group_url} |
| 43 | + = relationship.consumer_name |
| 44 | + %td |
| 45 | + = relationship.consumer_version_number |
| 46 | + %span{style: 'color:gray'} |
| 47 | + = relationship.tag_names |
| 48 | + %td.pact |
| 49 | + %a{:href => relationship.pact_url, :title => "View pact"} |
| 50 | + %span.pact |
| 51 | + %td.provider |
| 52 | + %a{:href => relationship.provider_group_url} |
| 53 | + = relationship.provider_name |
| 54 | + %td |
| 55 | + = relationship.provider_version_number |
| 56 | + %td |
| 57 | + = relationship.publication_date_of_latest_pact.gsub("about ", "") |
| 58 | + %td{class: relationship.webhook_status} |
| 59 | + - if relationship.show_webhook_status? |
| 60 | + %a{:href => relationship.webhook_url} |
| 61 | + = relationship.webhook_label |
| 62 | + |
| 63 | + %td{class: relationship.verification_status, title: relationship.verification_tooltip, "data-toggle": "tooltip", "data-placement": "left"} |
| 64 | + %div |
| 65 | + = relationship.last_verified_date.gsub("about ", "") |
| 66 | + - if relationship.warning? |
| 67 | + %span.glyphicon.glyphicon-warning-sign{'aria-hidden':true} |
| 68 | + %div.relationships-size |
| 69 | + = relationships.size_label |
| 70 | +
|
| 71 | +:javascript |
| 72 | + $(function(){ |
| 73 | + $("#relationships").tablesorter(); |
| 74 | + }); |
| 75 | + |
| 76 | + $(document).ready(function(){ |
| 77 | + $("span.pact").load("/images/doc-text.svg"); |
| 78 | + $('td[data-toggle="tooltip"]').each(function(index, td){ |
| 79 | + //appended tooltip div screws up table if it's appended after a |
| 80 | + //td, so need to append it to a div |
| 81 | + $(td).tooltip({container: $(td).first()}); |
| 82 | + }); |
| 83 | + }); |
0 commit comments