Remove dead code from old modified attributes

refs #9851
This commit is contained in:
Michael Friedrich 2015-09-28 18:58:00 +02:00
parent 1bfa0a5ab1
commit 1813c0932c
25 changed files with 8 additions and 360 deletions

View File

@ -396,7 +396,6 @@ void StatusDataWriter::DumpCheckableStatusAttrs(std::ostream& fp, const Checkabl
"\t" "last_notification=" << CompatUtility::GetCheckableNotificationLastNotification(checkable) << "\n"
"\t" "next_notification=" << CompatUtility::GetCheckableNotificationNextNotification(checkable) << "\n"
"\t" "current_notification_number=" << CompatUtility::GetCheckableNotificationNotificationNumber(checkable) << "\n"
"\t" "modified_attributes=" << checkable->GetModifiedAttributes() << "\n"
"\t" "is_reachable=" << CompatUtility::GetCheckableIsReachable(checkable) << "\n";
}

View File

@ -181,18 +181,11 @@ void DbObject::SendVarsConfigUpdate(void)
} else
value = kv.second;
int overridden = custom_var_object->IsVarOverridden(kv.first) ? 1 : 0;
Log(LogDebug, "DbObject")
<< "object customvar key: '" << kv.first << "' value: '" << kv.second
<< "' overridden: " << overridden;
Dictionary::Ptr fields = new Dictionary();
fields->Set("varname", kv.first);
fields->Set("varvalue", value);
fields->Set("is_json", is_json);
fields->Set("config_type", 1);
fields->Set("has_been_modified", overridden);
fields->Set("object_id", obj);
fields->Set("instance_id", 0); /* DbConnection class fills in real ID */
@ -242,17 +235,10 @@ void DbObject::SendVarsStatusUpdate(void)
} else
value = kv.second;
int overridden = custom_var_object->IsVarOverridden(kv.first) ? 1 : 0;
Log(LogDebug, "DbObject")
<< "object customvar key: '" << kv.first << "' value: '" << kv.second
<< "' overridden: " << overridden;
Dictionary::Ptr fields = new Dictionary();
fields->Set("varname", kv.first);
fields->Set("varvalue", value);
fields->Set("is_json", is_json);
fields->Set("has_been_modified", overridden);
fields->Set("status_update_time", DbValue::FromTimestamp(Utility::GetTime()));
fields->Set("object_id", obj);
fields->Set("instance_id", 0); /* DbConnection class fills in real ID */

View File

@ -163,7 +163,6 @@ Dictionary::Ptr HostDbObject::GetStatusFields(void) const
fields->Set("failure_prediction_enabled", Empty);
fields->Set("process_performance_data", CompatUtility::GetCheckableProcessPerformanceData(host));
fields->Set("obsess_over_host", Empty);
fields->Set("modified_host_attributes", host->GetModifiedAttributes());
fields->Set("event_handler", CompatUtility::GetCheckableEventHandler(host));
fields->Set("check_command", CompatUtility::GetCheckableCheckCommand(host));
fields->Set("normal_check_interval", CompatUtility::GetCheckableCheckInterval(host));

View File

@ -162,7 +162,6 @@ Dictionary::Ptr ServiceDbObject::GetStatusFields(void) const
fields->Set("normal_check_interval", CompatUtility::GetCheckableCheckInterval(service));
fields->Set("retry_check_interval", CompatUtility::GetCheckableRetryInterval(service));
fields->Set("check_timeperiod_object_id", service->GetCheckPeriod());
fields->Set("modified_service_attributes", service->GetModifiedAttributes());
fields->Set("is_reachable", CompatUtility::GetCheckableIsReachable(service));
return fields;

View File

@ -71,9 +71,6 @@ Dictionary::Ptr UserDbObject::GetStatusFields(void) const
fields->Set("service_notifications_enabled", user->GetEnableNotifications());
fields->Set("last_host_notification", DbValue::FromTimestamp(user->GetLastNotification()));
fields->Set("last_service_notification", DbValue::FromTimestamp(user->GetLastNotification()));
fields->Set("modified_attributes", user->GetModifiedAttributes());
fields->Set("modified_host_attributes", Empty);
fields->Set("modified_service_attributes", Empty);
return fields;
}

View File

