1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
3 #include "db_ido/servicegroupdbobject.hpp"
4 #include "db_ido/dbtype.hpp"
5 #include "db_ido/dbvalue.hpp"
6 #include "base/objectlock.hpp"
7 #include "base/initialize.hpp"
9 using namespace icinga;
11 REGISTER_DBTYPE(ServiceGroup, "servicegroup", DbObjectTypeServiceGroup, "servicegroup_object_id", ServiceGroupDbObject);
13 ServiceGroupDbObject::ServiceGroupDbObject(const DbType::Ptr& type, const String& name1, const String& name2)
14 : DbObject(type, name1, name2)
17 Dictionary::Ptr ServiceGroupDbObject::GetConfigFields() const
19 ServiceGroup::Ptr group = static_pointer_cast<ServiceGroup>(GetObject());
21 return new Dictionary({
22 { "alias", group->GetDisplayName() },
23 { "notes", group->GetNotes() },
24 { "notes_url", group->GetNotesUrl() },
25 { "action_url", group->GetActionUrl() }
29 Dictionary::Ptr ServiceGroupDbObject::GetStatusFields() const