Changeset 7b68139
- Timestamp:
- Apr 23, 2017, 5:41:30 PM (10 years ago)
- Branches:
- debian/bullseye, debian/jessie
- Children:
- 12afe34
- Parents:
- e9ed726 (diff), 19ac332 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - git-author:
- Joachim Langenbach <joachim.langenbach@…> (04/23/17 17:40:44)
- git-committer:
- Joachim Langenbach <joachim.langenbach@…> (04/23/17 17:41:30)
- Files:
-
- 6 added
- 10 edited
-
debian/changelog (modified) (1 diff)
-
doc/electronics/E-Paper-Pin-out.pdf (added)
-
src/puppetcode/environments/test/hieradata/common.yaml (modified) (2 diffs)
-
src/puppetcode/environments/test/modules/gnuboat_canboat/manifests/init.pp (added)
-
src/puppetcode/environments/test/modules/gnuboat_canboat/manifests/install.pp (added)
-
src/puppetcode/environments/test/modules/gnuboat_canboat/manifests/service.pp (added)
-
src/puppetcode/environments/test/modules/gnuboat_canboat/templates/actisense-udev.epp (added)
-
src/puppetcode/environments/test/modules/gnuboat_canboat/templates/n2kd.epp (added)
-
src/puppetcode/environments/test/modules/gnuboat_epd/manifests/install.pp (modified) (1 diff)
-
src/puppetcode/environments/test/modules/gnuboat_gnuboat/manifests/config.pp (modified) (2 diffs)
-
src/puppetcode/environments/test/modules/gnuboat_gnuboat/manifests/install.pp (modified) (2 diffs)
-
src/puppetcode/environments/test/modules/gnuboat_gnuboat/templates/lighttpd.conf.epp (modified) (2 diffs)
-
src/webapp/webclient/javascript/main.js (modified) (2 diffs)
-
src/webapp/webservice/inc/Config.php (modified) (4 diffs)
-
src/webapp/webservice/index.php (modified) (3 diffs)
-
src/webapp/webservice/tileserver.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
debian/changelog
re9ed726 r7b68139 2 2 3 3 * Added php5-mysql dependency for gnuboat-server 4 * Merged improvements to gnuboat-server and gnuboat-webclient 5 from master 4 6 5 7 -- EngSaS - Joachim Langenbach <info@engsas.de> Sun, 23 Apr 2017 12:54:00 +0200 -
src/puppetcode/environments/test/hieradata/common.yaml
re9ed726 r7b68139 6 6 - gnuboat_gnuboat 7 7 - gnuboat_hostapd 8 - gnuboat_canboat 9 - apt 8 10 9 gnuboat_lighttpd::servuce::status: 'running' 11 apt::sources: 12 'gnuboat': 13 comment: 'GNUBoat repository' 14 location: 'http://ftp.engsas.de/unstable/gnuboat/' 15 release: 'jessie' 16 repos: 'main' 17 pin: '100' 18 key: 19 id: 'A365301E098FC834A7DA74C5210358AB8EC7F5EB' 20 server: 'pgp.mit.edu' 21 include: 22 src: true 23 deb: true 24 gnuboat_lighttpd::service::status: 'running' 10 25 gnuboat_lighttpd::service::enabled: true 11 gnuboat_epd::service::status: ' running'26 gnuboat_epd::service::status: 'stopped' 12 27 gnuboat_epd::service::enabled: true 13 28 gnuboat_epd::service::display_size: '2.7' … … 24 39 gnuboat_hostapd::config::interface: 'wlan0' 25 40 gnuboat_hostapd::config::country_code: 'de' 41 gnuboat_canboat::service::actisense_primary: '/dev/ttyUSB0' 42 gnuboat_canboat::service::monitor: true 43 gnuboat_canboat::service::actisense_serial: 'Actisense_NGT-1_2C88A' -
src/puppetcode/environments/test/modules/gnuboat_epd/manifests/install.pp
re9ed726 r7b68139 5 5 inherits gnuboat_epd 6 6 { 7 include apt8 9 apt::source{'gnuboatapt':10 comment => 'This is the raspbian repository for GNUBoat',11 location => 'http://ftp.engsas.de/unstable/gnuboat/',12 release => 'jessie',13 repos => 'main',14 pin => '-10',15 include => {16 'src' => true,17 'deb' => true,18 },19 }20 21 7 package{'epd-fuse': 22 8 name => "epd-fuse-${panel}", 23 9 ensure => $version, 24 10 notify => Service['epd-fuse'], 25 require => Apt::Source['gnuboatapt'],26 11 } 27 12 -
src/puppetcode/environments/test/modules/gnuboat_gnuboat/manifests/config.pp
re9ed726 r7b68139 5 5 inherits gnuboat_gnuboat 6 6 { 7 file{'/etc/lighttpd ':7 file{'/etc/lighttpd/lighttpd.conf': 8 8 ensure => 'present', 9 9 owner => 'root', … … 15 15 } 16 16 ), 17 notify => Service['lighttpd'], 17 18 } 18 19 } -
src/puppetcode/environments/test/modules/gnuboat_gnuboat/manifests/install.pp
re9ed726 r7b68139 1 1 class gnuboat_gnuboat::install() inherits gnuboat_gnuboat 2 2 { 3 include apt4 5 # apt::source{'gnuboatapt':6 # comment => 'This is the raspbian repository for GNUBoat',7 # location => 'http://ftp.engsas.de/unstable/gnuboat/',8 # release => 'jessie',9 # repos => 'main',10 # pin => '-10',11 # include => {12 # 'src' => true,13 # 'deb' => true,14 # },15 # }16 17 3 if $server { 18 4 package{'gnuboat-server': 19 5 ensure => $version, 20 6 notify => Service['gnuboat'], 21 require => Apt::Source['gnuboatapt'],22 7 } 23 8 } … … 26 11 package{'gnuboat-webclient': 27 12 ensure => $version, 28 require => Apt::Source['gnuboatapt'],29 13 } 30 14 } -
src/puppetcode/environments/test/modules/gnuboat_gnuboat/templates/lighttpd.conf.epp
re9ed726 r7b68139 7 7 ) 8 8 9 server.document-root = "<%= document_root %>"9 server.document-root = "<%= $document_root %>" 10 10 server.upload-dirs = ( "/var/cache/lighttpd/uploads" ) 11 11 server.errorlog = "/var/log/lighttpd/error.log" … … 27 27 include_shell "/usr/share/lighttpd/create-mime.assign.pl" 28 28 include_shell "/usr/share/lighttpd/include-conf-enabled.pl" 29 30 url.redirect = ( "^/$" => "/webclient/" ) -
src/webapp/webclient/javascript/main.js
re9ed726 r7b68139 28 28 29 29 function displayDataSet(data){ 30 if(!Array.isArray(data)){ 31 console.log("No data array returned!"); 32 return; 33 } 30 34 if(!("lastvalid" in data)){ 31 35 console.log("No last valid values given!"); … … 118 122 $(document).ready(function() { 119 123 displayDataGet(); 120 setInterval(displayDataGet, 5000);124 setInterval(displayDataGet, 15000); 121 125 122 126 $.getJSON("../webservice/tileserver.php?/map.json", mapSetup); -
src/webapp/webservice/inc/Config.php
re9ed726 r7b68139 35 35 36 36 public function databaseFile(){ 37 return $this->dataDirectory() ." log-webservice.rrd";37 return $this->dataDirectory() ."gnuboat.rrd"; 38 38 } 39 39 40 40 public function shutdownRequestFile(){ 41 41 if(array_key_exists("shutdownfile", $this->_config)) … … 43 43 return "/var/spool/gnuboat/shutdown.request"; 44 44 } 45 45 46 46 public function dataDirectory(){ 47 47 if(array_key_exists("datadirectory", $this->_config)) … … 49 49 return __DIR__ ."/../data/"; 50 50 } 51 51 52 52 private static function addTrailingSlash($path){ 53 53 $length = strlen($path); … … 57 57 return $path; 58 58 } 59 59 60 60 private $_config; 61 61 } -
src/webapp/webservice/index.php
re9ed726 r7b68139 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 ?> -
src/webapp/webservice/tileserver.php
re9ed726 r7b68139 294 294 $this->db = new PDO('sqlite:' . $tileset, '', '', array(PDO::ATTR_PERSISTENT => true)); 295 295 } catch (Exception $exc) { 296 e cho $exc->getTraceAsString();296 error_log($exc->getTraceAsString()); 297 297 die; 298 298 } … … 300 300 if (!isset($this->db)) { 301 301 header('Content-type: text/plain'); 302 e cho 'Incorrect tileset name: ' . $tileset;302 error_log('Incorrect tileset name: ' . $tileset); 303 303 die; 304 304 } … … 401 401 } else { 402 402 header('HTTP/1.1 404 Not Found'); 403 e cho 'Server: Unknown or not specified dataset "' . $tileset . '"';403 error_log('Server: Unknown or not specified dataset "' . $tileset . '"'); 404 404 die; 405 405 }
Note:
See TracChangeset
for help on using the changeset viewer.