@ -139,18 +139,6 @@ void Checkable::ClearAcknowledgement(const MessageOrigin::Ptr& origin)
OnAcknowledgementCleared(this, origin);
}
int Checkable::GetModifiedAttributes(void) const
{
//TODO-MA
return 0;
}
void Checkable::SetModifiedAttributes(int flags, const MessageOrigin::Ptr& origin)
{
//TODO-MA
return;
}
Endpoint::Ptr Checkable::GetCommandEndpoint(void) const
{
return Endpoint::GetByName(GetCommandEndpointRaw());

View File

@ -103,9 +103,6 @@ public:
void ExecuteCheck();
void ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrigin::Ptr& origin = MessageOrigin::Ptr());
virtual int GetModifiedAttributes(void) const override;
virtual void SetModifiedAttributes(int flags, const MessageOrigin::Ptr& origin = MessageOrigin::Ptr()) override;
Endpoint::Ptr GetCommandEndpoint(void) const;
bool IsCheckPending(void) const;

View File

@ -28,17 +28,6 @@ using namespace icinga;
REGISTER_TYPE(Command);
int Command::GetModifiedAttributes(void) const
{
//TODO-MA
return 0;
}
void Command::SetModifiedAttributes(int flags, const MessageOrigin::Ptr& origin)
{
//TODO-MA
}
void Command::Validate(int types, const ValidationUtils& utils)
{
ObjectImpl<Command>::Validate(types, utils);

View File

@ -40,9 +40,6 @@ public:
//virtual Dictionary::Ptr Execute(const Object::Ptr& context) = 0;
virtual void Validate(int types, const ValidationUtils& utils) override;
int GetModifiedAttributes(void) const override;
void SetModifiedAttributes(int flags, const MessageOrigin::Ptr& origin = MessageOrigin::Ptr()) override;
};
}

View File

