From fb182cdeeb54478f634d8d7a6d49d53d3dec69e1 Mon Sep 17 00:00:00 2001 From: Shadify Date: Thu, 30 Nov 2017 13:06:42 +0100 Subject: Added all readings for graph --- app/Resources/views/default/AllDataPage.html.twig | 25 +++++++++++++++ app/Resources/views/default/index.html.twig | 1 + app/config/parameters.yml | 18 +++-------- src/AppBundle/Controller/AllDataController.php | 38 +++++++++++++++++++++++ 4 files changed, 69 insertions(+), 13 deletions(-) create mode 100644 app/Resources/views/default/AllDataPage.html.twig create mode 100644 src/AppBundle/Controller/AllDataController.php diff --git a/app/Resources/views/default/AllDataPage.html.twig b/app/Resources/views/default/AllDataPage.html.twig new file mode 100644 index 0000000..7851afb --- /dev/null +++ b/app/Resources/views/default/AllDataPage.html.twig @@ -0,0 +1,25 @@ + + + + + Title + + + + + + + + + + + {% for table in data %} + + + + + + {% endfor %} +
TimeStampCoNoSo
{{ table.TimeStamp }}{{ table.Co }}{{ table.No }}{{ table.So }}
+ + \ No newline at end of file diff --git a/app/Resources/views/default/index.html.twig b/app/Resources/views/default/index.html.twig index 2fc12a2..684393d 100644 --- a/app/Resources/views/default/index.html.twig +++ b/app/Resources/views/default/index.html.twig @@ -17,6 +17,7 @@ + All Data Page

{{ Aqi }}

{% endblock %} diff --git a/app/config/parameters.yml b/app/config/parameters.yml index 3651354..355c026 100644 --- a/app/config/parameters.yml +++ b/app/config/parameters.yml @@ -1,20 +1,12 @@ -# This file is a "template" of what your parameters.yml file should look like -# Set parameters here that may be different on each deployment target of the app, e.g. development, staging, production. -# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration +# This file is auto-generated during the composer install parameters: database_host: 127.0.0.1 - database_port: ~ + database_port: null database_name: symfony database_user: root - database_password: ~ - # You should uncomment this if you want to use pdo_sqlite - #database_path: '%kernel.project_dir%/var/data/data.sqlite' - - # Mail settings + database_password: null mailer_transport: smtp - mailer_host: mail.cock.li:587 + mailer_host: 'mail.cock.li:587' mailer_user: ***REMOVED*** mailer_password: ***REMOVED*** - - # A secret key that's used to generate certain security-related tokens - secret: ThisTokenIsNotSoSecretChangeIt \ No newline at end of file + secret: ThisTokenIsNotSoSecretChangeIt diff --git a/src/AppBundle/Controller/AllDataController.php b/src/AppBundle/Controller/AllDataController.php new file mode 100644 index 0000000..18a30a1 --- /dev/null +++ b/src/AppBundle/Controller/AllDataController.php @@ -0,0 +1,38 @@ + $item) + { + $data[$index]['TimeStamp'] = gmdate("l jS \of F Y h:i:s A", $item['TimeStamp']); + } + + $parametersToTwig = array("data" => $data); + + + return $this->render('default/AllDataPage.html.twig',$parametersToTwig); + + + } +} \ No newline at end of file -- cgit v1.2.3