Example #1
0
 /**
  * Display services
  *
  * @method get
  * @route /service
  * @todo work on ajax refresh
  */
 public function displayServicesAction()
 {
     $tpl = Di::getDefault()->get('template');
     $router = Di::getDefault()->get('router');
     /* Load css */
     $tpl->addCss('dataTables.tableTools.min.css')->addCss('jquery.fileupload.css')->addCss('dataTables.colVis.min.css')->addCss('dataTables.colReorder.min.css')->addCss('select2.css')->addCss('select2-bootstrap.css')->addCss('centreon-wizard.css');
     /* Load js */
     $tpl->addJs('jquery.min.js')->addJs('jquery.dataTables.min.js')->addJs('dataTables.tableTools.min.js')->addJs('dataTables.colVis.min.js')->addJs('dataTables.colReorder.min.js')->addJs('bootstrap-dataTables-paging.js')->addJs('jquery.dataTables.columnFilter.js')->addJs('dataTables.bootstrap.js')->addJs('jquery.select2/select2.min.js')->addJs('jquery.validation/jquery.validate.min.js')->addJs('jquery.validation/additional-methods.min.js')->addJs('jquery.qtip.min.js')->addJs('moment-with-locales.js')->addJs('hogan-3.0.0.min.js')->addJs('daterangepicker.js')->addJs('bootstrap3-typeahead.js')->addJs('centreon.search.js')->addJs('centreon.overlay.js')->addJs('centreon.tag.js', 'bottom', 'centreon-administration')->addJs('moment-timezone-with-data.min.js')->addJs('centreon-wizard.js');
     /* Datatable */
     $tpl->assign('moduleName', 'CentreonRealtime');
     $tpl->assign('datatableObject', $this->datatableObject);
     $tpl->assign('objectDisplayName', 'Service');
     $tpl->assign('objectName', 'Service');
     $tpl->assign('objectListUrl', '/centreon-realtime/service/list');
     $actions = array();
     $actions[] = array('group' => _('Services'), 'actions' => ServicedetailRepository::getMonitoringActions());
     $actions[] = array('group' => _('Hosts'), 'actions' => HostdetailRepository::getMonitoringActions());
     $tpl->assign('actions', $actions);
     $urls = array('tag' => array('add' => $router->getPathFor('/centreon-administration/tag/add'), 'del' => $router->getPathFor('/centreon-administration/tag/delete'), 'getallGlobal' => $router->getPathFor('/centreon-administration/tag/all'), 'getallPerso' => $router->getPathFor('/centreon-administration/tag/allPerso'), 'addMassive' => $router->getPathFor('/centreon-administration/tag/addMassive')));
     $tpl->append('jsUrl', $urls, true);
     /* Add javascript and css file for hooks */
     Hook::addStaticFile('displaySvcTooltipGraph');
     $tpl->display('file:[CentreonMainModule]list.tpl');
 }