mirror of https://github.com/Icinga/icinga2.git
Cli: Don't add empty host/port endpoint attributes in node wizard
refs #9205 refs #9536
This commit is contained in:
parent
9d3020cd31
commit
d3cb1ad48a
|
@ -273,13 +273,17 @@ int NodeUtility::GenerateNodeIcingaConfig(const std::vector<std::string>& endpoi
|
||||||
if (tokens.size() > 1) {
|
if (tokens.size() > 1) {
|
||||||
String host = tokens[1];
|
String host = tokens[1];
|
||||||
host.Trim();
|
host.Trim();
|
||||||
my_master_endpoint->Set("host", host);
|
|
||||||
|
if (!host.IsEmpty())
|
||||||
|
my_master_endpoint->Set("host", host);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tokens.size() > 2) {
|
if (tokens.size() > 2) {
|
||||||
String port = tokens[2];
|
String port = tokens[2];
|
||||||
port.Trim();
|
port.Trim();
|
||||||
my_master_endpoint->Set("port", port);
|
|
||||||
|
if (!port.IsEmpty())
|
||||||
|
my_master_endpoint->Set("port", port);
|
||||||
}
|
}
|
||||||
|
|
||||||
String cn = tokens[0];
|
String cn = tokens[0];
|
||||||
|
|
Loading…
Reference in New Issue