From f411cfdcc6a0508d134ed4726c55881cb681bcbb Mon Sep 17 00:00:00 2001 From: johannnes Date: Wed, 6 Mar 2013 18:47:44 +0000 Subject: [PATCH] merged 93_DbLog to stay up2date added version display git-svn-id: https://svn.fhem.de/fhem/trunk@2858 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/www/frontend/CHANGED | 11 +++++++++-- fhem/www/frontend/FHEM/93_DbLog.pm | 12 ++++++++++-- fhem/www/frontend/controls_frontend.txt | 4 ++-- .../www/frontend/app/controller/MainController.js | 2 +- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/fhem/www/frontend/CHANGED b/fhem/www/frontend/CHANGED index de2f32765..2a1276bb2 100644 --- a/fhem/www/frontend/CHANGED +++ b/fhem/www/frontend/CHANGED @@ -1,11 +1,18 @@ -Update vom 2.3.2012 +Update vom 6.2.2013 + + * Name des Charts beim Speichern escaped + * Bessere Fehlermeldung bei Device Selektion + * Merge von 93_DbLog auf den SVN Stand + * Versionsnummer hinzugefügt + +Update vom 2.3.2013 * Auslesen der verfügbaren Geräte / FHEM-Komponenten und Darstellung im Menü * Kommandozeile hinzugefügt, inkl Speichern in der fhem.cfg * Shutdown und Restart Button für FHEM hinzugefügt * Icons -Update vom 1.3.2012 +Update vom 1.3.2013 * Charts unterstützen jetzt mehrere Y Achsen. Diese können nach Klick auf den Button "Add another Y Axis" hinzugefügt werden diff --git a/fhem/www/frontend/FHEM/93_DbLog.pm b/fhem/www/frontend/FHEM/93_DbLog.pm index 8ccddc631..fc8d7931e 100644 --- a/fhem/www/frontend/FHEM/93_DbLog.pm +++ b/fhem/www/frontend/FHEM/93_DbLog.pm @@ -396,6 +396,15 @@ DbLog_Connect($) Log 3, "Connection to db $dbconn established"; $hash->{DBH}= $dbh; + if ($hash->{DBMODEL} eq "SQLITE") { + $dbh->do("PRAGMA temp_store=MEMORY"); + $dbh->do("PRAGMA synchronous=NORMAL"); + $dbh->do("PRAGMA journal_mode=WAL"); + $dbh->do("CREATE TEMP TABLE IF NOT EXISTS current (TIMESTAMP TIMESTAMP, DEVICE varchar(32), TYPE varchar(32), EVENT varchar(512), READING varchar(32), VALUE varchar(32), UNIT varchar(32))"); + $dbh->do("CREATE TABLE IF NOT EXISTS history (TIMESTAMP TIMESTAMP, DEVICE varchar(32), TYPE varchar(32), EVENT varchar(512), READING varchar(32), VALUE varchar(32), UNIT varchar(32))"); + $dbh->do("CREATE INDEX IF NOT EXISTS Search_Idx ON `history` (DEVICE, READING, TIMESTAMP)"); + } + # creating an own connection for the webfrontend, saved as DBHF in Hash # this makes sure that the connection doesnt get lost due to other modules my $dbhf = DBI->connect_cached("dbi:$dbconn", $dbuser, $dbpassword); @@ -476,7 +485,7 @@ DbLog_Get($@) my $to = shift @a; # Now @a contains the list of column_specs my ($internal, @fld); - if(uc($outf) eq "INT") { + if($outf eq "INT") { $outf = "-"; $internal = 1; } elsif (uc($outf) eq "WEBCHART") { @@ -1320,4 +1329,3 @@ sub chartQuery($@) { =end html_DE =cut - diff --git a/fhem/www/frontend/controls_frontend.txt b/fhem/www/frontend/controls_frontend.txt index 2930722d9..33cdeddbf 100644 --- a/fhem/www/frontend/controls_frontend.txt +++ b/fhem/www/frontend/controls_frontend.txt @@ -37,7 +37,7 @@ DIR www/frontend/lib/ext-4.1.1a/images/gray/grid DIR www/frontend/lib/ext-4.1.1a/images/gray/util DIR www/frontend/lib/ext-4.1.1a/images/gray/panel-header DIR www/frontend/lib/ext-4.1.1a/images/gray/tip -UPD 2013-03-01_05:44:48 49099 FHEM/93_DbLog.pm +UPD 2013-03-06_07:36:41 49747 FHEM/93_DbLog.pm UPD 2013-02-25_08:13:15 499 www/frontend/index.html UPD 2013-02-27_07:20:39 236 www/frontend/README.txt UPD 2013-03-02_04:42:03 1856 www/frontend/app/app.js @@ -47,7 +47,7 @@ UPD 2013-03-02_06:11:57 4269 www/frontend/app/view/DevicePanel.js UPD 2013-03-01_05:43:56 2503 www/frontend/app/view/TableDataGridPanel.js UPD 2013-03-01_05:43:55 1310 www/frontend/app/view/LineChartView.js UPD 2013-03-05_07:35:50 41802 www/frontend/app/controller/ChartController.js -UPD 2013-03-02_06:14:02 10733 www/frontend/app/controller/MainController.js +UPD 2013-03-06_07:36:41 10761 www/frontend/app/controller/MainController.js UPD 2013-03-01_05:43:32 202 www/frontend/app/model/ReadingsModel.js UPD 2013-03-01_05:43:32 338 www/frontend/app/model/SavedChartsModel.js UPD 2013-03-01_05:43:31 674 www/frontend/app/model/ChartModel.js diff --git a/fhem/www/frontend/www/frontend/app/controller/MainController.js b/fhem/www/frontend/www/frontend/app/controller/MainController.js index 74eb4f52d..d5bb14e9a 100644 --- a/fhem/www/frontend/www/frontend/app/controller/MainController.js +++ b/fhem/www/frontend/www/frontend/app/controller/MainController.js @@ -73,7 +73,7 @@ Ext.define('FHEM.controller.MainController', { if (Ext.isDefined(FHEM.version)) { var sp = this.getStatustextfield(); - sp.setText(FHEM.version); + sp.setText(FHEM.version + "; Frontend Version: 0.2"); } //setup west accordion