monitoring/API: Require a filter when removing host downtimes
refs #9606
This commit is contained in:
parent
e9c7a5894a
commit
2c393afbeb
|
@ -43,12 +43,12 @@ class Monitoring_ActionsController extends Controller
|
||||||
*/
|
*/
|
||||||
public function removeHostDowntimeAction()
|
public function removeHostDowntimeAction()
|
||||||
{
|
{
|
||||||
// @TODO(el): Require a filter
|
|
||||||
$downtimes = $this->backend
|
$downtimes = $this->backend
|
||||||
->select()
|
->select()
|
||||||
->from('downtime', array('host_name', 'id' => 'downtime_internal_id'))
|
->from('downtime', array('host_name', 'id' => 'downtime_internal_id'))
|
||||||
->where('object_type', 'host')
|
->where('object_type', 'host')
|
||||||
->applyFilter($this->getRestriction('monitoring/filter/objects'))
|
->applyFilter($this->getRestriction('monitoring/filter/objects'))
|
||||||
|
->setRequiresFilter(true)
|
||||||
->handleRequest($this->getRequest())
|
->handleRequest($this->getRequest())
|
||||||
->fetchAll();
|
->fetchAll();
|
||||||
if (empty($downtimes)) {
|
if (empty($downtimes)) {
|
||||||
|
|
Loading…
Reference in New Issue