File: federation-upstreams.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 (186 lines) | stat: -rw-r--r-- 5,709 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<h1>Federation Upstreams</h1>
<div class="section">
  <h2>Upstreams</h2>
  <div class="hider updatable">
<% if (upstreams.length > 0) { %>
<table class="list">
 <thead>
  <tr>
<% if (vhosts_interesting) { %>
    <th>Virtual Host</th>
<% } %>
    <th>Name</th>
    <th>URI</th>
    <th>Expiry</th>
    <th>Message TTL</th>
    <th>Max Hops</th>
    <th>Prefetch Count</th>
    <th>Reconnect Delay</th>
    <th>Ack mode</th>
    <th>Trust User-ID</th>
  </tr>
 </thead>
 <tbody>
<%
 for (var i = 0; i < upstreams.length; i++) {
    var upstream = upstreams[i];
%>
   <tr<%= alt_rows(i)%>>
<% if (vhosts_interesting) { %>
     <td><%= fmt_string(upstream.vhost) %></td>
<% } %>
     <td><%= link_fed_conn(upstream.vhost, upstream.name) %></td>
     <td><%= fmt_shortened_uri(upstream.value.uri) %></td>
     <td class="r"><%= fmt_time(upstream.value.expires, 'ms') %></td>
     <td class="r"><%= fmt_time(upstream.value['message-ttl'], 'ms') %></td>
     <td class="r"><%= upstream.value['max-hops'] %></td>
     <td class="r"><%= upstream.value['prefetch-count'] %></td>
     <td class="r"><%= fmt_time(upstream.value['reconnect-delay'], 's') %></td>
     <td class="c"><%= fmt_string(upstream.value['ack-mode']) %></td>
     <td class="c"><%= fmt_boolean(upstream.value['trust-user-id']) %></td>
   </tr>
<% } %>
 </tbody>
</table>
<% } else { %>
  <p>... no upstreams ...</p>
<% } %>
  </div>
</div>

<div class="section-hidden">
  <h2>Add a new upstream</h2>
  <div class="hider">
    <form action="#/fed-parameters" method="put">
      <input type="hidden" name="component" value="federation-upstream"/>
      <table class="form">
<% if (vhosts_interesting) { %>
        <tr>
          <th><label>Virtual host:</label></th>
          <td>
            <select name="vhost">
              <% for (var i = 0; i < vhosts.length; i++) { %>
              <option value="<%= fmt_string(vhosts[i].name) %>"><%= fmt_string(vhosts[i].name) %></option>
              <% } %>
            </select>
          </td>
        </tr>
<% } else { %>
        <tr><td><input type="hidden" name="vhost" value="<%= fmt_string(vhosts[0].name) %>"/></td></tr>
<% } %>
        <tr>
          <th><label>Name:</label></th>
          <td><input type="text" name="name"/><span class="mand">*</span></td>
        </tr>
        <tr>
          <th>
            <label>
              URI:
              <span class="help" id="federation-uri"></span>
            </label>
          </th>
          <td><input type="text" name="uri"/><span class="mand">*</span></td>
        </tr>
        <tr>
          <th>
            <label>
              Expires:
              <span class="help" id="federation-expires"></span>
            </label>
          </th>
          <td><input type="text" name="expires"/> ms</td>
        </tr>
        <tr>
          <th>
            <label>
              Message TTL:
              <span class="help" id="federation-ttl"></span>
            </label>
          </th>
          <td><input type="text" name="message-ttl"/> ms</td>
        </tr>
        <tr>
          <th>
            <label>
              Max hops:
              <span class="help" id="federation-max-hops"></span>
            </label>
          </th>
          <td><input type="text" name="max-hops"/></td>
        </tr>
        <tr>
          <th>
            <label>
              Prefetch count:
              <span class="help" id="federation-prefetch"></span>
            </label>
          </th>
          <td><input type="text" name="prefetch-count"/></td>
        </tr>
        <tr>
          <th>
            <label>
              Reconnect delay:
              <span class="help" id="federation-reconnect"></span>
            </label>
          </th>
          <td><input type="text" name="reconnect-delay"/> s</td>
        </tr>
        <tr>
          <th>
            <label>
              Acknowledgement Mode:
              <span class="help" id="federation-ack-mode"></span>
            </label>
          </th>
          <td>
            <select name="ack-mode">
              <option value="on-confirm">On confirm</option>
              <option value="on-publish">On publish</option>
              <option value="no-ack">No ack</option>
            </select>
          </td>
        </tr>
        <tr>
          <th>
            <label>
              Trust User-ID:
              <span class="help" id="federation-trust-user-id"></span>
            </label>
          </th>
          <td>
            <select name="trust-user-id">
              <option value="false">No</option>
              <option value="true">Yes</option>
            </select>
          </td>
        </tr>
      </table>
      <input type="submit" value="Add upstream"/>
    </form>
  </div>
</div>
<div class="section-hidden">
  <h2>URI examples</h2>
  <div class="hider">
    <ul>
      <li>
        <code>amqp://server-name</code><br/>
        connect to server-name, without SSL and default credentials
      </li>
      <li>
        <code>amqp://user:password@server-name/my-vhost</code><br/>
        connect to server-name, with credentials and overridden
        virtual host
      </li>
      <li>
        <code>amqps://user:password@server-name?cacertfile=/path/to/cacert.pem&certfile=/path/to/cert.pem&keyfile=/path/to/key.pem&verify=verify_peer</code><br/>
        connect to server-name, with credentials and SSL
      </li>
      <li>
        <code>amqps://server-name?cacertfile=/path/to/cacert.pem&certfile=/path/to/cert.pem&keyfile=/path/to/key.pem&verify=verify_peer&fail_if_no_peer_cert=true&auth_mechanism=external</code><br/>
        connect to server-name, with SSL and EXTERNAL authentication
      </li>
    </ul>
  </div>
</div>