File: exchange.ejs

package info (click to toggle)
rabbitmq-server 3.3.5-1.1
  • links: PTS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 12,004 kB
  • sloc: erlang: 78,203; python: 3,187; xml: 2,843; makefile: 903; sh: 831; java: 660; perl: 64; ruby: 63
file content (102 lines) | stat: -rw-r--r-- 2,951 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<h1>Exchange: <b><%= fmt_exchange(exchange.name) %></b></h1>

<div class="section">
  <h2>Overview</h2>
  <div class="hider">
<% if (statistics_level == 'fine') { %>
    <%= message_rates('msg-rates-x', exchange.message_stats) %>
<% } %>

    <div class="updatable">
    <h3>Details</h3>
    <table class="facts">
      <tr>
        <th>Type</th>
        <td class="l"><%= fmt_exchange_type(exchange.type) %></td>
      </tr>
      <tr>
        <th>Parameters</th>
        <td><%= fmt_parameters(exchange) %></td>
      </tr>
      <tr>
        <th>Policy</th>
        <td><%= fmt_string(exchange.policy, '') %></td>
      </tr>
<% if (vhosts_interesting) { %>
      <tr>
        <th>Virtual host</th>
        <td><%= fmt_string(exchange.vhost) %></td>
      </tr>
<% } %>
    </table>
    </div>
  </div>
</div>

<% if (statistics_level == 'fine') { %>
<div class="section-hidden">
<h2>Message rates breakdown</h2>
<div class="hider updatable">
<table class="two-col-layout">
  <tr>
    <td>
      <%= format('msg-detail-publishes',
                 {'mode':   'exchange-incoming',
                  'object': exchange.incoming,
                  'label':  'Incoming <span class="help" id="exchange-rates-incoming"></span>'}) %>
    </td>
    <td>
      <%= format('msg-detail-publishes',
                 {'mode':   'exchange-outgoing',
                  'object': exchange.outgoing,
                  'label':  'Outgoing <span class="help" id="exchange-rates-outgoing"></span>'}) %>
    </td>
  </tr>
</table>
</div>
</div>
<% } %>


<div class="section-hidden">
  <h2>Bindings</h2>
  <div class="hider">
<% if (exchange.name == "") { %>
  <h3>Default exchange</h3>
  <p>
    The default exchange is implicitly bound to every queue, with a
    routing key equal to the queue name. It it not possible to
    explicitly bind to, or unbind from the default exchange. It also
    cannot be deleted.
  </p>
<% } else { %>
<div class="bindings-wrapper">
<% if (bindings_destination.length > 0) { %>
  <%= format('bindings', {'mode': 'exchange_destination', 'bindings': bindings_destination}) %>
  <p class="arrow">&dArr;</p>
<% } %>
  <p><span class="exchange">This exchange</span></p>
  <p class="arrow">&dArr;</p>
  <%= format('bindings', {'mode': 'exchange_source', 'bindings': bindings_source}) %>
</div>
  <%= format('add-binding', {'mode': 'exchange_source', 'parent': exchange}) %>
<% } %>
</div>
</div>

<% if (!exchange.internal) { %>
<%= format('publish', {'mode': 'exchange', 'exchange': exchange}) %>
<% } %>

<% if (exchange.name != "") { %>
<div class="section-hidden">
  <h2>Delete this exchange</h2>
  <div class="hider">
    <form action="#/exchanges" method="delete" class="confirm">
      <input type="hidden" name="vhost" value="<%= fmt_string(exchange.vhost) %>"/>
      <input type="hidden" name="name" value="<%= fmt_exchange_url(exchange.name) %>"/>
      <input type="submit" value="Delete"/>
    </form>
  </div>
</div>
<% } %>