diff options
author | Arnaud Cogoluègnes <acogoluegnes@gmail.com> | 2021-09-13 16:31:06 +0200 |
---|---|---|
committer | Arnaud Cogoluègnes <acogoluegnes@gmail.com> | 2021-09-13 16:31:06 +0200 |
commit | b0ec9ff64cce2e51b4db043b4ee01c9aa4325410 (patch) | |
tree | 537eca2ce334e29ea93689417a676557c58aa048 | |
parent | 39a51772c6f73b7838bc117850f1c98014116db4 (diff) | |
download | rabbitmq-server-git-rabbitmq-server-3389-stream-publishers-in-queue-page.tar.gz |
Adapt stream publisher list view to connection/queue contextrabbitmq-server-3389-stream-publishers-in-queue-page
References #3389
3 files changed, 15 insertions, 3 deletions
diff --git a/deps/rabbitmq_stream_management/priv/www/js/stream.js b/deps/rabbitmq_stream_management/priv/www/js/stream.js index 2b881ed173..baa9fe808a 100644 --- a/deps/rabbitmq_stream_management/priv/www/js/stream.js +++ b/deps/rabbitmq_stream_management/priv/www/js/stream.js @@ -20,8 +20,8 @@ dispatcher_add(function(sammy) { if (is_stream(queue)) { var publishers = extraContent['extra_stream_publishers']; if (publishers !== undefined) { - return '<div class="section"><h2>Stream publishers</h2><div class="hider updatable">' + - format('streamPublishersList', {'publishers': publishers}) + + return '<div class="section-hidden"><h2>Stream publishers</h2><div class="hider updatable">' + + format('streamPublishersList', {'publishers': publishers, 'mode': 'queue'}) + '</div></div>'; } else { return ''; diff --git a/deps/rabbitmq_stream_management/priv/www/js/tmpl/streamConnection.ejs b/deps/rabbitmq_stream_management/priv/www/js/tmpl/streamConnection.ejs index 1e36a15eee..524ad71ebd 100644 --- a/deps/rabbitmq_stream_management/priv/www/js/tmpl/streamConnection.ejs +++ b/deps/rabbitmq_stream_management/priv/www/js/tmpl/streamConnection.ejs @@ -118,7 +118,7 @@ <div class="section"> <h2>Publishers</h2> <div class="hider updatable"> - <%= format('streamPublishersList', {'publishers': publishers}) %> + <%= format('streamPublishersList', {'publishers': publishers, 'mode' : 'connection'}) %> </div> </div> diff --git a/deps/rabbitmq_stream_management/priv/www/js/tmpl/streamPublishersList.ejs b/deps/rabbitmq_stream_management/priv/www/js/tmpl/streamPublishersList.ejs index 25ac94a72b..903889175a 100644 --- a/deps/rabbitmq_stream_management/priv/www/js/tmpl/streamPublishersList.ejs +++ b/deps/rabbitmq_stream_management/priv/www/js/tmpl/streamPublishersList.ejs @@ -2,9 +2,15 @@ <table class="list"> <thead> <tr> +<% if (mode == 'queue') { %> + <th>Connection</th> + <th>ID</th> + <th>Reference</th> +<% } else { %> <th>ID</th> <th>Reference</th> <th>Queue</th> +<% } %> <th>Messages Published</th> <th>Messages Confirmed</th> <th>Messages Errored</th> @@ -15,9 +21,15 @@ var publisher = publishers[i]; %> <tr<%= alt_rows(i) %>> +<% if (mode == 'queue') { %> + <td><%= link_stream_conn(publisher.queue.vhost, publisher.connection_details.name) %></td> + <td><%= publisher.publisher_id %></td> + <td class="c"><%= fmt_string(publisher.reference) %></td> +<% } else { %> <td><%= publisher.publisher_id %></td> <td class="c"><%= fmt_string(publisher.reference) %></td> <td><%= link_queue(publisher.queue.vhost, publisher.queue.name) %></td> +<% } %> <td class="c"><%= publisher.published %></td> <td class="c"><%= publisher.confirmed %></td> <td class="c"><%= publisher.errored %></td> |