From 1ab2b90b02705e206680b5428bf1fbaec6438132 Mon Sep 17 00:00:00 2001 From: Marcin Zelent Date: Fri, 16 Mar 2018 17:53:32 +0100 Subject: Removed old files. --- web/.htaccess | 68 ------- web/app.php | 21 --- web/app_dev.php | 31 ---- web/apple-touch-icon.png | Bin 2092 -> 0 bytes web/config.php | 422 -------------------------------------------- web/favicon.ico | Bin 6518 -> 0 bytes web/js/AllDataChart.js | 63 ------- web/js/LastWeekDataChart.js | 63 ------- web/js/realtime.js | 110 ------------ web/robots.txt | 5 - 10 files changed, 783 deletions(-) delete mode 100644 web/.htaccess delete mode 100644 web/app.php delete mode 100644 web/app_dev.php delete mode 100644 web/apple-touch-icon.png delete mode 100644 web/config.php delete mode 100644 web/favicon.ico delete mode 100644 web/js/AllDataChart.js delete mode 100644 web/js/LastWeekDataChart.js delete mode 100644 web/js/realtime.js delete mode 100644 web/robots.txt (limited to 'web') diff --git a/web/.htaccess b/web/.htaccess deleted file mode 100644 index 4dc7251..0000000 --- a/web/.htaccess +++ /dev/null @@ -1,68 +0,0 @@ -# Use the front controller as index file. It serves as a fallback solution when -# every other rewrite/redirect fails (e.g. in an aliased environment without -# mod_rewrite). Additionally, this reduces the matching process for the -# start page (path "/") because otherwise Apache will apply the rewriting rules -# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl). -DirectoryIndex app.php - -# By default, Apache does not evaluate symbolic links if you did not enable this -# feature in your server configuration. Uncomment the following line if you -# install assets as symlinks or if you experience problems related to symlinks -# when compiling LESS/Sass/CoffeScript assets. -# Options FollowSymlinks - -# Disabling MultiViews prevents unwanted negotiation, e.g. "/app" should not resolve -# to the front controller "/app.php" but be rewritten to "/app.php/app". - - Options -MultiViews - - - - RewriteEngine On - - # Determine the RewriteBase automatically and set it as environment variable. - # If you are using Apache aliases to do mass virtual hosting or installed the - # project in a subdirectory, the base path will be prepended to allow proper - # resolution of the app.php file and to redirect to the correct URI. It will - # work in environments without path prefix as well, providing a safe, one-size - # fits all solution. But as you do not need it in this case, you can comment - # the following 2 lines to eliminate the overhead. - RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ - RewriteRule ^(.*) - [E=BASE:%1] - - # Sets the HTTP_AUTHORIZATION header removed by Apache - RewriteCond %{HTTP:Authorization} . - RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] - - # Redirect to URI without front controller to prevent duplicate content - # (with and without `/app.php`). Only do this redirect on the initial - # rewrite by Apache and not on subsequent cycles. Otherwise we would get an - # endless redirect loop (request -> rewrite to front controller -> - # redirect -> request -> ...). - # So in case you get a "too many redirects" error or you always get redirected - # to the start page because your Apache does not expose the REDIRECT_STATUS - # environment variable, you have 2 choices: - # - disable this feature by commenting the following 2 lines or - # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the - # following RewriteCond (best solution) - RewriteCond %{ENV:REDIRECT_STATUS} ^$ - RewriteRule ^app\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L] - - # If the requested filename exists, simply serve it. - # We only want to let Apache serve files and not directories. - RewriteCond %{REQUEST_FILENAME} -f - RewriteRule ^ - [L] - - # Rewrite all other queries to the front controller. - RewriteRule ^ %{ENV:BASE}/app.php [L] - - - - - # When mod_rewrite is not available, we instruct a temporary redirect of - # the start page to the front controller explicitly so that the website - # and the generated links can still be used. - RedirectMatch 302 ^/$ /app.php/ - # RedirectTemp cannot be used instead - - diff --git a/web/app.php b/web/app.php deleted file mode 100644 index 943d089..0000000 --- a/web/app.php +++ /dev/null @@ -1,21 +0,0 @@ -loadClassCache(); -} -//$kernel = new AppCache($kernel); - -// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter -//Request::enableHttpMethodParameterOverride(); -$request = Request::createFromGlobals(); -$response = $kernel->handle($request); -$response->send(); -$kernel->terminate($request, $response); diff --git a/web/app_dev.php b/web/app_dev.php deleted file mode 100644 index d2ff583..0000000 --- a/web/app_dev.php +++ /dev/null @@ -1,31 +0,0 @@ -loadClassCache(); -} -$request = Request::createFromGlobals(); -$response = $kernel->handle($request); -$response->send(); -$kernel->terminate($request, $response); diff --git a/web/apple-touch-icon.png b/web/apple-touch-icon.png deleted file mode 100644 index 6e6b6ce..0000000 Binary files a/web/apple-touch-icon.png and /dev/null differ diff --git a/web/config.php b/web/config.php deleted file mode 100644 index fd7e17e..0000000 --- a/web/config.php +++ /dev/null @@ -1,422 +0,0 @@ -getFailedRequirements(); -$minorProblems = $symfonyRequirements->getFailedRecommendations(); -$hasMajorProblems = (bool) count($majorProblems); -$hasMinorProblems = (bool) count($minorProblems); - -?> - - - - - - Symfony Configuration Checker - - - -
-
- - - -
- -
-
-
-

