Clean up representation of timeouts

This commit is contained in:
Simon MacMullen 2012-06-12 13:07:41 +01:00
parent 2ccc3926c0
commit 092a7504ed
3 changed files with 7 additions and 2 deletions

View File

@ -42,6 +42,11 @@ function fmt_date(d) {
":" + f(d.getSeconds());
}
function fmt_time(t, suffix) {
if (t == undefined || t == 0) return '';
return t + suffix;
}
function fmt_parameters(obj) {
return fmt_table_short(args_to_params(obj));
}

View File

@ -70,7 +70,7 @@
</tr>
<tr>
<th>Timeout</th>
<td><% if (connection.timeout != 0) { %><%= connection.timeout %>s<% } %></td>
<td><%= fmt_time(connection.timeout, 's') %></td>
</tr>
<tr>
<th>Frame max</th>

View File

@ -43,7 +43,7 @@
<% } %>
<td><%= fmt_rate_bytes(connection, 'recv_oct') %></td>
<td><%= fmt_rate_bytes(connection, 'send_oct') %></td>
<td><% if (connection.timeout != undefined) { %><%= connection.timeout %>s<% } %></td>
<td><%= fmt_time(connection.timeout, 's') %></td>
<td><%= connection.channels %></td>
<% if (vhosts_interesting) { %>
<td><%= fmt_string(connection.vhost) %></td>