Changes in / [c84f87e:00a8800]


Ignore:
Location:
src
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • src/puppetcode/environments/test/hieradata/common.yaml

    rc84f87e r00a8800  
    3939gnuboat_hostapd::config::interface: 'wlan0'
    4040gnuboat_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'
     41gnuboat_canboat::actisense_primary: '/dev/ttyUSB0'
     42gnuboat_canboat::monitor: true
     43gnuboat_canboat::actisense_serial: 'Actisense_NGT-1_2C88A'
  • src/puppetcode/environments/test/modules/gnuboat_canboat/manifests/service.pp

    rc84f87e r00a8800  
    3636        }
    3737
     38        file{'/etc/systemd/system/n2kd_monitor.service':
     39                ensure => present,
     40                owner => 'root',
     41                group => 'root',
     42                mode => '0600',
     43                notify => Service['n2kd_monitor'],
     44                source => 'puppet:///modules/gnuboat_canboat/n2kd_monitor.service',
     45        }
     46
    3847        if $actisense_serial != '' {
    3948                file{'/etc/udev/rules.d/99-n2kd-actisense.rules':
  • src/puppetcode/environments/test/modules/gnuboat_gnuboat/manifests/config.pp

    rc84f87e r00a8800  
    1515                        }
    1616                ),
    17                 notify => Service['lighttpd'],
    1817        }
    1918}
  • src/puppetcode/environments/test/modules/gnuboat_gnuboat/templates/lighttpd.conf.epp

    rc84f87e r00a8800  
    2727include_shell "/usr/share/lighttpd/create-mime.assign.pl"
    2828include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
    29 
    30 url.redirect = ( "^/$" => "/webclient/" )
  • src/webapp/webclient/javascript/main.js

    rc84f87e r00a8800  
    2828
    2929function displayDataSet(data){
    30         if(!Array.isArray(data)){
    31                 console.log("No data array returned!");
    32                 return;
    33         }
    3430        if(!("lastvalid" in data)){
    3531                        console.log("No last valid values given!");
    … …  
    123119        displayDataGet();
    124120        setInterval(displayDataGet, 10000);
    125 
     121       
    126122        $.getJSON("../webservice/tileserver.php?/map.json", mapSetup);
    127123       
  • src/webapp/webservice/inc/Config.php

    rc84f87e r00a8800  
    11<?php
    22/*
    3     Copyright (C) 2016 - 2017 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
     3    Copyright (C) 2016 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
    44
    55    This program is free software: you can redistribute it and/or modify
    … …  
    3535
    3636        public function databaseFile(){
    37                 return $this->dataDirectory() ."gnuboat.rrd";
     37                return $this->dataDirectory() ."log-webservice.rrd";
    3838        }
    39 
     39       
    4040        public function shutdownRequestFile(){
    4141                if(array_key_exists("shutdownfile", $this->_config))
    … …  
    4343                return "/var/spool/gnuboat/shutdown.request";
    4444        }
    45 
     45       
    4646        public function dataDirectory(){
    4747                if(array_key_exists("datadirectory", $this->_config))
    … …  
    4949                return "/var/lib/gnuboat/";
    5050        }
    51 
     51       
    5252        private static function addTrailingSlash($path){
    5353                $length = strlen($path);
    … …  
    5757                return $path;
    5858        }
    59 
     59       
    6060        private $_config;
    6161}
  • src/webapp/webservice/index.php

    rc84f87e r00a8800  
    1616    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717*/
    18 
    19 xdebug_start_trace();
    2018
    2119require_once(__DIR__ ."/inc/Config.php");
    … …  
    7068        $lastTime = -1;
    7169        $keys = array_keys($data);
    72         $keyTimeframes = $keys[0];
    73         $itemCount = count($keys);
    74         if($itemCount < 0 ){
     70        if(count($keys) < 0 ){
    7571                error_log("No keys in fetched rrd data from ". $dbFile);
    7672                echo json_encode("");
    7773                exit;
    7874        }
    79         $timeframesCount = count($data[$keyTimeframes]);
    8075        if($debug > 0){
    81                 echo "<p>Variables: ". $itemCount ."; Timeframes: ". $timeframesCount ."</p>\n";
     76                echo "<p>Variables: ". count($keys) ."; Timeframes: ". count($data[$keys[0]]) ."</p>\n";
    8277        }
    8378        foreach($data[$keys[0]] as $timeframe => $value){
    … …  
    190185}
    191186
    192 xdebug_stop_trace();
    193 
    194187?>
  • src/webapp/webservice/tileserver.php

    rc84f87e r00a8800  
    294294      $this->db = new PDO('sqlite:' . $tileset, '', '', array(PDO::ATTR_PERSISTENT => true));
    295295    } catch (Exception $exc) {
    296       error_log($exc->getTraceAsString());
     296      echo $exc->getTraceAsString();
    297297      die;
    298298    }
    … …  
    300300    if (!isset($this->db)) {
    301301      header('Content-type: text/plain');
    302       error_log('Incorrect tileset name: ' . $tileset);
     302      echo 'Incorrect tileset name: ' . $tileset;
    303303      die;
    304304    }
    … …  
    401401    } else {
    402402      header('HTTP/1.1 404 Not Found');
    403       error_log('Server: Unknown or not specified dataset "' . $tileset . '"');
     403      echo 'Server: Unknown or not specified dataset "' . $tileset . '"';
    404404      die;
    405405    }
Note: See TracChangeset for help on using the changeset viewer.