Changeset acea570 for src/webapp
- Timestamp:
- Apr 23, 2017, 5:34:25 PM (10 years ago)
- Branches:
- 0.5, app-cordova, debian/bullseye, debian/jessie, master
- Children:
- 08bb037
- Parents:
- c61b79b
- Location:
- src/webapp
- Files:
-
- 2 edited
-
webclient/javascript/main.js (modified) (1 diff)
-
webservice/index.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/webapp/webclient/javascript/main.js
rc61b79b racea570 122 122 $(document).ready(function() { 123 123 displayDataGet(); 124 setInterval(displayDataGet, 5000);124 setInterval(displayDataGet, 15000); 125 125 126 126 $.getJSON("../webservice/tileserver.php?/map.json", mapSetup); -
src/webapp/webservice/index.php
rc61b79b racea570 16 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 17 */ 18 19 xdebug_start_trace(); 18 20 19 21 require_once(__DIR__ ."/inc/Config.php"); … … 63 65 $lastTime = -1; 64 66 $keys = array_keys($data); 65 if(count($keys) < 0 ){ 67 $keyTimeframes = $keys[0]; 68 $itemCount = count($keys); 69 if($itemCount < 0 ){ 66 70 error_log("No keys in fetched rrd data from ". $dbFile); 67 71 echo json_encode(""); 68 72 exit; 69 73 } 74 $timeframesCount = count($data[$keyTimeframes]); 70 75 if($debug > 0){ 71 echo "<p>Variables: ". count($keys) ."; Timeframes: ". count($data[$keys[0]])."</p>\n";76 echo "<p>Variables: ". $itemCount ."; Timeframes: ". $timeframesCount ."</p>\n"; 72 77 } 73 for($i = 0; $i < count($data[$keys[0]]); $i++){ 74 $time = array_keys($data[$keys[0]])[$i]; 78 $keysTimeframes = array_keys($data[$keyTimeframes]); 79 for($i = 0; $i < $timeframesCount; $i++){ 80 $time = $keysTimeframes[$i]; 75 81 $allValid = true; 76 82 $tmp = array(); … … 175 181 } 176 182 183 xdebug_stop_trace(); 184 177 185 ?>
Note:
See TracChangeset
for help on using the changeset viewer.
