| 1113 | } |
| 1114 | |
| 1115 | void ExternalCommandProcessor::DelHostDowntime(double, const std::vector<String>& arguments) |
| 1116 | { |
| 1117 | int id = Convert::ToLong(arguments[0]); |
| 1118 | String rid; |
| 1119 | auto dt (Downtime::GetDowntimeFromLegacyID(id)); |
| 1120 | |
| 1121 | if (dt) { |
| 1122 | rid = dt->GetName(); |
| 1123 | } |
| 1124 | |
| 1125 | try { |
| 1126 | Downtime::RemoveDowntime(rid, false, DowntimeRemovedByUser); |
| 1127 | |
| 1128 | Log(LogNotice, "ExternalCommandProcessor") |
| 1129 | << "Removed downtime ID " << arguments[0]; |
| 1130 | } catch (const invalid_downtime_removal_error& error) { |
| 1131 | Log(LogWarning, "ExternalCommandProcessor") << error.what(); |
| 1132 | } |
| 1133 | } |
| 1134 | |
| 1135 | void ExternalCommandProcessor::DelDowntimeByHostName(double, const std::vector<String>& arguments) |
| 1136 | { |