mirror of https://github.com/Icinga/icinga2.git
Add support for implicit 'true' filter when filter parameter is missing
refs #9077
This commit is contained in:
parent
890694e629
commit
15e5dbd151
|
@ -42,10 +42,14 @@ bool StatusQueryHandler::HandleRequest(const ApiUser::Ptr& user, HttpRequest& re
|
|||
|
||||
Dictionary::Ptr params = HttpUtility::FetchRequestParameters(request);
|
||||
|
||||
params->Set("type", type->GetName());
|
||||
|
||||
if (request.RequestUrl->GetPath().size() > 1) {
|
||||
String attr = type->GetName();
|
||||
boost::algorithm::to_lower(attr);
|
||||
params->Set(attr, request.RequestUrl->GetPath()[1]);
|
||||
} else if (!params->Contains("filter")) {
|
||||
params->Set("filter", "true");
|
||||
}
|
||||
|
||||
std::vector<DynamicObject::Ptr> objs = FilterUtility::GetFilterTargets(qd, params);
|
||||
|
|
Loading…
Reference in New Issue