mirror of https://github.com/Icinga/icinga2.git
Drop useless CompatUtility::GetCustomAttributeConfig() wrapper
This commit is contained in:
parent
b5f5d167dc
commit
f2fe165ccb
|
@ -227,7 +227,7 @@ void DbObject::SendVarsConfigUpdateHeavy()
|
|||
query2.WhereCriteria->Set("object_id", obj);
|
||||
queries.emplace_back(std::move(query2));
|
||||
|
||||
Dictionary::Ptr vars = CompatUtility::GetCustomAttributeConfig(custom_var_object);
|
||||
Dictionary::Ptr vars = custom_var_object->GetVars();
|
||||
|
||||
if (vars) {
|
||||
ObjectLock olock (vars);
|
||||
|
@ -274,7 +274,7 @@ void DbObject::SendVarsStatusUpdate()
|
|||
if (!custom_var_object)
|
||||
return;
|
||||
|
||||
Dictionary::Ptr vars = CompatUtility::GetCustomAttributeConfig(custom_var_object);
|
||||
Dictionary::Ptr vars = custom_var_object->GetVars();
|
||||
|
||||
if (vars) {
|
||||
std::vector<DbQuery> queries;
|
||||
|
|
|
@ -233,17 +233,6 @@ int CompatUtility::GetCheckableInNotificationPeriod(const Checkable::Ptr& checka
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* vars attr */
|
||||
Dictionary::Ptr CompatUtility::GetCustomAttributeConfig(const CustomVarObject::Ptr& object)
|
||||
{
|
||||
Dictionary::Ptr vars = object->GetVars();
|
||||
|
||||
if (!vars)
|
||||
return nullptr;
|
||||
|
||||
return vars;
|
||||
}
|
||||
|
||||
/* notifications */
|
||||
int CompatUtility::GetCheckableNotificationLastNotification(const Checkable::Ptr& checkable)
|
||||
{
|
||||
|
|
|
@ -78,9 +78,6 @@ public:
|
|||
static std::set<User::Ptr> GetCheckableNotificationUsers(const Checkable::Ptr& checkable);
|
||||
static std::set<UserGroup::Ptr> GetCheckableNotificationUserGroups(const Checkable::Ptr& checkable);
|
||||
|
||||
/* custom attribute */
|
||||
static Dictionary::Ptr GetCustomAttributeConfig(const CustomVarObject::Ptr& object);
|
||||
|
||||
/* check result */
|
||||
static String GetCheckResultOutput(const CheckResult::Ptr& cr);
|
||||
static String GetCheckResultLongOutput(const CheckResult::Ptr& cr);
|
||||
|
|
|
@ -103,7 +103,7 @@ Value CommandsTable::CustomVariableNamesAccessor(const Value& row)
|
|||
|
||||
{
|
||||
ObjectLock olock(command);
|
||||
vars = CompatUtility::GetCustomAttributeConfig(command);
|
||||
vars = command->GetVars();
|
||||
}
|
||||
|
||||
Array::Ptr cv = new Array();
|
||||
|
@ -132,7 +132,7 @@ Value CommandsTable::CustomVariableValuesAccessor(const Value& row)
|
|||
|
||||
{
|
||||
ObjectLock olock(command);
|
||||
vars = CompatUtility::GetCustomAttributeConfig(command);
|
||||
vars = command->GetVars();
|
||||
}
|
||||
|
||||
Array::Ptr cv = new Array();
|
||||
|
@ -161,7 +161,7 @@ Value CommandsTable::CustomVariablesAccessor(const Value& row)
|
|||
|
||||
{
|
||||
ObjectLock olock(command);
|
||||
vars = CompatUtility::GetCustomAttributeConfig(command);
|
||||
vars = command->GetVars();
|
||||
}
|
||||
|
||||
Array::Ptr cv = new Array();
|
||||
|
|
|
@ -207,7 +207,7 @@ Value ContactsTable::CustomVariableNamesAccessor(const Value& row)
|
|||
|
||||
{
|
||||
ObjectLock olock(user);
|
||||
vars = CompatUtility::GetCustomAttributeConfig(user);
|
||||
vars = user->GetVars();
|
||||
}
|
||||
|
||||
Array::Ptr cv = new Array();
|
||||
|
@ -234,7 +234,7 @@ Value ContactsTable::CustomVariableValuesAccessor(const Value& row)
|
|||
|
||||
{
|
||||
ObjectLock olock(user);
|
||||
vars = CompatUtility::GetCustomAttributeConfig(user);
|
||||
vars = user->GetVars();
|
||||
}
|
||||
|
||||
Array::Ptr cv = new Array();
|
||||
|
@ -264,7 +264,7 @@ Value ContactsTable::CustomVariablesAccessor(const Value& row)
|
|||
|
||||
{
|
||||
ObjectLock olock(user);
|
||||
vars = CompatUtility::GetCustomAttributeConfig(user);
|
||||
vars = user->GetVars();
|
||||
}
|
||||
|
||||
Array::Ptr cv = new Array();
|
||||
|
@ -299,7 +299,7 @@ Value ContactsTable::CVIsJsonAccessor(const Value& row)
|
|||
|
||||
{
|
||||
ObjectLock olock(user);
|
||||
vars = CompatUtility::GetCustomAttributeConfig(user);
|
||||
vars = user->GetVars();
|
||||
}
|
||||
|
||||
if (!vars)
|
||||
|
|
|
@ -1021,7 +1021,7 @@ Value HostsTable::CustomVariableNamesAccessor(const Value& row)
|
|||
|
||||
{
|
||||
ObjectLock olock(host);
|
||||
vars = CompatUtility::GetCustomAttributeConfig(host);
|
||||
vars = host->GetVars();
|
||||
}
|
||||
|
||||
Array::Ptr cv = new Array();
|
||||
|
@ -1048,7 +1048,7 @@ Value HostsTable::CustomVariableValuesAccessor(const Value& row)
|
|||
|
||||
{
|
||||
ObjectLock olock(host);
|
||||
vars = CompatUtility::GetCustomAttributeConfig(host);
|
||||
vars = host->GetVars();
|
||||
}
|
||||
|
||||
Array::Ptr cv = new Array();
|
||||
|
@ -1078,7 +1078,7 @@ Value HostsTable::CustomVariablesAccessor(const Value& row)
|
|||
|
||||
{
|
||||
ObjectLock olock(host);
|
||||
vars = CompatUtility::GetCustomAttributeConfig(host);
|
||||
vars = host->GetVars();
|
||||
}
|
||||
|
||||
Array::Ptr cv = new Array();
|
||||
|
@ -1113,7 +1113,7 @@ Value HostsTable::CVIsJsonAccessor(const Value& row)
|
|||
|
||||
{
|
||||
ObjectLock olock(host);
|
||||
vars = CompatUtility::GetCustomAttributeConfig(host);
|
||||
vars = host->GetVars();
|
||||
}
|
||||
|
||||
if (!vars)
|
||||
|
|
|
@ -1043,7 +1043,7 @@ Value ServicesTable::CustomVariableNamesAccessor(const Value& row)
|
|||
|
||||
{
|
||||
ObjectLock olock(service);
|
||||
vars = CompatUtility::GetCustomAttributeConfig(service);
|
||||
vars = service->GetVars();
|
||||
}
|
||||
|
||||
Array::Ptr cv = new Array();
|
||||
|
@ -1070,7 +1070,7 @@ Value ServicesTable::CustomVariableValuesAccessor(const Value& row)
|
|||
|
||||
{
|
||||
ObjectLock olock(service);
|
||||
vars = CompatUtility::GetCustomAttributeConfig(service);
|
||||
vars = service->GetVars();
|
||||
}
|
||||
|
||||
Array::Ptr cv = new Array();
|
||||
|
@ -1100,7 +1100,7 @@ Value ServicesTable::CustomVariablesAccessor(const Value& row)
|
|||
|
||||
{
|
||||
ObjectLock olock(service);
|
||||
vars = CompatUtility::GetCustomAttributeConfig(service);
|
||||
vars = service->GetVars();
|
||||
}
|
||||
|
||||
Array::Ptr cv = new Array();
|
||||
|
@ -1135,7 +1135,7 @@ Value ServicesTable::CVIsJsonAccessor(const Value& row)
|
|||
|
||||
{
|
||||
ObjectLock olock(service);
|
||||
vars = CompatUtility::GetCustomAttributeConfig(service);
|
||||
vars = service->GetVars();
|
||||
}
|
||||
|
||||
if (!vars)
|
||||
|
|
Loading…
Reference in New Issue