diff --git a/README b/README index 3b1f374..94bc40f 100644 --- a/README +++ b/README @@ -3,12 +3,12 @@ Feel free to setup your own installation and protect your privacy! volkszaehler.org/ |_ htdocs/ static files accessible through the web - | |_ backend.php backend bootstrapping + | |_ middleware.php middleware bootstrapping | \_ frontend web frontend | |_ etc/ configuration files |_ var/ SQLite database (optional) - |_ lib/ backend libraries + |_ lib/ middleware libraries |_ misc/ |_ controller/ | |_ php/ simple reference implemenation of controllers @@ -21,7 +21,7 @@ volkszaehler.org/ | \_ demo/ demo data | |_ tools/ scripts for imports, installation etc. - |_ tests/ simple tests for backend classes + |_ tests/ simple tests for middleware classes \_ website/ our main webpage on http://volkszaehler.org Wiki: http://wiki.volkszaehler.org diff --git a/etc/volkszaehler.conf.template.php b/etc/volkszaehler.conf.template.php index 15810fb..abd015e 100644 --- a/etc/volkszaehler.conf.template.php +++ b/etc/volkszaehler.conf.template.php @@ -52,7 +52,7 @@ $config['db']['user'] = 'vz'; $config['db']['password'] = 'demo'; /** - * @var string backend database + * @var string database name * @link http://www.doctrine-project.org/projects/dbal/2.0/docs/reference/configuration/en */ $config['db']['dbname'] = 'volkszaehler'; diff --git a/htdocs/frontend/index.html b/htdocs/frontend/index.html index 43f4db9..a35491f 100644 --- a/htdocs/frontend/index.html +++ b/htdocs/frontend/index.html @@ -109,8 +109,8 @@ - - + + +

