mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-31 01:24:19 +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);
|
m_Rcon->FireAndForgetQuery(std::move(xAdd), Prio::History);
|
||||||
|
UpdateState(checkable);
|
||||||
|
SendStatusUpdate(checkable);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IcingaDB::SendRemovedComment(const Comment::Ptr& comment)
|
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);
|
m_Rcon->FireAndForgetQuery(std::move(xAdd), Prio::History);
|
||||||
|
UpdateState(checkable);
|
||||||
|
SendStatusUpdate(checkable);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IcingaDB::SendFlappingChange(const Checkable::Ptr& checkable, double changeTime, double flappingLastChange)
|
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());
|
attrs->Set("in_downtime", checkable->IsInDowntime());
|
||||||
|
|
||||||
if (checkable->GetCheckTimeout().IsEmpty())
|
if (checkable->GetCheckTimeout().IsEmpty())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user