Skip to content

Commit

Permalink
feat(matrix ui): change default to show all results
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Mar 15, 2018
1 parent e04e360 commit f7bea07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/pact_broker/ui/controllers/matrix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Matrix < Base

get "/" do
selectors = [OpenStruct.new, OpenStruct.new]
options = { limit: 100, latestby: 'cvpv' }
options = { limit: 100, latestby: nil }
locals = {
lines: [],
title: "The Matrix",
Expand Down Expand Up @@ -42,7 +42,7 @@ class Matrix < Base

get "/provider/:provider_name/consumer/:consumer_name" do
selectors = [{ pacticipant_name: params[:consumer_name] }, { pacticipant_name: params[:provider_name] } ]
options = {latestby: 'cvpv', limit: 100}
options = {latestby: nil, limit: 100}
lines = matrix_service.find(selectors, options)
lines = PactBroker::UI::ViewDomain::MatrixLines.new(lines)
locals = {
Expand Down
10 changes: 5 additions & 5 deletions lib/pact_broker/ui/views/matrix/show.haml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
%input{name: 'q[]latest', value: 'true', hidden: true, class: 'latest-flag'}

%div.top-of-group
.input-group
%input{type: 'radio', name: "latestby", class: '', value: '', id: 'all_rows', checked: options.all_rows_checked}
%label{for: 'all_rows'}
Show all results
%div
.input-group
%input{type: 'radio', name: "latestby", class: '', value: 'cvpv', id: 'cvpv', checked: options.cvpv_checked}
%label{for: 'cvpv'}
Expand All @@ -62,11 +67,6 @@
%input{type: 'radio', name: "latestby", class: '', value: 'cvp', id: 'cvp', checked: options.cvp_checked}
%label{for: 'cvp'}
Show latest result for each consumer version/provider
%div
.input-group
%input{type: 'radio', name: "latestby", class: '', value: '', id: 'all_rows', checked: options.all_rows_checked}
%label{for: 'all_rows'}
Show all results
%div.top-of-group
- 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."
%label{for: "limit", "title": limit_text, "data-toggle": "tooltip", "data-placement": "right"}
Expand Down

0 comments on commit f7bea07

Please sign in to comment.