mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 13:45:04 +02:00
parent
6bc2938996
commit
1811f8689b
@ -134,15 +134,9 @@ void ObjectListCommand::PrintObject(std::ostream& fp, bool& first, const String&
|
|||||||
else
|
else
|
||||||
fp << "\n";
|
fp << "\n";
|
||||||
|
|
||||||
bool abstract = object->Get("abstract");
|
|
||||||
Dictionary::Ptr debug_hints = object->Get("debug_hints");
|
Dictionary::Ptr debug_hints = object->Get("debug_hints");
|
||||||
|
|
||||||
if (abstract)
|
fp << "Object " << ConsoleColorTag(Console_ForegroundBlue | Console_Bold) << internal_name << ConsoleColorTag(Console_Normal) << "'";
|
||||||
fp << "Template '";
|
|
||||||
else
|
|
||||||
fp << "Object '";
|
|
||||||
|
|
||||||
fp << ConsoleColorTag(Console_ForegroundBlue | Console_Bold) << internal_name << ConsoleColorTag(Console_Normal) << "'";
|
|
||||||
fp << " of type '" << ConsoleColorTag(Console_ForegroundMagenta | Console_Bold) << type << ConsoleColorTag(Console_Normal) << "':\n";
|
fp << " of type '" << ConsoleColorTag(Console_ForegroundMagenta | Console_Bold) << type << ConsoleColorTag(Console_Normal) << "':\n";
|
||||||
|
|
||||||
PrintProperties(fp, properties, debug_hints, 2);
|
PrintProperties(fp, properties, debug_hints, 2);
|
||||||
|
@ -121,6 +121,7 @@ Expression::Ptr ConfigItem::GetExpressionList(void) const
|
|||||||
Dictionary::Ptr ConfigItem::GetProperties(void)
|
Dictionary::Ptr ConfigItem::GetProperties(void)
|
||||||
{
|
{
|
||||||
ASSERT(!OwnsLock());
|
ASSERT(!OwnsLock());
|
||||||
|
VERIFY(!IsAbstract());
|
||||||
|
|
||||||
ObjectLock olock(this);
|
ObjectLock olock(this);
|
||||||
|
|
||||||
@ -296,11 +297,13 @@ void ConfigItem::WriteObjectsFile(const String& filename)
|
|||||||
BOOST_FOREACH(const ItemMap::value_type& kv, m_Items) {
|
BOOST_FOREACH(const ItemMap::value_type& kv, m_Items) {
|
||||||
ConfigItem::Ptr item = kv.second;
|
ConfigItem::Ptr item = kv.second;
|
||||||
|
|
||||||
|
if (item->IsAbstract())
|
||||||
|
continue;
|
||||||
|
|
||||||
Dictionary::Ptr persistentItem = make_shared<Dictionary>();
|
Dictionary::Ptr persistentItem = make_shared<Dictionary>();
|
||||||
|
|
||||||
persistentItem->Set("type", item->GetType());
|
persistentItem->Set("type", item->GetType());
|
||||||
persistentItem->Set("name", item->GetName());
|
persistentItem->Set("name", item->GetName());
|
||||||
persistentItem->Set("abstract", item->IsAbstract());
|
|
||||||
persistentItem->Set("properties", item->GetProperties());
|
persistentItem->Set("properties", item->GetProperties());
|
||||||
persistentItem->Set("debug_hints", item->GetDebugHints());
|
persistentItem->Set("debug_hints", item->GetDebugHints());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user