mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-15 17:54:33 +02:00
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);
|
Dictionary::Ptr params = HttpUtility::FetchRequestParameters(request);
|
||||||
|
|
||||||
|
params->Set("type", type->GetName());
|
||||||
|
|
||||||
if (request.RequestUrl->GetPath().size() > 1) {
|
if (request.RequestUrl->GetPath().size() > 1) {
|
||||||
String attr = type->GetName();
|
String attr = type->GetName();
|
||||||
boost::algorithm::to_lower(attr);
|
boost::algorithm::to_lower(attr);
|
||||||
params->Set(attr, request.RequestUrl->GetPath()[1]);
|
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);
|
std::vector<DynamicObject::Ptr> objs = FilterUtility::GetFilterTargets(qd, params);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user