livestatus: use generic Value() as row accessor instead of Object()

This will allow comments/downtimes to be stashed as string (id) while
existing objects will still be available as Value().

refs #4372
This commit is contained in:
Michael Friedrich 2013-07-10 14:06:46 +02:00
parent 664916dffb
commit ff61df9d71
23 changed files with 747 additions and 751 deletions

View File

@ -58,13 +58,13 @@ void CommandsTable::FetchRows(const AddRowFunction& addRowFn)
}
}
Value CommandsTable::NameAccessor(const Object::Ptr& object)
Value CommandsTable::NameAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value CommandsTable::LineAccessor(const Object::Ptr& object)
Value CommandsTable::LineAccessor(const Value& row)
{
/* TODO */
return Value();

View File

@ -45,8 +45,8 @@ public:
protected:
virtual void FetchRows(const AddRowFunction& addRowFn);
static Value NameAccessor(const Object::Ptr& object);
static Value LineAccessor(const Object::Ptr& object);
static Value NameAccessor(const Value& row);
static Value LineAccessor(const Value& row);
};
}

View File

@ -18,6 +18,8 @@
******************************************************************************/
#include "livestatus/commentstable.h"
#include "livestatus/servicestable.h"
#include "livestatus/hoststable.h"
#include "icinga/service.h"
#include "base/dynamictype.h"
#include "base/objectlock.h"
@ -47,7 +49,9 @@ void CommentsTable::AddColumns(Table *table, const String& prefix,
table->AddColumn(prefix + "expires", Column(&CommentsTable::ExpiresAccessor, objectAccessor));
table->AddColumn(prefix + "expire_time", Column(&CommentsTable::ExpireTimeAccessor, objectAccessor));
// TODO: Join services table.
// TODO: Join hosts and services table with prefix
HostsTable::AddColumns(table, "host_", &CommentsTable::HostAccessor);
ServicesTable::AddColumns(table, "service_", &CommentsTable::ServiceAccessor);
}
String CommentsTable::GetName(void) const
@ -66,99 +70,102 @@ void CommentsTable::FetchRows(const AddRowFunction& addRowFn)
ObjectLock olock(comments);
Value comment;
/*Value comment;
BOOST_FOREACH(boost::tie(boost::tuples::ignore, comment), comments) {
addRowFn(comment);
}*/
String id;
BOOST_FOREACH(boost::tie(id, boost::tuples::ignore), comments) {
addRowFn(id);
}
}
}
Value CommentsTable::AuthorAccessor(const Object::Ptr& object)
Object::Ptr CommentsTable::HostAccessor(const Value& row)
{
Service::Ptr svc = Service::GetOwnerByCommentID(row);
if (!svc)
return Value();
return svc->GetHost();
}
Object::Ptr CommentsTable::ServiceAccessor(const Value& row)
{
return Service::GetOwnerByCommentID(row);
}
Value CommentsTable::AuthorAccessor(const Value& row)
{
/*
Dictionary::Ptr comment = Service::GetCommentByID(row);
return comment->Get("author");
*/
}
Value CommentsTable::CommentAccessor(const Object::Ptr& object)
Value CommentsTable::CommentAccessor(const Value& row)
{
/*
Dictionary::Ptr comment = Service::GetCommentByID(row);
return comment->Get("text");
*/
}
Value CommentsTable::IdAccessor(const Object::Ptr& object)
Value CommentsTable::IdAccessor(const Value& row)
{
/*
Dictionary::Ptr comment = Service::GetCommentByID(row);
return comment->Get("legacy_id");
*/
}
Value CommentsTable::EntryTimeAccessor(const Object::Ptr& object)
Value CommentsTable::EntryTimeAccessor(const Value& row)
{
/*
Dictionary::Ptr comment = Service::GetCommentByID(row);
return comment->Get("entry_time");
*/
}
Value CommentsTable::TypeAccessor(const Object::Ptr& object)
Value CommentsTable::TypeAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value CommentsTable::IsServiceAccessor(const Object::Ptr& object)
Value CommentsTable::IsServiceAccessor(const Value& row)
{
/*
Service::Ptr svc = Service::GetOwnerByCommentID(row);
return (svc->IsHostCheck() ? 0 : 1);
*/
}
Value CommentsTable::PersistentAccessor(const Object::Ptr& object)
Value CommentsTable::PersistentAccessor(const Value& row)
{
/* TODO - always 1 */
return 1;
}
Value CommentsTable::SourceAccessor(const Object::Ptr& object)
Value CommentsTable::SourceAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value CommentsTable::EntryTypeAccessor(const Object::Ptr& object)
Value CommentsTable::EntryTypeAccessor(const Value& row)
{
/*
Dictionary::Ptr comment = Service::GetCommentByID(row);
return comment->Get("entry_type");
*/
}
Value CommentsTable::ExpiresAccessor(const Object::Ptr& object)
Value CommentsTable::ExpiresAccessor(const Value& row)
{
/*
Dictionary::Ptr comment = Service::GetCommentByID(row);
return comment->Get("expires");
*/
}
Value CommentsTable::ExpireTimeAccessor(const Object::Ptr& object)
Value CommentsTable::ExpireTimeAccessor(const Value& row)
{
/*
Dictionary::Ptr comment = Service::GetCommentByID(row);
return comment->Get("expire_time");
*/
}

View File

@ -45,17 +45,20 @@ public:
protected:
virtual void FetchRows(const AddRowFunction& addRowFn);
static Value AuthorAccessor(const Object::Ptr& object);
static Value CommentAccessor(const Object::Ptr& object);
static Value IdAccessor(const Object::Ptr& object);
static Value EntryTimeAccessor(const Object::Ptr& object);
static Value TypeAccessor(const Object::Ptr& object);
static Value IsServiceAccessor(const Object::Ptr& object);
static Value PersistentAccessor(const Object::Ptr& object);
static Value SourceAccessor(const Object::Ptr& object);
static Value EntryTypeAccessor(const Object::Ptr& object);
static Value ExpiresAccessor(const Object::Ptr& object);
static Value ExpireTimeAccessor(const Object::Ptr& object);
static Object::Ptr HostAccessor(const Value& row);
static Object::Ptr ServiceAccessor(const Value& row);
static Value AuthorAccessor(const Value& row);
static Value CommentAccessor(const Value& row);
static Value IdAccessor(const Value& row);
static Value EntryTimeAccessor(const Value& row);
static Value TypeAccessor(const Value& row);
static Value IsServiceAccessor(const Value& row);
static Value PersistentAccessor(const Value& row);
static Value SourceAccessor(const Value& row);
static Value EntryTypeAccessor(const Value& row);
static Value ExpiresAccessor(const Value& row);
static Value ExpireTimeAccessor(const Value& row);
};
}

View File

@ -50,21 +50,21 @@ void ContactGroupsTable::FetchRows(const AddRowFunction& addRowFn)
}
}
Value ContactGroupsTable::NameAccessor(const Object::Ptr& object)
Value ContactGroupsTable::NameAccessor(const Value& row)
{
return static_pointer_cast<UserGroup>(object)->GetName();
return static_cast<UserGroup::Ptr>(row)->GetName();
}
Value ContactGroupsTable::AliasAccessor(const Object::Ptr& object)
Value ContactGroupsTable::AliasAccessor(const Value& row)
{
return static_pointer_cast<UserGroup>(object)->GetName();
return static_cast<UserGroup::Ptr>(row)->GetName();
}
Value ContactGroupsTable::MembersAccessor(const Object::Ptr& object)
Value ContactGroupsTable::MembersAccessor(const Value& row)
{
Array::Ptr members = boost::make_shared<Array>();
BOOST_FOREACH(const User::Ptr& user, static_pointer_cast<UserGroup>(object)->GetMembers()) {
BOOST_FOREACH(const User::Ptr& user, static_cast<UserGroup::Ptr>(row)->GetMembers()) {
members->Add(user->GetName());
}

View File

@ -45,9 +45,9 @@ public:
protected:
virtual void FetchRows(const AddRowFunction& addRowFn);
static Value NameAccessor(const Object::Ptr& object);
static Value AliasAccessor(const Object::Ptr& object);
static Value MembersAccessor(const Object::Ptr& object);
static Value NameAccessor(const Value& row);
static Value AliasAccessor(const Value& row);
static Value MembersAccessor(const Value& row);
};
}

View File

@ -63,19 +63,19 @@ void ContactsTable::FetchRows(const AddRowFunction& addRowFn)
}
}
Value ContactsTable::NameAccessor(const Object::Ptr& object)
Value ContactsTable::NameAccessor(const Value& row)
{
return static_pointer_cast<User>(object)->GetName();
return static_cast<User::Ptr>(row)->GetName();
}
Value ContactsTable::AliasAccessor(const Object::Ptr& object)
Value ContactsTable::AliasAccessor(const Value& row)
{
return static_pointer_cast<User>(object)->GetDisplayName();
return static_cast<User::Ptr>(row)->GetDisplayName();
}
Value ContactsTable::EmailAccessor(const Object::Ptr& object)
Value ContactsTable::EmailAccessor(const Value& row)
{
Dictionary::Ptr macros = static_pointer_cast<User>(object)->GetMacros();
Dictionary::Ptr macros = static_cast<User::Ptr>(row)->GetMacros();
if (!macros)
return Value();
@ -83,9 +83,9 @@ Value ContactsTable::EmailAccessor(const Object::Ptr& object)
return macros->Get("email");
}
Value ContactsTable::PagerAccessor(const Object::Ptr& object)
Value ContactsTable::PagerAccessor(const Value& row)
{
Dictionary::Ptr macros = static_pointer_cast<User>(object)->GetMacros();
Dictionary::Ptr macros = static_cast<User::Ptr>(row)->GetMacros();
if (!macros)
return Value();
@ -93,73 +93,73 @@ Value ContactsTable::PagerAccessor(const Object::Ptr& object)
return macros->Get("pager");
}
Value ContactsTable::HostNotificationPeriodAccessor(const Object::Ptr& object)
Value ContactsTable::HostNotificationPeriodAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ContactsTable::ServiceNotificationPeriodAccessor(const Object::Ptr& object)
Value ContactsTable::ServiceNotificationPeriodAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ContactsTable::CanSubmitCommandsAccessor(const Object::Ptr& object)
Value ContactsTable::CanSubmitCommandsAccessor(const Value& row)
{
/* TODO - default 1*/
return 1;
}
Value ContactsTable::HostNotificationsEnabledAccessor(const Object::Ptr& object)
Value ContactsTable::HostNotificationsEnabledAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ContactsTable::ServiceNotificationsEnabledAccessor(const Object::Ptr& object)
Value ContactsTable::ServiceNotificationsEnabledAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ContactsTable::InHostNotificationPeriodAccessor(const Object::Ptr& object)
Value ContactsTable::InHostNotificationPeriodAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ContactsTable::InServiceNotificationPeriodAccessor(const Object::Ptr& object)
Value ContactsTable::InServiceNotificationPeriodAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ContactsTable::CustomVariableNamesAccessor(const Object::Ptr& object)
Value ContactsTable::CustomVariableNamesAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ContactsTable::CustomVariableValuesAccessor(const Object::Ptr& object)
Value ContactsTable::CustomVariableValuesAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ContactsTable::CustomVariablesAccessor(const Object::Ptr& object)
Value ContactsTable::CustomVariablesAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ContactsTable::ModifiedAttributesAccessor(const Object::Ptr& object)
Value ContactsTable::ModifiedAttributesAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value ContactsTable::ModifiedAttributesListAccessor(const Object::Ptr& object)
Value ContactsTable::ModifiedAttributesListAccessor(const Value& row)
{
/* not supported */
return Value();

View File

@ -45,22 +45,22 @@ public:
protected:
virtual void FetchRows(const AddRowFunction& addRowFn);
static Value NameAccessor(const Object::Ptr& object);
static Value AliasAccessor(const Object::Ptr& object);
static Value EmailAccessor(const Object::Ptr& object);
static Value PagerAccessor(const Object::Ptr& object);
static Value HostNotificationPeriodAccessor(const Object::Ptr& object);
static Value ServiceNotificationPeriodAccessor(const Object::Ptr& object);
static Value CanSubmitCommandsAccessor(const Object::Ptr& object);
static Value HostNotificationsEnabledAccessor(const Object::Ptr& object);
static Value ServiceNotificationsEnabledAccessor(const Object::Ptr& object);
static Value InHostNotificationPeriodAccessor(const Object::Ptr& object);
static Value InServiceNotificationPeriodAccessor(const Object::Ptr& object);
static Value CustomVariableNamesAccessor(const Object::Ptr& object);
static Value CustomVariableValuesAccessor(const Object::Ptr& object);
static Value CustomVariablesAccessor(const Object::Ptr& object);
static Value ModifiedAttributesAccessor(const Object::Ptr& object);
static Value ModifiedAttributesListAccessor(const Object::Ptr& object);
static Value NameAccessor(const Value& row);
static Value AliasAccessor(const Value& row);
static Value EmailAccessor(const Value& row);
static Value PagerAccessor(const Value& row);
static Value HostNotificationPeriodAccessor(const Value& row);
static Value ServiceNotificationPeriodAccessor(const Value& row);
static Value CanSubmitCommandsAccessor(const Value& row);
static Value HostNotificationsEnabledAccessor(const Value& row);
static Value ServiceNotificationsEnabledAccessor(const Value& row);
static Value InHostNotificationPeriodAccessor(const Value& row);
static Value InServiceNotificationPeriodAccessor(const Value& row);
static Value CustomVariableNamesAccessor(const Value& row);
static Value CustomVariableValuesAccessor(const Value& row);
static Value CustomVariablesAccessor(const Value& row);
static Value ModifiedAttributesAccessor(const Value& row);
static Value ModifiedAttributesListAccessor(const Value& row);
};
}

