/**
  * Service slider default menu
  *
  * @method get
  * @route /service/slideschelduded/[i:id]
  */
 public function slideScheldudedInfosAction()
 {
     $router = Di::getDefault()->get('router');
     $params = $this->getParams();
     $return = array();
     $service = ServicedetailRepository::getRealtimeData($params['id']);
     $serviceTemp = $service[0];
     $return['schelduded']['name'] = $serviceTemp['instance_name'];
     $return['schelduded']['execution_time'] = Datetime::humanReadable(time() - $serviceTemp['last_command_check'], Datetime::PRECISION_FORMAT, 2);
     $return['schelduded']['latency'] = $serviceTemp['latency'];
     $return['success'] = true;
     $router->response()->json($return);
 }
 /**
  * Convert ids when necessary
  * Service ids could be received while we want to perform actions on hosts
  *
  * @param array $objectIds
  * @param int $source
  */
 protected function getHostIds($objectIds, $source)
 {
     /* we come from service console, need conversion */
     if ($source == 1) {
         return ServicedetailRepository::getHostIdFromServiceId($objectIds);
     }
     return $objectIds;
 }