Skip to content

Commit 107fca2

Browse files
committed
feat(matrix ui): remove logic for hiding links until I can get it right
1 parent 2b71355 commit 107fca2

File tree

3 files changed

+10
-17
lines changed

3 files changed

+10
-17
lines changed

lib/pact_broker/ui/view_models/matrix_line.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ def number
4040
@line[:verification_number]
4141
end
4242

43+
def pact_revision_number
44+
@line[:pact_revision_number]
45+
end
46+
4347
def consumer_name
4448
@line[:consumer_name]
4549
end
@@ -107,7 +111,7 @@ def other_provider_version_tags
107111
end
108112

109113
def orderable_fields
110-
[consumer_name, consumer_version_order, @line[:pact_revision_number], provider_name, @line[:verification_id]]
114+
[consumer_name, consumer_version_order, pact_revision_number, provider_name, @line[:verification_id]]
111115
end
112116

113117
def <=> other

lib/pact_broker/ui/view_models/matrix_lines.rb

-12
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,7 @@ def initialize rows
99
lines = rows.collect do | row |
1010
PactBroker::UI::ViewDomain::MatrixLine.new(row)
1111
end
12-
1312
super(lines.sort)
14-
15-
# Don't have a URL to view ovewritten pact revisions, so don't show a link for them until we do
16-
line_group_ids = []
17-
each do | line |
18-
line_group_id = [line.consumer_name, line.consumer_version_number, line.provider_name]
19-
if line_group_ids.include?(line_group_id)
20-
line.overwritten = true
21-
else
22-
line_group_ids << line_group_id
23-
end
24-
end
2513
end
2614
end
2715
end

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

+5-4
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,12 @@
114114
.tag.label.label-default
115115
= tag.name
116116
%td.pact-published{'data-sort-value' => line.pact_published_order}
117-
- if !line.overwritten?
118-
%a{href: line.pact_publication_date_url}
117+
%a{href: line.pact_publication_date_url}
118+
- if options.all_rows_checked
119+
= "#{line.pact_publication_date} (revision #{line.pact_revision_number})"
120+
- else
119121
= line.pact_publication_date
120-
- else
121-
= "#{line.pact_publication_date} (overwritten)"
122+
122123
%td.provider{'data-sort-value' => line.provider_name}
123124
%a{href: line.provider_name_url}
124125
= line.provider_name

0 commit comments

Comments
 (0)