]> review.fuel-infra Code Review - packages/trusty/rabbitmq-server.git/blob
ff23d38c5cdf511f422b0151d6fa62f022d262a5
[packages/trusty/rabbitmq-server.git] /
1 <h1>Federation Upstreams</h1>
2 <div class="section">
3   <h2>Upstreams</h2>
4   <div class="hider updatable">
5 <% if (upstreams.length > 0) { %>
6 <table class="list">
7  <thead>
8   <tr>
9 <% if (vhosts_interesting) { %>
10     <th>Virtual Host</th>
11 <% } %>
12     <th>Name</th>
13     <th>URI</th>
14     <th>Expiry</th>
15     <th>Message TTL</th>
16     <th>Max Hops</th>
17     <th>Prefetch Count</th>
18     <th>Reconnect Delay</th>
19     <th>Ack mode</th>
20     <th>Trust User-ID</th>
21   </tr>
22  </thead>
23  <tbody>
24 <%
25  for (var i = 0; i < upstreams.length; i++) {
26     var upstream = upstreams[i];
27 %>
28    <tr<%= alt_rows(i)%>>
29 <% if (vhosts_interesting) { %>
30      <td><%= fmt_string(upstream.vhost) %></td>
31 <% } %>
32      <td><%= link_fed_conn(upstream.vhost, upstream.name) %></td>
33      <td><%= fmt_shortened_uri(upstream.value.uri) %></td>
34      <td class="r"><%= fmt_time(upstream.value.expires, 'ms') %></td>
35      <td class="r"><%= fmt_time(upstream.value['message-ttl'], 'ms') %></td>
36      <td class="r"><%= upstream.value['max-hops'] %></td>
37      <td class="r"><%= upstream.value['prefetch-count'] %></td>
38      <td class="r"><%= fmt_time(upstream.value['reconnect-delay'], 's') %></td>
39      <td class="c"><%= fmt_string(upstream.value['ack-mode']) %></td>
40      <td class="c"><%= fmt_boolean(upstream.value['trust-user-id']) %></td>
41    </tr>
42 <% } %>
43  </tbody>
44 </table>
45 <% } else { %>
46   <p>... no upstreams ...</p>
47 <% } %>
48   </div>
49 </div>
50
51 <div class="section-hidden">
52   <h2>Add a new upstream</h2>
53   <div class="hider">
54     <form action="#/fed-parameters" method="put">
55       <input type="hidden" name="component" value="federation-upstream"/>
56       <table class="form">
57 <% if (vhosts_interesting) { %>
58         <tr>
59           <th><label>Virtual host:</label></th>
60           <td>
61             <select name="vhost">
62               <% for (var i = 0; i < vhosts.length; i++) { %>
63               <option value="<%= fmt_string(vhosts[i].name) %>"><%= fmt_string(vhosts[i].name) %></option>
64               <% } %>
65             </select>
66           </td>
67         </tr>
68 <% } else { %>
69         <tr><td><input type="hidden" name="vhost" value="<%= fmt_string(vhosts[0].name) %>"/></td></tr>
70 <% } %>
71         <tr>
72           <th><label>Name:</label></th>
73           <td><input type="text" name="name"/><span class="mand">*</span></td>
74         </tr>
75         <tr>
76           <th>
77             <label>
78               URI:
79               <span class="help" id="federation-uri"></span>
80             </label>
81           </th>
82           <td><input type="text" name="uri"/><span class="mand">*</span></td>
83         </tr>
84         <tr>
85           <th>
86             <label>
87               Expires:
88               <span class="help" id="federation-expires"></span>
89             </label>
90           </th>
91           <td><input type="text" name="expires"/> ms</td>
92         </tr>
93         <tr>
94           <th>
95             <label>
96               Message TTL:
97               <span class="help" id="federation-ttl"></span>
98             </label>
99           </th>
100           <td><input type="text" name="message-ttl"/> ms</td>
101         </tr>
102         <tr>
103           <th>
104             <label>
105               Max hops:
106               <span class="help" id="federation-max-hops"></span>
107             </label>
108           </th>
109           <td><input type="text" name="max-hops"/></td>
110         </tr>
111         <tr>
112           <th>
113             <label>
114               Prefetch count:
115               <span class="help" id="federation-prefetch"></span>
116             </label>
117           </th>
118           <td><input type="text" name="prefetch-count"/></td>
119         </tr>
120         <tr>
121           <th>
122             <label>
123               Reconnect delay:
124               <span class="help" id="federation-reconnect"></span>
125             </label>
126           </th>
127           <td><input type="text" name="reconnect-delay"/> s</td>
128         </tr>
129         <tr>
130           <th>
131             <label>
132               Acknowledgement Mode:
133               <span class="help" id="federation-ack-mode"></span>
134             </label>
135           </th>
136           <td>
137             <select name="ack-mode">
138               <option value="on-confirm">On confirm</option>
139               <option value="on-publish">On publish</option>
140               <option value="no-ack">No ack</option>
141             </select>
142           </td>
143         </tr>
144         <tr>
145           <th>
146             <label>
147               Trust User-ID:
148               <span class="help" id="federation-trust-user-id"></span>
149             </label>
150           </th>
151           <td>
152             <select name="trust-user-id">
153               <option value="false">No</option>
154               <option value="true">Yes</option>
155             </select>
156           </td>
157         </tr>
158       </table>
159       <input type="submit" value="Add upstream"/>
160     </form>
161   </div>
162 </div>
163 <div class="section-hidden">
164   <h2>URI examples</h2>
165   <div class="hider">
166     <ul>
167       <li>
168         <code>amqp://server-name</code><br/>
169         connect to server-name, without SSL and default credentials
170       </li>
171       <li>
172         <code>amqp://user:password@server-name/my-vhost</code><br/>
173         connect to server-name, with credentials and overridden
174         virtual host
175       </li>
176       <li>
177         <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/>
178         connect to server-name, with credentials and SSL
179       </li>
180       <li>
181         <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/>
182         connect to server-name, with SSL and EXTERNAL authentication
183       </li>
184     </ul>
185   </div>
186 </div>