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