@ -388,62 +388,6 @@ String CompatUtility::GetCustomAttributeConfig(const CustomVarObject::Ptr& objec
return vars->Get(name);
}
Array::Ptr CompatUtility::GetModifiedAttributesList(const CustomVarObject::Ptr& object)
{
Array::Ptr mod_attr_list = new Array();
if (object->GetType() != ConfigType::GetByName("Host") &&
object->GetType() != ConfigType::GetByName("Service") &&
object->GetType() != ConfigType::GetByName("User") &&
object->GetType() != ConfigType::GetByName("CheckCommand") &&
object->GetType() != ConfigType::GetByName("EventCommand") &&
object->GetType() != ConfigType::GetByName("NotificationCommand"))
return mod_attr_list;
int flags = object->GetModifiedAttributes();
if ((flags & ModAttrNotificationsEnabled))
mod_attr_list->Add("notifications_enabled");
if ((flags & ModAttrActiveChecksEnabled))
mod_attr_list->Add("active_checks_enabled");
if ((flags & ModAttrPassiveChecksEnabled))
mod_attr_list->Add("passive_checks_enabled");
if ((flags & ModAttrFlapDetectionEnabled))
mod_attr_list->Add("flap_detection_enabled");
if ((flags & ModAttrEventHandlerEnabled))
mod_attr_list->Add("event_handler_enabled");
if ((flags & ModAttrPerformanceDataEnabled))
mod_attr_list->Add("performance_data_enabled");
if ((flags & ModAttrNormalCheckInterval))
mod_attr_list->Add("check_interval");
if ((flags & ModAttrRetryCheckInterval))
mod_attr_list->Add("retry_interval");
if ((flags & ModAttrEventHandlerCommand))
mod_attr_list->Add("event_handler_command");
if ((flags & ModAttrCheckCommand))
mod_attr_list->Add("check_command");
if ((flags & ModAttrMaxCheckAttempts))
mod_attr_list->Add("max_check_attemps");
if ((flags & ModAttrCheckTimeperiod))
mod_attr_list->Add("check_timeperiod");
if ((flags & ModAttrCustomVariable))
mod_attr_list->Add("custom_variable");
return mod_attr_list;
}
/* notifications */
int CompatUtility::GetCheckableNotificationsEnabled(const Checkable::Ptr& checkable)
{

View File

@ -82,8 +82,6 @@ public:
static int GetCheckableInCheckPeriod(const Checkable::Ptr& checkable);
static int GetCheckableInNotificationPeriod(const Checkable::Ptr& checkable);
static Array::Ptr GetModifiedAttributesList(const CustomVarObject::Ptr& object);
/* notification */
static int GetCheckableNotificationsEnabled(const Checkable::Ptr& checkable);
static int GetCheckableNotificationLastNotification(const Checkable::Ptr& checkable);

View File

@ -29,23 +29,6 @@ using namespace icinga;
REGISTER_TYPE(CustomVarObject);
int CustomVarObject::GetModifiedAttributes(void) const
{
//TODO-MA
return 0;
}
void CustomVarObject::SetModifiedAttributes(int, const MessageOrigin::Ptr&)
{
//TODO-MA
}
bool CustomVarObject::IsVarOverridden(const String& name) const
{
//TODO: implement
return false;
}
void CustomVarObject::ValidateVars(const Dictionary::Ptr& value, const ValidationUtils& utils)
{
MacroProcessor::ValidateCustomVars(this, value);

View File

@ -28,27 +28,6 @@
namespace icinga
{
enum ModifiedAttributeType
{
ModAttrNotificationsEnabled = 1,
ModAttrActiveChecksEnabled = 2,
ModAttrPassiveChecksEnabled = 4,
ModAttrEventHandlerEnabled = 8,
ModAttrFlapDetectionEnabled = 16,
ModAttrFailurePredictionEnabled = 32,
ModAttrPerformanceDataEnabled = 64,
ModAttrObsessiveHandlerEnabled = 128,
ModAttrEventHandlerCommand = 256,
ModAttrCheckCommand = 512,
ModAttrNormalCheckInterval = 1024,
ModAttrRetryCheckInterval = 2048,
ModAttrMaxCheckAttempts = 4096,
ModAttrFreshnessChecksEnabled = 8192,
ModAttrCheckTimeperiod = 16384,
ModAttrCustomVariable = 32768,
ModAttrNotificationTimeperiod = 65536
};
/**
* An object with custom variable attribute.
*
@ -60,11 +39,6 @@ public:
DECLARE_OBJECT(CustomVarObject);
virtual void ValidateVars(const Dictionary::Ptr& value, const ValidationUtils& utils) override;
virtual int GetModifiedAttributes(void) const;
virtual void SetModifiedAttributes(int flags, const MessageOrigin::Ptr& origin = MessageOrigin::Ptr());
bool IsVarOverridden(const String& name) const;
};
}

View File

@ -257,12 +257,6 @@ void ExternalCommandProcessor::StaticInitialize(void)
RegisterCommand("STOP_EXECUTING_SVC_CHECKS", &ExternalCommandProcessor::StopExecutingSvcChecks);
RegisterCommand("START_EXECUTING_HOST_CHECKS", &ExternalCommandProcessor::StartExecutingHostChecks);
RegisterCommand("STOP_EXECUTING_HOST_CHECKS", &ExternalCommandProcessor::StopExecutingHostChecks);
RegisterCommand("CHANGE_SVC_MODATTR", &ExternalCommandProcessor::ChangeSvcModattr, 3);
RegisterCommand("CHANGE_HOST_MODATTR", &ExternalCommandProcessor::ChangeHostModattr, 2);
RegisterCommand("CHANGE_USER_MODATTR", &ExternalCommandProcessor::ChangeUserModattr, 2);
RegisterCommand("CHANGE_CHECKCOMMAND_MODATTR", &ExternalCommandProcessor::ChangeCheckcommandModattr, 2);
RegisterCommand("CHANGE_EVENTCOMMAND_MODATTR", &ExternalCommandProcessor::ChangeEventcommandModattr, 2);
RegisterCommand("CHANGE_NOTIFICATIONCOMMAND_MODATTR", &ExternalCommandProcessor::ChangeNotificationcommandModattr, 2);
RegisterCommand("CHANGE_NORMAL_SVC_CHECK_INTERVAL", &ExternalCommandProcessor::ChangeNormalSvcCheckInterval, 3);
RegisterCommand("CHANGE_NORMAL_HOST_CHECK_INTERVAL", &ExternalCommandProcessor::ChangeNormalHostCheckInterval, 2);
RegisterCommand("CHANGE_RETRY_SVC_CHECK_INTERVAL", &ExternalCommandProcessor::ChangeRetrySvcCheckInterval, 3);
@ -1667,89 +1661,6 @@ void ExternalCommandProcessor::StopExecutingHostChecks(double, const std::vector
IcingaApplication::GetInstance()->SetEnableHostChecks(false);
}
void ExternalCommandProcessor::ChangeSvcModattr(double, const std::vector<String>& arguments)
{
Service::Ptr service = Service::GetByNamePair(arguments[0], arguments[1]);
if (!service)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot update modified attributes for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
int modifiedAttributes = Convert::ToLong(arguments[2]);
Log(LogNotice, "ExternalCommandProcessor")
<< "Updating modified attributes for service '" << arguments[1] << "'";
service->SetModifiedAttributes(modifiedAttributes);
}
void ExternalCommandProcessor::ChangeHostModattr(double, const std::vector<String>& arguments)
{
Host::Ptr host = Host::GetByName(arguments[0]);
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot update modified attributes for non-existent host '" + arguments[0] + "'"));
Log(LogNotice, "ExternalCommandProcessor")
<< "Updating modified attributes for host '" << arguments[0] << "'";
int modifiedAttributes = Convert::ToLong(arguments[1]);
host->SetModifiedAttributes(modifiedAttributes);
}
void ExternalCommandProcessor::ChangeUserModattr(double, const std::vector<String>& arguments)
{
User::Ptr user = User::GetByName(arguments[0]);
if (!user)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot update modified attributes for non-existent user '" + arguments[0] + "'"));
Log(LogNotice, "ExternalCommandProcessor")
<< "Updating modified attributes for user '" << arguments[0] << "'";
int modifiedAttributes = Convert::ToLong(arguments[1]);
user->SetModifiedAttributes(modifiedAttributes);
}
void ExternalCommandProcessor::ChangeCheckcommandModattr(double, const std::vector<String>& arguments)
{
CheckCommand::Ptr command = CheckCommand::GetByName(arguments[0]);
if (!command)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot update modified attributes for non-existent command '" + arguments[0] + "'"));
ChangeCommandModattrInternal(command, Convert::ToLong(arguments[1]));
}
void ExternalCommandProcessor::ChangeEventcommandModattr(double, const std::vector<String>& arguments)
{
EventCommand::Ptr command = EventCommand::GetByName(arguments[0]);
if (!command)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot update modified attributes for non-existent command '" + arguments[0] + "'"));
ChangeCommandModattrInternal(command, Convert::ToLong(arguments[1]));
}
void ExternalCommandProcessor::ChangeNotificationcommandModattr(double, const std::vector<String>& arguments)
{
NotificationCommand::Ptr command = NotificationCommand::GetByName(arguments[0]);
if (!command)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot update modified attributes for non-existent command '" + arguments[0] + "'"));
ChangeCommandModattrInternal(command, Convert::ToLong(arguments[1]));
}
void ExternalCommandProcessor::ChangeCommandModattrInternal(const Command::Ptr& command, int mod_attr)
{
Log(LogNotice, "ExternalCommandProcessor")
<< "Updating modified attributes for command '" << command->GetName() << "'";
command->SetModifiedAttributes(mod_attr);
}
void ExternalCommandProcessor::ChangeNormalSvcCheckInterval(double, const std::vector<String>& arguments)
{
Service::Ptr service = Service::GetByNamePair(arguments[0], arguments[1]);

View File

@ -127,13 +127,6 @@ private:
static void StopExecutingSvcChecks(double time, const std::vector<String>& arguments);
static void StartExecutingHostChecks(double time, const std::vector<String>& arguments);
static void StopExecutingHostChecks(double time, const std::vector<String>& arguments);
static void ChangeSvcModattr(double time, const std::vector<String>& arguments);
static void ChangeHostModattr(double time, const std::vector<String>& arguments);
static void ChangeUserModattr(double time, const std::vector<String>& arguments);
static void ChangeCheckcommandModattr(double time, const std::vector<String>& arguments);
static void ChangeEventcommandModattr(double time, const std::vector<String>& arguments);
static void ChangeNotificationcommandModattr(double time, const std::vector<String>& arguments);
static void ChangeNormalSvcCheckInterval(double time, const std::vector<String>& arguments);
static void ChangeNormalHostCheckInterval(double time, const std::vector<String>& arguments);
@ -168,7 +161,6 @@ private:
static void DisableServicegroupSvcNotifications(double time, const std::vector<String>& arguments);
private:
static void ChangeCommandModattrInternal(const Command::Ptr& command, int mod_attr);
static void ChangeCustomCommandVarInternal(const Command::Ptr& command, const String& name, const Value& value);
};

View File

@ -119,15 +119,3 @@ void User::ValidateTypes(const Array::Ptr& value, const ValidationUtils& utils)
BOOST_THROW_EXCEPTION(ValidationError(this, boost::assign::list_of("types"), "Type filter is invalid."));
}
}
int User::GetModifiedAttributes(void) const
{
//TODO-MA
return 0;
}
void User::SetModifiedAttributes(int flags, const MessageOrigin::Ptr& origin)
{
//TODO-MA
return;
}

View File

@ -47,9 +47,6 @@ public:
virtual void ValidateStates(const Array::Ptr& value, const ValidationUtils& utils) override;
virtual void ValidateTypes(const Array::Ptr& value, const ValidationUtils& utils) override;
virtual int GetModifiedAttributes(void) const override;
virtual void SetModifiedAttributes(int flags, const MessageOrigin::Ptr& origin = MessageOrigin::Ptr()) override;
protected:
virtual void Stop(void) override;

View File

@ -44,8 +44,8 @@ void CommandsTable::AddColumns(Table *table, const String& prefix,
table->AddColumn(prefix + "custom_variable_names", Column(&CommandsTable::CustomVariableNamesAccessor, objectAccessor));
table->AddColumn(prefix + "custom_variable_values", Column(&CommandsTable::CustomVariableValuesAccessor, objectAccessor));
table->AddColumn(prefix + "custom_variables", Column(&CommandsTable::CustomVariablesAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes", Column(&CommandsTable::ModifiedAttributesAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes_list", Column(&CommandsTable::ModifiedAttributesListAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes", Column(&Table::ZeroAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes_list", Column(&Table::ZeroAccessor, objectAccessor));
}
String CommandsTable::GetName(void) const
@ -185,24 +185,3 @@ Value CommandsTable::CustomVariablesAccessor(const Value& row)
return cv;
}
Value CommandsTable::ModifiedAttributesAccessor(const Value& row)
{
Command::Ptr command = static_cast<Command::Ptr>(row);
if (!command)
return Empty;
/* not supported */
return command->GetModifiedAttributes();
}
Value CommandsTable::ModifiedAttributesListAccessor(const Value& row)
{
Command::Ptr command = static_cast<Command::Ptr>(row);
if (!command)
return Empty;
return CompatUtility::GetModifiedAttributesList(command);
}

View File

@ -51,8 +51,6 @@ protected:
static Value CustomVariableNamesAccessor(const Value& row);
static Value CustomVariableValuesAccessor(const Value& row);
static Value CustomVariablesAccessor(const Value& row);
static Value ModifiedAttributesAccessor(const Value& row);
static Value ModifiedAttributesListAccessor(const Value& row);
};
}

