livestatus: add last_time_* to host and service table

refs #4372
This commit is contained in:
Michael Friedrich 2013-07-18 18:17:25 +02:00
parent 2ebf0822ac
commit 446d9ad7c6
2 changed files with 7 additions and 14 deletions

View File

@ -800,20 +800,17 @@ Value HostsTable::LastStateChangeAccessor(const Value& row)
Value HostsTable::LastTimeUpAccessor(const Value& row)
{
/* TODO */
return Empty;
return static_cast<int>(static_cast<Host::Ptr>(row)->GetLastStateUp());
}
Value HostsTable::LastTimeDownAccessor(const Value& row)
{
/* TODO */
return Empty;
return static_cast<int>(static_cast<Host::Ptr>(row)->GetLastStateDown());
}
Value HostsTable::LastTimeUnreachableAccessor(const Value& row)
{
/* TODO */
return Empty;
return static_cast<int>(static_cast<Host::Ptr>(row)->GetLastStateUnreachable());
}
Value HostsTable::IsFlappingAccessor(const Value& row)

View File

@ -481,26 +481,22 @@ Value ServicesTable::NoMoreNotificationsAccessor(const Value& row)
Value ServicesTable::LastTimeOkAccessor(const Value& row)
{
/* TODO */
return Empty;
return static_cast<int>(static_cast<Service::Ptr>(row)->GetLastStateOK());
}
Value ServicesTable::LastTimeWarningAccessor(const Value& row)
{
/* TODO */
return Empty;
return static_cast<int>(static_cast<Service::Ptr>(row)->GetLastStateWarning());
}
Value ServicesTable::LastTimeCriticalAccessor(const Value& row)
{
/* TODO */
return Empty;
return static_cast<int>(static_cast<Service::Ptr>(row)->GetLastStateCritical());
}
Value ServicesTable::LastTimeUnknownAccessor(const Value& row)
{
/* TODO */
return Empty;
return static_cast<int>(static_cast<Service::Ptr>(row)->GetLastStateUnknown());
}
Value ServicesTable::LastCheckAccessor(const Value& row)