Configuration Checker

-

- This script analyzes your system to check whether is - ready to run Symfony applications. -

- - -

Major problems

-

Major problems have been detected and must be fixed before continuing:

-
    - -
  1. getTestMessage() ?> -

    getHelpHtml() ?>

    -
  2. - -
- - - -

Recommendations

-

- Additionally, toTo enhance your Symfony experience, - it’s recommended that you fix the following: -

-
    - -
  1. getTestMessage() ?> -

    getHelpHtml() ?>

    -
  2. - -
- - - hasPhpIniConfigIssue()): ?> -

* - getPhpIniConfigPath()): ?> - Changes to the php.ini file must be done in "getPhpIniConfigPath() ?>". - - To change settings, create a "php.ini". - -

- - - -

All checks passed successfully. Your system is ready to run Symfony applications.

- - - -
-
-
-
Symfony Standard Edition
-
- - diff --git a/web/favicon.ico b/web/favicon.ico deleted file mode 100644 index 479f7f5..0000000 Binary files a/web/favicon.ico and /dev/null differ diff --git a/web/js/AllDataChart.js b/web/js/AllDataChart.js deleted file mode 100644 index 6525382..0000000 --- a/web/js/AllDataChart.js +++ /dev/null @@ -1,63 +0,0 @@ -var gasReading = { - Co: [], - No: [], - So: [] -}; - -var canvas = document.querySelector('#ctx'); -var ctx = canvas.getContext('2d'); - -var datasets = [{ - label: "Co", - borderColor: "rgb(5, 0, 0)", - fill: false, - data: [] -}, { - label: "No", - borderColor: "rgb(69, 169, 230)", - fill: false, - data: [] -}, { - label: "So", - borderColor: "rgb(246, 250, 15)", - fill: false, - data: [] -}]; - -fetch('/AllDataAverage') - .then(function(response) { - return response.json(); - }) - .then(function(data) { - drawChart(data, datasets); - }); - -function drawChart(gasData, datasets) { - - var finishedData = { - labels: [] - }; - - Object.keys(gasData).forEach(function(key) { - finishedData.labels.push(key); - datasets[0].data.push(gasData[key].Co); - datasets[1].data.push(gasData[key].No); - datasets[2].data.push(gasData[key].So); - }); - - finishedData.datasets = datasets; - - var myLineChart = new Chart(ctx, { - type: 'line', - data: finishedData, - options: { - scales: { - xAxes: [{ - time: { - unit: 'day' - } - }] - } - } - }); -} diff --git a/web/js/LastWeekDataChart.js b/web/js/LastWeekDataChart.js deleted file mode 100644 index b5e3976..0000000 --- a/web/js/LastWeekDataChart.js +++ /dev/null @@ -1,63 +0,0 @@ -var gasReading = { - Co: [], - No: [], - So: [] -}; - -var canvas = document.querySelector('#ctx'); -var ctx = canvas.getContext('2d'); - -var datasets = [{ - label: "Co", - borderColor: "rgb(5, 0, 0)", - fill: false, - data: [] -}, { - label: "No", - borderColor: "rgb(69, 169, 230)", - fill: false, - data: [] -}, { - label: "So", - borderColor: "rgb(246, 250, 15)", - fill: false, - data: [] -}]; - -fetch('/LastWeekDataAverage') - .then(function(response) { - return response.json(); - }) - .then(function(data) { - drawChart(data, datasets); - }); - -function drawChart(gasData, datasets) { - - var finishedData = { - labels: [] - }; - - Object.keys(gasData).forEach(function(key) { - finishedData.labels.push(key); - datasets[0].data.push(gasData[key].Co); - datasets[1].data.push(gasData[key].No); - datasets[2].data.push(gasData[key].So); - }); - - finishedData.datasets = datasets; - - var myLineChart = new Chart(ctx, { - type: 'line', - data: finishedData, - options: { - scales: { - xAxes: [{ - time: { - unit: 'day' - } - }] - } - } - }); -} diff --git a/web/js/realtime.js b/web/js/realtime.js deleted file mode 100644 index 1f5ef22..0000000 --- a/web/js/realtime.js +++ /dev/null @@ -1,110 +0,0 @@ -function arrayMax(arr) { - var len = arr.length, max = -Infinity; - while (len--) { - if (arr[len] > max) { - max = arr[len]; - } - } - return max; -}; - - -const table = { - Co: { - breakpoints: [0, 4.4, 4.5, 9.4, 9.5, 12.4, 12.5, 15.4, 15.5, 30.4, 30.5, 40.4, 40.5, 50.4], - aq: [0, 50, 51, 100, 101, 150, 151, 200, 201, 300, 301, 400, 401, 500] - }, - So: { - breakpoints: [0.000, 0.034, 0.035, 0.144, 0.145, 0.224, 0.225, 0.304, 0.305, 0.604, 0.605, 0.804, 0.805, 1.004], - aq:[0, 50, 51, 100, 101, 150, 151, 200, 201, 300, 301, 400, 401, 500] - }, - No: { - breakpoints: [0.65, 1.24, 1.25, 1.64, 1.65, 2.04], - aq:[201, 300, 301, 400, 401, 500] - } -}; - - -function calculateAQI(gasName, concentration) { - var bpLow,bpHi; - var bpLowIndex, bpHiIndex; - - table[gasName].breakpoints.forEach(function(value, index) { - if(value <= concentration && table[gasName].breakpoints[index + 1] >= concentration) { - bpLow = value; - bpLowIndex = index; - } - - if(value >= concentration && table[gasName].breakpoints[index - 1] <= concentration) { - bpHi = value; - bpHiIndex = index; - } - - }); - - - - var airQualityIndex = ((table[gasName].aq[bpHiIndex] - table[gasName].aq[bpLowIndex]) / (bpHi - bpLow)) * (concentration - bpLow) + table[gasName].aq[bpLowIndex]; - - return airQualityIndex; - -} - - -function update() { - - var data; - - fetch('/latest') - .then(function(resp) { - return resp.json(); - }) - .then(function(response) { - data = response; - var table = document.querySelector('#latest').children; - table[0].textContent = data.TimeStamp; - table[1].textContent = data.Co; - table[2].textContent = data.No; - table[3].textContent = data.So; - - var indexes = []; - var CO = isNaN(calculateAQI("Co", data.Co)) ? 0 : calculateAQI("Co", data.Co); - var SO = isNaN(calculateAQI("So", data.So)) ? 0 : calculateAQI("So", data.So); - var NO = isNaN(calculateAQI("No", data.No)) ? 0 : calculateAQI("No", data.No); - indexes.push(CO); - indexes.push(NO); - indexes.push(SO); - - - var max = arrayMax(indexes); - - document.querySelector("#aq").innerHTML = `The current air quality index is ${max}`; - - }) - .catch(function(error) { - console.log(error); - }); - - - - -} - -function drawChart() { - -} - -setInterval(update, 10000); - - - - - - - - - - - - - diff --git a/web/robots.txt b/web/robots.txt deleted file mode 100644 index 4665fca..0000000 --- a/web/robots.txt +++ /dev/null @@ -1,5 +0,0 @@ -# www.robotstxt.org/ -# www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 - -User-agent: * -Disallow: -- cgit v1.2.3