|
| 1 | +<% |
| 2 | +function getAddressClass(address) { |
| 3 | + return address === '/management' ? 'grey-background' : ''; |
| 4 | +} |
| 5 | +
|
| 6 | +function getCreditClass(credit) { |
| 7 | + return credit === 0 || credit === '0' ? 'yellow-background' : ''; |
| 8 | +} |
| 9 | +%> |
| 10 | + |
1 | 11 | <% if (sessions.length > 0) { %>
|
2 | 12 | <table class="list" id="sessions">
|
3 | 13 | <thead>
|
|
22 | 32 | <td class="c"><%= fmt_string(session.channel_number) %></td>
|
23 | 33 | <td class="c"><%= fmt_string(session.handle_max) %></td>
|
24 | 34 | <td class="c"><%= fmt_string(session.next_incoming_id) %></td>
|
25 |
| - <td class="c"><%= fmt_string(session.incoming_window) %></td> |
| 35 | + <td class="c <%= getCreditClass(session.incoming_window) %>"><%= fmt_string(session.incoming_window) %></td> |
26 | 36 | <td class="c"><%= fmt_string(session.next_outgoing_id) %></td>
|
27 |
| - <td class="c"><%= fmt_string(session.remote_incoming_window) %></td> |
| 37 | + <td class="c <%= getCreditClass(session.remote_incoming_window) %>"><%= fmt_string(session.remote_incoming_window) %></td> |
28 | 38 | <td class="c"><%= fmt_string(session.remote_outgoing_window) %></td>
|
29 | 39 | <td class="c"><%= fmt_string(session.outgoing_unsettled_deliveries) %></td>
|
30 | 40 | </tr>
|
|
53 | 63 | <tr class="link">
|
54 | 64 | <td class="c"><%= fmt_string(in_link.handle) %></td>
|
55 | 65 | <td class="c"><%= fmt_string(in_link.link_name) %></td>
|
56 |
| - <td class="c"><%= fmt_string(in_link.target_address) %></td> |
| 66 | + <td class="c <%= getAddressClass(in_link.target_address) %>"><%= fmt_string(in_link.target_address) %></td> |
57 | 67 | <td class="c"><%= fmt_string(in_link.snd_settle_mode) %></td>
|
58 | 68 | <td class="c"><%= fmt_string(in_link.max_message_size) %></td>
|
59 | 69 | <td class="c"><%= fmt_string(in_link.delivery_count) %></td>
|
60 |
| - <td class="c"><%= fmt_string(in_link.credit) %></td> |
| 70 | + <td class="c <%= getCreditClass(in_link.credit) %>"><%= fmt_string(in_link.credit) %></td> |
61 | 71 | <td class="c"><%= fmt_string(in_link.unconfirmed_messages) %></td>
|
62 | 72 | </tr>
|
63 | 73 | <% } %>
|
|
91 | 101 | <tr class="link">
|
92 | 102 | <td class="c"><%= fmt_string(out_link.handle) %></td>
|
93 | 103 | <td class="c"><%= fmt_string(out_link.link_name) %></td>
|
94 |
| - <td class="c"><%= fmt_string(out_link.source_address) %></td> |
| 104 | + <td class="c <%= getAddressClass(out_link.source_address) %>"><%= fmt_string(out_link.source_address) %></td> |
95 | 105 | <td class="c"><%= fmt_string(out_link.queue_name) %></td>
|
96 | 106 | <td class="c"><%= fmt_boolean(out_link.send_settled) %></td>
|
97 | 107 | <td class="c"><%= fmt_string(out_link.max_message_size) %></td>
|
|
0 commit comments