Added 24H Availability

This commit is contained in:
Luca Deri 2020-04-23 18:33:45 +02:00
parent 7bd499adb9
commit 069268fc15
5 changed files with 37 additions and 3 deletions

View file

@ -144,6 +144,7 @@ if(page == "overview") then
<th>]].. i18n("chart") ..[[</th>
<th>]].. i18n("threshold") .. [[</th>
<th>]].. i18n("plugins_overview.availability") .. [[</th>
<th>]].. i18n("active_monitoring.24h") .. [[</th>
<th>]].. i18n("active_monitoring_stats.last_measurement") .. [[</th>
<th>]].. i18n("system_stats.last_ip") .. [[</th>
<th>]].. i18n("active_monitoring_stats.measurement") .. [[</th>

View file

@ -24,7 +24,7 @@ local res = {}
for key, am_host in pairs(am_hosts) do
local chart = ""
local m_info = am_utils.getMeasurementInfo(am_host.measurement)
local availability = am_utils.getAvailability(am_host.host, am_host.measurement)
local hourly_stats, availability = am_utils.getAvailability(am_host.host, am_host.measurement)
if not m_info then
goto continue
@ -79,6 +79,7 @@ for key, am_host in pairs(am_hosts) do
last_ip = column_last_ip,
granularity = am_host.granularity,
availability = availability or "",
hourly_stats = hourly_stats or {},
unit = i18n(m_info.i18n_unit) or m_info.i18n_unit,
}