fixing bugs
This commit is contained in:
parent
522dbb6e6f
commit
f61fd1a6a7
@ -102,7 +102,7 @@ class OManager:
|
|||||||
for line in io_stat:
|
for line in io_stat:
|
||||||
time, value_down, value_up = line.split(",")
|
time, value_down, value_up = line.split(",")
|
||||||
time = datetime.utcfromtimestamp(float(time))
|
time = datetime.utcfromtimestamp(float(time))
|
||||||
value = float(value_down+value_up)
|
value = float(value_down)+float(value_up)
|
||||||
if first_line:
|
if first_line:
|
||||||
first_line = False
|
first_line = False
|
||||||
else:
|
else:
|
||||||
|
|||||||
@ -466,7 +466,7 @@
|
|||||||
<th>Alive</th>
|
<th>Alive</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>`))
|
</thead>`))
|
||||||
data.instances.forEach((instace, index) => {
|
data.instances.forEach((instance, index) => {
|
||||||
var tr = `<tr>
|
var tr = `<tr>
|
||||||
<td>
|
<td>
|
||||||
${instance.name}
|
${instance.name}
|
||||||
@ -477,9 +477,8 @@
|
|||||||
<div class="chart-sparkline" id="sparkline-${index}"></div>
|
<div class="chart-sparkline" id="sparkline-${index}"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>`
|
</tr>`
|
||||||
});
|
|
||||||
ovpn_table.append(tr);
|
|
||||||
|
|
||||||
|
ovpn_table.append(tr);
|
||||||
$().peity && $(`#sparkline-${index}`).text(instance.ping_rate.join(", ")).peity("line", {
|
$().peity && $(`#sparkline-${index}`).text(instance.ping_rate.join(", ")).peity("line", {
|
||||||
width: 64,
|
width: 64,
|
||||||
height: 40,
|
height: 40,
|
||||||
@ -489,6 +488,9 @@
|
|||||||
padding: .2,
|
padding: .2,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
update_stat();
|
update_stat();
|
||||||
setInterval(update_stat, 5000);
|
setInterval(update_stat, 5000);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user