mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-31 01:24:19 +02:00
Fix how the HOSTALIAS and CONTACTALIAS macros work.
This commit is contained in:
parent
4cd4228f64
commit
184f503c2a
@ -541,11 +541,11 @@ String Host::StateToString(HostState state)
|
|||||||
|
|
||||||
bool Host::ResolveMacro(const String& macro, const Dictionary::Ptr&, String *result) const
|
bool Host::ResolveMacro(const String& macro, const Dictionary::Ptr&, String *result) const
|
||||||
{
|
{
|
||||||
if (macro == "HOSTNAME" || macro == "HOSTALIAS") {
|
if (macro == "HOSTNAME") {
|
||||||
*result = GetName();
|
*result = GetName();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (macro == "HOSTDISPLAYNAME") {
|
else if (macro == "HOSTDISPLAYNAME" || macro == "HOSTALIAS") {
|
||||||
*result = GetDisplayName();
|
*result = GetDisplayName();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ bool User::ResolveMacro(const String& macro, const Dictionary::Ptr& cr, String *
|
|||||||
*result = GetName();
|
*result = GetName();
|
||||||
return true;
|
return true;
|
||||||
} else if (macro == "CONTACTALIAS") {
|
} else if (macro == "CONTACTALIAS") {
|
||||||
*result = GetName();
|
*result = GetDisplayName();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
Dictionary::Ptr macros = GetMacros();
|
Dictionary::Ptr macros = GetMacros();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user