livestatus: finish commentstable attributes

refs #4372
This commit is contained in:
Michael Friedrich 2013-07-12 18:10:27 +02:00
parent 8c02c3a75a
commit 45db7e08a2
1 changed files with 9 additions and 5 deletions

View File

@ -122,8 +122,12 @@ Value CommentsTable::EntryTimeAccessor(const Value& row)
Value CommentsTable::TypeAccessor(const Value& row)
{
/* TODO */
Service::Ptr svc = Service::GetOwnerByCommentID(row);
if (!svc)
return Value();
return (svc->IsHostCheck() ? 1 : 2);
}
Value CommentsTable::IsServiceAccessor(const Value& row)
@ -138,14 +142,14 @@ Value CommentsTable::IsServiceAccessor(const Value& row)
Value CommentsTable::PersistentAccessor(const Value& row)
{
/* TODO - always 1 */
/* always 1 */
return 1;
}
Value CommentsTable::SourceAccessor(const Value& row)
{
/* TODO */
return Value();
/* always external */
return 1;
}
Value CommentsTable::EntryTypeAccessor(const Value& row)