src/php/lib/class.ext_apcaccess.php
// Get result. Essentially take results and make it usable by the LinfoCommon::createTable function
Get result. Essentially take results and make it usable by the LinfoCommon::createTable function
Get result . Essentially take results and make it usable by the LinfoCommon :: createTable function
public function result() {
		if ($this->_res === false)
			return false;
		$rows = array();
		$rows[] = array(
			'type' => 'header',
			'columns' => array(
				'UPS Name',
				'Model',
				'Battery Volts',
				'Battery Charge',
				'Time Left',
				'Current Load',
				$this->_res['watts_used'] ? 'Current Usage' : false,
				'Status'
			)
		);
		$rows[] = array(
			'type' => 'values',
			'columns' => array(
				$this->_res['name'],
				$this->_res['model'],
				$this->_res['volts'],
				$this->_res['charge'],
				$this->_res['time_left'],
				$this->_res['load'],
				$this->_res['watts_used'] ? $this->_res['watts_used'] . 'W' : false,
				$this->_res['status'],
			)
		);
		return array(
			'root_title' => 'APC UPS Status',
			'rows' => $rows
		);
	}
public function result ( ) { if ( $ this -> _res === false ) return false ; $ rows = array ( ) ; $ rows [ ] = array ( 'type' => 'header' , 'columns' => array ( 'UPS Name' , 'Model' , 'Battery Volts' , 'Battery Charge' , 'Time Left' , 'Current Load' , $ this -> _res [ 'watts_used' ] ? 'Current Usage' : false , 'Status' ) ) ; $ rows [ ] = array ( 'type' => 'values' , 'columns' => array ( $ this -> _res [ 'name' ] , $ this -> _res [ 'model' ] , $ this -> _res [ 'volts' ] , $ this -> _res [ 'charge' ] , $ this -> _res [ 'time_left' ] , $ this -> _res [ 'load' ] , $ this -> _res [ 'watts_used' ] ? $ this -> _res [ 'watts_used' ] . 'W' : false , $ this -> _res [ 'status' ] , ) ) ; return array ( 'root_title' => 'APC UPS Status' , 'rows' => $ rows ) ; }
Get result.
Get result .
// Don't bother if it didn't go well // Store rows here // Start showing connections // And all the values // Give it off