From aed9b578f18455ab1bb1ac85bffc8a2f3b7e2cb9 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 16 Oct 2013 14:30:13 +0200 Subject: [PATCH] livestatus: Implement support for modified_attributes. --- components/livestatus/hoststable.cpp | 8 ++++++-- components/livestatus/servicestable.cpp | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/components/livestatus/hoststable.cpp b/components/livestatus/hoststable.cpp index e7cd2e51d..893b996a3 100644 --- a/components/livestatus/hoststable.cpp +++ b/components/livestatus/hoststable.cpp @@ -840,8 +840,12 @@ Value HostsTable::CheckOptionsAccessor(const Value& row) Value HostsTable::ModifiedAttributesAccessor(const Value& row) { - /* not supported */ - return Empty; + Service::Ptr hc = static_cast(row)->GetCheckService(); + + if (!hc) + return Empty; + + return hc->GetModifiedAttributes(); } Value HostsTable::ModifiedAttributesListAccessor(const Value& row) diff --git a/components/livestatus/servicestable.cpp b/components/livestatus/servicestable.cpp index d07ed5543..328557ab6 100644 --- a/components/livestatus/servicestable.cpp +++ b/components/livestatus/servicestable.cpp @@ -618,8 +618,7 @@ Value ServicesTable::CheckFreshnessAccessor(const Value& row) Value ServicesTable::ModifiedAttributesAccessor(const Value& row) { - /* not supported */ - return Empty; + return static_cast(row)->GetModifiedAttributes(); } Value ServicesTable::ModifiedAttributesListAccessor(const Value& row)