Merge branch 'feature/property-fix-4973' into next

Fixes #4973
This commit is contained in:
Gunnar Beutner 2013-10-30 09:57:41 +01:00
commit 47ea15d197
7 changed files with 48 additions and 13 deletions

View File

@ -32,7 +32,12 @@ enum StateType
class Host : DynamicObject class Host : DynamicObject
{ {
[config] String display_name { [config] String display_name {
default {{{ return GetName(); }}} get {{{
if (m_DisplayName.IsEmpty())
return GetName();
else
return m_DisplayName;
}}}
}; };
[config] Array::Ptr groups; [config] Array::Ptr groups;
[config] Dictionary::Ptr macros; [config] Dictionary::Ptr macros;
@ -42,4 +47,4 @@ class Host : DynamicObject
[config, protected] Dictionary::Ptr services (ServiceDescriptions); [config, protected] Dictionary::Ptr services (ServiceDescriptions);
}; };
} }

View File

@ -6,8 +6,13 @@ namespace icinga
class HostGroup : DynamicObject class HostGroup : DynamicObject
{ {
[config] String display_name { [config] String display_name {
default {{{ return GetName(); }}} get {{{
if (m_DisplayName.IsEmpty())
return GetName();
else
return m_DisplayName;
}}}
}; };
}; };
} }

View File

@ -48,7 +48,12 @@ class Service : DynamicObject
[config] String event_command (EventCommandRaw); [config] String event_command (EventCommandRaw);
[config] bool volatile; [config] bool volatile;
[config] String short_name { [config] String short_name {
default {{{ return GetName(); }}} get {{{
if (m_ShortName.IsEmpty())
return GetName();
else
return m_ShortName;
}}}
}; };
[config] String host (HostRaw); [config] String host (HostRaw);
[config] double flapping_threshold { [config] double flapping_threshold {

View File

@ -6,8 +6,13 @@ namespace icinga
class ServiceGroup : DynamicObject class ServiceGroup : DynamicObject
{ {
[config] String display_name { [config] String display_name {
default {{{ return GetName(); }}} get {{{
if (m_DisplayName.IsEmpty())
return GetName();
else
return m_DisplayName;
}}}
}; };
}; };
} }

View File

@ -6,7 +6,12 @@ namespace icinga
class TimePeriod : DynamicObject class TimePeriod : DynamicObject
{ {
[config] String display_name { [config] String display_name {
default {{{ return GetName(); }}} get {{{
if (m_DisplayName.IsEmpty())
return GetName();
else
return m_DisplayName;
}}}
}; };
[config] Dictionary::Ptr ranges; [config] Dictionary::Ptr ranges;
[state] Value valid_begin; [state] Value valid_begin;
@ -14,4 +19,4 @@ class TimePeriod : DynamicObject
[state] Array::Ptr segments; [state] Array::Ptr segments;
}; };
} }

View File

@ -6,7 +6,12 @@ namespace icinga
class User : DynamicObject class User : DynamicObject
{ {
[config] String display_name { [config] String display_name {
default {{{ return GetName(); }}} get {{{
if (m_DisplayName.IsEmpty())
return GetName();
else
return m_DisplayName;
}}}
}; };
[config] Dictionary::Ptr macros; [config] Dictionary::Ptr macros;
[config] Array::Ptr groups; [config] Array::Ptr groups;
@ -21,4 +26,4 @@ class User : DynamicObject
[state] double last_notification; [state] double last_notification;
}; };
} }

View File

@ -6,8 +6,13 @@ namespace icinga
class UserGroup : DynamicObject class UserGroup : DynamicObject
{ {
[config] String display_name { [config] String display_name {
default {{{ return GetName(); }}} get {{{
if (m_DisplayName.IsEmpty())
return GetName();
else
return m_DisplayName;
}}}
}; };
}; };
} }