View File

@ -66,95 +66,81 @@ void DowntimesTable::FetchRows(const AddRowFunction& addRowFn)
ObjectLock olock(downtimes);
Value downtime;
/*Value downtime;
BOOST_FOREACH(boost::tie(boost::tuples::ignore, downtime), downtimes) {
addRowFn(downtime);
}*/
String id;
BOOST_FOREACH(boost::tie(id, boost::tuples::ignore), downtimes) {
addRowFn(id);
}
}
}
Value DowntimesTable::AuthorAccessor(const Object::Ptr& object)
Value DowntimesTable::AuthorAccessor(const Value& row)
{
/*
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
return downtime->Get("author");
*/
}
Value DowntimesTable::CommentAccessor(const Object::Ptr& object)
Value DowntimesTable::CommentAccessor(const Value& row)
{
/*
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
return downtime->Get("comment");
*/
}
Value DowntimesTable::IdAccessor(const Object::Ptr& object)
Value DowntimesTable::IdAccessor(const Value& row)
{
/*
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
return downtime->Get("legacy_id");
*/
}
Value DowntimesTable::EntryTimeAccessor(const Object::Ptr& object)
Value DowntimesTable::EntryTimeAccessor(const Value& row)
{
/*
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
return downtime->Get("entry_time");
*/
}
Value DowntimesTable::TypeAccessor(const Object::Ptr& object)
Value DowntimesTable::TypeAccessor(const Value& row)
{
/*
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
// 1 .. active, 0 .. pending
return (Service::IsDowntimeActive(downtime) ? 1 : 0);
*/
}
Value DowntimesTable::IsServiceAccessor(const Object::Ptr& object)
Value DowntimesTable::IsServiceAccessor(const Value& row)
{
/*
Service::Ptr svc = Service::GetOwnerByDowntimeID(row);
return (svc->IsHostCheck() ? 0 : 1);
*/
}
Value DowntimesTable::StartTimeAccessor(const Object::Ptr& object)
Value DowntimesTable::StartTimeAccessor(const Value& row)
{
/*
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
return downtime->Get("start_time");
*/
}
Value DowntimesTable::EndTimeAccessor(const Object::Ptr& object)
Value DowntimesTable::EndTimeAccessor(const Value& row)
{
/*
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
return downtime->Get("end_time");
*/
}
Value DowntimesTable::FixedAccessor(const Object::Ptr& object)
Value DowntimesTable::FixedAccessor(const Value& row)
{
/*
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
return downtime->Get("fixed");
*/
}
Value DowntimesTable::DurationAccessor(const Object::Ptr& object)
Value DowntimesTable::DurationAccessor(const Value& row)
{
/*
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
@ -163,7 +149,7 @@ Value DowntimesTable::DurationAccessor(const Object::Ptr& object)
*/
}
Value DowntimesTable::TriggeredByAccessor(const Object::Ptr& object)
Value DowntimesTable::TriggeredByAccessor(const Value& row)
{
/*
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);

View File

@ -45,17 +45,17 @@ public:
protected:
virtual void FetchRows(const AddRowFunction& addRowFn);
static Value AuthorAccessor(const Object::Ptr& object);
static Value CommentAccessor(const Object::Ptr& object);
static Value IdAccessor(const Object::Ptr& object);
static Value EntryTimeAccessor(const Object::Ptr& object);
static Value TypeAccessor(const Object::Ptr& object);
static Value IsServiceAccessor(const Object::Ptr& object);
static Value StartTimeAccessor(const Object::Ptr& object);
static Value EndTimeAccessor(const Object::Ptr& object);
static Value FixedAccessor(const Object::Ptr& object);
static Value DurationAccessor(const Object::Ptr& object);
static Value TriggeredByAccessor(const Object::Ptr& object);
static Value AuthorAccessor(const Value& row);
static Value CommentAccessor(const Value& row);
static Value IdAccessor(const Value& row);
static Value EntryTimeAccessor(const Value& row);
static Value TypeAccessor(const Value& row);
static Value IsServiceAccessor(const Value& row);
static Value StartTimeAccessor(const Value& row);
static Value EndTimeAccessor(const Value& row);
static Value FixedAccessor(const Value& row);
static Value DurationAccessor(const Value& row);
static Value TriggeredByAccessor(const Value& row);
};
}

View File

@ -50,21 +50,21 @@ void HostGroupsTable::FetchRows(const AddRowFunction& addRowFn)
}
}
Value HostGroupsTable::NameAccessor(const Object::Ptr& object)
Value HostGroupsTable::NameAccessor(const Value& row)
{
return static_pointer_cast<HostGroup>(object)->GetName();
return static_cast<HostGroup::Ptr>(row)->GetName();
}
Value HostGroupsTable::AliasAccessor(const Object::Ptr& object)
Value HostGroupsTable::AliasAccessor(const Value& row)
{
return static_pointer_cast<HostGroup>(object)->GetName();
return static_cast<HostGroup::Ptr>(row)->GetName();
}
Value HostGroupsTable::MembersAccessor(const Object::Ptr& object)
Value HostGroupsTable::MembersAccessor(const Value& row)
{
Array::Ptr members = boost::make_shared<Array>();
BOOST_FOREACH(const Host::Ptr& host, static_pointer_cast<HostGroup>(object)->GetMembers()) {
BOOST_FOREACH(const Host::Ptr& host, static_cast<HostGroup::Ptr>(row)->GetMembers()) {
members->Add(host->GetName());
}

View File

@ -45,9 +45,9 @@ public:
protected:
virtual void FetchRows(const AddRowFunction& addRowFn);
static Value NameAccessor(const Object::Ptr& object);
static Value AliasAccessor(const Object::Ptr& object);
static Value MembersAccessor(const Object::Ptr& object);
static Value NameAccessor(const Value& row);
static Value AliasAccessor(const Value& row);
static Value MembersAccessor(const Value& row);
};
}

View File

@ -163,19 +163,19 @@ void HostsTable::FetchRows(const AddRowFunction& addRowFn)
}
}
Value HostsTable::NameAccessor(const Object::Ptr& object)
Value HostsTable::NameAccessor(const Value& row)
{
return static_pointer_cast<Host>(object)->GetName();
return static_cast<Host::Ptr>(row)->GetName();
}
Value HostsTable::DisplayNameAccessor(const Object::Ptr& object)
Value HostsTable::DisplayNameAccessor(const Value& row)
{
return static_pointer_cast<Host>(object)->GetDisplayName();
return static_cast<Host::Ptr>(row)->GetDisplayName();
}
Value HostsTable::AddressAccessor(const Object::Ptr& object)
Value HostsTable::AddressAccessor(const Value& row)
{
Dictionary::Ptr macros = static_pointer_cast<Host>(object)->GetMacros();
Dictionary::Ptr macros = static_cast<Host::Ptr>(row)->GetMacros();
if (!macros)
return Value();
@ -183,9 +183,9 @@ Value HostsTable::AddressAccessor(const Object::Ptr& object)
return macros->Get("address");
}
Value HostsTable::Address6Accessor(const Object::Ptr& object)
Value HostsTable::Address6Accessor(const Value& row)
{
Dictionary::Ptr macros = static_pointer_cast<Host>(object)->GetMacros();
Dictionary::Ptr macros = static_cast<Host::Ptr>(row)->GetMacros();
if (!macros)
return Value();
@ -193,10 +193,10 @@ Value HostsTable::Address6Accessor(const Object::Ptr& object)
return macros->Get("address6");
}
Value HostsTable::CheckCommandAccessor(const Object::Ptr& object)
Value HostsTable::CheckCommandAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -208,10 +208,10 @@ Value HostsTable::CheckCommandAccessor(const Object::Ptr& object)
return Value();
}
Value HostsTable::CheckCommandExpandedAccessor(const Object::Ptr& object)
Value HostsTable::CheckCommandExpandedAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -223,10 +223,10 @@ Value HostsTable::CheckCommandExpandedAccessor(const Object::Ptr& object)
return Value();
}
Value HostsTable::EventHandlerAccessor(const Object::Ptr& object)
Value HostsTable::EventHandlerAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -238,10 +238,10 @@ Value HostsTable::EventHandlerAccessor(const Object::Ptr& object)
return Value();
}
Value HostsTable::NotificationPeriodAccessor(const Object::Ptr& object)
Value HostsTable::NotificationPeriodAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -250,10 +250,10 @@ Value HostsTable::NotificationPeriodAccessor(const Object::Ptr& object)
return Value();
}
Value HostsTable::CheckPeriodAccessor(const Object::Ptr& object)
Value HostsTable::CheckPeriodAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -266,9 +266,9 @@ Value HostsTable::CheckPeriodAccessor(const Object::Ptr& object)
return timeperiod->GetName();
}
Value HostsTable::NotesAccessor(const Object::Ptr& object)
Value HostsTable::NotesAccessor(const Value& row)
{
Dictionary::Ptr custom = static_pointer_cast<Host>(object)->GetCustom();
Dictionary::Ptr custom = static_cast<Host::Ptr>(row)->GetCustom();
if (!custom)
return Value();
@ -276,15 +276,15 @@ Value HostsTable::NotesAccessor(const Object::Ptr& object)
return custom->Get("notes");
}
Value HostsTable::NotesExpandedAccessor(const Object::Ptr& object)
Value HostsTable::NotesExpandedAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::NotesUrlAccessor(const Object::Ptr& object)
Value HostsTable::NotesUrlAccessor(const Value& row)
{
Dictionary::Ptr custom = static_pointer_cast<Host>(object)->GetCustom();
Dictionary::Ptr custom = static_cast<Host::Ptr>(row)->GetCustom();
if (!custom)
return Value();
@ -292,15 +292,15 @@ Value HostsTable::NotesUrlAccessor(const Object::Ptr& object)
return custom->Get("notes_url");
}
Value HostsTable::NotesUrlExpandedAccessor(const Object::Ptr& object)
Value HostsTable::NotesUrlExpandedAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::ActionUrlAccessor(const Object::Ptr& object)
Value HostsTable::ActionUrlAccessor(const Value& row)
{
Dictionary::Ptr custom = static_pointer_cast<Host>(object)->GetCustom();
Dictionary::Ptr custom = static_cast<Host::Ptr>(row)->GetCustom();
if (!custom)
return Value();
@ -308,16 +308,16 @@ Value HostsTable::ActionUrlAccessor(const Object::Ptr& object)
return custom->Get("action_url");
}
Value HostsTable::ActionUrlExpandedAccessor(const Object::Ptr& object)
Value HostsTable::ActionUrlExpandedAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::PluginOutputAccessor(const Object::Ptr& object)
Value HostsTable::PluginOutputAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
String output;
if(hc)
@ -326,10 +326,10 @@ Value HostsTable::PluginOutputAccessor(const Object::Ptr& object)
return output;
}
Value HostsTable::PerfDataAccessor(const Object::Ptr& object)
Value HostsTable::PerfDataAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
String perfdata;
if (hc)
@ -338,9 +338,9 @@ Value HostsTable::PerfDataAccessor(const Object::Ptr& object)
return perfdata;
}
Value HostsTable::IconImageAccessor(const Object::Ptr& object)
Value HostsTable::IconImageAccessor(const Value& row)
{
Dictionary::Ptr custom = static_pointer_cast<Host>(object)->GetCustom();
Dictionary::Ptr custom = static_cast<Host::Ptr>(row)->GetCustom();
if (!custom)
return Value();
@ -348,15 +348,15 @@ Value HostsTable::IconImageAccessor(const Object::Ptr& object)
return custom->Get("icon_image");
}
Value HostsTable::IconImageExpandedAccessor(const Object::Ptr& object)
Value HostsTable::IconImageExpandedAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::IconImageAltAccessor(const Object::Ptr& object)
Value HostsTable::IconImageAltAccessor(const Value& row)
{
Dictionary::Ptr custom = static_pointer_cast<Host>(object)->GetCustom();
Dictionary::Ptr custom = static_cast<Host::Ptr>(row)->GetCustom();
if (!custom)
return Value();
@ -364,9 +364,9 @@ Value HostsTable::IconImageAltAccessor(const Object::Ptr& object)
return custom->Get("icon_image_alt");
}
Value HostsTable::StatusmapImageAccessor(const Object::Ptr& object)
Value HostsTable::StatusmapImageAccessor(const Value& row)
{
Dictionary::Ptr custom = static_pointer_cast<Host>(object)->GetCustom();
Dictionary::Ptr custom = static_cast<Host::Ptr>(row)->GetCustom();
if (!custom)
return Value();
@ -374,10 +374,10 @@ Value HostsTable::StatusmapImageAccessor(const Object::Ptr& object)
return custom->Get("statusmap_image");
}
Value HostsTable::LongPluginOutputAccessor(const Object::Ptr& object)
Value HostsTable::LongPluginOutputAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
String long_output;
if (hc)
@ -386,16 +386,16 @@ Value HostsTable::LongPluginOutputAccessor(const Object::Ptr& object)
return long_output;
}
Value HostsTable::InitialStateAccessor(const Object::Ptr& object)
Value HostsTable::InitialStateAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::MaxCheckAttemptsAccessor(const Object::Ptr& object)
Value HostsTable::MaxCheckAttemptsAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -403,10 +403,10 @@ Value HostsTable::MaxCheckAttemptsAccessor(const Object::Ptr& object)
return hc->GetMaxCheckAttempts();
}
Value HostsTable::FlapDetectionEnabledAccessor(const Object::Ptr& object)
Value HostsTable::FlapDetectionEnabledAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -414,22 +414,22 @@ Value HostsTable::FlapDetectionEnabledAccessor(const Object::Ptr& object)
return (hc->GetEnableFlapping() ? 1 : 0);
}
Value HostsTable::CheckFreshnessAccessor(const Object::Ptr& object)
Value HostsTable::CheckFreshnessAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::ProcessPerformanceDataAccessor(const Object::Ptr& object)
Value HostsTable::ProcessPerformanceDataAccessor(const Value& row)
{
/* TODO always enabled */
return Value(1);
}
Value HostsTable::AcceptPassiveChecksAccessor(const Object::Ptr& object)
Value HostsTable::AcceptPassiveChecksAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -437,16 +437,16 @@ Value HostsTable::AcceptPassiveChecksAccessor(const Object::Ptr& object)
return (hc->GetEnablePassiveChecks() ? 1 : 0);
}
Value HostsTable::EventHandlerEnabledAccessor(const Object::Ptr& object)
Value HostsTable::EventHandlerEnabledAccessor(const Value& row)
{
/* TODO always enabled */
return Value(1);
}
Value HostsTable::AcknowledgementTypeAccessor(const Object::Ptr& object)
Value HostsTable::AcknowledgementTypeAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -457,10 +457,10 @@ Value HostsTable::AcknowledgementTypeAccessor(const Object::Ptr& object)
return static_cast<int>(hc->GetAcknowledgement());
}
Value HostsTable::CheckTypeAccessor(const Object::Ptr& object)
Value HostsTable::CheckTypeAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -468,20 +468,20 @@ Value HostsTable::CheckTypeAccessor(const Object::Ptr& object)
return (hc->GetEnableActiveChecks() ? 1 : 0);
}
Value HostsTable::LastStateAccessor(const Object::Ptr& object)
Value HostsTable::LastStateAccessor(const Value& row)
{
return static_pointer_cast<Host>(object)->GetLastState();
return static_cast<Host::Ptr>(row)->GetLastState();
}
Value HostsTable::LastHardStateAccessor(const Object::Ptr& object)
Value HostsTable::LastHardStateAccessor(const Value& row)
{
return static_pointer_cast<Host>(object)->GetLastHardState();
return static_cast<Host::Ptr>(row)->GetLastHardState();
}
Value HostsTable::CurrentAttemptAccessor(const Object::Ptr& object)
Value HostsTable::CurrentAttemptAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -489,22 +489,22 @@ Value HostsTable::CurrentAttemptAccessor(const Object::Ptr& object)
return hc->GetCurrentCheckAttempt();
}
Value HostsTable::LastNotificationAccessor(const Object::Ptr& object)
Value HostsTable::LastNotificationAccessor(const Value& row)
{
/* TODO Host->Service->GetNotifications->(loop)->GetLastNotification() */
return Value();
}
Value HostsTable::NextNotificationAccessor(const Object::Ptr& object)
Value HostsTable::NextNotificationAccessor(const Value& row)
{
/* TODO Host->Service->GetNotifications->(loop)->GetNextNotification() */
return Value();
}
Value HostsTable::NextCheckAccessor(const Object::Ptr& object)
Value HostsTable::NextCheckAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -512,10 +512,10 @@ Value HostsTable::NextCheckAccessor(const Object::Ptr& object)
return hc->GetNextCheck();
}
Value HostsTable::LastHardStateChangeAccessor(const Object::Ptr& object)
Value HostsTable::LastHardStateChangeAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -523,10 +523,10 @@ Value HostsTable::LastHardStateChangeAccessor(const Object::Ptr& object)
return hc->GetLastHardStateChange();
}
Value HostsTable::HasBeenCheckedAccessor(const Object::Ptr& object)
Value HostsTable::HasBeenCheckedAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -534,27 +534,27 @@ Value HostsTable::HasBeenCheckedAccessor(const Object::Ptr& object)
return (hc->HasBeenChecked() ? 1 : 0);
}
Value HostsTable::CurrentNotificationNumberAccessor(const Object::Ptr& object)
Value HostsTable::CurrentNotificationNumberAccessor(const Value& row)
{
/* TODO Host->Service->GetNotifications->(loop) new attribute */
return Value();
}
Value HostsTable::PendingFlexDowntimeAccessor(const Object::Ptr& object)
Value HostsTable::PendingFlexDowntimeAccessor(const Value& row)
{
/* TODO Host->Service->GetDowntimes->(loop) type flexible? */
return Value();
}
Value HostsTable::TotalServicesAccessor(const Object::Ptr& object)
Value HostsTable::TotalServicesAccessor(const Value& row)
{
return static_pointer_cast<Host>(object)->GetTotalServices();
return static_cast<Host::Ptr>(row)->GetTotalServices();
}
Value HostsTable::ChecksEnabledAccessor(const Object::Ptr& object)
Value HostsTable::ChecksEnabledAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -562,10 +562,10 @@ Value HostsTable::ChecksEnabledAccessor(const Object::Ptr& object)
return (hc->GetEnableActiveChecks() ? 1 : 0);
}
Value HostsTable::NotificationsEnabledAccessor(const Object::Ptr& object)
Value HostsTable::NotificationsEnabledAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -573,10 +573,10 @@ Value HostsTable::NotificationsEnabledAccessor(const Object::Ptr& object)
return (hc->GetEnableNotifications() ? 1 : 0);
}
Value HostsTable::AcknowledgedAccessor(const Object::Ptr& object)
Value HostsTable::AcknowledgedAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -587,32 +587,32 @@ Value HostsTable::AcknowledgedAccessor(const Object::Ptr& object)
return (hc->IsAcknowledged() ? 1 : 0);
}
Value HostsTable::StateAccessor(const Object::Ptr& object)
Value HostsTable::StateAccessor(const Value& row)
{
return static_pointer_cast<Host>(object)->GetState();
return static_cast<Host::Ptr>(row)->GetState();
}
Value HostsTable::StateTypeAccessor(const Object::Ptr& object)
Value HostsTable::StateTypeAccessor(const Value& row)
{
return static_pointer_cast<Host>(object)->GetStateType();
return static_cast<Host::Ptr>(row)->GetStateType();
}
Value HostsTable::NoMoreNotificationsAccessor(const Object::Ptr& object)
Value HostsTable::NoMoreNotificationsAccessor(const Value& row)
{
/* TODO: notification_interval == 0, volatile == false */
return Value(0);
}
Value HostsTable::CheckFlappingRecoveryNotificationAccessor(const Object::Ptr& object)
Value HostsTable::CheckFlappingRecoveryNotificationAccessor(const Value& row)
{
/* TODO: if we're flapping, state != OK && notified once, set to true */
return Value(0);
}
Value HostsTable::LastCheckAccessor(const Object::Ptr& object)
Value HostsTable::LastCheckAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -620,33 +620,33 @@ Value HostsTable::LastCheckAccessor(const Object::Ptr& object)
return hc->GetLastCheck();
}
Value HostsTable::LastStateChangeAccessor(const Object::Ptr& object)
Value HostsTable::LastStateChangeAccessor(const Value& row)
{
return static_pointer_cast<Host>(object)->GetLastStateChange();
return static_cast<Host::Ptr>(row)->GetLastStateChange();
}
Value HostsTable::LastTimeUpAccessor(const Object::Ptr& object)
Value HostsTable::LastTimeUpAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::LastTimeDownAccessor(const Object::Ptr& object)
Value HostsTable::LastTimeDownAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::LastTimeUnreachableAccessor(const Object::Ptr& object)
Value HostsTable::LastTimeUnreachableAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::IsFlappingAccessor(const Object::Ptr& object)
Value HostsTable::IsFlappingAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -654,10 +654,10 @@ Value HostsTable::IsFlappingAccessor(const Object::Ptr& object)
return hc->IsFlapping();
}
Value HostsTable::ScheduledDowntimeDepthAccessor(const Object::Ptr& object)
Value HostsTable::ScheduledDowntimeDepthAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -665,17 +665,17 @@ Value HostsTable::ScheduledDowntimeDepthAccessor(const Object::Ptr& object)
return hc->GetDowntimeDepth();
}
Value HostsTable::IsExecutingAccessor(const Object::Ptr& object)
Value HostsTable::IsExecutingAccessor(const Value& row)
{
/* TODO does that make sense with Icinga2? */
return Value();
}
Value HostsTable::ActiveChecksEnabledAccessor(const Object::Ptr& object)
Value HostsTable::ActiveChecksEnabledAccessor(const Value& row)
{
/* duplicate of ChecksEnableAccessor */
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -683,34 +683,34 @@ Value HostsTable::ActiveChecksEnabledAccessor(const Object::Ptr& object)
return (hc->GetEnableActiveChecks() ? 1 : 0);
}
Value HostsTable::CheckOptionsAccessor(const Object::Ptr& object)
Value HostsTable::CheckOptionsAccessor(const Value& row)
{
/* TODO - forcexec, freshness, orphan, none */
return Value();
}
Value HostsTable::ObsessOverHostAccessor(const Object::Ptr& object)
Value HostsTable::ObsessOverHostAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value HostsTable::ModifiedAttributesAccessor(const Object::Ptr& object)
Value HostsTable::ModifiedAttributesAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value HostsTable::ModifiedAttributesListAccessor(const Object::Ptr& object)
Value HostsTable::ModifiedAttributesListAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value HostsTable::CheckIntervalAccessor(const Object::Ptr& object)
Value HostsTable::CheckIntervalAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -718,10 +718,10 @@ Value HostsTable::CheckIntervalAccessor(const Object::Ptr& object)
return (hc->GetCheckInterval() / 60.0);
}
Value HostsTable::RetryIntervalAccessor(const Object::Ptr& object)
Value HostsTable::RetryIntervalAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -729,64 +729,64 @@ Value HostsTable::RetryIntervalAccessor(const Object::Ptr& object)
return (hc->GetRetryInterval() / 60.0);
}
Value HostsTable::NotificationIntervalAccessor(const Object::Ptr& object)
Value HostsTable::NotificationIntervalAccessor(const Value& row)
{
/* TODO Host->Services->GetNotifications->(loop)->GetNotificationInterval() */
return Value();
}
Value HostsTable::FirstNotificationDelayAccessor(const Object::Ptr& object)
Value HostsTable::FirstNotificationDelayAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value HostsTable::LowFlapThresholdAccessor(const Object::Ptr& object)
Value HostsTable::LowFlapThresholdAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::HighFlapThresholdAccessor(const Object::Ptr& object)
Value HostsTable::HighFlapThresholdAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::X3dAccessor(const Object::Ptr& object)
Value HostsTable::X3dAccessor(const Value& row)
{
/* not supported - removed in Icinga 1.x */
return Value();
}
Value HostsTable::Y3dAccessor(const Object::Ptr& object)
Value HostsTable::Y3dAccessor(const Value& row)
{
/* not supported - removed in Icinga 1.x */
return Value();
}
Value HostsTable::Z3dAccessor(const Object::Ptr& object)
Value HostsTable::Z3dAccessor(const Value& row)
{
/* not supported - removed in Icinga 1.x */
return Value();
}
Value HostsTable::X2dAccessor(const Object::Ptr& object)
Value HostsTable::X2dAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::Y2dAccessor(const Object::Ptr& object)
Value HostsTable::Y2dAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::LatencyAccessor(const Object::Ptr& object)
Value HostsTable::LatencyAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -794,10 +794,10 @@ Value HostsTable::LatencyAccessor(const Object::Ptr& object)
return (Service::CalculateLatency(hc->GetLastCheckResult()));
}
Value HostsTable::ExecutionTimeAccessor(const Object::Ptr& object)
Value HostsTable::ExecutionTimeAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -805,10 +805,10 @@ Value HostsTable::ExecutionTimeAccessor(const Object::Ptr& object)
return (Service::CalculateExecutionTime(hc->GetLastCheckResult()));
}
Value HostsTable::PercentStateChangeAccessor(const Object::Ptr& object)
Value HostsTable::PercentStateChangeAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -816,23 +816,23 @@ Value HostsTable::PercentStateChangeAccessor(const Object::Ptr& object)
return hc->GetFlappingCurrent();
}
Value HostsTable::InNotificationPeriodAccessor(const Object::Ptr& object)
Value HostsTable::InNotificationPeriodAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::InCheckPeriodAccessor(const Object::Ptr& object)
Value HostsTable::InCheckPeriodAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::ContactsAccessor(const Object::Ptr& object)
Value HostsTable::ContactsAccessor(const Value& row)
{
/* TODO - host->service->notifications->users */
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -857,147 +857,147 @@ Value HostsTable::ContactsAccessor(const Object::Ptr& object)
return Value();
}
Value HostsTable::DowntimesAccessor(const Object::Ptr& object)
Value HostsTable::DowntimesAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::DowntimesWithInfoAccessor(const Object::Ptr& object)
Value HostsTable::DowntimesWithInfoAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::CommentsAccessor(const Object::Ptr& object)
Value HostsTable::CommentsAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::CommentsWithInfoAccessor(const Object::Ptr& object)
Value HostsTable::CommentsWithInfoAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::CommentsWithExtraInfoAccessor(const Object::Ptr& object)
Value HostsTable::CommentsWithExtraInfoAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::CustomVariableNamesAccessor(const Object::Ptr& object)
Value HostsTable::CustomVariableNamesAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::CustomVariableValuesAccessor(const Object::Ptr& object)
Value HostsTable::CustomVariableValuesAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::CustomVariablesAccessor(const Object::Ptr& object)
Value HostsTable::CustomVariablesAccessor(const Value& row)
{
/* TODO Dictionary */
return Value();
}
Value HostsTable::FilenameAccessor(const Object::Ptr& object)
Value HostsTable::FilenameAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::ParentsAccessor(const Object::Ptr& object)
Value HostsTable::ParentsAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::ChildsAccessor(const Object::Ptr& object)
Value HostsTable::ChildsAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::NumServicesAccessor(const Object::Ptr& object)
Value HostsTable::NumServicesAccessor(const Value& row)
{
/* duplicate of TotalServices */
return static_pointer_cast<Host>(object)->GetTotalServices();
return static_cast<Host::Ptr>(row)->GetTotalServices();
}
Value HostsTable::WorstServiceStateAccessor(const Object::Ptr& object)
Value HostsTable::WorstServiceStateAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::NumServicesOkAccessor(const Object::Ptr& object)
Value HostsTable::NumServicesOkAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::NumServicesWarnAccessor(const Object::Ptr& object)
Value HostsTable::NumServicesWarnAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::NumServicesCritAccessor(const Object::Ptr& object)
Value HostsTable::NumServicesCritAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::NumServicesUnknownAccessor(const Object::Ptr& object)
Value HostsTable::NumServicesUnknownAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::NumServicesPendingAccessor(const Object::Ptr& object)
Value HostsTable::NumServicesPendingAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::WorstServiceHardStateAccessor(const Object::Ptr& object)
Value HostsTable::WorstServiceHardStateAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::NumServicesHardOkAccessor(const Object::Ptr& object)
Value HostsTable::NumServicesHardOkAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::NumServicesHardWarnAccessor(const Object::Ptr& object)
Value HostsTable::NumServicesHardWarnAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::NumServicesHardCritAccessor(const Object::Ptr& object)
Value HostsTable::NumServicesHardCritAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::NumServicesHardUnknownAccessor(const Object::Ptr& object)
Value HostsTable::NumServicesHardUnknownAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::HardStateAccessor(const Object::Ptr& object)
Value HostsTable::HardStateAccessor(const Value& row)
{
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -1010,23 +1010,23 @@ Value HostsTable::HardStateAccessor(const Object::Ptr& object)
return hc->GetLastHardState();
}
Value HostsTable::PnpgraphPresentAccessor(const Object::Ptr& object)
Value HostsTable::PnpgraphPresentAccessor(const Value& row)
{
/* wtf. not supported */
return Value();
}
Value HostsTable::StalenessAccessor(const Object::Ptr& object)
Value HostsTable::StalenessAccessor(const Value& row)
{
/* TODO time since last check normalized on the check_interval */
return Value();
}
Value HostsTable::GroupsAccessor(const Object::Ptr& object)
Value HostsTable::GroupsAccessor(const Value& row)
{
/* TODO create array */
/* use hostcheck service */
Service::Ptr hc = static_pointer_cast<Host>(object)->GetHostCheckService();
Service::Ptr hc = static_cast<Host::Ptr>(row)->GetHostCheckService();
if (!hc)
return Value();
@ -1034,26 +1034,26 @@ Value HostsTable::GroupsAccessor(const Object::Ptr& object)
return hc->GetGroups();
}
Value HostsTable::ContactGroupsAccessor(const Object::Ptr& object)
Value HostsTable::ContactGroupsAccessor(const Value& row)
{
/* TODO create array */
return Value();
}
Value HostsTable::ServicesAccessor(const Object::Ptr& object)
Value HostsTable::ServicesAccessor(const Value& row)
{
/* TODO create array */
return Value();
}
/* dictionary */
Value HostsTable::ServicesWithStateAccessor(const Object::Ptr& object)
Value HostsTable::ServicesWithStateAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value HostsTable::ServicesWithInfoAccessor(const Object::Ptr& object)
Value HostsTable::ServicesWithInfoAccessor(const Value& row)
{
/* TODO */
return Value();

View File

@ -45,117 +45,117 @@ public:
protected:
virtual void FetchRows(const AddRowFunction& addRowFn);
static Value NameAccessor(const Object::Ptr& object);
static Value DisplayNameAccessor(const Object::Ptr& object);
static Value AddressAccessor(const Object::Ptr& object);
static Value Address6Accessor(const Object::Ptr& object);
static Value CheckCommandAccessor(const Object::Ptr& object);
static Value CheckCommandExpandedAccessor(const Object::Ptr& object);
static Value EventHandlerAccessor(const Object::Ptr& object);
static Value NotificationPeriodAccessor(const Object::Ptr& object);
static Value CheckPeriodAccessor(const Object::Ptr& object);
static Value NotesAccessor(const Object::Ptr& object);
static Value NotesExpandedAccessor(const Object::Ptr& object);
static Value NotesUrlAccessor(const Object::Ptr& object);
static Value NotesUrlExpandedAccessor(const Object::Ptr& object);
static Value ActionUrlAccessor(const Object::Ptr& object);
static Value ActionUrlExpandedAccessor(const Object::Ptr& object);
static Value PluginOutputAccessor(const Object::Ptr& object);
static Value PerfDataAccessor(const Object::Ptr& object);
static Value IconImageAccessor(const Object::Ptr& object);
static Value IconImageExpandedAccessor(const Object::Ptr& object);
static Value IconImageAltAccessor(const Object::Ptr& object);
static Value StatusmapImageAccessor(const Object::Ptr& object);
static Value LongPluginOutputAccessor(const Object::Ptr& object);
static Value InitialStateAccessor(const Object::Ptr& object);
static Value MaxCheckAttemptsAccessor(const Object::Ptr& object);
static Value FlapDetectionEnabledAccessor(const Object::Ptr& object);
static Value CheckFreshnessAccessor(const Object::Ptr& object);
static Value ProcessPerformanceDataAccessor(const Object::Ptr& object);
static Value AcceptPassiveChecksAccessor(const Object::Ptr& object);
static Value EventHandlerEnabledAccessor(const Object::Ptr& object);
static Value AcknowledgementTypeAccessor(const Object::Ptr& object);
static Value CheckTypeAccessor(const Object::Ptr& object);
static Value LastStateAccessor(const Object::Ptr& object);
static Value LastHardStateAccessor(const Object::Ptr& object);
static Value CurrentAttemptAccessor(const Object::Ptr& object);
static Value LastNotificationAccessor(const Object::Ptr& object);
static Value NextNotificationAccessor(const Object::Ptr& object);
static Value NextCheckAccessor(const Object::Ptr& object);
static Value LastHardStateChangeAccessor(const Object::Ptr& object);
static Value HasBeenCheckedAccessor(const Object::Ptr& object);
static Value CurrentNotificationNumberAccessor(const Object::Ptr& object);
static Value PendingFlexDowntimeAccessor(const Object::Ptr& object);
static Value TotalServicesAccessor(const Object::Ptr& object);
static Value ChecksEnabledAccessor(const Object::Ptr& object);
static Value NotificationsEnabledAccessor(const Object::Ptr& object);
static Value AcknowledgedAccessor(const Object::Ptr& object);
static Value StateAccessor(const Object::Ptr& object);
static Value StateTypeAccessor(const Object::Ptr& object);
static Value NoMoreNotificationsAccessor(const Object::Ptr& object);
static Value CheckFlappingRecoveryNotificationAccessor(const Object::Ptr& object);
static Value LastCheckAccessor(const Object::Ptr& object);
static Value LastStateChangeAccessor(const Object::Ptr& object);
static Value LastTimeUpAccessor(const Object::Ptr& object);
static Value LastTimeDownAccessor(const Object::Ptr& object);
static Value LastTimeUnreachableAccessor(const Object::Ptr& object);
static Value IsFlappingAccessor(const Object::Ptr& object);
static Value ScheduledDowntimeDepthAccessor(const Object::Ptr& object);
static Value IsExecutingAccessor(const Object::Ptr& object);
static Value ActiveChecksEnabledAccessor(const Object::Ptr& object);
static Value CheckOptionsAccessor(const Object::Ptr& object);
static Value ObsessOverHostAccessor(const Object::Ptr& object);
static Value ModifiedAttributesAccessor(const Object::Ptr& object);
static Value ModifiedAttributesListAccessor(const Object::Ptr& object);
static Value CheckIntervalAccessor(const Object::Ptr& object);
static Value RetryIntervalAccessor(const Object::Ptr& object);
static Value NotificationIntervalAccessor(const Object::Ptr& object);
static Value FirstNotificationDelayAccessor(const Object::Ptr& object);
static Value LowFlapThresholdAccessor(const Object::Ptr& object);
static Value HighFlapThresholdAccessor(const Object::Ptr& object);
static Value X3dAccessor(const Object::Ptr& object);
static Value Y3dAccessor(const Object::Ptr& object);
static Value Z3dAccessor(const Object::Ptr& object);
static Value X2dAccessor(const Object::Ptr& object);
static Value Y2dAccessor(const Object::Ptr& object);
static Value LatencyAccessor(const Object::Ptr& object);
static Value ExecutionTimeAccessor(const Object::Ptr& object);
static Value PercentStateChangeAccessor(const Object::Ptr& object);
static Value InNotificationPeriodAccessor(const Object::Ptr& object);
static Value InCheckPeriodAccessor(const Object::Ptr& object);
static Value ContactsAccessor(const Object::Ptr& object);
static Value DowntimesAccessor(const Object::Ptr& object);
static Value DowntimesWithInfoAccessor(const Object::Ptr& object);
static Value CommentsAccessor(const Object::Ptr& object);
static Value CommentsWithInfoAccessor(const Object::Ptr& object);
static Value CommentsWithExtraInfoAccessor(const Object::Ptr& object);
static Value CustomVariableNamesAccessor(const Object::Ptr& object);
static Value CustomVariableValuesAccessor(const Object::Ptr& object);
static Value CustomVariablesAccessor(const Object::Ptr& object);
static Value FilenameAccessor(const Object::Ptr& object);
static Value ParentsAccessor(const Object::Ptr& object);
static Value ChildsAccessor(const Object::Ptr& object);
static Value NumServicesAccessor(const Object::Ptr& object);
static Value WorstServiceStateAccessor(const Object::Ptr& object);
static Value NumServicesOkAccessor(const Object::Ptr& object);
static Value NumServicesWarnAccessor(const Object::Ptr& object);
static Value NumServicesCritAccessor(const Object::Ptr& object);
static Value NumServicesUnknownAccessor(const Object::Ptr& object);
static Value NumServicesPendingAccessor(const Object::Ptr& object);
static Value WorstServiceHardStateAccessor(const Object::Ptr& object);
static Value NumServicesHardOkAccessor(const Object::Ptr& object);
static Value NumServicesHardWarnAccessor(const Object::Ptr& object);
static Value NumServicesHardCritAccessor(const Object::Ptr& object);
static Value NumServicesHardUnknownAccessor(const Object::Ptr& object);
static Value HardStateAccessor(const Object::Ptr& object);
static Value PnpgraphPresentAccessor(const Object::Ptr& object);
static Value StalenessAccessor(const Object::Ptr& object);
static Value GroupsAccessor(const Object::Ptr& object);
static Value ContactGroupsAccessor(const Object::Ptr& object);
static Value ServicesAccessor(const Object::Ptr& object);
static Value NameAccessor(const Value& row);
static Value DisplayNameAccessor(const Value& row);
static Value AddressAccessor(const Value& row);
static Value Address6Accessor(const Value& row);
static Value CheckCommandAccessor(const Value& row);
static Value CheckCommandExpandedAccessor(const Value& row);
static Value EventHandlerAccessor(const Value& row);
static Value NotificationPeriodAccessor(const Value& row);
static Value CheckPeriodAccessor(const Value& row);
static Value NotesAccessor(const Value& row);
static Value NotesExpandedAccessor(const Value& row);
static Value NotesUrlAccessor(const Value& row);
static Value NotesUrlExpandedAccessor(const Value& row);
static Value ActionUrlAccessor(const Value& row);
static Value ActionUrlExpandedAccessor(const Value& row);
static Value PluginOutputAccessor(const Value& row);
static Value PerfDataAccessor(const Value& row);
static Value IconImageAccessor(const Value& row);
static Value IconImageExpandedAccessor(const Value& row);
static Value IconImageAltAccessor(const Value& row);
static Value StatusmapImageAccessor(const Value& row);
static Value LongPluginOutputAccessor(const Value& row);
static Value InitialStateAccessor(const Value& row);
static Value MaxCheckAttemptsAccessor(const Value& row);
static Value FlapDetectionEnabledAccessor(const Value& row);
static Value CheckFreshnessAccessor(const Value& row);
static Value ProcessPerformanceDataAccessor(const Value& row);
static Value AcceptPassiveChecksAccessor(const Value& row);
static Value EventHandlerEnabledAccessor(const Value& row);
static Value AcknowledgementTypeAccessor(const Value& row);
static Value CheckTypeAccessor(const Value& row);
static Value LastStateAccessor(const Value& row);
static Value LastHardStateAccessor(const Value& row);
static Value CurrentAttemptAccessor(const Value& row);
static Value LastNotificationAccessor(const Value& row);
static Value NextNotificationAccessor(const Value& row);
static Value NextCheckAccessor(const Value& row);
static Value LastHardStateChangeAccessor(const Value& row);
static Value HasBeenCheckedAccessor(const Value& row);
static Value CurrentNotificationNumberAccessor(const Value& row);
static Value PendingFlexDowntimeAccessor(const Value& row);
static Value TotalServicesAccessor(const Value& row);
static Value ChecksEnabledAccessor(const Value& row);
static Value NotificationsEnabledAccessor(const Value& row);
static Value AcknowledgedAccessor(const Value& row);
static Value StateAccessor(const Value& row);
static Value StateTypeAccessor(const Value& row);
static Value NoMoreNotificationsAccessor(const Value& row);
static Value CheckFlappingRecoveryNotificationAccessor(const Value& row);
static Value LastCheckAccessor(const Value& row);
static Value LastStateChangeAccessor(const Value& row);
static Value LastTimeUpAccessor(const Value& row);
static Value LastTimeDownAccessor(const Value& row);
static Value LastTimeUnreachableAccessor(const Value& row);
static Value IsFlappingAccessor(const Value& row);
static Value ScheduledDowntimeDepthAccessor(const Value& row);
static Value IsExecutingAccessor(const Value& row);
static Value ActiveChecksEnabledAccessor(const Value& row);
static Value CheckOptionsAccessor(const Value& row);
static Value ObsessOverHostAccessor(const Value& row);
static Value ModifiedAttributesAccessor(const Value& row);
static Value ModifiedAttributesListAccessor(const Value& row);
static Value CheckIntervalAccessor(const Value& row);
static Value RetryIntervalAccessor(const Value& row);
static Value NotificationIntervalAccessor(const Value& row);
static Value FirstNotificationDelayAccessor(const Value& row);
static Value LowFlapThresholdAccessor(const Value& row);
static Value HighFlapThresholdAccessor(const Value& row);
static Value X3dAccessor(const Value& row);
static Value Y3dAccessor(const Value& row);
static Value Z3dAccessor(const Value& row);
static Value X2dAccessor(const Value& row);
static Value Y2dAccessor(const Value& row);
static Value LatencyAccessor(const Value& row);
static Value ExecutionTimeAccessor(const Value& row);
static Value PercentStateChangeAccessor(const Value& row);
static Value InNotificationPeriodAccessor(const Value& row);
static Value InCheckPeriodAccessor(const Value& row);
static Value ContactsAccessor(const Value& row);
static Value DowntimesAccessor(const Value& row);
static Value DowntimesWithInfoAccessor(const Value& row);
static Value CommentsAccessor(const Value& row);
static Value CommentsWithInfoAccessor(const Value& row);
static Value CommentsWithExtraInfoAccessor(const Value& row);
static Value CustomVariableNamesAccessor(const Value& row);
static Value CustomVariableValuesAccessor(const Value& row);
static Value CustomVariablesAccessor(const Value& row);
static Value FilenameAccessor(const Value& row);
static Value ParentsAccessor(const Value& row);
static Value ChildsAccessor(const Value& row);
static Value NumServicesAccessor(const Value& row);
static Value WorstServiceStateAccessor(const Value& row);
static Value NumServicesOkAccessor(const Value& row);
static Value NumServicesWarnAccessor(const Value& row);
static Value NumServicesCritAccessor(const Value& row);
static Value NumServicesUnknownAccessor(const Value& row);
static Value NumServicesPendingAccessor(const Value& row);
static Value WorstServiceHardStateAccessor(const Value& row);
static Value NumServicesHardOkAccessor(const Value& row);
static Value NumServicesHardWarnAccessor(const Value& row);
static Value NumServicesHardCritAccessor(const Value& row);
static Value NumServicesHardUnknownAccessor(const Value& row);
static Value HardStateAccessor(const Value& row);
static Value PnpgraphPresentAccessor(const Value& row);
static Value StalenessAccessor(const Value& row);
static Value GroupsAccessor(const Value& row);
static Value ContactGroupsAccessor(const Value& row);
static Value ServicesAccessor(const Value& row);
static Value ServicesWithStateAccessor(const Object::Ptr& object);
static Value ServicesWithInfoAccessor(const Object::Ptr& object);
static Value ServicesWithStateAccessor(const Value& row);
static Value ServicesWithInfoAccessor(const Value& row);
};
}

