mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-07 20:25:08 +02:00
Icinga DB: introduce Checkable#last_comment_id
This commit is contained in:
parent
173a93c487
commit
5c10fffa3b
@ -1895,6 +1895,8 @@ void IcingaDB::SendAddedComment(const Comment::Ptr& comment)
|
||||
}
|
||||
|
||||
m_Rcon->FireAndForgetQuery(std::move(xAdd), Prio::History);
|
||||
UpdateState(checkable);
|
||||
SendStatusUpdate(checkable);
|
||||
}
|
||||
|
||||
void IcingaDB::SendRemovedComment(const Comment::Ptr& comment)
|
||||
@ -1962,6 +1964,8 @@ void IcingaDB::SendRemovedComment(const Comment::Ptr& comment)
|
||||
}
|
||||
|
||||
m_Rcon->FireAndForgetQuery(std::move(xAdd), Prio::History);
|
||||
UpdateState(checkable);
|
||||
SendStatusUpdate(checkable);
|
||||
}
|
||||
|
||||
void IcingaDB::SendFlappingChange(const Checkable::Ptr& checkable, double changeTime, double flappingLastChange)
|
||||
@ -2253,6 +2257,14 @@ Dictionary::Ptr IcingaDB::SerializeState(const Checkable::Ptr& checkable)
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
auto lastComment (checkable->GetLastComment());
|
||||
|
||||
if (lastComment) {
|
||||
attrs->Set("last_comment_id", GetObjectIdentifier(lastComment));
|
||||
}
|
||||
}
|
||||
|
||||
attrs->Set("in_downtime", checkable->IsInDowntime());
|
||||
|
||||
if (checkable->GetCheckTimeout().IsEmpty())
|
||||
|
Loading…
x
Reference in New Issue
Block a user