Fix Web 2's remove-downtime API actions not selecting the downtime name

refs #11398
This commit is contained in:
Eric Lippmann 2016-10-07 14:44:08 +02:00
parent 246ad7b4d3
commit 213804401c

View File

@ -61,7 +61,7 @@ class Monitoring_ActionsController extends Controller
$filter = $this->getFilterOrExitIfEmpty();
$downtimes = $this->backend
->select()
->from('downtime', array('host_name', 'id' => 'downtime_internal_id'))
->from('downtime', array('host_name', 'id' => 'downtime_internal_id', 'name' => 'downtime_name'))
->where('object_type', 'host')
->applyFilter($this->getRestriction('monitoring/filter/objects'))
->applyFilter($filter);
@ -110,7 +110,10 @@ class Monitoring_ActionsController extends Controller
$filter = $this->getFilterOrExitIfEmpty();
$downtimes = $this->backend
->select()
->from('downtime', array('host_name', 'service_description', 'id' => 'downtime_internal_id'))
->from(
'downtime',
array('host_name', 'service_description', 'id' => 'downtime_internal_id', 'name' => 'downtime_name')
)
->where('object_type', 'service')
->applyFilter($this->getRestriction('monitoring/filter/objects'))
->applyFilter($filter);