mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-03 20:04:29 +02:00
parent
ba2309338e
commit
dcf7d07c7a
@ -78,8 +78,8 @@ void Notification::StaticInitialize(void)
|
|||||||
|
|
||||||
void Notification::OnConfigLoaded(void)
|
void Notification::OnConfigLoaded(void)
|
||||||
{
|
{
|
||||||
SetNotificationTypeFilter(FilterArrayToInt(GetNotificationTypeFilterRaw(), 0));
|
SetNotificationTypeFilter(FilterArrayToInt(GetNotificationTypeFilterRaw(), ~0));
|
||||||
SetNotificationStateFilter(FilterArrayToInt(GetNotificationStateFilterRaw(), 0));
|
SetNotificationStateFilter(FilterArrayToInt(GetNotificationStateFilterRaw(), ~0));
|
||||||
|
|
||||||
GetCheckable()->AddNotification(GetSelf());
|
GetCheckable()->AddNotification(GetSelf());
|
||||||
}
|
}
|
||||||
@ -252,13 +252,9 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Service::Ptr service = dynamic_pointer_cast<Service>(checkable);
|
|
||||||
Host::Ptr host;
|
Host::Ptr host;
|
||||||
|
Service::Ptr service;
|
||||||
if (service)
|
tie(host, service) = GetHostService(checkable);
|
||||||
host = service->GetHost();
|
|
||||||
else
|
|
||||||
host = static_pointer_cast<Host>(checkable);
|
|
||||||
|
|
||||||
unsigned long fstate;
|
unsigned long fstate;
|
||||||
|
|
||||||
@ -333,13 +329,9 @@ bool Notification::CheckNotificationUserFilters(NotificationType type, const Use
|
|||||||
}
|
}
|
||||||
|
|
||||||
Checkable::Ptr checkable = GetCheckable();
|
Checkable::Ptr checkable = GetCheckable();
|
||||||
Service::Ptr service = dynamic_pointer_cast<Service>(checkable);
|
|
||||||
Host::Ptr host;
|
Host::Ptr host;
|
||||||
|
Service::Ptr service;
|
||||||
if (service)
|
tie(host, service) = GetHostService(checkable);
|
||||||
host = service->GetHost();
|
|
||||||
else
|
|
||||||
host = static_pointer_cast<Host>(checkable);
|
|
||||||
|
|
||||||
unsigned long fstate;
|
unsigned long fstate;
|
||||||
|
|
||||||
@ -422,7 +414,7 @@ int icinga::FilterArrayToInt(const Array::Ptr& typeFilters, int defaultValue)
|
|||||||
{
|
{
|
||||||
Value resultTypeFilter;
|
Value resultTypeFilter;
|
||||||
|
|
||||||
if (!typeFilters || typeFilters->GetLength() == 0)
|
if (!typeFilters)
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
|
|
||||||
resultTypeFilter = 0;
|
resultTypeFilter = 0;
|
||||||
|
@ -33,8 +33,8 @@ REGISTER_SCRIPTFUNCTION(ValidateUserFilters, &User::ValidateFilters);
|
|||||||
|
|
||||||
void User::OnConfigLoaded(void)
|
void User::OnConfigLoaded(void)
|
||||||
{
|
{
|
||||||
SetNotificationTypeFilter(FilterArrayToInt(GetNotificationTypeFilterRaw(), 0));
|
SetNotificationTypeFilter(FilterArrayToInt(GetNotificationTypeFilterRaw(), ~0));
|
||||||
SetNotificationStateFilter(FilterArrayToInt(GetNotificationStateFilterRaw(), 0));
|
SetNotificationStateFilter(FilterArrayToInt(GetNotificationStateFilterRaw(), ~0));
|
||||||
|
|
||||||
Array::Ptr groups = GetGroups();
|
Array::Ptr groups = GetGroups();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user