mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 07:04:37 +02:00
livestatus: add parentObjectAccessor to function prototypes
comments and downtimes where missing, even if unused.
This commit is contained in:
parent
d6d61354ed
commit
0a033b0f87
@ -48,7 +48,7 @@ void CommentsTable::AddColumns(Table *table, const String& prefix,
|
|||||||
table->AddColumn(prefix + "expires", Column(&CommentsTable::ExpiresAccessor, objectAccessor));
|
table->AddColumn(prefix + "expires", Column(&CommentsTable::ExpiresAccessor, objectAccessor));
|
||||||
table->AddColumn(prefix + "expire_time", Column(&CommentsTable::ExpireTimeAccessor, objectAccessor));
|
table->AddColumn(prefix + "expire_time", Column(&CommentsTable::ExpireTimeAccessor, objectAccessor));
|
||||||
|
|
||||||
ServicesTable::AddColumns(table, "service_", &CommentsTable::ServiceAccessor);
|
ServicesTable::AddColumns(table, "service_", boost::bind(&CommentsTable::ServiceAccessor, _1, objectAccessor));
|
||||||
}
|
}
|
||||||
|
|
||||||
String CommentsTable::GetName(void) const
|
String CommentsTable::GetName(void) const
|
||||||
@ -75,7 +75,7 @@ void CommentsTable::FetchRows(const AddRowFunction& addRowFn)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Object::Ptr CommentsTable::ServiceAccessor(const Value& row)
|
Object::Ptr CommentsTable::ServiceAccessor(const Value& row, const Column::ObjectAccessor& parentObjectAccessor)
|
||||||
{
|
{
|
||||||
return Service::GetOwnerByCommentID(row);
|
return Service::GetOwnerByCommentID(row);
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ protected:
|
|||||||
virtual void FetchRows(const AddRowFunction& addRowFn);
|
virtual void FetchRows(const AddRowFunction& addRowFn);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static Object::Ptr ServiceAccessor(const Value& row);
|
static Object::Ptr ServiceAccessor(const Value& row, const Column::ObjectAccessor& parentObjectAccessor);
|
||||||
|
|
||||||
static Value AuthorAccessor(const Value& row);
|
static Value AuthorAccessor(const Value& row);
|
||||||
static Value CommentAccessor(const Value& row);
|
static Value CommentAccessor(const Value& row);
|
||||||
|
@ -48,7 +48,7 @@ void DowntimesTable::AddColumns(Table *table, const String& prefix,
|
|||||||
table->AddColumn(prefix + "duration", Column(&DowntimesTable::DurationAccessor, objectAccessor));
|
table->AddColumn(prefix + "duration", Column(&DowntimesTable::DurationAccessor, objectAccessor));
|
||||||
table->AddColumn(prefix + "triggered_by", Column(&DowntimesTable::TriggeredByAccessor, objectAccessor));
|
table->AddColumn(prefix + "triggered_by", Column(&DowntimesTable::TriggeredByAccessor, objectAccessor));
|
||||||
|
|
||||||
ServicesTable::AddColumns(table, "service_", &DowntimesTable::ServiceAccessor);
|
ServicesTable::AddColumns(table, "service_", boost::bind(&DowntimesTable::ServiceAccessor, _1, objectAccessor));
|
||||||
}
|
}
|
||||||
|
|
||||||
String DowntimesTable::GetName(void) const
|
String DowntimesTable::GetName(void) const
|
||||||
@ -75,7 +75,7 @@ void DowntimesTable::FetchRows(const AddRowFunction& addRowFn)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Object::Ptr DowntimesTable::ServiceAccessor(const Value& row)
|
Object::Ptr DowntimesTable::ServiceAccessor(const Value& row, const Column::ObjectAccessor& parentObjectAccessor)
|
||||||
{
|
{
|
||||||
return Service::GetOwnerByDowntimeID(row);
|
return Service::GetOwnerByDowntimeID(row);
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ protected:
|
|||||||
virtual void FetchRows(const AddRowFunction& addRowFn);
|
virtual void FetchRows(const AddRowFunction& addRowFn);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static Object::Ptr ServiceAccessor(const Value& row);
|
static Object::Ptr ServiceAccessor(const Value& row, const Column::ObjectAccessor& parentObjectAccessor);
|
||||||
|
|
||||||
static Value AuthorAccessor(const Value& row);
|
static Value AuthorAccessor(const Value& row);
|
||||||
static Value CommentAccessor(const Value& row);
|
static Value CommentAccessor(const Value& row);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user