"\t" "check_period=" << CompatUtility::GetCheckableCheckPeriod(checkable) << "\n"
"\t" "check_interval=" << CompatUtility::GetCheckableCheckInterval(checkable) << "\n"
"\t" "retry_interval=" << CompatUtility::GetCheckableRetryInterval(checkable) << "\n"
- "\t" "has_been_checked=" << CompatUtility::GetCheckableHasBeenChecked(checkable) << "\n"
+ "\t" "has_been_checked=" << (checkable->HasBeenChecked() ? 1 : 0) << "\n"
"\t" "should_be_scheduled=" << checkable->GetEnableActiveChecks() << "\n"
"\t" "event_handler_enabled=" << CompatUtility::GetCheckableEventHandlerEnabled(checkable) << "\n";
}
fields->Set("current_state", CompatUtility::GetHostCurrentState(host));
- fields->Set("has_been_checked", CompatUtility::GetCheckableHasBeenChecked(host));
+ fields->Set("has_been_checked", host->HasBeenChecked());
fields->Set("should_be_scheduled", host->GetEnableActiveChecks());
fields->Set("current_check_attempt", host->GetCheckAttempt());
fields->Set("max_check_attempts", host->GetMaxCheckAttempts());
}
fields->Set("current_state", service->GetState());
- fields->Set("has_been_checked", CompatUtility::GetCheckableHasBeenChecked(service));
+ fields->Set("has_been_checked", service->HasBeenChecked());
fields->Set("should_be_scheduled", service->GetEnableActiveChecks());
fields->Set("current_check_attempt", service->GetCheckAttempt());
fields->Set("max_check_attempts", service->GetMaxCheckAttempts());
return "24x7";
}
-int CompatUtility::GetCheckableHasBeenChecked(const Checkable::Ptr& checkable)
-{
- return (checkable->GetLastCheckResult() ? 1 : 0);
-}
-
int CompatUtility::GetCheckablePassiveChecksEnabled(const Checkable::Ptr& checkable)
{
return (checkable->GetEnablePassiveChecks() ? 1 : 0);
static double GetCheckableCheckInterval(const Checkable::Ptr& checkable);
static double GetCheckableRetryInterval(const Checkable::Ptr& checkable);
static String GetCheckableCheckPeriod(const Checkable::Ptr& checkable);
- static int GetCheckableHasBeenChecked(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);
if (!host)
return Empty;
- return CompatUtility::GetCheckableHasBeenChecked(host);
+ return Convert::ToLong(host->HasBeenChecked());
}
Value HostsTable::CurrentNotificationNumberAccessor(const Value& row)
if (!service)
return Empty;
- return CompatUtility::GetCheckableHasBeenChecked(service);
+ return Convert::ToLong(service->HasBeenChecked());
}
Value ServicesTable::LastStateAccessor(const Value& row)