fixing bugs

This commit is contained in:
mantaohuang 2020-07-28 12:28:29 -04:00
parent 522dbb6e6f
commit f61fd1a6a7
2 changed files with 13 additions and 11 deletions

View File

@ -102,7 +102,7 @@ class OManager:
for line in io_stat:
time, value_down, value_up = line.split(",")
time = datetime.utcfromtimestamp(float(time))
value = float(value_down+value_up)
value = float(value_down)+float(value_up)
if first_line:
first_line = False
else:

View File

@ -466,7 +466,7 @@
<th>Alive</th>
</tr>
</thead>`))
data.instances.forEach((instace, index) => {
data.instances.forEach((instance, index) => {
var tr = `<tr>
<td>
${instance.name}
@ -477,17 +477,19 @@
<div class="chart-sparkline" id="sparkline-${index}"></div>
</td>
</tr>`
});
ovpn_table.append(tr);
$().peity && $(`#sparkline-${index}`).text(instance.ping_rate.join(", ")).peity("line", {
width: 64,
height: 40,
stroke: "#206bc4",
strokeWidth: 2,
fill: ["#d2e1f3"],
padding: .2,
ovpn_table.append(tr);
$().peity && $(`#sparkline-${index}`).text(instance.ping_rate.join(", ")).peity("line", {
width: 64,
height: 40,
stroke: "#206bc4",
strokeWidth: 2,
fill: ["#d2e1f3"],
padding: .2,
});
});
});
}
update_stat();