Skip to content

Commit f7bea07

Browse files
committed
feat(matrix ui): change default to show all results
1 parent e04e360 commit f7bea07

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/pact_broker/ui/controllers/matrix.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Matrix < Base
1313

1414
get "/" do
1515
selectors = [OpenStruct.new, OpenStruct.new]
16-
options = { limit: 100, latestby: 'cvpv' }
16+
options = { limit: 100, latestby: nil }
1717
locals = {
1818
lines: [],
1919
title: "The Matrix",
@@ -42,7 +42,7 @@ class Matrix < Base
4242

4343
get "/provider/:provider_name/consumer/:consumer_name" do
4444
selectors = [{ pacticipant_name: params[:consumer_name] }, { pacticipant_name: params[:provider_name] } ]
45-
options = {latestby: 'cvpv', limit: 100}
45+
options = {latestby: nil, limit: 100}
4646
lines = matrix_service.find(selectors, options)
4747
lines = PactBroker::UI::ViewDomain::MatrixLines.new(lines)
4848
locals = {

lib/pact_broker/ui/views/matrix/show.haml

+5-5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@
5353
%input{name: 'q[]latest', value: 'true', hidden: true, class: 'latest-flag'}
5454

5555
%div.top-of-group
56+
.input-group
57+
%input{type: 'radio', name: "latestby", class: '', value: '', id: 'all_rows', checked: options.all_rows_checked}
58+
%label{for: 'all_rows'}
59+
Show all results
60+
%div
5661
.input-group
5762
%input{type: 'radio', name: "latestby", class: '', value: 'cvpv', id: 'cvpv', checked: options.cvpv_checked}
5863
%label{for: 'cvpv'}
@@ -62,11 +67,6 @@
6267
%input{type: 'radio', name: "latestby", class: '', value: 'cvp', id: 'cvp', checked: options.cvp_checked}
6368
%label{for: 'cvp'}
6469
Show latest result for each consumer version/provider
65-
%div
66-
.input-group
67-
%input{type: 'radio', name: "latestby", class: '', value: '', id: 'all_rows', checked: options.all_rows_checked}
68-
%label{for: 'all_rows'}
69-
Show all results
7070
%div.top-of-group
7171
- limit_text = "Note that the 'Show latest...' options are summaries of the 'Show all results' query, and that the limit applies to the underlying query, rather than the number of rows returned in the summary."
7272
%label{for: "limit", "title": limit_text, "data-toggle": "tooltip", "data-placement": "right"}

0 commit comments

Comments
 (0)