Changes in src/webapp/webservice/index.php [acea570:9be4f3f]
- File:
-
- 1 edited
-
src/webapp/webservice/index.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/webapp/webservice/index.php
racea570 r9be4f3f 16 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 17 */ 18 19 xdebug_start_trace();20 18 21 19 require_once(__DIR__ ."/inc/Config.php"); … … 65 63 $lastTime = -1; 66 64 $keys = array_keys($data); 67 $keyTimeframes = $keys[0]; 68 $itemCount = count($keys); 69 if($itemCount < 0 ){ 65 if(count($keys) < 0 ){ 70 66 error_log("No keys in fetched rrd data from ". $dbFile); 71 67 echo json_encode(""); 72 68 exit; 73 69 } 74 $timeframesCount = count($data[$keyTimeframes]);75 70 if($debug > 0){ 76 echo "<p>Variables: ". $itemCount ."; Timeframes: ". $timeframesCount."</p>\n";71 echo "<p>Variables: ". count($keys) ."; Timeframes: ". count($data[$keys[0]]) ."</p>\n"; 77 72 } 78 $keysTimeframes = array_keys($data[$keyTimeframes]); 79 for($i = 0; $i < $timeframesCount; $i++){ 80 $time = $keysTimeframes[$i]; 73 for($i = 0; $i < count($data[$keys[0]]); $i++){ 74 $time = array_keys($data[$keys[0]])[$i]; 81 75 $allValid = true; 82 76 $tmp = array(); … … 181 175 } 182 176 183 xdebug_stop_trace();184 185 177 ?>
Note:
See TracChangeset
for help on using the changeset viewer.