View File

@ -52,8 +52,8 @@ void ContactsTable::AddColumns(Table *table, const String& prefix,
table->AddColumn(prefix + "vars_variable_names", Column(&ContactsTable::CustomVariableNamesAccessor, objectAccessor));
table->AddColumn(prefix + "vars_variable_values", Column(&ContactsTable::CustomVariableValuesAccessor, objectAccessor));
table->AddColumn(prefix + "vars_variables", Column(&ContactsTable::CustomVariablesAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes", Column(&ContactsTable::ModifiedAttributesAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes_list", Column(&ContactsTable::ModifiedAttributesListAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes", Column(&Table::ZeroAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes_list", Column(&Table::ZeroAccessor, objectAccessor));
table->AddColumn(prefix + "cv_is_json", Column(&ContactsTable::CVIsJsonAccessor, objectAccessor));
}
@ -316,24 +316,3 @@ Value ContactsTable::CVIsJsonAccessor(const Value& row)
return cv_is_json;
}
Value ContactsTable::ModifiedAttributesAccessor(const Value& row)
{
User::Ptr user = static_cast<User::Ptr>(row);
if (!user)
return Empty;
/* not supported */
return user->GetModifiedAttributes();
}
Value ContactsTable::ModifiedAttributesListAccessor(const Value& row)
{
User::Ptr user = static_cast<User::Ptr>(row);
if (!user)
return Empty;
return CompatUtility::GetModifiedAttributesList(user);
}

View File

@ -59,8 +59,6 @@ protected:
static Value CustomVariableNamesAccessor(const Value& row);
static Value CustomVariableValuesAccessor(const Value& row);
static Value CustomVariablesAccessor(const Value& row);
static Value ModifiedAttributesAccessor(const Value& row);
static Value ModifiedAttributesListAccessor(const Value& row);
static Value CVIsJsonAccessor(const Value& row);
};

