From 446d9ad7c6941f711fc5573f3562a7cebc26df7c Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 18 Jul 2013 18:17:25 +0200 Subject: [PATCH] livestatus: add last_time_* to host and service table refs #4372 --- components/livestatus/hoststable.cpp | 9 +++------ components/livestatus/servicestable.cpp | 12 ++++-------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/components/livestatus/hoststable.cpp b/components/livestatus/hoststable.cpp index 819802d67..4a9de4393 100644 --- a/components/livestatus/hoststable.cpp +++ b/components/livestatus/hoststable.cpp @@ -800,20 +800,17 @@ Value HostsTable::LastStateChangeAccessor(const Value& row) Value HostsTable::LastTimeUpAccessor(const Value& row) { - /* TODO */ - return Empty; + return static_cast(static_cast(row)->GetLastStateUp()); } Value HostsTable::LastTimeDownAccessor(const Value& row) { - /* TODO */ - return Empty; + return static_cast(static_cast(row)->GetLastStateDown()); } Value HostsTable::LastTimeUnreachableAccessor(const Value& row) { - /* TODO */ - return Empty; + return static_cast(static_cast(row)->GetLastStateUnreachable()); } Value HostsTable::IsFlappingAccessor(const Value& row) diff --git a/components/livestatus/servicestable.cpp b/components/livestatus/servicestable.cpp index b914ad4e3..e99f4ab58 100644 --- a/components/livestatus/servicestable.cpp +++ b/components/livestatus/servicestable.cpp @@ -481,26 +481,22 @@ Value ServicesTable::NoMoreNotificationsAccessor(const Value& row) Value ServicesTable::LastTimeOkAccessor(const Value& row) { - /* TODO */ - return Empty; + return static_cast(static_cast(row)->GetLastStateOK()); } Value ServicesTable::LastTimeWarningAccessor(const Value& row) { - /* TODO */ - return Empty; + return static_cast(static_cast(row)->GetLastStateWarning()); } Value ServicesTable::LastTimeCriticalAccessor(const Value& row) { - /* TODO */ - return Empty; + return static_cast(static_cast(row)->GetLastStateCritical()); } Value ServicesTable::LastTimeUnknownAccessor(const Value& row) { - /* TODO */ - return Empty; + return static_cast(static_cast(row)->GetLastStateUnknown()); } Value ServicesTable::LastCheckAccessor(const Value& row) -- 2.40.0