View File

@ -65,91 +65,91 @@ void LogTable::FetchRows(const AddRowFunction& addRowFn)
addRowFn(obj);
}
Value LogTable::TimeAccessor(const Object::Ptr& object)
Value LogTable::TimeAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value LogTable::LinenoAccessor(const Object::Ptr& object)
Value LogTable::LinenoAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value LogTable::ClassAccessor(const Object::Ptr& object)
Value LogTable::ClassAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value LogTable::MessageAccessor(const Object::Ptr& object)
Value LogTable::MessageAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value LogTable::TypeAccessor(const Object::Ptr& object)
Value LogTable::TypeAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value LogTable::OptionsAccessor(const Object::Ptr& object)
Value LogTable::OptionsAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value LogTable::CommentAccessor(const Object::Ptr& object)
Value LogTable::CommentAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value LogTable::PluginOutputAccessor(const Object::Ptr& object)
Value LogTable::PluginOutputAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value LogTable::StateAccessor(const Object::Ptr& object)
Value LogTable::StateAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value LogTable::StateTypeAccessor(const Object::Ptr& object)
Value LogTable::StateTypeAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value LogTable::AttemptAccessor(const Object::Ptr& object)
Value LogTable::AttemptAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value LogTable::ServiceDescriptionAccessor(const Object::Ptr& object)
Value LogTable::ServiceDescriptionAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value LogTable::HostNameAccessor(const Object::Ptr& object)
Value LogTable::HostNameAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value LogTable::ContactNameAccessor(const Object::Ptr& object)
Value LogTable::ContactNameAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value LogTable::CommandNameAccessor(const Object::Ptr& object)
Value LogTable::CommandNameAccessor(const Value& row)
{
/* not supported */
return Value();

View File

@ -45,21 +45,21 @@ public:
protected:
virtual void FetchRows(const AddRowFunction& addRowFn);
static Value TimeAccessor(const Object::Ptr& object);
static Value LinenoAccessor(const Object::Ptr& object);
static Value ClassAccessor(const Object::Ptr& object);
static Value MessageAccessor(const Object::Ptr& object);
static Value TypeAccessor(const Object::Ptr& object);
static Value OptionsAccessor(const Object::Ptr& object);
static Value CommentAccessor(const Object::Ptr& object);
static Value PluginOutputAccessor(const Object::Ptr& object);
static Value StateAccessor(const Object::Ptr& object);
static Value StateTypeAccessor(const Object::Ptr& object);
static Value AttemptAccessor(const Object::Ptr& object);
static Value ServiceDescriptionAccessor(const Object::Ptr& object);
static Value HostNameAccessor(const Object::Ptr& object);
static Value ContactNameAccessor(const Object::Ptr& object);
static Value CommandNameAccessor(const Object::Ptr& object);
static Value TimeAccessor(const Value& row);
static Value LinenoAccessor(const Value& row);
static Value ClassAccessor(const Value& row);
static Value MessageAccessor(const Value& row);
static Value TypeAccessor(const Value& row);
static Value OptionsAccessor(const Value& row);
static Value CommentAccessor(const Value& row);
static Value PluginOutputAccessor(const Value& row);
static Value StateAccessor(const Value& row);
static Value StateTypeAccessor(const Value& row);
static Value AttemptAccessor(const Value& row);
static Value ServiceDescriptionAccessor(const Value& row);
static Value HostNameAccessor(const Value& row);
static Value ContactNameAccessor(const Value& row);
static Value CommandNameAccessor(const Value& row);
};
}