View File

@ -111,8 +111,8 @@ void HostsTable::AddColumns(Table *table, const String& prefix,
table->AddColumn(prefix + "active_checks_enabled", Column(&HostsTable::ActiveChecksEnabledAccessor, objectAccessor));
table->AddColumn(prefix + "check_options", Column(&HostsTable::CheckOptionsAccessor, objectAccessor));
table->AddColumn(prefix + "obsess_over_host", Column(&Table::ZeroAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes", Column(&HostsTable::ModifiedAttributesAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes_list", Column(&HostsTable::ModifiedAttributesListAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes", Column(&Table::ZeroAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes_list", Column(&Table::ZeroAccessor, objectAccessor));
table->AddColumn(prefix + "check_interval", Column(&HostsTable::CheckIntervalAccessor, objectAccessor));
table->AddColumn(prefix + "retry_interval", Column(&HostsTable::RetryIntervalAccessor, objectAccessor));
table->AddColumn(prefix + "notification_interval", Column(&HostsTable::NotificationIntervalAccessor, objectAccessor));
@ -778,26 +778,6 @@ Value HostsTable::CheckOptionsAccessor(const Value&)
return Empty;
}
Value HostsTable::ModifiedAttributesAccessor(const Value& row)
{
Host::Ptr host = static_cast<Host::Ptr>(row);
if (!host)
return Empty;
return host->GetModifiedAttributes();
}
Value HostsTable::ModifiedAttributesListAccessor(const Value& row)
{
Host::Ptr host = static_cast<Host::Ptr>(row);
if (!host)
return Empty;
return CompatUtility::GetModifiedAttributesList(host);
}
Value HostsTable::CheckIntervalAccessor(const Value& row)
{
Host::Ptr host = static_cast<Host::Ptr>(row);

View File

@ -101,8 +101,6 @@ protected:
static Value ScheduledDowntimeDepthAccessor(const Value& row);
static Value ActiveChecksEnabledAccessor(const Value& row);
static Value CheckOptionsAccessor(const Value& row);
static Value ModifiedAttributesAccessor(const Value& row);
static Value ModifiedAttributesListAccessor(const Value& row);
static Value CheckIntervalAccessor(const Value& row);
static Value RetryIntervalAccessor(const Value& row);
static Value NotificationIntervalAccessor(const Value& row);

View File

@ -108,8 +108,8 @@ void ServicesTable::AddColumns(Table *table, const String& prefix,
table->AddColumn(prefix + "flap_detection_enabled", Column(&ServicesTable::FlapDetectionEnabledAccessor, objectAccessor));
table->AddColumn(prefix + "check_freshness", Column(&ServicesTable::CheckFreshnessAccessor, objectAccessor));
table->AddColumn(prefix + "obsess_over_service", Column(&Table::ZeroAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes", Column(&ServicesTable::ModifiedAttributesAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes_list", Column(&ServicesTable::ModifiedAttributesListAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes", Column(&Table::ZeroAccessor, objectAccessor));
table->AddColumn(prefix + "modified_attributes_list", Column(&Table::ZeroAccessor, objectAccessor));
table->AddColumn(prefix + "pnpgraph_present", Column(&Table::ZeroAccessor, objectAccessor));
table->AddColumn(prefix + "staleness", Column(&ServicesTable::StalenessAccessor, objectAccessor));
table->AddColumn(prefix + "check_interval", Column(&ServicesTable::CheckIntervalAccessor, objectAccessor));
@ -806,26 +806,6 @@ Value ServicesTable::CheckFreshnessAccessor(const Value& row)
return CompatUtility::GetCheckableFreshnessChecksEnabled(service);
}
Value ServicesTable::ModifiedAttributesAccessor(const Value& row)
{
Service::Ptr service = static_cast<Service::Ptr>(row);
if (!service)
return Empty;
return service->GetModifiedAttributes();
}
Value ServicesTable::ModifiedAttributesListAccessor(const Value& row)
{
Service::Ptr service = static_cast<Service::Ptr>(row);
if (!service)
return Empty;
return CompatUtility::GetModifiedAttributesList(service);
}
Value ServicesTable::StalenessAccessor(const Value& row)
{
Service::Ptr service = static_cast<Service::Ptr>(row);

View File

@ -102,8 +102,6 @@ protected:
static Value CheckOptionsAccessor(const Value& row);
static Value FlapDetectionEnabledAccessor(const Value& row);
static Value CheckFreshnessAccessor(const Value& row);
static Value ModifiedAttributesAccessor(const Value& row);
static Value ModifiedAttributesListAccessor(const Value& row);
static Value StalenessAccessor(const Value& row);
static Value CheckIntervalAccessor(const Value& row);
static Value RetryIntervalAccessor(const Value& row);