File: bindings.ejs

package info (click to toggle)
rabbitmq-server 2.8.4-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 8,928 kB
  • sloc: erlang: 52,968; python: 2,846; xml: 1,987; sh: 816; makefile: 683; perl: 86; ruby: 63
file content (58 lines) | stat: -rw-r--r-- 2,091 bytes parent folder | download
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
<%= maybe_truncate(bindings) %>
<% if (bindings.length > 0) { %>
    <table class="list bindings">
      <thead>
        <tr>
<% if (mode == 'exchange_source') { %>
          <th>To</th>
<% } else { %>
          <th>From</th>
<% } %>
          <th>Routing key</th>
          <th>Arguments</th>
          <th></th>
        </tr>
      </thead>
      <tbody>
        <%
           for (var i = 0; i < bindings.length; i++) {
               var binding = bindings[i];
        %>
           <tr<%= alt_rows(i)%>>
<% if (mode == 'queue' || mode == 'exchange_destination') { %>
             <td>
               <%= link_exchange(binding.vhost, binding.source) %>
               <sub>Exchange</sub>
             </td>
<% } else if (binding.destination_type == 'exchange') { %>
             <td>
               <%= link_exchange(binding.vhost, binding.destination) %>
               <sub>Exchange</sub>
             </td>
<% } else { %>
             <td>
               <%= link_queue(binding.vhost, binding.destination) %>
               <sub>Queue</sub>
             </td>
<% } %>
             <td><%= fmt_string(binding.routing_key) %></td>
             <td><%= fmt_table_short(binding.arguments) %></td>
             <td class="c">
<% if (binding.source != '') { %>
               <form action="#/bindings" method="delete" class="confirm">
                 <input type="hidden" name="vhost" value="<%= fmt_string(binding.vhost) %>"/>
                 <input type="hidden" name="source" value="<%= fmt_exchange_url(binding.source) %>"/>
                 <input type="hidden" name="destination" value="<%= fmt_string(binding.destination) %>"/>
                 <input type="hidden" name="destination_type" value="<%= binding.destination_type.substring(0, 1) %>"/>
                 <input type="hidden" name="properties_key" value="<%= fmt_string(binding.properties_key) %>"/>
                 <input type="submit" value="Unbind"/>
               </form>
<% } %>
             </td>
           </tr>
           <% } %>
      </tbody>
    </table>
<% } else { %>
  <p>... no bindings ...</p>
<% } %>