2013-02-15 22:33:59 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
2013-02-16 00:01:16 +01:00
|
|
|
<meta http-equiv="refresh" content="60">
|
2013-02-15 22:33:59 +01:00
|
|
|
<title>OpenVPN Status</title>
|
|
|
|
<style type="text/css">
|
|
|
|
table {
|
|
|
|
border-collapse: collapse;
|
|
|
|
}
|
|
|
|
h1 {
|
|
|
|
font-size: 24px;
|
|
|
|
}
|
|
|
|
h2 {
|
|
|
|
font-size: 16px;
|
|
|
|
font-weight: normal;
|
2013-02-16 00:01:16 +01:00
|
|
|
margin-top: 20px;
|
|
|
|
margin-bottom: 10px;
|
|
|
|
}
|
|
|
|
div {
|
|
|
|
margin-left: 15px;
|
2013-02-15 22:33:59 +01:00
|
|
|
}
|
|
|
|
td {
|
|
|
|
margin: 0px;
|
|
|
|
}
|
|
|
|
td.first {
|
|
|
|
padding: 0px 6px 0px 0px;
|
|
|
|
}
|
|
|
|
td.middle {
|
|
|
|
padding: 0px 6px 0px 6px;
|
|
|
|
border-left: 1px solid #ccc;
|
|
|
|
border-right: 1px solid #ccc;
|
|
|
|
}
|
|
|
|
td.last {
|
|
|
|
padding: 0px 0px 0px 6px;
|
|
|
|
}
|
|
|
|
thead {
|
|
|
|
font-weight: bold;
|
|
|
|
border-bottom: 1px solid #ccc;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<h1>OpenVPN Status for <%= name %></h1>
|
|
|
|
|
|
|
|
<h2>Client List</h2>
|
2013-02-16 00:01:16 +01:00
|
|
|
<div>
|
2013-02-15 22:33:59 +01:00
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<td class="first">Common Name</td>
|
|
|
|
<td class="middle">Real Address</td>
|
|
|
|
<td class="middle">Data Received</td>
|
|
|
|
<td class="middle">Data Sent</td>
|
|
|
|
<td class="last">Connected Since</td>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% client_list.each do |client| %>
|
|
|
|
<tr>
|
|
|
|
<td class="first"><%= client[0] %></td>
|
|
|
|
<td class="middle"><%= client[1] %></td>
|
|
|
|
<td class="middle"><%= client[2].to_i.as_bytes %></td>
|
|
|
|
<td class="middle"><%= client[3].to_i.as_bytes %></td>
|
|
|
|
<td class="last"><%= client[4] %></td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2013-02-16 00:01:16 +01:00
|
|
|
</div>
|
2013-02-15 22:33:59 +01:00
|
|
|
|
|
|
|
<h2>Routing Table</h2>
|
2013-02-16 00:01:16 +01:00
|
|
|
<div>
|
2013-02-15 22:33:59 +01:00
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<td class="first">Virtual Address</td>
|
|
|
|
<td class="middle">Common Name</td>
|
|
|
|
<td class="middle">Real Address</td>
|
|
|
|
<td class="last">Last Ref</td>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% routing_table.each do |e| %>
|
|
|
|
<tr>
|
|
|
|
<td class="first"><%= e[0] %></td>
|
|
|
|
<td class="middle"><%= e[1] %></td>
|
|
|
|
<td class="middle"><%= e[2] %></td>
|
|
|
|
<td class="last"><%= e[3] %></td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2013-02-16 00:01:16 +01:00
|
|
|
</div>
|
2013-02-15 22:33:59 +01:00
|
|
|
|
|
|
|
<h2>Global Stats</h2>
|
2013-02-16 00:01:16 +01:00
|
|
|
<div>
|
2013-02-15 22:33:59 +01:00
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
<% global_stats.each do |e| %>
|
|
|
|
<tr>
|
|
|
|
<td><%= e[0] %>:</td>
|
|
|
|
<td><%= e[1] %></td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2013-02-16 00:01:16 +01:00
|
|
|
</div>
|
2013-02-15 22:33:59 +01:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|