View File

@ -50,21 +50,21 @@ void ServiceGroupsTable::FetchRows(const AddRowFunction& addRowFn)
}
}
Value ServiceGroupsTable::NameAccessor(const Object::Ptr& object)
Value ServiceGroupsTable::NameAccessor(const Value& row)
{
return static_pointer_cast<ServiceGroup>(object)->GetName();
return static_cast<ServiceGroup::Ptr>(row)->GetName();
}
Value ServiceGroupsTable::AliasAccessor(const Object::Ptr& object)
Value ServiceGroupsTable::AliasAccessor(const Value& row)
{
return static_pointer_cast<ServiceGroup>(object)->GetName();
return static_cast<ServiceGroup::Ptr>(row)->GetName();
}
Value ServiceGroupsTable::MembersAccessor(const Object::Ptr& object)
Value ServiceGroupsTable::MembersAccessor(const Value& row)
{
Array::Ptr members = boost::make_shared<Array>();
BOOST_FOREACH(const Service::Ptr& service, static_pointer_cast<ServiceGroup>(object)->GetMembers()) {
BOOST_FOREACH(const Service::Ptr& service, static_cast<ServiceGroup::Ptr>(row)->GetMembers()) {
members->Add(service->GetName());
}

View File

@ -45,9 +45,9 @@ public:
protected:
virtual void FetchRows(const AddRowFunction& addRowFn);
static Value NameAccessor(const Object::Ptr& object);
static Value AliasAccessor(const Object::Ptr& object);
static Value MembersAccessor(const Object::Ptr& object);
static Value NameAccessor(const Value& row);
static Value AliasAccessor(const Value& row);
static Value MembersAccessor(const Value& row);
};
}