diff --git a/htdocs/frontend/javascripts/entity.js b/htdocs/frontend/javascripts/entity.js index f2d170a..5365598 100644 --- a/htdocs/frontend/javascripts/entity.js +++ b/htdocs/frontend/javascripts/entity.js @@ -80,7 +80,7 @@ Entity.prototype.getDOM = function(edit) { case 'uuid': var title = 'UUID'; - var value = '' + this[property] + ''; + var value = '' + this[property] + ''; break; case 'color': diff --git a/htdocs/frontend/javascripts/functions.js b/htdocs/frontend/javascripts/functions.js index 472cde3..3b36551 100644 --- a/htdocs/frontend/javascripts/functions.js +++ b/htdocs/frontend/javascripts/functions.js @@ -25,11 +25,11 @@ */ /** - * Universal helper for backend ajax requests with error handling + * Universal helper for middleware ajax requests with error handling */ vz.load = function(args) { $.extend(args, { - url: this.options.backendUrl, + url: this.options.middlewareUrl, dataType: 'json', error: function(xhr) { try { @@ -41,7 +41,7 @@ vz.load = function(args) { } } - throw new Exception(xhr.statusText, 'Unknown backend response', xhr.status) + throw new Exception(xhr.statusText, 'Unknown middleware response', xhr.status) } catch (e) { vz.wui.dialogs.exception(e); @@ -92,7 +92,7 @@ vz.parseUrlParams = function() { }; /** - * Load capabilities from backend + * Load capabilities from middleware */ vz.capabilities.load = function() { return vz.load({ diff --git a/htdocs/frontend/javascripts/init.js b/htdocs/frontend/javascripts/init.js index 716acb1..93a0638 100644 --- a/htdocs/frontend/javascripts/init.js +++ b/htdocs/frontend/javascripts/init.js @@ -46,7 +46,7 @@ var vz = { // flot instance plot: { }, - // debugging and runtime information from backend + // debugging and runtime information from middleware capabilities: { definitions: { } // definitions of entities & properties }, diff --git a/htdocs/frontend/javascripts/options.js b/htdocs/frontend/javascripts/options.js index a68f77b..94f85d7 100644 --- a/htdocs/frontend/javascripts/options.js +++ b/htdocs/frontend/javascripts/options.js @@ -27,9 +27,9 @@ // default time interval to show vz.options = { language: 'de', - backendUrl: '../backend.php', // TODO default backend, store backend urls in cookies + middlewareUrl: '../middleware.php', // TODO default middleware, store middleware urls in cookies tuples: 300, - precision: 2, // TODO update from backend capabilities? + precision: 2, // TODO update from middleware capabilities? render: 'lines', refresh: false, defaultInterval: 24*60*60*1000, // 1 day diff --git a/htdocs/frontend/javascripts/wui.js b/htdocs/frontend/javascripts/wui.js index 96e257e..e96262b 100644 --- a/htdocs/frontend/javascripts/wui.js +++ b/htdocs/frontend/javascripts/wui.js @@ -71,11 +71,11 @@ vz.wui.init = function() { vz.entities.loadData().done(vz.wui.drawPlot); }); - // backend address - $('#backend-url') - .val(vz.options.backendUrl) + // middleware address + $('#middleware-url') + .val(vz.options.middlewareUrl) .change(function() { - vz.options.backendUrl = $(this).val(); + vz.options.middlewareUrl = $(this).val(); }); // auto refresh @@ -361,7 +361,7 @@ vz.entities.each = function(cb) { } /** - * Get all entity information from backend + * Get all entity information from middleware */ vz.entities.loadDetails = function() { this.clear(); @@ -445,7 +445,7 @@ vz.entities.showTable = function() { vz.wui.dialogs.exception(e); } finally { $.when(queue).done(function() { - // wait for backend + // wait for middleware vz.entities.loadDetails().done(vz.entities.showTable); }); $(this).dialog('close'); @@ -486,7 +486,7 @@ vz.entities.showTable = function() { }; /** - * Load json data from the backend + * Load json data from the middleware * * @todo move to Entity class */ diff --git a/htdocs/backend.php b/htdocs/middleware.php similarity index 100% rename from htdocs/backend.php rename to htdocs/middleware.php diff --git a/lib/Definition/EntityDefinition.php b/lib/Definition/EntityDefinition.php index 49dbe43..a2d2cce 100644 --- a/lib/Definition/EntityDefinition.php +++ b/lib/Definition/EntityDefinition.php @@ -52,14 +52,14 @@ class EntityDefinition extends Definition { protected $optional = array(); /** - * Classname of intepreter (see backend/lib/Interpreter/) + * Classname of intepreter (see lib/Interpreter/) * * @var string */ protected $interpreter; /** - * Classname of model (see backend/lib/Model/) + * Classname of model (see lib/Model/) * * @var string */ diff --git a/lib/Router.php b/lib/Router.php index 05da83b..492cd67 100644 --- a/lib/Router.php +++ b/lib/Router.php @@ -136,7 +136,7 @@ class Router { /** * Processes the request * - * Example: http://sub.domain.local/backend.php/channel/550e8400-e29b-11d4-a716-446655440000/data.json?operation=edit&title=New Title + * Example: http://sub.domain.local/middleware.php/channel/550e8400-e29b-11d4-a716-446655440000/data.json?operation=edit&title=New Title */ public function run() { $operation = self::getOperation($this->view->request); diff --git a/misc/controller/bash/log_i2c_ds1631_ecmd.sh b/misc/controller/bash/log_i2c_ds1631_ecmd.sh index c7513db..c1571dc 100755 --- a/misc/controller/bash/log_i2c_ds1631_ecmd.sh +++ b/misc/controller/bash/log_i2c_ds1631_ecmd.sh @@ -33,17 +33,20 @@ # configuration # -# backend url -URL="http://192.168.10.1/backend" +# middleware url +URL="http://volkszaehler.org/demo/middleware.php" # sensor settings # Sensor 0x48 (72) ist bei ds1631 sensorid = 0 warum auch immer? # folglich ist sensor 0x4d (75) sensorid = 3 usw. SENSORID= + # ip address of the controller board running ethersex ESEXIP= + # uuid of the sensor in the volkszaehler database UUID= + ## # paths to binaries - you should not need to change these CURL=/usr/bin/curl diff --git a/misc/controller/bash/log_onewire.sh b/misc/controller/bash/log_onewire.sh index aeab12c..784663f 100755 --- a/misc/controller/bash/log_onewire.sh +++ b/misc/controller/bash/log_onewire.sh @@ -31,8 +31,8 @@ # configuration # -# backend url -URL="http://localhost/workspace/volkszaehler.org/backend/index.php/" +# middleware url +URL="http://volkszaehler.org/demo/middleware.php" # 1wire sensor id => volkszaehler.org uuid declare -A MAPPING diff --git a/misc/controller/bash/log_onewire_ecmd.sh b/misc/controller/bash/log_onewire_ecmd.sh index c611661..25a203b 100755 --- a/misc/controller/bash/log_onewire_ecmd.sh +++ b/misc/controller/bash/log_onewire_ecmd.sh @@ -33,14 +33,16 @@ # configuration # -# backend url -URL="http://volkszaehler.org/neu/backend/index.php" +# middleware url +URL="http://volkszaehler.org/demo/middleware.php" # sensor settings # id of the sensor SENSORID= + # ip address of the controller board running ethersex ESEXIP= + # uuid of the sensor in the volkszaehler database UUID= diff --git a/misc/docs/manual.lyx b/misc/docs/manual.lyx index 046a3ed..f142486 100644 --- a/misc/docs/manual.lyx +++ b/misc/docs/manual.lyx @@ -751,7 +751,7 @@ C ontroller Entwurfsmuster aufgebaut. Jeder Request an das Backend muss über die Datei \family typewriter -/htdocs/backend.php +/htdocs/middleware.php \family default erfolgen. Sie ist quasi der @@ -834,7 +834,7 @@ Alle Anfragen an das Backend müssen einem bestimmten Schema entsprechen. \begin_layout Standard \family typewriter -http://://backend[.php]/[/].://middleware[.php]/[/].?= \end_layout