MCPcopy Create free account
hub / github.com/Icinga/icinga2 / MakeName

Method MakeName

lib/icinga/notification.cpp:30–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28boost::signals2::signal<void (const Notification::Ptr&, const MessageOrigin::Ptr&)> Notification::OnLastNotifiedStatePerUserCleared;
29
30String NotificationNameComposer::MakeName(const String& shortName, const Object::Ptr& context) const
31{
32 Notification::Ptr notification = dynamic_pointer_cast<Notification>(context);
33
34 if (!notification)
35 return "";
36
37 String name = notification->GetHostName();
38
39 if (!notification->GetServiceName().IsEmpty())
40 name += "!" + notification->GetServiceName();
41
42 name += "!" + shortName;
43
44 return name;
45}
46
47Dictionary::Ptr NotificationNameComposer::ParseName(const String& name) const
48{

Callers

nothing calls this directly

Calls 2

GetHostNameMethod · 0.80
IsEmptyMethod · 0.45

Tested by

no test coverage detected