View File

@ -134,24 +134,24 @@ void ServicesTable::FetchRows(const AddRowFunction& addRowFn)
}
}
Object::Ptr ServicesTable::HostAccessor(const Object::Ptr& object)
Object::Ptr ServicesTable::HostAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetHost();
return static_cast<Service::Ptr>(row)->GetHost();
}
Value ServicesTable::ShortNameAccessor(const Object::Ptr& object)
Value ServicesTable::ShortNameAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetShortName();
return static_cast<Service::Ptr>(row)->GetShortName();
}
Value ServicesTable::DisplayNameAccessor(const Object::Ptr& object)
Value ServicesTable::DisplayNameAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetDisplayName();
return static_cast<Service::Ptr>(row)->GetDisplayName();
}
Value ServicesTable::CheckCommandAccessor(const Object::Ptr& object)
Value ServicesTable::CheckCommandAccessor(const Value& row)
{
CheckCommand::Ptr checkcommand = static_pointer_cast<Service>(object)->GetCheckCommand();
CheckCommand::Ptr checkcommand = static_cast<Service::Ptr>(row)->GetCheckCommand();
if (checkcommand)
return checkcommand->GetName(); /* this is the name without '!' args */
@ -159,9 +159,9 @@ Value ServicesTable::CheckCommandAccessor(const Object::Ptr& object)
return Value();
}
Value ServicesTable::CheckCommandExpandedAccessor(const Object::Ptr& object)
Value ServicesTable::CheckCommandExpandedAccessor(const Value& row)
{
CheckCommand::Ptr checkcommand = static_pointer_cast<Service>(object)->GetCheckCommand();
CheckCommand::Ptr checkcommand = static_cast<Service::Ptr>(row)->GetCheckCommand();
if (checkcommand)
return checkcommand->GetName(); /* this is the name without '!' args */
@ -169,9 +169,9 @@ Value ServicesTable::CheckCommandExpandedAccessor(const Object::Ptr& object)
return Value();
}
Value ServicesTable::EventHandlerAccessor(const Object::Ptr& object)
Value ServicesTable::EventHandlerAccessor(const Value& row)
{
EventCommand::Ptr eventcommand = static_pointer_cast<Service>(object)->GetEventCommand();
EventCommand::Ptr eventcommand = static_cast<Service::Ptr>(row)->GetEventCommand();
if (eventcommand)
return eventcommand->GetName();
@ -179,30 +179,30 @@ Value ServicesTable::EventHandlerAccessor(const Object::Ptr& object)
return Value();
}
Value ServicesTable::PluginOutputAccessor(const Object::Ptr& object)
Value ServicesTable::PluginOutputAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetLastCheckOutput();
return static_cast<Service::Ptr>(row)->GetLastCheckOutput();
}
Value ServicesTable::LongPluginOutputAccessor(const Object::Ptr& object)
Value ServicesTable::LongPluginOutputAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetLastCheckLongOutput();
return static_cast<Service::Ptr>(row)->GetLastCheckLongOutput();
}
Value ServicesTable::PerfDataAccessor(const Object::Ptr& object)
Value ServicesTable::PerfDataAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetLastCheckPerfData();
return static_cast<Service::Ptr>(row)->GetLastCheckPerfData();
}
Value ServicesTable::NotificationPeriodAccessor(const Object::Ptr& object)
Value ServicesTable::NotificationPeriodAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::CheckPeriodAccessor(const Object::Ptr& object)
Value ServicesTable::CheckPeriodAccessor(const Value& row)
{
TimePeriod::Ptr timeperiod = static_pointer_cast<Service>(object)->GetCheckPeriod();
TimePeriod::Ptr timeperiod = static_cast<Service::Ptr>(row)->GetCheckPeriod();
if (!timeperiod)
return Value();
@ -210,9 +210,9 @@ Value ServicesTable::CheckPeriodAccessor(const Object::Ptr& object)
return timeperiod->GetName();
}
Value ServicesTable::NotesAccessor(const Object::Ptr& object)
Value ServicesTable::NotesAccessor(const Value& row)
{
Dictionary::Ptr custom = static_pointer_cast<Service>(object)->GetCustom();
Dictionary::Ptr custom = static_cast<Service::Ptr>(row)->GetCustom();
if (!custom)
return Value();
@ -220,15 +220,15 @@ Value ServicesTable::NotesAccessor(const Object::Ptr& object)
return custom->Get("notes");
}
Value ServicesTable::NotesExpandedAccessor(const Object::Ptr& object)
Value ServicesTable::NotesExpandedAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::NotesUrlAccessor(const Object::Ptr& object)
Value ServicesTable::NotesUrlAccessor(const Value& row)
{
Dictionary::Ptr custom = static_pointer_cast<Service>(object)->GetCustom();
Dictionary::Ptr custom = static_cast<Service::Ptr>(row)->GetCustom();
if (!custom)
return Value();
@ -236,15 +236,15 @@ Value ServicesTable::NotesUrlAccessor(const Object::Ptr& object)
return custom->Get("notes_url");
}
Value ServicesTable::NotesUrlExpandedAccessor(const Object::Ptr& object)
Value ServicesTable::NotesUrlExpandedAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::ActionUrlAccessor(const Object::Ptr& object)
Value ServicesTable::ActionUrlAccessor(const Value& row)
{
Dictionary::Ptr custom = static_pointer_cast<Service>(object)->GetCustom();
Dictionary::Ptr custom = static_cast<Service::Ptr>(row)->GetCustom();
if (!custom)
return Value();
@ -252,15 +252,15 @@ Value ServicesTable::ActionUrlAccessor(const Object::Ptr& object)
return custom->Get("action_url");
}
Value ServicesTable::ActionUrlExpandedAccessor(const Object::Ptr& object)
Value ServicesTable::ActionUrlExpandedAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::IconImageAccessor(const Object::Ptr& object)
Value ServicesTable::IconImageAccessor(const Value& row)
{
Dictionary::Ptr custom = static_pointer_cast<Service>(object)->GetCustom();
Dictionary::Ptr custom = static_cast<Service::Ptr>(row)->GetCustom();
if (!custom)
return Value();
@ -268,15 +268,15 @@ Value ServicesTable::IconImageAccessor(const Object::Ptr& object)
return custom->Get("icon_image");
}
Value ServicesTable::IconImageExpandedAccessor(const Object::Ptr& object)
Value ServicesTable::IconImageExpandedAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::IconImageAltAccessor(const Object::Ptr& object)
Value ServicesTable::IconImageAltAccessor(const Value& row)
{
Dictionary::Ptr custom = static_pointer_cast<Service>(object)->GetCustom();
Dictionary::Ptr custom = static_cast<Service::Ptr>(row)->GetCustom();
if (!custom)
return Value();
@ -284,55 +284,55 @@ Value ServicesTable::IconImageAltAccessor(const Object::Ptr& object)
return custom->Get("icon_image_alt");
}
Value ServicesTable::InitialStateAccessor(const Object::Ptr& object)
Value ServicesTable::InitialStateAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value ServicesTable::MaxCheckAttemptsAccessor(const Object::Ptr& object)
Value ServicesTable::MaxCheckAttemptsAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetMaxCheckAttempts();
return static_cast<Service::Ptr>(row)->GetMaxCheckAttempts();
}
Value ServicesTable::CurrentAttemptAccessor(const Object::Ptr& object)
Value ServicesTable::CurrentAttemptAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetCurrentCheckAttempt();
return static_cast<Service::Ptr>(row)->GetCurrentCheckAttempt();
}
Value ServicesTable::StateAccessor(const Object::Ptr& object)
Value ServicesTable::StateAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetState();
return static_cast<Service::Ptr>(row)->GetState();
}
Value ServicesTable::HasBeenCheckedAccessor(const Object::Ptr& object)
Value ServicesTable::HasBeenCheckedAccessor(const Value& row)
{
return (static_pointer_cast<Service>(object)->HasBeenChecked() ? 1 : 0);
return (static_cast<Service::Ptr>(row)->HasBeenChecked() ? 1 : 0);
}
Value ServicesTable::LastStateAccessor(const Object::Ptr& object)
Value ServicesTable::LastStateAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetLastState();
return static_cast<Service::Ptr>(row)->GetLastState();
}
Value ServicesTable::LastHardStateAccessor(const Object::Ptr& object)
Value ServicesTable::LastHardStateAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetLastHardState();
return static_cast<Service::Ptr>(row)->GetLastHardState();
}
Value ServicesTable::StateTypeAccessor(const Object::Ptr& object)
Value ServicesTable::StateTypeAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetStateType();
return static_cast<Service::Ptr>(row)->GetStateType();
}
Value ServicesTable::CheckTypeAccessor(const Object::Ptr& object)
Value ServicesTable::CheckTypeAccessor(const Value& row)
{
return (static_pointer_cast<Service>(object)->GetEnableActiveChecks() ? 1 : 0);
return (static_cast<Service::Ptr>(row)->GetEnableActiveChecks() ? 1 : 0);
}
Value ServicesTable::AcknowledgedAccessor(const Object::Ptr& object)
Value ServicesTable::AcknowledgedAccessor(const Value& row)
{
Service::Ptr service = static_pointer_cast<Service>(object);
Service::Ptr service = static_cast<Service::Ptr>(row);
/* important: lock acknowledgements */
ObjectLock olock(service);
@ -340,9 +340,9 @@ Value ServicesTable::AcknowledgedAccessor(const Object::Ptr& object)
return (service->IsAcknowledged() ? 1 : 0);
}
Value ServicesTable::AcknowledgementTypeAccessor(const Object::Ptr& object)
Value ServicesTable::AcknowledgementTypeAccessor(const Value& row)
{
Service::Ptr service = static_pointer_cast<Service>(object);
Service::Ptr service = static_cast<Service::Ptr>(row);
/* important: lock acknowledgements */
ObjectLock olock(service);
@ -350,232 +350,232 @@ Value ServicesTable::AcknowledgementTypeAccessor(const Object::Ptr& object)
return static_cast<int>(service->GetAcknowledgement());
}
Value ServicesTable::NoMoreNotificationsAccessor(const Object::Ptr& object)
Value ServicesTable::NoMoreNotificationsAccessor(const Value& row)
{
/* TODO: notification_interval == 0, volatile == false */
return Value();
}
Value ServicesTable::LastTimeOkAccessor(const Object::Ptr& object)
Value ServicesTable::LastTimeOkAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::LastTimeWarningAccessor(const Object::Ptr& object)
Value ServicesTable::LastTimeWarningAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::LastTimeCriticalAccessor(const Object::Ptr& object)
Value ServicesTable::LastTimeCriticalAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::LastTimeUnknownAccessor(const Object::Ptr& object)
Value ServicesTable::LastTimeUnknownAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::LastCheckAccessor(const Object::Ptr& object)
Value ServicesTable::LastCheckAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetLastCheck();
return static_cast<Service::Ptr>(row)->GetLastCheck();
}
Value ServicesTable::NextCheckAccessor(const Object::Ptr& object)
Value ServicesTable::NextCheckAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetNextCheck();
return static_cast<Service::Ptr>(row)->GetNextCheck();
}
Value ServicesTable::LastNotificationAccessor(const Object::Ptr& object)
Value ServicesTable::LastNotificationAccessor(const Value& row)
{
/* TODO Host->Service->GetNotifications->(loop)->GetLastNotification() */
return Value();
}
Value ServicesTable::NextNotificationAccessor(const Object::Ptr& object)
Value ServicesTable::NextNotificationAccessor(const Value& row)
{
/* TODO Host->Service->GetNotifications->(loop)->GetLastNotification() */
return Value();
}
Value ServicesTable::CurrentNotificationNumberAccessor(const Object::Ptr& object)
Value ServicesTable::CurrentNotificationNumberAccessor(const Value& row)
{
/* TODO Host->Service->GetNotifications->(loop) new attribute */
return Value();
}
Value ServicesTable::LastStateChangeAccessor(const Object::Ptr& object)
Value ServicesTable::LastStateChangeAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetLastStateChange();
return static_cast<Service::Ptr>(row)->GetLastStateChange();
}
Value ServicesTable::LastHardStateChangeAccessor(const Object::Ptr& object)
Value ServicesTable::LastHardStateChangeAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetLastHardStateChange();
return static_cast<Service::Ptr>(row)->GetLastHardStateChange();
}
Value ServicesTable::ScheduledDowntimeDepthAccessor(const Object::Ptr& object)
Value ServicesTable::ScheduledDowntimeDepthAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetDowntimeDepth();
return static_cast<Service::Ptr>(row)->GetDowntimeDepth();
}
Value ServicesTable::IsFlappingAccessor(const Object::Ptr& object)
Value ServicesTable::IsFlappingAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->IsFlapping();
return static_cast<Service::Ptr>(row)->IsFlapping();
}
Value ServicesTable::ChecksEnabledAccessor(const Object::Ptr& object)
Value ServicesTable::ChecksEnabledAccessor(const Value& row)
{
return (static_pointer_cast<Service>(object)->GetEnableActiveChecks() ? 1 : 0);
return (static_cast<Service::Ptr>(row)->GetEnableActiveChecks() ? 1 : 0);
}
Value ServicesTable::AcceptPassiveChecksAccessor(const Object::Ptr& object)
Value ServicesTable::AcceptPassiveChecksAccessor(const Value& row)
{
return (static_pointer_cast<Service>(object)->GetEnablePassiveChecks() ? 1 : 0);
return (static_cast<Service::Ptr>(row)->GetEnablePassiveChecks() ? 1 : 0);
}
Value ServicesTable::EventHandlerEnabledAccessor(const Object::Ptr& object)
Value ServicesTable::EventHandlerEnabledAccessor(const Value& row)
{
/* TODO always enabled*/
return Value(1);
}
Value ServicesTable::NotificationsEnabledAccessor(const Object::Ptr& object)
Value ServicesTable::NotificationsEnabledAccessor(const Value& row)
{
return (static_pointer_cast<Service>(object)->GetEnableNotifications() ? 1 : 0);
return (static_cast<Service::Ptr>(row)->GetEnableNotifications() ? 1 : 0);
}
Value ServicesTable::ProcessPerformanceDataAccessor(const Object::Ptr& object)
Value ServicesTable::ProcessPerformanceDataAccessor(const Value& row)
{
/* TODO always enabled */
return Value(1);
}
Value ServicesTable::IsExecutingAccessor(const Object::Ptr& object)
Value ServicesTable::IsExecutingAccessor(const Value& row)
{
/* TODO does that make sense with Icinga2? */
return Value();
}
Value ServicesTable::ActiveChecksEnabledAccessor(const Object::Ptr& object)
Value ServicesTable::ActiveChecksEnabledAccessor(const Value& row)
{
return (static_pointer_cast<Service>(object)->GetEnableActiveChecks() ? 1 : 0);
return (static_cast<Service::Ptr>(row)->GetEnableActiveChecks() ? 1 : 0);
}
Value ServicesTable::CheckOptionsAccessor(const Object::Ptr& object)
Value ServicesTable::CheckOptionsAccessor(const Value& row)
{
/* TODO - forcexec, freshness, orphan, none */
return Value();
}
Value ServicesTable::FlapDetectionEnabledAccessor(const Object::Ptr& object)
Value ServicesTable::FlapDetectionEnabledAccessor(const Value& row)
{
return (static_pointer_cast<Service>(object)->GetEnableFlapping() ? 1 : 0);
return (static_cast<Service::Ptr>(row)->GetEnableFlapping() ? 1 : 0);
}
Value ServicesTable::CheckFreshnessAccessor(const Object::Ptr& object)
Value ServicesTable::CheckFreshnessAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::ObsessOverServiceAccessor(const Object::Ptr& object)
Value ServicesTable::ObsessOverServiceAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value ServicesTable::ModifiedAttributesAccessor(const Object::Ptr& object)
Value ServicesTable::ModifiedAttributesAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value ServicesTable::ModifiedAttributesListAccessor(const Object::Ptr& object)
Value ServicesTable::ModifiedAttributesListAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value ServicesTable::PnpgraphPresentAccessor(const Object::Ptr& object)
Value ServicesTable::PnpgraphPresentAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value ServicesTable::CheckIntervalAccessor(const Object::Ptr& object)
Value ServicesTable::CheckIntervalAccessor(const Value& row)
{
return (static_pointer_cast<Service>(object)->GetCheckInterval() / 60.0);
return (static_cast<Service::Ptr>(row)->GetCheckInterval() / 60.0);
}
Value ServicesTable::RetryIntervalAccessor(const Object::Ptr& object)
Value ServicesTable::RetryIntervalAccessor(const Value& row)
{
return (static_pointer_cast<Service>(object)->GetRetryInterval() / 60.0);
return (static_cast<Service::Ptr>(row)->GetRetryInterval() / 60.0);
}
Value ServicesTable::NotificationIntervalAccessor(const Object::Ptr& object)
Value ServicesTable::NotificationIntervalAccessor(const Value& row)
{
/* TODO Host->Services->GetNotifications->(loop)->GetNotificationInterval() */
return Value();
}
Value ServicesTable::FirstNotificationDelayAccessor(const Object::Ptr& object)
Value ServicesTable::FirstNotificationDelayAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value ServicesTable::LowFlapThresholdAccessor(const Object::Ptr& object)
Value ServicesTable::LowFlapThresholdAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::HighFlapThresholdAccessor(const Object::Ptr& object)
Value ServicesTable::HighFlapThresholdAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::LatencyAccessor(const Object::Ptr& object)
Value ServicesTable::LatencyAccessor(const Value& row)
{
return (Service::CalculateLatency(static_pointer_cast<Service>(object)->GetLastCheckResult()));
return (Service::CalculateLatency(static_cast<Service::Ptr>(row)->GetLastCheckResult()));
}
Value ServicesTable::ExecutionTimeAccessor(const Object::Ptr& object)
Value ServicesTable::ExecutionTimeAccessor(const Value& row)
{
return (Service::CalculateExecutionTime(static_pointer_cast<Service>(object)->GetLastCheckResult()));
return (Service::CalculateExecutionTime(static_cast<Service::Ptr>(row)->GetLastCheckResult()));
}
Value ServicesTable::PercentStateChangeAccessor(const Object::Ptr& object)
Value ServicesTable::PercentStateChangeAccessor(const Value& row)
{
return static_pointer_cast<Service>(object)->GetFlappingCurrent();
return static_cast<Service::Ptr>(row)->GetFlappingCurrent();
}
Value ServicesTable::InCheckPeriodAccessor(const Object::Ptr& object)
Value ServicesTable::InCheckPeriodAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::InNotificationPeriodAccessor(const Object::Ptr& object)
Value ServicesTable::InNotificationPeriodAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::ContactsAccessor(const Object::Ptr& object)
Value ServicesTable::ContactsAccessor(const Value& row)
{
/* TODO - host->service->notifications->users */
/*
std::set<User::Ptr> allUsers;
std::set<User::Ptr> users;
BOOST_FOREACH(const Notification::Ptr& notification, static_pointer_cast<Service>(object)->GetNotifications()) {
BOOST_FOREACH(const Notification::Ptr& notification, static_cast<Service::Ptr>(row)->GetNotifications()) {
ObjectLock olock(notification);
users = notification->GetUsers();
@ -591,52 +591,52 @@ Value ServicesTable::ContactsAccessor(const Object::Ptr& object)
return Value();
}
Value ServicesTable::DowntimesAccessor(const Object::Ptr& object)
Value ServicesTable::DowntimesAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::DowntimesWithInfoAccessor(const Object::Ptr& object)
Value ServicesTable::DowntimesWithInfoAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::CommentsAccessor(const Object::Ptr& object)
Value ServicesTable::CommentsAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::CommentsWithInfoAccessor(const Object::Ptr& object)
Value ServicesTable::CommentsWithInfoAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::CommentsWithExtraInfoAccessor(const Object::Ptr& object)
Value ServicesTable::CommentsWithExtraInfoAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::CustomVariableNamesAccessor(const Object::Ptr& object)
Value ServicesTable::CustomVariableNamesAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::CustomVariableValuesAccessor(const Object::Ptr& object)
Value ServicesTable::CustomVariableValuesAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::CustomVariablesAccessor(const Object::Ptr& object)
Value ServicesTable::CustomVariablesAccessor(const Value& row)
{
/*
Service::Ptr svc = static_pointer_cast<Service>(object);
Service::Ptr svc = static_cast<Service::Ptr>(row);
Dictionary::Ptr custom = svc->Get("custom");
@ -658,13 +658,13 @@ Value ServicesTable::CustomVariablesAccessor(const Object::Ptr& object)
return Value();
}
Value ServicesTable::GroupsAccessor(const Object::Ptr& object)
Value ServicesTable::GroupsAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value ServicesTable::ContactGroupsAccessor(const Object::Ptr& object)
Value ServicesTable::ContactGroupsAccessor(const Value& row)
{
/* TODO */
return Value();

View File

@ -45,88 +45,88 @@ public:
protected:
virtual void FetchRows(const AddRowFunction& addRowFn);
static Object::Ptr HostAccessor(const Object::Ptr& object);
static Object::Ptr HostAccessor(const Value& row);
static Value ShortNameAccessor(const Object::Ptr& object);
static Value DisplayNameAccessor(const Object::Ptr& object);
static Value CheckCommandAccessor(const Object::Ptr& object);
static Value CheckCommandExpandedAccessor(const Object::Ptr& object);
static Value EventHandlerAccessor(const Object::Ptr& object);
static Value PluginOutputAccessor(const Object::Ptr& object);
static Value LongPluginOutputAccessor(const Object::Ptr& object);
static Value PerfDataAccessor(const Object::Ptr& object);
static Value NotificationPeriodAccessor(const Object::Ptr& object);
static Value CheckPeriodAccessor(const Object::Ptr& object);
static Value NotesAccessor(const Object::Ptr& object);
static Value NotesExpandedAccessor(const Object::Ptr& object);
static Value NotesUrlAccessor(const Object::Ptr& object);
static Value NotesUrlExpandedAccessor(const Object::Ptr& object);
static Value ActionUrlAccessor(const Object::Ptr& object);
static Value ActionUrlExpandedAccessor(const Object::Ptr& object);
static Value IconImageAccessor(const Object::Ptr& object);
static Value IconImageExpandedAccessor(const Object::Ptr& object);
static Value IconImageAltAccessor(const Object::Ptr& object);
static Value InitialStateAccessor(const Object::Ptr& object);
static Value MaxCheckAttemptsAccessor(const Object::Ptr& object);
static Value CurrentAttemptAccessor(const Object::Ptr& object);
static Value StateAccessor(const Object::Ptr& object);
static Value HasBeenCheckedAccessor(const Object::Ptr& object);
static Value LastStateAccessor(const Object::Ptr& object);
static Value LastHardStateAccessor(const Object::Ptr& object);
static Value StateTypeAccessor(const Object::Ptr& object);
static Value CheckTypeAccessor(const Object::Ptr& object);
static Value AcknowledgedAccessor(const Object::Ptr& object);
static Value AcknowledgementTypeAccessor(const Object::Ptr& object);
static Value NoMoreNotificationsAccessor(const Object::Ptr& object);
static Value LastTimeOkAccessor(const Object::Ptr& object);
static Value LastTimeWarningAccessor(const Object::Ptr& object);
static Value LastTimeCriticalAccessor(const Object::Ptr& object);
static Value LastTimeUnknownAccessor(const Object::Ptr& object);
static Value LastCheckAccessor(const Object::Ptr& object);
static Value NextCheckAccessor(const Object::Ptr& object);
static Value LastNotificationAccessor(const Object::Ptr& object);
static Value NextNotificationAccessor(const Object::Ptr& object);
static Value CurrentNotificationNumberAccessor(const Object::Ptr& object);
static Value LastStateChangeAccessor(const Object::Ptr& object);
static Value LastHardStateChangeAccessor(const Object::Ptr& object);
static Value ScheduledDowntimeDepthAccessor(const Object::Ptr& object);
static Value IsFlappingAccessor(const Object::Ptr& object);
static Value ChecksEnabledAccessor(const Object::Ptr& object);
static Value AcceptPassiveChecksAccessor(const Object::Ptr& object);
static Value EventHandlerEnabledAccessor(const Object::Ptr& object);
static Value NotificationsEnabledAccessor(const Object::Ptr& object);
static Value ProcessPerformanceDataAccessor(const Object::Ptr& object);
static Value IsExecutingAccessor(const Object::Ptr& object);
static Value ActiveChecksEnabledAccessor(const Object::Ptr& object);
static Value CheckOptionsAccessor(const Object::Ptr& object);
static Value FlapDetectionEnabledAccessor(const Object::Ptr& object);
static Value CheckFreshnessAccessor(const Object::Ptr& object);
static Value ObsessOverServiceAccessor(const Object::Ptr& object);
static Value ModifiedAttributesAccessor(const Object::Ptr& object);
static Value ModifiedAttributesListAccessor(const Object::Ptr& object);
static Value PnpgraphPresentAccessor(const Object::Ptr& object);
static Value CheckIntervalAccessor(const Object::Ptr& object);
static Value RetryIntervalAccessor(const Object::Ptr& object);
static Value NotificationIntervalAccessor(const Object::Ptr& object);
static Value FirstNotificationDelayAccessor(const Object::Ptr& object);
static Value LowFlapThresholdAccessor(const Object::Ptr& object);
static Value HighFlapThresholdAccessor(const Object::Ptr& object);
static Value LatencyAccessor(const Object::Ptr& object);
static Value ExecutionTimeAccessor(const Object::Ptr& object);
static Value PercentStateChangeAccessor(const Object::Ptr& object);
static Value InCheckPeriodAccessor(const Object::Ptr& object);
static Value InNotificationPeriodAccessor(const Object::Ptr& object);
static Value ContactsAccessor(const Object::Ptr& object);
static Value DowntimesAccessor(const Object::Ptr& object);
static Value DowntimesWithInfoAccessor(const Object::Ptr& object);
static Value CommentsAccessor(const Object::Ptr& object);
static Value CommentsWithInfoAccessor(const Object::Ptr& object);
static Value CommentsWithExtraInfoAccessor(const Object::Ptr& object);
static Value CustomVariableNamesAccessor(const Object::Ptr& object);
static Value CustomVariableValuesAccessor(const Object::Ptr& object);
static Value CustomVariablesAccessor(const Object::Ptr& object);
static Value GroupsAccessor(const Object::Ptr& object);
static Value ContactGroupsAccessor(const Object::Ptr& object);
static Value ShortNameAccessor(const Value& row);
static Value DisplayNameAccessor(const Value& row);
static Value CheckCommandAccessor(const Value& row);
static Value CheckCommandExpandedAccessor(const Value& row);
static Value EventHandlerAccessor(const Value& row);
static Value PluginOutputAccessor(const Value& row);
static Value LongPluginOutputAccessor(const Value& row);
static Value PerfDataAccessor(const Value& row);
static Value NotificationPeriodAccessor(const Value& row);
static Value CheckPeriodAccessor(const Value& row);
static Value NotesAccessor(const Value& row);
static Value NotesExpandedAccessor(const Value& row);
static Value NotesUrlAccessor(const Value& row);
static Value NotesUrlExpandedAccessor(const Value& row);
static Value ActionUrlAccessor(const Value& row);
static Value ActionUrlExpandedAccessor(const Value& row);
static Value IconImageAccessor(const Value& row);
static Value IconImageExpandedAccessor(const Value& row);
static Value IconImageAltAccessor(const Value& row);
static Value InitialStateAccessor(const Value& row);
static Value MaxCheckAttemptsAccessor(const Value& row);
static Value CurrentAttemptAccessor(const Value& row);
static Value StateAccessor(const Value& row);
static Value HasBeenCheckedAccessor(const Value& row);
static Value LastStateAccessor(const Value& row);
static Value LastHardStateAccessor(const Value& row);
static Value StateTypeAccessor(const Value& row);
static Value CheckTypeAccessor(const Value& row);
static Value AcknowledgedAccessor(const Value& row);
static Value AcknowledgementTypeAccessor(const Value& row);
static Value NoMoreNotificationsAccessor(const Value& row);
static Value LastTimeOkAccessor(const Value& row);
static Value LastTimeWarningAccessor(const Value& row);
static Value LastTimeCriticalAccessor(const Value& row);
static Value LastTimeUnknownAccessor(const Value& row);
static Value LastCheckAccessor(const Value& row);
static Value NextCheckAccessor(const Value& row);
static Value LastNotificationAccessor(const Value& row);
static Value NextNotificationAccessor(const Value& row);
static Value CurrentNotificationNumberAccessor(const Value& row);
static Value LastStateChangeAccessor(const Value& row);
static Value LastHardStateChangeAccessor(const Value& row);
static Value ScheduledDowntimeDepthAccessor(const Value& row);
static Value IsFlappingAccessor(const Value& row);
static Value ChecksEnabledAccessor(const Value& row);
static Value AcceptPassiveChecksAccessor(const Value& row);
static Value EventHandlerEnabledAccessor(const Value& row);
static Value NotificationsEnabledAccessor(const Value& row);
static Value ProcessPerformanceDataAccessor(const Value& row);
static Value IsExecutingAccessor(const Value& row);
static Value ActiveChecksEnabledAccessor(const Value& row);
static Value CheckOptionsAccessor(const Value& row);
static Value FlapDetectionEnabledAccessor(const Value& row);
static Value CheckFreshnessAccessor(const Value& row);
static Value ObsessOverServiceAccessor(const Value& row);
static Value ModifiedAttributesAccessor(const Value& row);
static Value ModifiedAttributesListAccessor(const Value& row);
static Value PnpgraphPresentAccessor(const Value& row);
static Value CheckIntervalAccessor(const Value& row);
static Value RetryIntervalAccessor(const Value& row);
static Value NotificationIntervalAccessor(const Value& row);
static Value FirstNotificationDelayAccessor(const Value& row);
static Value LowFlapThresholdAccessor(const Value& row);
static Value HighFlapThresholdAccessor(const Value& row);
static Value LatencyAccessor(const Value& row);
static Value ExecutionTimeAccessor(const Value& row);
static Value PercentStateChangeAccessor(const Value& row);
static Value InCheckPeriodAccessor(const Value& row);
static Value InNotificationPeriodAccessor(const Value& row);
static Value ContactsAccessor(const Value& row);
static Value DowntimesAccessor(const Value& row);
static Value DowntimesWithInfoAccessor(const Value& row);
static Value CommentsAccessor(const Value& row);
static Value CommentsWithInfoAccessor(const Value& row);
static Value CommentsWithExtraInfoAccessor(const Value& row);
static Value CustomVariableNamesAccessor(const Value& row);
static Value CustomVariableValuesAccessor(const Value& row);
static Value CustomVariablesAccessor(const Value& row);
static Value GroupsAccessor(const Value& row);
static Value ContactGroupsAccessor(const Value& row);
};
}

