mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 07:04:37 +02:00
parent
31c9406684
commit
aedef8af97
@ -255,6 +255,6 @@ void Checkable::SetModifiedAttributes(int flags, const MessageOrigin& origin)
|
|||||||
|
|
||||||
if ((flags & ModAttrCustomVariable) == 0) {
|
if ((flags & ModAttrCustomVariable) == 0) {
|
||||||
SetOverrideVars(Empty);
|
SetOverrideVars(Empty);
|
||||||
OnVarsChanged(GetSelf(), origin);
|
OnVarsChanged(GetSelf(), GetVars(), origin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ void Command::SetModifiedAttributes(int flags, const MessageOrigin& origin)
|
|||||||
{
|
{
|
||||||
if ((flags & ModAttrCustomVariable) == 0) {
|
if ((flags & ModAttrCustomVariable) == 0) {
|
||||||
SetOverrideVars(Empty);
|
SetOverrideVars(Empty);
|
||||||
OnVarsChanged(GetSelf(), origin);
|
OnVarsChanged(GetSelf(), GetVars(), origin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ using namespace icinga;
|
|||||||
|
|
||||||
REGISTER_TYPE(CustomVarObject);
|
REGISTER_TYPE(CustomVarObject);
|
||||||
|
|
||||||
boost::signals2::signal<void (const CustomVarObject::Ptr&, const MessageOrigin&)> CustomVarObject::OnVarsChanged;
|
boost::signals2::signal<void (const CustomVarObject::Ptr&, const Dictionary::Ptr& vars, const MessageOrigin&)> CustomVarObject::OnVarsChanged;
|
||||||
|
|
||||||
Dictionary::Ptr CustomVarObject::GetVars(void) const
|
Dictionary::Ptr CustomVarObject::GetVars(void) const
|
||||||
{
|
{
|
||||||
@ -38,9 +38,7 @@ void CustomVarObject::SetVars(const Dictionary::Ptr& vars, const MessageOrigin&
|
|||||||
{
|
{
|
||||||
SetOverrideVars(vars);
|
SetOverrideVars(vars);
|
||||||
|
|
||||||
Log(LogNotice, "CustomVarObject", "Setting vars for object '" + GetName() + "'");
|
OnVarsChanged(GetSelf(), vars, origin);
|
||||||
|
|
||||||
OnVarsChanged(GetSelf(), origin);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CustomVarObject::GetModifiedAttributes(void) const
|
int CustomVarObject::GetModifiedAttributes(void) const
|
||||||
|
@ -58,8 +58,9 @@ class I2_ICINGA_API CustomVarObject : public ObjectImpl<CustomVarObject>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DECLARE_PTR_TYPEDEFS(CustomVarObject);
|
DECLARE_PTR_TYPEDEFS(CustomVarObject);
|
||||||
|
DECLARE_TYPENAME(CustomVarObject);
|
||||||
|
|
||||||
static boost::signals2::signal<void (const CustomVarObject::Ptr&, const MessageOrigin&)> OnVarsChanged;
|
static boost::signals2::signal<void (const CustomVarObject::Ptr&, const Dictionary::Ptr& vars, const MessageOrigin&)> OnVarsChanged;
|
||||||
|
|
||||||
Dictionary::Ptr GetVars(void) const;
|
Dictionary::Ptr GetVars(void) const;
|
||||||
void SetVars(const Dictionary::Ptr& vars, const MessageOrigin& origin = MessageOrigin());
|
void SetVars(const Dictionary::Ptr& vars, const MessageOrigin& origin = MessageOrigin());
|
||||||
|
@ -122,7 +122,7 @@ void User::SetModifiedAttributes(int flags, const MessageOrigin& origin)
|
|||||||
{
|
{
|
||||||
if ((flags & ModAttrCustomVariable) == 0) {
|
if ((flags & ModAttrCustomVariable) == 0) {
|
||||||
SetOverrideVars(Empty);
|
SetOverrideVars(Empty);
|
||||||
OnVarsChanged(GetSelf(), origin);
|
OnVarsChanged(GetSelf(), GetVars(), origin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user