]> granicus.if.org Git - icinga2/blob - lib/db_ido/servicegroupdbobject.cpp
Merge pull request #7185 from Icinga/bugfix/gelfwriter-wrong-log-facility
[icinga2] / lib / db_ido / servicegroupdbobject.cpp
1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2
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"
8
9 using namespace icinga;
10
11 REGISTER_DBTYPE(ServiceGroup, "servicegroup", DbObjectTypeServiceGroup, "servicegroup_object_id", ServiceGroupDbObject);
12
13 ServiceGroupDbObject::ServiceGroupDbObject(const DbType::Ptr& type, const String& name1, const String& name2)
14         : DbObject(type, name1, name2)
15 { }
16
17 Dictionary::Ptr ServiceGroupDbObject::GetConfigFields() const
18 {
19         ServiceGroup::Ptr group = static_pointer_cast<ServiceGroup>(GetObject());
20
21         return new Dictionary({
22                 { "alias", group->GetDisplayName() },
23                 { "notes", group->GetNotes() },
24                 { "notes_url", group->GetNotesUrl() },
25                 { "action_url", group->GetActionUrl() }
26         });
27 }
28
29 Dictionary::Ptr ServiceGroupDbObject::GetStatusFields() const
30 {
31         return nullptr;
32 }