View File

@ -107,292 +107,292 @@ void StatusTable::FetchRows(const AddRowFunction& addRowFn)
addRowFn(obj);
}
Value StatusTable::NebCallbacksAccessor(const Object::Ptr& object)
Value StatusTable::NebCallbacksAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value StatusTable::NebCallbacksRateAccessor(const Object::Ptr& object)
Value StatusTable::NebCallbacksRateAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value StatusTable::RequestsAccessor(const Object::Ptr& object)
Value StatusTable::RequestsAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::RequestsRateAccessor(const Object::Ptr& object)
Value StatusTable::RequestsRateAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::ConnectionsAccessor(const Object::Ptr& object)
Value StatusTable::ConnectionsAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::ConnectionsRateAccessor(const Object::Ptr& object)
Value StatusTable::ConnectionsRateAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::ServiceChecksAccessor(const Object::Ptr& object)
Value StatusTable::ServiceChecksAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::ServiceChecksRateAccessor(const Object::Ptr& object)
Value StatusTable::ServiceChecksRateAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::HostChecksAccessor(const Object::Ptr& object)
Value StatusTable::HostChecksAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::HostChecksRateAccessor(const Object::Ptr& object)
Value StatusTable::HostChecksRateAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::ForksAccessor(const Object::Ptr& object)
Value StatusTable::ForksAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::ForksRateAccessor(const Object::Ptr& object)
Value StatusTable::ForksRateAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::LogMessagesAccessor(const Object::Ptr& object)
Value StatusTable::LogMessagesAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::LogMessagesRateAccessor(const Object::Ptr& object)
Value StatusTable::LogMessagesRateAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::ExternalCommandsAccessor(const Object::Ptr& object)
Value StatusTable::ExternalCommandsAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::ExternalCommandsRateAccessor(const Object::Ptr& object)
Value StatusTable::ExternalCommandsRateAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::LivechecksAccessor(const Object::Ptr& object)
Value StatusTable::LivechecksAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::LivechecksRateAccessor(const Object::Ptr& object)
Value StatusTable::LivechecksRateAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::LivecheckOverflowsAccessor(const Object::Ptr& object)
Value StatusTable::LivecheckOverflowsAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::LivecheckOverflowsRateAccessor(const Object::Ptr& object)
Value StatusTable::LivecheckOverflowsRateAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::NagiosPidAccessor(const Object::Ptr& object)
Value StatusTable::NagiosPidAccessor(const Value& row)
{
return Utility::GetPid();
}
Value StatusTable::EnableNotificationsAccessor(const Object::Ptr& object)
Value StatusTable::EnableNotificationsAccessor(const Value& row)
{
/* TODO - enabled by default*/
return 1;
}
Value StatusTable::ExecuteServiceChecksAccessor(const Object::Ptr& object)
Value StatusTable::ExecuteServiceChecksAccessor(const Value& row)
{
/* TODO - enabled by default*/
return 1;
}
Value StatusTable::AcceptPassiveServiceChecksAccessor(const Object::Ptr& object)
Value StatusTable::AcceptPassiveServiceChecksAccessor(const Value& row)
{
/* TODO - enabled by default*/
return 1;
}
Value StatusTable::ExecuteHostChecksAccessor(const Object::Ptr& object)
Value StatusTable::ExecuteHostChecksAccessor(const Value& row)
{
/* TODO - enabled by default*/
return 1;
}
Value StatusTable::AcceptPassiveHostChecksAccessor(const Object::Ptr& object)
Value StatusTable::AcceptPassiveHostChecksAccessor(const Value& row)
{
/* TODO - enabled by default*/
return 1;
}
Value StatusTable::EnableEventHandlersAccessor(const Object::Ptr& object)
Value StatusTable::EnableEventHandlersAccessor(const Value& row)
{
/* TODO - enabled by default*/
return 1;
}
Value StatusTable::ObsessOverServicesAccessor(const Object::Ptr& object)
Value StatusTable::ObsessOverServicesAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value StatusTable::ObsessOverHostsAccessor(const Object::Ptr& object)
Value StatusTable::ObsessOverHostsAccessor(const Value& row)
{
/* not supported */
return Value();
}
Value StatusTable::CheckServiceFreshnessAccessor(const Object::Ptr& object)
Value StatusTable::CheckServiceFreshnessAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::CheckHostFreshnessAccessor(const Object::Ptr& object)
Value StatusTable::CheckHostFreshnessAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::EnableFlapDetectionAccessor(const Object::Ptr& object)
Value StatusTable::EnableFlapDetectionAccessor(const Value& row)
{
/* TODO - enabled by default*/
return 1;
}
Value StatusTable::ProcessPerformanceDataAccessor(const Object::Ptr& object)
Value StatusTable::ProcessPerformanceDataAccessor(const Value& row)
{
/* TODO - enabled by default*/
return 1;
}
Value StatusTable::CheckExternalCommandsAccessor(const Object::Ptr& object)
Value StatusTable::CheckExternalCommandsAccessor(const Value& row)
{
/* TODO - enabled by default*/
return 1;
}
Value StatusTable::ProgramStartAccessor(const Object::Ptr& object)
Value StatusTable::ProgramStartAccessor(const Value& row)
{
return IcingaApplication::GetInstance()->GetStartTime();
}
Value StatusTable::LastCommandCheckAccessor(const Object::Ptr& object)
Value StatusTable::LastCommandCheckAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::LastLogRotationAccessor(const Object::Ptr& object)
Value StatusTable::LastLogRotationAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::IntervalLengthAccessor(const Object::Ptr& object)
Value StatusTable::IntervalLengthAccessor(const Value& row)
{
/* hardcoded 60s */
return 60;
}
Value StatusTable::NumHostsAccessor(const Object::Ptr& object)
Value StatusTable::NumHostsAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::NumServicesAccessor(const Object::Ptr& object)
Value StatusTable::NumServicesAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::ProgramVersionAccessor(const Object::Ptr& object)
Value StatusTable::ProgramVersionAccessor(const Value& row)
{
return "2.0";
}
Value StatusTable::ExternalCommandBufferSlotsAccessor(const Object::Ptr& object)
Value StatusTable::ExternalCommandBufferSlotsAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::ExternalCommandBufferUsageAccessor(const Object::Ptr& object)
Value StatusTable::ExternalCommandBufferUsageAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::ExternalCommandBufferMaxAccessor(const Object::Ptr& object)
Value StatusTable::ExternalCommandBufferMaxAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::CachedLogMessagesAccessor(const Object::Ptr& object)
Value StatusTable::CachedLogMessagesAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::LivestatusVersionAccessor(const Object::Ptr& object)
Value StatusTable::LivestatusVersionAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::LivestatusActiveConnectionsAccessor(const Object::Ptr& object)
Value StatusTable::LivestatusActiveConnectionsAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::LivestatusQueuedConnectionsAccessor(const Object::Ptr& object)
Value StatusTable::LivestatusQueuedConnectionsAccessor(const Value& row)
{
/* TODO */
return Value();
}
Value StatusTable::LivestatusThreadsAccessor(const Object::Ptr& object)
Value StatusTable::LivestatusThreadsAccessor(const Value& row)
{
/* TODO */
return Value();

View File

@ -45,55 +45,55 @@ public:
protected:
virtual void FetchRows(const AddRowFunction& addRowFn);
static Value NebCallbacksAccessor(const Object::Ptr& object);
static Value NebCallbacksRateAccessor(const Object::Ptr& object);
static Value RequestsAccessor(const Object::Ptr& object);
static Value RequestsRateAccessor(const Object::Ptr& object);
static Value ConnectionsAccessor(const Object::Ptr& object);
static Value ConnectionsRateAccessor(const Object::Ptr& object);
static Value ServiceChecksAccessor(const Object::Ptr& object);
static Value ServiceChecksRateAccessor(const Object::Ptr& object);
static Value HostChecksAccessor(const Object::Ptr& object);
static Value HostChecksRateAccessor(const Object::Ptr& object);
static Value ForksAccessor(const Object::Ptr& object);
static Value ForksRateAccessor(const Object::Ptr& object);
static Value LogMessagesAccessor(const Object::Ptr& object);
static Value LogMessagesRateAccessor(const Object::Ptr& object);
static Value ExternalCommandsAccessor(const Object::Ptr& object);
static Value ExternalCommandsRateAccessor(const Object::Ptr& object);
static Value LivechecksAccessor(const Object::Ptr& object);
static Value LivechecksRateAccessor(const Object::Ptr& object);
static Value LivecheckOverflowsAccessor(const Object::Ptr& object);
static Value LivecheckOverflowsRateAccessor(const Object::Ptr& object);
static Value NagiosPidAccessor(const Object::Ptr& object);
static Value EnableNotificationsAccessor(const Object::Ptr& object);
static Value ExecuteServiceChecksAccessor(const Object::Ptr& object);
static Value AcceptPassiveServiceChecksAccessor(const Object::Ptr& object);
static Value ExecuteHostChecksAccessor(const Object::Ptr& object);
static Value AcceptPassiveHostChecksAccessor(const Object::Ptr& object);
static Value EnableEventHandlersAccessor(const Object::Ptr& object);
static Value ObsessOverServicesAccessor(const Object::Ptr& object);
static Value ObsessOverHostsAccessor(const Object::Ptr& object);
static Value CheckServiceFreshnessAccessor(const Object::Ptr& object);
static Value CheckHostFreshnessAccessor(const Object::Ptr& object);
static Value EnableFlapDetectionAccessor(const Object::Ptr& object);
static Value ProcessPerformanceDataAccessor(const Object::Ptr& object);
static Value CheckExternalCommandsAccessor(const Object::Ptr& object);
static Value ProgramStartAccessor(const Object::Ptr& object);
static Value LastCommandCheckAccessor(const Object::Ptr& object);
static Value LastLogRotationAccessor(const Object::Ptr& object);
static Value IntervalLengthAccessor(const Object::Ptr& object);
static Value NumHostsAccessor(const Object::Ptr& object);
static Value NumServicesAccessor(const Object::Ptr& object);
static Value ProgramVersionAccessor(const Object::Ptr& object);
static Value ExternalCommandBufferSlotsAccessor(const Object::Ptr& object);
static Value ExternalCommandBufferUsageAccessor(const Object::Ptr& object);
static Value ExternalCommandBufferMaxAccessor(const Object::Ptr& object);
static Value CachedLogMessagesAccessor(const Object::Ptr& object);
static Value LivestatusVersionAccessor(const Object::Ptr& object);
static Value LivestatusActiveConnectionsAccessor(const Object::Ptr& object);
static Value LivestatusQueuedConnectionsAccessor(const Object::Ptr& object);
static Value LivestatusThreadsAccessor(const Object::Ptr& object);
static Value NebCallbacksAccessor(const Value& row);
static Value NebCallbacksRateAccessor(const Value& row);
static Value RequestsAccessor(const Value& row);
static Value RequestsRateAccessor(const Value& row);
static Value ConnectionsAccessor(const Value& row);
static Value ConnectionsRateAccessor(const Value& row);
static Value ServiceChecksAccessor(const Value& row);
static Value ServiceChecksRateAccessor(const Value& row);
static Value HostChecksAccessor(const Value& row);
static Value HostChecksRateAccessor(const Value& row);
static Value ForksAccessor(const Value& row);
static Value ForksRateAccessor(const Value& row);
static Value LogMessagesAccessor(const Value& row);
static Value LogMessagesRateAccessor(const Value& row);
static Value ExternalCommandsAccessor(const Value& row);
static Value ExternalCommandsRateAccessor(const Value& row);
static Value LivechecksAccessor(const Value& row);
static Value LivechecksRateAccessor(const Value& row);
static Value LivecheckOverflowsAccessor(const Value& row);
static Value LivecheckOverflowsRateAccessor(const Value& row);
static Value NagiosPidAccessor(const Value& row);
static Value EnableNotificationsAccessor(const Value& row);
static Value ExecuteServiceChecksAccessor(const Value& row);
static Value AcceptPassiveServiceChecksAccessor(const Value& row);
static Value ExecuteHostChecksAccessor(const Value& row);
static Value AcceptPassiveHostChecksAccessor(const Value& row);
static Value EnableEventHandlersAccessor(const Value& row);
static Value ObsessOverServicesAccessor(const Value& row);
static Value ObsessOverHostsAccessor(const Value& row);
static Value CheckServiceFreshnessAccessor(const Value& row);
static Value CheckHostFreshnessAccessor(const Value& row);
static Value EnableFlapDetectionAccessor(const Value& row);
static Value ProcessPerformanceDataAccessor(const Value& row);
static Value CheckExternalCommandsAccessor(const Value& row);
static Value ProgramStartAccessor(const Value& row);
static Value LastCommandCheckAccessor(const Value& row);
static Value LastLogRotationAccessor(const Value& row);
static Value IntervalLengthAccessor(const Value& row);
static Value NumHostsAccessor(const Value& row);
static Value NumServicesAccessor(const Value& row);
static Value ProgramVersionAccessor(const Value& row);
static Value ExternalCommandBufferSlotsAccessor(const Value& row);
static Value ExternalCommandBufferUsageAccessor(const Value& row);
static Value ExternalCommandBufferMaxAccessor(const Value& row);
static Value CachedLogMessagesAccessor(const Value& row);
static Value LivestatusVersionAccessor(const Value& row);
static Value LivestatusActiveConnectionsAccessor(const Value& row);
static Value LivestatusQueuedConnectionsAccessor(const Value& row);
static Value LivestatusThreadsAccessor(const Value& row);
};
}

View File

@ -38,7 +38,7 @@ class Table : public Object
public:
DECLARE_PTR_TYPEDEFS(Table);
typedef boost::function<void (const Object::Ptr&)> AddRowFunction;
typedef boost::function<void (const Value&)> AddRowFunction;
static Table::Ptr GetByName(const String& name);