aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarwolaethblack <a.unal677@gmail.com>2017-11-23 11:54:46 +0100
committermarwolaethblack <a.unal677@gmail.com>2017-11-23 11:54:46 +0100
commit0575ee556944b85e14bdc664bb9e67234edf1836 (patch)
tree2cd38500732360276321f27ed461aa8b52269bb7
parent4312b353dbb4b448d551975b63db9c95b3eef4f5 (diff)
Show data from api
-rw-r--r--.idea/vcs.xml6
-rw-r--r--.idea/workspace.xml208
-rw-r--r--app/Resources/views/default/index.html.twig83
-rw-r--r--src/AppBundle/Controller/DefaultController.php21
-rw-r--r--src/AppBundle/Controller/HomeController.php41
5 files changed, 206 insertions, 153 deletions
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="VcsDirectoryMappings">
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
+ </component>
+</project> \ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 3a04178..d581ca7 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
- <list default="true" id="c02a68ca-4895-49ef-94e1-572ab8cf87ba" name="Default" comment="" />
+ <list default="true" id="c02a68ca-4895-49ef-94e1-572ab8cf87ba" name="Default" comment="">
+ <change type="DELETED" beforePath="$PROJECT_DIR$/src/AppBundle/Controller/DefaultController.php" afterPath="" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/Resources/views/default/index.html.twig" afterPath="$PROJECT_DIR$/app/Resources/views/default/index.html.twig" />
+ </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
@@ -15,40 +19,44 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
- <file leaf-file-name="composer.json" pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/composer.json">
+ <file leaf-file-name="HomeController.php" pinned="false" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/src/AppBundle/Controller/HomeController.php">
<provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="18">
- <caret line="1" column="13" lean-forward="false" selection-start-line="1" selection-start-column="13" selection-end-line="1" selection-end-column="13" />
+ <state relative-caret-position="194">
+ <caret line="37" column="60" lean-forward="false" selection-start-line="37" selection-start-column="60" selection-end-line="37" selection-end-column="60" />
<folding>
- <marker date="1511347709204" expanded="true" signature="514:1028" ph="{&quot;php&quot;: &quot;&gt;=5.5.9&quot;...}" />
- <marker date="1511347709204" expanded="true" signature="1049:1140" ph="{&quot;sensio/generator-bundle&quot;: &quot;^3.0&quot;...}" />
- <marker date="1511347709204" expanded="true" signature="1157:1888" ph="{...}" />
- <marker date="1511347709204" expanded="true" signature="1186:1739" ph="[...]" />
- <marker date="1511347709204" expanded="true" signature="1769:1811" ph="[...]" />
- <marker date="1511347709204" expanded="true" signature="1904:1941" ph="{&quot;sort-packages&quot;: true...}" />
+ <element signature="e#122#181#0#PHP" expanded="true" />
+ <element signature="e#1088#1113#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="AppKernel.php" pinned="false" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/app/AppKernel.php">
+ <file leaf-file-name="index.html.twig" pinned="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/app/Resources/views/default/index.html.twig">
<provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="231">
- <caret line="26" column="82" lean-forward="false" selection-start-line="26" selection-start-column="82" selection-end-line="26" selection-end-column="82" />
- <folding />
+ <state relative-caret-position="190">
+ <caret line="17" column="16" lean-forward="false" selection-start-line="17" selection-start-column="16" selection-end-line="17" selection-end-column="16" />
+ <folding>
+ <element signature="e#12#26#0#Twig" expanded="true" />
+ </folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
+ <component name="Git.Settings">
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+ </component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/composer.json" />
<option value="$PROJECT_DIR$/app/AppKernel.php" />
+ <option value="$PROJECT_DIR$/src/AppBundle/View/Home.php" />
+ <option value="$PROJECT_DIR$/app/Resources/views/default/index.html.twig" />
+ <option value="$PROJECT_DIR$/src/AppBundle/Controller/HomeController.php" />
</list>
</option>
</component>
@@ -103,9 +111,10 @@
<component name="ProjectFrameBounds">
<option name="x" value="293" />
<option name="y" value="47" />
- <option name="width" value="1400" />
- <option name="height" value="883" />
+ <option name="width" value="957" />
+ <option name="height" value="741" />
</component>
+ <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages />
@@ -131,7 +140,28 @@
<path>
<item name="pollution-sensor" type="b2602c69:ProjectViewProjectNode" />
<item name="pollution-sensor" type="2a2b976b:PhpTreeStructureProvider$1" />
- <item name="web" type="2a2b976b:PhpTreeStructureProvider$1" />
+ <item name="app" type="2a2b976b:PhpTreeStructureProvider$1" />
+ </path>
+ <path>
+ <item name="pollution-sensor" type="b2602c69:ProjectViewProjectNode" />
+ <item name="pollution-sensor" type="2a2b976b:PhpTreeStructureProvider$1" />
+ <item name="app" type="2a2b976b:PhpTreeStructureProvider$1" />
+ <item name="Resources" type="2a2b976b:PhpTreeStructureProvider$1" />
+ </path>
+ <path>
+ <item name="pollution-sensor" type="b2602c69:ProjectViewProjectNode" />
+ <item name="pollution-sensor" type="2a2b976b:PhpTreeStructureProvider$1" />
+ <item name="app" type="2a2b976b:PhpTreeStructureProvider$1" />
+ <item name="Resources" type="2a2b976b:PhpTreeStructureProvider$1" />
+ <item name="views" type="2a2b976b:PhpTreeStructureProvider$1" />
+ </path>
+ <path>
+ <item name="pollution-sensor" type="b2602c69:ProjectViewProjectNode" />
+ <item name="pollution-sensor" type="2a2b976b:PhpTreeStructureProvider$1" />
+ <item name="app" type="2a2b976b:PhpTreeStructureProvider$1" />
+ <item name="Resources" type="2a2b976b:PhpTreeStructureProvider$1" />
+ <item name="views" type="2a2b976b:PhpTreeStructureProvider$1" />
+ <item name="default" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
</expand>
<select />
@@ -158,6 +188,14 @@
</list>
</option>
</component>
+ <component name="RunManager" selected="JavaScript Debug.HomeController.php">
+ <configuration name="HomeController.php" type="JavascriptDebugType" factoryName="JavaScript Debug" temporary="true" nameIsGenerated="true" uri="http://localhost:63342/pollution-sensor/Controller/HomeController.php" />
+ <recent_temporary>
+ <list size="1">
+ <item index="0" class="java.lang.String" itemvalue="JavaScript Debug.HomeController.php" />
+ </list>
+ </recent_temporary>
+ </component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
@@ -172,25 +210,27 @@
<workItem from="1511346151555" duration="377000" />
<workItem from="1511346717882" duration="176000" />
<workItem from="1511347081605" duration="1264000" />
+ <workItem from="1511428524892" duration="5724000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
- <option name="totallyTimeSpent" value="1991000" />
+ <option name="totallyTimeSpent" value="7715000" />
</component>
<component name="ToolWindowManager">
- <frame x="293" y="47" width="1400" height="883" extended-state="0" />
+ <frame x="293" y="47" width="957" height="741" extended-state="0" />
+ <editor active="true" />
<layout>
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24973877" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
- <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32903227" sideWeight="0.5114286" order="7" side_tool="true" content_ui="tabs" />
+ <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39968404" sideWeight="0.5036573" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
- <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
- <window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32903227" sideWeight="0.48857144" order="7" side_tool="false" content_ui="tabs" />
+ <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.328594" sideWeight="0.4848485" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
- <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39968404" sideWeight="0.49634275" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
@@ -207,22 +247,33 @@
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
- <breakpoint-manager />
+ <breakpoint-manager>
+ <option name="time" value="1" />
+ </breakpoint-manager>
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/composer.json">
<provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="18">
+ <caret line="1" column="13" lean-forward="false" selection-start-line="1" selection-start-column="13" selection-end-line="1" selection-end-column="13" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/AppKernel.php">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="468">
+ <caret line="26" column="82" lean-forward="false" selection-start-line="26" selection-start-column="82" selection-end-line="26" selection-end-column="82" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/composer.json">
+ <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- <folding>
- <marker date="1511347709204" expanded="true" signature="514:1028" ph="{&quot;php&quot;: &quot;&gt;=5.5.9&quot;...}" />
- <marker date="1511347709204" expanded="true" signature="1049:1140" ph="{&quot;sensio/generator-bundle&quot;: &quot;^3.0&quot;...}" />
- <marker date="1511347709204" expanded="true" signature="1157:1888" ph="{...}" />
- <marker date="1511347709204" expanded="true" signature="1186:1739" ph="[...]" />
- <marker date="1511347709204" expanded="true" signature="1769:1811" ph="[...]" />
- <marker date="1511347709204" expanded="true" signature="1904:1941" ph="{&quot;sort-packages&quot;: true...}" />
- </folding>
+ <folding />
</state>
</provider>
</entry>
@@ -230,14 +281,7 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- <folding>
- <marker date="1511347709204" expanded="true" signature="514:1028" ph="{&quot;php&quot;: &quot;&gt;=5.5.9&quot;...}" />
- <marker date="1511347709204" expanded="true" signature="1049:1140" ph="{&quot;sensio/generator-bundle&quot;: &quot;^3.0&quot;...}" />
- <marker date="1511347709204" expanded="true" signature="1157:1888" ph="{...}" />
- <marker date="1511347709204" expanded="true" signature="1186:1739" ph="[...]" />
- <marker date="1511347709204" expanded="true" signature="1769:1811" ph="[...]" />
- <marker date="1511347709204" expanded="true" signature="1904:1941" ph="{&quot;sort-packages&quot;: true...}" />
- </folding>
+ <folding />
</state>
</provider>
</entry>
@@ -245,14 +289,7 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- <folding>
- <marker date="1511347709204" expanded="true" signature="514:1028" ph="{&quot;php&quot;: &quot;&gt;=5.5.9&quot;...}" />
- <marker date="1511347709204" expanded="true" signature="1049:1140" ph="{&quot;sensio/generator-bundle&quot;: &quot;^3.0&quot;...}" />
- <marker date="1511347709204" expanded="true" signature="1157:1888" ph="{...}" />
- <marker date="1511347709204" expanded="true" signature="1186:1739" ph="[...]" />
- <marker date="1511347709204" expanded="true" signature="1769:1811" ph="[...]" />
- <marker date="1511347709204" expanded="true" signature="1904:1941" ph="{&quot;sort-packages&quot;: true...}" />
- </folding>
+ <folding />
</state>
</provider>
</entry>
@@ -260,14 +297,7 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="18">
<caret line="1" column="13" lean-forward="false" selection-start-line="1" selection-start-column="13" selection-end-line="1" selection-end-column="13" />
- <folding>
- <marker date="1511347709204" expanded="true" signature="514:1028" ph="{&quot;php&quot;: &quot;&gt;=5.5.9&quot;...}" />
- <marker date="1511347709204" expanded="true" signature="1049:1140" ph="{&quot;sensio/generator-bundle&quot;: &quot;^3.0&quot;...}" />
- <marker date="1511347709204" expanded="true" signature="1157:1888" ph="{...}" />
- <marker date="1511347709204" expanded="true" signature="1186:1739" ph="[...]" />
- <marker date="1511347709204" expanded="true" signature="1769:1811" ph="[...]" />
- <marker date="1511347709204" expanded="true" signature="1904:1941" ph="{&quot;sort-packages&quot;: true...}" />
- </folding>
+ <folding />
</state>
</provider>
</entry>
@@ -276,6 +306,21 @@
<state />
</provider>
</entry>
+ <entry file="file://$PROJECT_DIR$/web/app_dev.php">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="0">
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/AppKernel.php">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="18">
+ <caret line="26" column="82" lean-forward="false" selection-start-line="26" selection-start-column="82" selection-end-line="26" selection-end-column="82" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
<entry file="file://$PROJECT_DIR$/web/app.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
@@ -284,7 +329,23 @@
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/web/app_dev.php">
+ <entry file="file://$PROJECT_DIR$/src/AppBundle/Controller/DefaultController.php">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="82">
+ <caret line="11" column="34" lean-forward="false" selection-start-line="11" selection-start-column="19" selection-end-line="11" selection-end-column="34" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/AppBundle/View/Home.php">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="126">
+ <caret line="7" column="17" lean-forward="false" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/AppBundle/AppBundle.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
@@ -292,13 +353,34 @@
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/app/AppKernel.php">
+ <entry file="file://$PROJECT_DIR$/app/Resources/views/base.html.twig">
<provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="231">
- <caret line="26" column="82" lean-forward="false" selection-start-line="26" selection-start-column="82" selection-end-line="26" selection-end-column="82" />
+ <state relative-caret-position="0">
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
+ <entry file="file://$PROJECT_DIR$/app/Resources/views/default/index.html.twig">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="190">
+ <caret line="17" column="16" lean-forward="false" selection-start-line="17" selection-start-column="16" selection-end-line="17" selection-end-column="16" />
+ <folding>
+ <element signature="e#12#26#0#Twig" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/AppBundle/Controller/HomeController.php">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="194">
+ <caret line="37" column="60" lean-forward="false" selection-start-line="37" selection-start-column="60" selection-end-line="37" selection-end-column="60" />
+ <folding>
+ <element signature="e#122#181#0#PHP" expanded="true" />
+ <element signature="e#1088#1113#0#PHP" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
</component>
</project> \ 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 c720409..b967237 100644
--- a/app/Resources/views/default/index.html.twig
+++ b/app/Resources/views/default/index.html.twig
@@ -2,75 +2,20 @@
{% block body %}
<div id="wrapper">
- <div id="container">
- <div id="welcome">
- <h1><span>Welcome to</span> Symfony {{ constant('Symfony\\Component\\HttpKernel\\Kernel::VERSION') }}</h1>
- </div>
-
- <div id="status">
- <p>
- <svg id="icon-status" width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1671 566q0 40-28 68l-724 724-136 136q-28 28-68 28t-68-28l-136-136-362-362q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 295 656-657q28-28 68-28t68 28l136 136q28 28 28 68z" fill="#759E1A"/></svg>
-
- Your application is now ready. You can start working on it at:
- <code>{{ base_dir }}</code>
- </p>
- </div>
-
- <div id="next">
- <h2>What's next?</h2>
- <p>
- <svg id="icon-book" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="-12.5 9 64 64" enable-background="new -12.5 9 64 64" xml:space="preserve">
- <path fill="#AAA" d="M6.8,40.8c2.4,0.8,4.5-0.7,4.9-2.5c0.2-1.2-0.3-2.1-1.3-3.2l-0.8-0.8c-0.4-0.5-0.6-1.3-0.2-1.9
- c0.4-0.5,0.9-0.8,1.8-0.5c1.3,0.4,1.9,1.3,2.9,2.2c-0.4,1.4-0.7,2.9-0.9,4.2l-0.2,1c-0.7,4-1.3,6.2-2.7,7.5
- c-0.3,0.3-0.7,0.5-1.3,0.6c-0.3,0-0.4-0.3-0.4-0.3c0-0.3,0.2-0.3,0.3-0.4c0.2-0.1,0.5-0.3,0.4-0.8c0-0.7-0.6-1.3-1.3-1.3
- c-0.6,0-1.4,0.6-1.4,1.7s1,1.9,2.4,1.8c0.8,0,2.5-0.3,4.2-2.5c2-2.5,2.5-5.4,2.9-7.4l0.5-2.8c0.3,0,0.5,0.1,0.8,0.1
- c2.4,0.1,3.7-1.3,3.7-2.3c0-0.6-0.3-1.2-0.9-1.2c-0.4,0-0.8,0.3-1,0.8c-0.1,0.6,0.8,1.1,0.1,1.5c-0.5,0.3-1.4,0.6-2.7,0.4l0.3-1.3
- c0.5-2.6,1-5.7,3.2-5.8c0.2,0,0.8,0,0.8,0.4c0,0.2,0,0.2-0.2,0.5c-0.2,0.3-0.3,0.4-0.2,0.7c0,0.7,0.5,1.1,1.2,1.1
- c0.9,0,1.2-1,1.2-1.4c0-1.2-1.2-1.8-2.6-1.8c-1.5,0.1-2.8,0.9-3.7,2.1c-1.1,1.3-1.8,2.9-2.3,4.5c-0.9-0.8-1.6-1.8-3.1-2.3
- c-1.1-0.7-2.3-0.5-3.4,0.3c-0.5,0.4-0.8,1-1,1.6c-0.4,1.5,0.4,2.9,0.8,3.4l0.9,1c0.2,0.2,0.6,0.8,0.4,1.5c-0.3,0.8-1.2,1.3-2.1,1
- c-0.4-0.2-1-0.5-0.9-0.9c0.1-0.2,0.2-0.3,0.3-0.5s0.1-0.3,0.1-0.3c0.2-0.6-0.1-1.4-0.7-1.6c-0.6-0.2-1.2,0-1.3,0.8
- C4.3,38.4,4.7,40,6.8,40.8z M46.1,20.9c0-4.2-3.2-7.5-7.1-7.5h-3.8C34.8,10.8,32.7,9,30.2,9L-2.3,9.1c-2.8,0.1-4.9,2.4-4.9,5.4
- L-7,58.6c0,4.8,8.1,13.9,11.6,14.1l34.7-0.1c3.9,0,7-3.4,7-7.6L46.1,20.9z M-0.3,36.4c0-8.6,6.5-15.6,14.5-15.6
- c8,0,14.5,7,14.5,15.6S22.1,52,14.2,52C6.1,52-0.3,45-0.3,36.4z M42.1,65.1c0,1.8-1.5,3.1-3.1,3.1H4.6c-0.7,0-3-1.8-4.5-4.4h30.4
- c2.8,0,5-2.4,5-5.4V17.9h3.7c1.6,0,2.9,1.4,2.9,3.1V65.1L42.1,65.1z"/>
- </svg>
-
- Read the documentation to learn
- <a href="https://symfony.com/doc/{{ constant('Symfony\\Component\\HttpKernel\\Kernel::VERSION')[:3] }}/page_creation.html">
- How to create your first page in Symfony
- </a>
- </p>
- </div>
-
- </div>
+ <table>
+ <tr>
+ <th>TimeStamp</th>
+ <th>Co</th>
+ <th>No</th>
+ <th>So</th>
+ </tr>
+ <tr>
+ <td>{{ TimeStamp }}</td>
+ <td>{{ Co }}</td>
+ <td>{{ No }}</td>
+ <td>{{ So }}</td>
+ </tr>
+ </table>
</div>
{% endblock %}
-{% block stylesheets %}
-<style>
- body { background: #F5F5F5; font: 18px/1.5 sans-serif; }
- h1, h2 { line-height: 1.2; margin: 0 0 .5em; }
- h1 { font-size: 36px; }
- h2 { font-size: 21px; margin-bottom: 1em; }
- p { margin: 0 0 1em 0; }
- a { color: #0000F0; }
- a:hover { text-decoration: none; }
- code { background: #F5F5F5; max-width: 100px; padding: 2px 6px; word-wrap: break-word; }
- #wrapper { background: #FFF; margin: 1em auto; max-width: 800px; width: 95%; }
- #container { padding: 2em; }
- #welcome, #status { margin-bottom: 2em; }
- #welcome h1 span { display: block; font-size: 75%; }
- #icon-status, #icon-book { float: left; height: 64px; margin-right: 1em; margin-top: -4px; width: 64px; }
- #icon-book { display: none; }
-
- @media (min-width: 768px) {
- #wrapper { width: 80%; margin: 2em auto; }
- #icon-book { display: inline-block; }
- #status a, #next a { display: block; }
-
- @-webkit-keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }
- @keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }
- .sf-toolbar { opacity: 0; -webkit-animation: fade-in 1s .2s forwards; animation: fade-in 1s .2s forwards;}
- }
-</style>
-{% endblock %}
diff --git a/src/AppBundle/Controller/DefaultController.php b/src/AppBundle/Controller/DefaultController.php
deleted file mode 100644
index cecd334..0000000
--- a/src/AppBundle/Controller/DefaultController.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-namespace AppBundle\Controller;
-
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
-use Symfony\Bundle\FrameworkBundle\Controller\Controller;
-use Symfony\Component\HttpFoundation\Request;
-
-class DefaultController extends Controller
-{
- /**
- * @Route("/", name="homepage")
- */
- public function indexAction(Request $request)
- {
- // replace this example code with whatever you need
- return $this->render('default/index.html.twig', [
- 'base_dir' => realpath($this->getParameter('kernel.project_dir')).DIRECTORY_SEPARATOR,
- ]);
- }
-}
diff --git a/src/AppBundle/Controller/HomeController.php b/src/AppBundle/Controller/HomeController.php
new file mode 100644
index 0000000..6190951
--- /dev/null
+++ b/src/AppBundle/Controller/HomeController.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: andy
+ * Date: 11/23/17
+ * Time: 10:21 AM
+ */
+
+namespace AppBundle\Controller;
+
+use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
+use Symfony\Component\HttpFoundation\Response;
+use Symfony\Bundle\FrameworkBundle\Controller\Controller;
+
+
+class HomeController extends Controller
+{
+ /**
+ * @Route("/", name="homepage")
+ */
+
+ public function numberAction()
+ {
+ // Get cURL resource
+ $curl = curl_init();
+ curl_setopt($curl, CURLOPT_URL, "http://pollutometerapi.azurewebsites.net/api/Readings/latest");
+ curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-type: application/json')); // Assuming you're requesting JSON
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
+ // Send the request & save response to $resp
+ $resp = curl_exec($curl);
+ // Close request to clear up some resources
+ curl_close($curl);
+
+ $data = json_decode($resp, true);
+ $data['TimeStamp'] = gmdate("l jS \of F Y h:i:s A", $data['TimeStamp']);
+
+
+ return $this->render('default/index.html.twig',$data);
+ }
+
+} \ No newline at end of file