public function indexAction()
    {
        // Get all instances
        $instances = $this->getManager()->findAll();
        
        $worker = $this->get('ringo_php_redmon.instance_worker');
        if(is_array($instances)) {
            foreach($instances as $index => $instance) {
                // Ping server and get potential error message
                $working = $worker->setInstance($instance)->ping();
                $instances[$index]->setWorking($working);
                $instances[$index]->setError($worker->getMessage());
            }
        }
        
        return $this->render(
            $this->getTemplatePath().'index.html.twig',
            array(
                'instances' => $instances 
            )
        );
    }
public function indexAction()
    {
        // Get all instances
        $instances = $this->getManager()->findAll();
        
        $worker = $this->get('ringo_php_redmon.instance_worker');
        if(is_array($instances)) {
            foreach($instances as $index => $instance) {
                // Ping server and get potential error message
                $working = $worker->setInstance($instance)->ping();
                $instances[$index]->setWorking($working);
                $instances[$index]->setError($worker->getMessage());
            }
        }
        
        return $this->render(
            $this->getTemplatePath().'index.html.twig',
            array(
                'instances' => $instances 
            )
        );
    }
public function indexAction ( ) { // Get all instances $ instances = $ this -> getManager ( ) -> findAll ( ) ; $ worker = $ this -> get ( 'ringo_php_redmon.instance_worker' ) ; if ( is_array ( $ instances ) ) { foreach ( $ instances as $ index => $ instance ) { // Ping server and get potential error message $ working = $ worker -> setInstance ( $ instance ) -> ping ( ) ; $ instances [ $ index ] -> setWorking ( $ working ) ; $ instances [ $ index ] -> setError ( $ worker -> getMessage ( ) ) ; } } return $ this -> render ( $ this -> getTemplatePath ( ) . 'index.html.twig' , array ( 'instances' => $ instances ) ) ; }
List of instances action

@return mixed
List of instances action