-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support routing patterns discovery in web-ui
- Loading branch information
Showing
10 changed files
with
170 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<div class="row mb-4"> | ||
<div class="col-sm-12"> | ||
<h4 class="mb-2"> | ||
<%= consumer_group.id %> | ||
</h4> | ||
<hr/> | ||
</div> | ||
</div> | ||
|
||
<div class="row mb-5"> | ||
<div class="col-sm-12"> | ||
<table class="processes bg-white table table-hover table-bordered table-striped mb-0 align-middle"> | ||
<thead> | ||
<tr class="align-middle"> | ||
<th>Subscription group</th> | ||
<th>Topic</th> | ||
<th>Type</th> | ||
<th>Active</th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% consumer_group.subscription_groups.each do |subscription_group| %> | ||
<%== | ||
each_partial( | ||
subscription_group.topics, | ||
'routing/topic', | ||
locals: { subscription_group: subscription_group } | ||
) | ||
%> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<% if v.is_a?(Hash) || v.respond_to?(:to_h) %> | ||
<% v.to_h.each do |k2, v2| %> | ||
<tr> | ||
<td> | ||
<%= "#{k}.#{k2}" %> | ||
</td> | ||
<td> | ||
<% if %w[sasl ssl].any? { |scope| k2.to_s.include?(scope) } %> | ||
*** | ||
<% else %> | ||
<%= v2 %> | ||
<% end %> | ||
</td> | ||
</tr> | ||
<% end %> | ||
<% else %> | ||
<tr> | ||
<td> | ||
<%= k %> | ||
</td> | ||
<td> | ||
<%= object_value_to_s(v) %> | ||
</td> | ||
</tr> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<tr> | ||
<td> | ||
<%= subscription_group.id %> | ||
</td> | ||
<td> | ||
<%= topic.name %> | ||
</td> | ||
<td> | ||
<span class="badge bg-secondary"> | ||
<%= topic.patterns.type %> | ||
</span> | ||
</td> | ||
<td> | ||
<span class="badge bg-<%= topic.active? ? 'success' : 'warning text-dark' %>"> | ||
<%= topic.active? %> | ||
</span> | ||
</td> | ||
<td class="text-center"> | ||
<a href="<%= root_path('routing', topic.id) %>" class="btn btn-sm btn-secondary text-white"> | ||
Details | ||
</a> | ||
</td> | ||
</tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<%== view_title('Routing details') %> | ||
|
||
<div class="container mb-5"> | ||
<%== | ||
each_partial( | ||
@routes, | ||
'routing/consumer_group' | ||
) | ||
%> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<%== | ||
title = [@topic.consumer_group.name, @topic.subscription_group, @topic.name].join(': ') | ||
view_title(title, hr: true) | ||
%> | ||
|
||
<div class="container"> | ||
<div class="row mb-5"> | ||
<div class="col-sm-12"> | ||
<table class="processes bg-white table table-hover table-bordered table-striped mb-0 align-middle"> | ||
<tbody> | ||
<% flat_hash(@topic.to_h).each do |k, v| %> | ||
<%== | ||
partial( | ||
'routing/detail', | ||
locals: { | ||
k: k, | ||
v: v | ||
} | ||
) | ||
%> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters