mirror of https://github.com/Icinga/icinga2.git
Removed alias property, added display_name.
This commit is contained in:
parent
126121e6f7
commit
84482bb39d
|
@ -279,7 +279,7 @@ void CompatComponent::DumpHostObject(ofstream& fp, const Host::Ptr& host)
|
|||
{
|
||||
fp << "define host {" << "\n"
|
||||
<< "\t" << "host_name" << "\t" << host->GetName() << "\n"
|
||||
<< "\t" << "alias" << "\t" << host->GetAlias() << "\n"
|
||||
<< "\t" << "display_name" << "\t" << host->GetDisplayName() << "\n"
|
||||
<< "\t" << "check_interval" << "\t" << 1 << "\n"
|
||||
<< "\t" << "retry_interval" << "\t" << 1 << "\n"
|
||||
<< "\t" << "max_check_attempts" << "\t" << 1 << "\n"
|
||||
|
@ -380,7 +380,7 @@ void CompatComponent::DumpServiceObject(ofstream& fp, const Service::Ptr& servic
|
|||
fp << "define service {" << "\n"
|
||||
<< "\t" << "host_name" << "\t" << service->GetHost()->GetName() << "\n"
|
||||
<< "\t" << "service_description" << "\t" << service->GetShortName() << "\n"
|
||||
<< "\t" << "display_name" << "\t" << service->GetAlias() << "\n"
|
||||
<< "\t" << "display_name" << "\t" << service->GetDisplayName() << "\n"
|
||||
<< "\t" << "check_command" << "\t" << "check_i2" << "\n"
|
||||
<< "\t" << "check_interval" << "\t" << service->GetCheckInterval() / 60.0 << "\n"
|
||||
<< "\t" << "retry_interval" << "\t" << service->GetRetryInterval() / 60.0 << "\n"
|
||||
|
@ -471,7 +471,7 @@ void CompatComponent::StatusTimerHandler(void)
|
|||
|
||||
objectfp << "define hostgroup {" << "\n"
|
||||
<< "\t" << "hostgroup_name" << "\t" << hg->GetName() << "\n"
|
||||
<< "\t" << "alias" << "\t" << hg->GetAlias() << "\n"
|
||||
<< "\t" << "display_name" << "\t" << hg->GetDisplayName() << "\n"
|
||||
<< "\t" << "notes_url" << "\t" << hg->GetNotesUrl() << "\n"
|
||||
<< "\t" << "action_url" << "\t" << hg->GetActionUrl() << "\n";
|
||||
|
||||
|
@ -493,7 +493,7 @@ void CompatComponent::StatusTimerHandler(void)
|
|||
|
||||
objectfp << "define servicegroup {" << "\n"
|
||||
<< "\t" << "servicegroup_name" << "\t" << sg->GetName() << "\n"
|
||||
<< "\t" << "alias" << "\t" << sg->GetAlias() << "\n"
|
||||
<< "\t" << "display_name" << "\t" << sg->GetDisplayName() << "\n"
|
||||
<< "\t" << "notes_url" << "\t" << sg->GetNotesUrl() << "\n"
|
||||
<< "\t" << "action_url" << "\t" << sg->GetActionUrl() << "\n";
|
||||
|
||||
|
|
|
@ -307,7 +307,7 @@ void CompatIdoComponent::EnableServiceObject(const Service::Ptr& service)
|
|||
<< 500 << ":" << "\n" /* enableobject */
|
||||
<< 4 << "=" << std::setprecision(17) << Utility::GetTime() << "\n" /* timestamp */
|
||||
<< 53 << "=" << service->GetHost()->GetName() << "\n" /* host */
|
||||
<< 114 << "=" << service->GetAlias() << "\n" /* service */
|
||||
<< 114 << "=" << service->GetShortName() << "\n" /* service */
|
||||
<< 999 << "\n\n"; /* enddata */
|
||||
|
||||
m_IdoConnection->SendMessage(message.str());
|
||||
|
@ -338,7 +338,7 @@ void CompatIdoComponent::DisableServiceObject(const Service::Ptr& service)
|
|||
<< 501 << ":" << "\n" /* disableobject */
|
||||
<< 4 << "=" << std::setprecision(17) << Utility::GetTime() << "\n" /* timestamp */
|
||||
<< 53 << "=" << service->GetHost()->GetName() << "\n" /* host */
|
||||
<< 114 << "=" << service->GetAlias() << "\n" /* service */
|
||||
<< 114 << "=" << service->GetShortName() << "\n" /* service */
|
||||
<< 999 << "\n\n"; /* enddata */
|
||||
|
||||
m_IdoConnection->SendMessage(message.str());
|
||||
|
@ -360,8 +360,8 @@ void CompatIdoComponent::DumpHostObject(const Host::Ptr& host)
|
|||
<< 400 << ":" << "\n" /* hostdefinition */
|
||||
<< 4 << "=" << std::setprecision(17) << Utility::GetTime() << "\n" /* timestamp */
|
||||
<< 174 << "=" << host->GetName() << "\n" /* hostname */
|
||||
<< 258 << "=" << host->GetAlias() << "\n" /* displayname */
|
||||
<< 159 << "=" << host->GetAlias() << "\n" /* hostalias */
|
||||
<< 258 << "=" << host->GetDisplayName() << "\n" /* displayname */
|
||||
<< 159 << "=" << host->GetName() << "\n" /* hostalias */
|
||||
<< 158 << "=" << host->GetName() << "\n" /* hostaddress */
|
||||
<< 266 << "=" << host->GetName() << "\n" /* hostaddress6 */
|
||||
<< 160 << "=" << "" << "\n" /* hostcheckcommand */
|
||||
|
@ -511,7 +511,7 @@ void CompatIdoComponent::DumpHostStatus(const Host::Ptr& host)
|
|||
void CompatIdoComponent::DumpServiceObject(const Service::Ptr& service)
|
||||
{
|
||||
stringstream log;
|
||||
log << "Dumping Service Config: " << service->GetHost()->GetName() << "->" << service->GetAlias();
|
||||
log << "Dumping Service Config: " << service->GetHost()->GetName() << "->" << service->GetShortName();
|
||||
Logger::Write(LogDebug, "compatido", log.str());
|
||||
|
||||
stringstream message;
|
||||
|
@ -519,8 +519,8 @@ void CompatIdoComponent::DumpServiceObject(const Service::Ptr& service)
|
|||
<< 402 << ":" << "\n" /* servicedefinition */
|
||||
<< 4 << "=" << std::setprecision(17) << Utility::GetTime() << "\n" /* timestamp */
|
||||
<< 174 << "=" << service->GetHost()->GetName() << "\n" /* hostname */
|
||||
<< 258 << "=" << service->GetAlias() << "\n" /* displayname */
|
||||
<< 210 << "=" << service->GetAlias() << "\n" /* servicedescription */
|
||||
<< 258 << "=" << service->GetDisplayName() << "\n" /* displayname */
|
||||
<< 210 << "=" << service->GetShortName() << "\n" /* servicedescription */
|
||||
<< 207 << "=" << "check_i2" << "\n" /* servicecheckcommand */
|
||||
<< 211 << "=" << "" << "\n" /* serviceeventhandler */
|
||||
<< 224 << "=" << "" << "\n" /* servicenotificationperiod */
|
||||
|
@ -585,7 +585,7 @@ void CompatIdoComponent::DumpServiceObject(const Service::Ptr& service)
|
|||
void CompatIdoComponent::DumpServiceStatus(const Service::Ptr& service)
|
||||
{
|
||||
stringstream log;
|
||||
log << "Dumping Service Status: " << service->GetHost()->GetName() << "->" << service->GetAlias();
|
||||
log << "Dumping Service Status: " << service->GetHost()->GetName() << "->" << service->GetShortName();
|
||||
Logger::Write(LogDebug, "compatido", log.str());
|
||||
|
||||
String output;
|
||||
|
@ -620,7 +620,7 @@ void CompatIdoComponent::DumpServiceStatus(const Service::Ptr& service)
|
|||
<< 3 << "=" << "" << "\n" /* attributes */
|
||||
<< 4 << "=" << std::setprecision(17) << Utility::GetTime() << "\n" /* timestamp */
|
||||
<< 53 << "=" << service->GetHost()->GetName() << "\n" /* host */
|
||||
<< 114 << "=" << service->GetAlias() << "\n" /* service */
|
||||
<< 114 << "=" << service->GetShortName() << "\n" /* service */
|
||||
<< 95 << "=" << output << "\n" /* output */
|
||||
<< 125 << "=" << "" << "\n" /* longoutput */
|
||||
<< 99 << "=" << perfdata << "\n" /* perfdata */
|
||||
|
@ -755,7 +755,7 @@ void CompatIdoComponent::DumpConfigObjects(void)
|
|||
<< 401 << ":" << "\n" /* hostgroupdefinition */
|
||||
<< 4 << "=" << std::setprecision(17) << Utility::GetTime() << "\n" /* timestamp */
|
||||
<< 172 << "=" << hg->GetName() << "\n" /* hostgroupname */
|
||||
<< 170 << "=" << hg->GetAlias() << "\n"; /* hostgroupalias */
|
||||
<< 170 << "=" << hg->GetName() << "\n"; /* hostgroupalias */
|
||||
|
||||
vector<String> hglist;
|
||||
|
||||
|
@ -788,14 +788,14 @@ void CompatIdoComponent::DumpConfigObjects(void)
|
|||
<< 403 << ":" << "\n" /* servicegroupdefinition */
|
||||
<< 4 << "=" << std::setprecision(17) << Utility::GetTime() << "\n" /* timestamp */
|
||||
<< 220 << "=" << sg->GetName() << "\n" /* servicegroupname */
|
||||
<< 218 << "=" << sg->GetAlias() << "\n"; /* servicegroupalias */
|
||||
<< 218 << "=" << sg->GetName() << "\n"; /* servicegroupalias */
|
||||
|
||||
vector<String> sglist;
|
||||
vector<Service::Ptr>::iterator vt;
|
||||
|
||||
BOOST_FOREACH(const Service::Ptr& service, sg->GetMembers()) {
|
||||
sglist.push_back(service->GetHost()->GetName());
|
||||
sglist.push_back(service->GetAlias());
|
||||
sglist.push_back(service->GetShortName());
|
||||
}
|
||||
|
||||
SendMessageList(message, sglist, 219); /* servicegroupmember */
|
||||
|
|
|
@ -57,7 +57,7 @@ Host::~Host(void)
|
|||
}
|
||||
}
|
||||
|
||||
String Host::GetAlias(void) const
|
||||
String Host::GetDisplayName(void) const
|
||||
{
|
||||
String value = Get("alias");
|
||||
if (!value.IsEmpty())
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
static bool Exists(const String& name);
|
||||
static Host::Ptr GetByName(const String& name);
|
||||
|
||||
String GetAlias(void) const;
|
||||
String GetDisplayName(void) const;
|
||||
Dictionary::Ptr GetGroups(void) const;
|
||||
|
||||
Dictionary::Ptr GetMacros(void) const;
|
||||
|
|
|
@ -26,7 +26,7 @@ bool HostGroup::m_MembersCacheValid = true;
|
|||
|
||||
REGISTER_TYPE(HostGroup, NULL);
|
||||
|
||||
String HostGroup::GetAlias(void) const
|
||||
String HostGroup::GetDisplayName(void) const
|
||||
{
|
||||
String value = Get("alias");
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
static bool Exists(const String& name);
|
||||
static HostGroup::Ptr GetByName(const String& name);
|
||||
|
||||
String GetAlias(void) const;
|
||||
String GetDisplayName(void) const;
|
||||
String GetNotesUrl(void) const;
|
||||
String GetActionUrl(void) const;
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ Service::~Service(void)
|
|||
Service::InvalidateCommentCache();
|
||||
}
|
||||
|
||||
String Service::GetAlias(void) const
|
||||
String Service::GetDisplayName(void) const
|
||||
{
|
||||
String value = Get("alias");
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ public:
|
|||
static const int DefaultCheckInterval;
|
||||
static const int CheckIntervalDivisor;
|
||||
|
||||
String GetAlias(void) const;
|
||||
String GetDisplayName(void) const;
|
||||
Host::Ptr GetHost(void) const;
|
||||
Dictionary::Ptr GetMacros(void) const;
|
||||
Dictionary::Ptr GetDowntimes(void) const;
|
||||
|
|
|
@ -26,7 +26,7 @@ bool ServiceGroup::m_MembersCacheValid;
|
|||
|
||||
REGISTER_TYPE(ServiceGroup, NULL);
|
||||
|
||||
String ServiceGroup::GetAlias(void) const
|
||||
String ServiceGroup::GetDisplayName(void) const
|
||||
{
|
||||
String value = Get("alias");
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
static bool Exists(const String& name);
|
||||
static ServiceGroup::Ptr GetByName(const String& name);
|
||||
|
||||
String GetAlias(void) const;
|
||||
String GetDisplayName(void) const;
|
||||
String GetNotesUrl(void) const;
|
||||
String GetActionUrl(void) const;
|
||||
|
||||
|
|
Loading…
Reference in New Issue