mirror of https://github.com/Icinga/icinga2.git
Drop CompatUtility::GetCheckableAcknowledgementType()
This already returns an integer.
This commit is contained in:
parent
7bf2e07032
commit
3847e37df1
|
@ -388,7 +388,7 @@ void StatusDataWriter::DumpCheckableStatusAttrs(std::ostream& fp, const Checkabl
|
|||
"\t" "is_flapping=" << CompatUtility::GetCheckableIsFlapping(checkable) << "\n"
|
||||
"\t" "percent_state_change=" << CompatUtility::GetCheckablePercentStateChange(checkable) << "\n"
|
||||
"\t" "problem_has_been_acknowledged=" << (checkable->GetAcknowledgement() != AcknowledgementNone ? 1 : 0) << "\n"
|
||||
"\t" "acknowledgement_type=" << CompatUtility::GetCheckableAcknowledgementType(checkable) << "\n"
|
||||
"\t" "acknowledgement_type=" << checkable->GetAcknowledgement() << "\n"
|
||||
"\t" "acknowledgement_end_time=" << checkable->GetAcknowledgementExpiry() << "\n"
|
||||
"\t" "scheduled_downtime_depth=" << checkable->GetDowntimeDepth() << "\n"
|
||||
"\t" "last_notification=" << CompatUtility::GetCheckableNotificationLastNotification(checkable) << "\n"
|
||||
|
|
|
@ -154,7 +154,7 @@ Dictionary::Ptr HostDbObject::GetStatusFields() const
|
|||
fields->Set("no_more_notifications", Empty);
|
||||
fields->Set("notifications_enabled", CompatUtility::GetCheckableNotificationsEnabled(host));
|
||||
fields->Set("problem_has_been_acknowledged", host->GetAcknowledgement() != AcknowledgementNone);
|
||||
fields->Set("acknowledgement_type", CompatUtility::GetCheckableAcknowledgementType(host));
|
||||
fields->Set("acknowledgement_type", host->GetAcknowledgement());
|
||||
fields->Set("current_notification_number", CompatUtility::GetCheckableNotificationNotificationNumber(host));
|
||||
fields->Set("passive_checks_enabled", CompatUtility::GetCheckablePassiveChecksEnabled(host));
|
||||
fields->Set("active_checks_enabled", CompatUtility::GetCheckableActiveChecksEnabled(host));
|
||||
|
|
|
@ -142,7 +142,7 @@ Dictionary::Ptr ServiceDbObject::GetStatusFields() const
|
|||
fields->Set("no_more_notifications", Empty);
|
||||
fields->Set("notifications_enabled", CompatUtility::GetCheckableNotificationsEnabled(service));
|
||||
fields->Set("problem_has_been_acknowledged", service->GetAcknowledgement() != AcknowledgementNone);
|
||||
fields->Set("acknowledgement_type", CompatUtility::GetCheckableAcknowledgementType(service));
|
||||
fields->Set("acknowledgement_type", service->GetAcknowledgement());
|
||||
fields->Set("current_notification_number", CompatUtility::GetCheckableNotificationNotificationNumber(service));
|
||||
fields->Set("passive_checks_enabled", CompatUtility::GetCheckablePassiveChecksEnabled(service));
|
||||
fields->Set("active_checks_enabled", CompatUtility::GetCheckableActiveChecksEnabled(service));
|
||||
|
|
|
@ -207,11 +207,6 @@ int CompatUtility::GetCheckableHasBeenChecked(const Checkable::Ptr& checkable)
|
|||
return (checkable->GetLastCheckResult() ? 1 : 0);
|
||||
}
|
||||
|
||||
int CompatUtility::GetCheckableAcknowledgementType(const Checkable::Ptr& checkable)
|
||||
{
|
||||
return static_cast<int>(checkable->GetAcknowledgement());
|
||||
}
|
||||
|
||||
int CompatUtility::GetCheckablePassiveChecksEnabled(const Checkable::Ptr& checkable)
|
||||
{
|
||||
return (checkable->GetEnablePassiveChecks() ? 1 : 0);
|
||||
|
|
|
@ -55,7 +55,6 @@ public:
|
|||
static double GetCheckableRetryInterval(const Checkable::Ptr& checkable);
|
||||
static String GetCheckableCheckPeriod(const Checkable::Ptr& checkable);
|
||||
static int GetCheckableHasBeenChecked(const Checkable::Ptr& checkable);
|
||||
static int GetCheckableAcknowledgementType(const Checkable::Ptr& checkable);
|
||||
static int GetCheckablePassiveChecksEnabled(const Checkable::Ptr& checkable);
|
||||
static int GetCheckableActiveChecksEnabled(const Checkable::Ptr& checkable);
|
||||
static int GetCheckableEventHandlerEnabled(const Checkable::Ptr& checkable);
|
||||
|
|
|
@ -512,7 +512,7 @@ Value HostsTable::AcknowledgementTypeAccessor(const Value& row)
|
|||
return Empty;
|
||||
|
||||
ObjectLock olock(host);
|
||||
return CompatUtility::GetCheckableAcknowledgementType(host);
|
||||
return host->GetAcknowledgement();
|
||||
}
|
||||
|
||||
Value HostsTable::CheckTypeAccessor(const Value& row)
|
||||
|
|
|
@ -571,7 +571,7 @@ Value ServicesTable::AcknowledgementTypeAccessor(const Value& row)
|
|||
return Empty;
|
||||
|
||||
ObjectLock olock(service);
|
||||
return CompatUtility::GetCheckableAcknowledgementType(service);
|
||||
return service->GetAcknowledgement();
|
||||
}
|
||||
|
||||
Value ServicesTable::NoMoreNotificationsAccessor(const Value& row)
|
||||
|
|
Loading…
Reference in New Issue