+
+
+
+
+
+<% if tab == "properties" %>
+
+
+
+ Main branch:
+
+
+ <%= pacticipant.main_branch %>
+
+
+
+
+ Repository URL:
+
+
+ <% if repository_url %>
+ <%
+ repository_link = "
#{repository_url}"
+ %>
+
+ <%= Sanitize.fragment(repository_link, Sanitize::Config::BASIC) %>
+ <% end %>
+
+
+
<% end %>
-
+<% if tab == "network" %>
+<% end %>
\ No newline at end of file
diff --git a/lib/pact_broker/ui/views/index/_dashboard_navbar.haml b/lib/pact_broker/ui/views/index/_dashboard_navbar.haml
new file mode 100644
index 000000000..cb1f751e8
--- /dev/null
+++ b/lib/pact_broker/ui/views/index/_dashboard_navbar.haml
@@ -0,0 +1,7 @@
+%nav{'aria-label': 'breadcrumb'}
+ %ol.breadcrumb
+ %li.breadcrumb-item
+ %a{'href': "#{base_url}/"}
+ Home
+ %li.breadcrumb-item.active{'aria-current': 'page'}
+ Pacts
\ No newline at end of file
diff --git a/lib/pact_broker/ui/views/index/_navbar.haml b/lib/pact_broker/ui/views/index/_navbar.haml
index 8a219d36e..ac4940248 100644
--- a/lib/pact_broker/ui/views/index/_navbar.haml
+++ b/lib/pact_broker/ui/views/index/_navbar.haml
@@ -3,12 +3,5 @@
.navbar-header
%ul.navbar-right#top-left-menu
%li
- - if tag_toggle
- %a{href: "#{base_url}?tags=true"}
- Show latest tags
- - else
- %a{href: "#{base_url}/"}
- Hide latest tags
-
%a{href: "#{base_url}/hal-browser/browser.html"}
API Browser
diff --git a/lib/pact_broker/ui/views/index/show.haml b/lib/pact_broker/ui/views/index/show.haml
index 973548cd4..ddc9678a8 100644
--- a/lib/pact_broker/ui/views/index/show.haml
+++ b/lib/pact_broker/ui/views/index/show.haml
@@ -13,7 +13,7 @@
= error
%form{action: "#{base_url}"}
- .field
+ .search-field
%label{for: 'search'}
Search
%input{name: 'search', id: 'search', class: 'search', value: search}
@@ -42,27 +42,27 @@
%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
- %td.consumer
+ %tr{'class':'pact-row', '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, 'data-href':"/dashboard/provider/#{index_item.provider_name}/consumer/#{index_item.consumer_name}"}
+ %td{'role':"button"}
+ %td.consumer{'role':"button"}
%a{ href: index_item.consumer_group_url }
= index_item.consumer_name
- %td.pact
+ %td.pact{'role':"button"}
%span.pact
%a{ href: index_item.latest_pact_url, :title => "View pact" }
%span.pact-matrix
%a{ href: index_item.pact_matrix_url, title: "View pact matrix" }
- %td.provider
+ %td.provider{'role':"button"}
%a{ href: index_item.provider_group_url }
= index_item.provider_name
- %td
- %td{"data-text": index_item.publication_date_of_latest_pact_order}
+ %td{'role':"button"}
+ %td{"data-text": index_item.publication_date_of_latest_pact_order, 'role':"button"}
= index_item.publication_date_of_latest_pact
- %td{class: "table-#{index_item.webhook_status}"}
+ %td{class: "table-#{index_item.webhook_status}", 'role':"button"}
%a{ href: index_item.webhook_url }
= index_item.webhook_label
- %td{ class: "table-#{index_item.pseudo_branch_verification_status}", title: index_item.verification_tooltip, "data-toggle": "tooltip", "data-placement": "left" }
+ %td{ class: "table-#{index_item.pseudo_branch_verification_status}", title: index_item.verification_tooltip, "data-toggle": "tooltip", "data-placement": "left", 'role':"button"}
%div
= index_item.last_verified_date
- if index_item.warning?
@@ -75,6 +75,11 @@
- pagination_locals = { page_number: page_number, page_size: page_size, pagination_record_count: pagination_record_count, current_page_size: current_page_size }
!= render :haml, :'index/_pagination', :layout => false, locals: pagination_locals
+ :css
+ .table tbody tr:hover td, .table tbody tr:hover th {
+ background-color: #ccc;
+ cursor: pointer;
+ }
:javascript
$(function(){
@@ -89,6 +94,12 @@
//td, so need to append it to a div
$(td).tooltip({container: $(td).first()});
});
+
+ $(function(){
+ $(".table").on("click", "td[role=\"button\"]", function (e) {
+ window.location = $(this).parent("tr").data("href");
+ });
+ });
});
$(".reset-search").on("click", function() {
diff --git a/lib/pact_broker/ui/views/matrix/show.haml b/lib/pact_broker/ui/views/matrix/show.haml
index 859eec6c0..fac34cca8 100644
--- a/lib/pact_broker/ui/views/matrix/show.haml
+++ b/lib/pact_broker/ui/views/matrix/show.haml
@@ -11,9 +11,13 @@
%script{type: 'text/javascript', src: "#{base_url}/js/bootstrap.bundle.min.js?v=#{PactBroker::VERSION}"}
.container
- .navbar-right
- %a{href: "#{base_url}/"}
- Home
+ %nav{'aria-label': 'breadcrumb'}
+ %ol.breadcrumb
+ %li.breadcrumb-item
+ %a{'href': "#{base_url}/"}
+ Home
+ %li.breadcrumb-item.active{'aria-current': 'page'}
+ The Matrix
%h1.page-header
The Matrix
- if defined?(badge_url) && badge_url
diff --git a/public/javascripts/index.js b/public/javascripts/index.js
index ee06a3421..61869b0d8 100644
--- a/public/javascripts/index.js
+++ b/public/javascripts/index.js
@@ -134,53 +134,32 @@ function handleDeleteResourcesSelected(
rowData.providerName,
tagName
);
- const isRefreshingThePage = !!tagName;
const cancelled = function() {
- unHighlightRows(rows);
+ unHighlightRows(row);
};
const confirmed = function() {
deleteResources(
deletionUrl,
- function() {
- handleDeletionSuccess(rows, isRefreshingThePage);
- },
+ handleDeletionSuccess,
function(response) {
- handleDeletionFailure(rows, response);
+ handleDeletionFailure(row, response);
}
);
};
- if (!isRefreshingThePage) {
- highlightRowsToBeDeleted(rows);
- }
- confirmDeleteResources(confirmationText, confirmed, cancelled);
-}
-function hideDeletedRows(rows) {
- rows
- .children("td, th")
- .animate({ padding: 0 })
- .wrapInner("
")
- .children()
- .slideUp(function() {
- $(this)
- .closest("tr")
- .remove();
- });
+ highlightRowsToBeDeleted(row);
+
+ confirmDeleteResources(confirmationText, confirmed, cancelled);
}
function refreshPage() {
const url = new URL(window.location);
- url.searchParams.delete("search");
window.location = url.toString();
}
-function handleDeletionSuccess(rows, isRefreshingThePage) {
- if (isRefreshingThePage) {
- return refreshPage();
- }
-
- hideDeletedRows(rows);
+function handleDeletionSuccess() {
+ return refreshPage();
}
function createErrorMessage(responseBody) {
@@ -250,7 +229,7 @@ function buildMaterialMenuItems(clickedElementData) {
const taggedPactUrl = taggedPactObject.deletionUrl;
return {
type: "normal",
- text: `Delete pacts for ${pactTagName}...`,
+ text: `Delete pacts for tag ${pactTagName}...`,
click: handleDeleteTagSelected({
providerName,
consumerName,
@@ -260,5 +239,9 @@ function buildMaterialMenuItems(clickedElementData) {
};
});
- return [...baseOptions, ...taggedPactsOptions];
+ if(taggedPactsOptions.length) {
+ return taggedPactsOptions;
+ } else {
+ return baseOptions;
+ }
}
diff --git a/public/javascripts/pact.js b/public/javascripts/pact.js
index bcfcddccb..24e29b8c7 100644
--- a/public/javascripts/pact.js
+++ b/public/javascripts/pact.js
@@ -8,20 +8,20 @@ $(document).ready(function() {
position: "overlay",
animationSpeed: 1,
items: [
- // {
- // type: "normal",
- // text: "View in API Browser",
- // click: function(openMenuElement) {
- // window.location.href = openMenuElement.data().apiBrowserUrl;
- // }
- // },
- // {
- // type: "normal",
- // text: "View Matrix",
- // click: function(openMenuElement) {
- // window.location.href = openMenuElement.data().matrixUrl;
- // }
- // },
+ {
+ type: "normal",
+ text: "View in API Browser",
+ click: function(openMenuElement) {
+ window.location.href = openMenuElement.data().apiBrowserUrl;
+ }
+ },
+ {
+ type: "normal",
+ text: "View Matrix",
+ click: function(openMenuElement) {
+ window.location.href = openMenuElement.data().matrixUrl;
+ }
+ },
{
type: "normal",
text: "Delete ...",
diff --git a/public/stylesheets/index.css b/public/stylesheets/index.css
index 6fd9e1366..ac45db71e 100644
--- a/public/stylesheets/index.css
+++ b/public/stylesheets/index.css
@@ -233,12 +233,11 @@ span.copy-success-icon {
height: 16px;
}
-.field {
+.search-field {
margin-top: 15px;
margin-bottom: 15px;
}
div.top-of-group {
margin-top: 20px;
- margin-bottom: 20px;
}
diff --git a/public/stylesheets/pact.css b/public/stylesheets/pact.css
index e309bdcef..2d8e400f8 100644
--- a/public/stylesheets/pact.css
+++ b/public/stylesheets/pact.css
@@ -1,4 +1,5 @@
div.pact-metadata {
+ margin-top: 40px;
float: right;
}
@@ -41,3 +42,13 @@ span.kebab-horizontal {
span.more-options {
float: right;
}
+
+/* same as .page-header */
+h1 {
+ padding-bottom: 2rem;
+ margin: 40px 0 20px;
+}
+
+h3 {
+ margin-top: 2rem;
+}
diff --git a/script/data/environments.rb b/script/data/environments.rb
old mode 100644
new mode 100755