Merge branch 'dev'

This commit is contained in:
Starbeamrainbowlabs 2020-05-21 20:19:36 +01:00
commit 88c23ad77b
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
6 changed files with 44 additions and 18 deletions

View file

@ -9,10 +9,16 @@ This is the changelog for the air quality web interface and its associated HTTP
- `[Code]` refers to internal changes to the code that have no direct impact on the web interface or the HTTP API, but are significant enough to warrant note.
- `[Docs]` refers to changes to the [documentation](https://aq.connectedhumber.org/__nightdocs/00-Welcome.html).
## v0.13.6
- [Code] Add option to allow cross-origin-request sharing HTTP API requests
## v0.13.5
- Disable the tour, as it's now causing a crash on startup :-(
- [API] Don't return devices in the device lists that have the `visible` flag in the database set to `0`
## v0.13.4
- [API] Fix crash in `list-devices-near` action

View file

@ -78,6 +78,10 @@ if(!class_exists($handler_name)) {
exit("Error: No action with the name '$action' could be found.");
}
if($settings->get("http.cors") !== false) {
header("access-control-allow-origin: " . $settings->get("http.cors"));
}
$handler = $di_container->get($handler_name);
$perfcounter->start("handle");

6
build
View file

@ -339,9 +339,9 @@ task_deploy() {
rm -r "${temp_dir}/data"; # Delete the default data directory - there's one on the server already
subtask_end $?;
subtask_begin "Unwinding symlinks";
find "${temp_dir}" -type l -not -path "./beta" -exec bash -c 'ln -f "$(readlink -m "$0")" "$0"' {} \;
subtask_end $?;
# subtask_begin "Unwinding symlinks";
# find "${temp_dir}" -D exec -type l -not -path "./beta" -exec bash -c 'ln -f "$(readlink -m "$0")" "$0"' {} \;
# subtask_end $?;
task_end $?;

29
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "air-quality-mapper",
"version": "0.13.4-dev",
"version": "0.13.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -36,9 +36,9 @@
"integrity": "sha512-yEvVC8RfhRPkD9TUn7cFcLcgoJePgZRAOR7T21rcRY5I8tpuhzeWfGa7We7tB14fe9R7wENdqUABcMdwD4SQLw=="
},
"@types/chart.js": {
"version": "2.9.19",
"resolved": "https://registry.npmjs.org/@types/chart.js/-/chart.js-2.9.19.tgz",
"integrity": "sha512-sFxlMb+ElfJelXh0Z8spmiLRrnXCd7CaT6WGQtckhjETK1H5i1nYKN4TOExhqPeDZ6u+w4bJ20UYqELWOEfAKQ==",
"version": "2.9.21",
"resolved": "https://registry.npmjs.org/@types/chart.js/-/chart.js-2.9.21.tgz",
"integrity": "sha512-bjwdC+SvE/c3rHYYcX8UbRmTvjEUP9Dhuk/iWXygH6EFDYf4OcofnwxBpJx+A4qU3YBr54a7wtPdswfg9Yt3rg==",
"dev": true,
"requires": {
"moment": "^2.10.2"
@ -252,7 +252,8 @@
},
"kind-of": {
"version": "6.0.2",
"resolved": "",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
"integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
"dev": true
}
}
@ -1257,7 +1258,8 @@
},
"kind-of": {
"version": "6.0.2",
"resolved": "",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
"integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
"dev": true
}
}
@ -1463,9 +1465,9 @@
"dev": true
},
"html-entities": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz",
"integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.3.1.tgz",
"integrity": "sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA==",
"dev": true
},
"icss-replace-symbols": {
@ -2010,9 +2012,9 @@
"integrity": "sha1-qiEiUSr49vpr3G8y1nqm3whvfK0="
},
"nightdocs": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/nightdocs/-/nightdocs-1.0.6.tgz",
"integrity": "sha512-oo9+q4nuztpnzefbasM4Pn3sKSYRGuZHFh18Km9AiDqQFqHUZrwPzy8zmAUkAP5ajUcUMS4j2vutg5hHb8pZcw==",
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/nightdocs/-/nightdocs-1.0.8.tgz",
"integrity": "sha512-Jqg0Ql3ZLlZSKCBWG8ci7XxVMQOfh605vX21FUiEuCD4woSOhbmMpUiVBgKZjDBm0ztCcz28qSFLJi9ZJRyAkQ==",
"dev": true,
"requires": {
"marked": "^0.7.0",
@ -4294,7 +4296,8 @@
},
"kind-of": {
"version": "6.0.2",
"resolved": "",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
"integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
"dev": true
}
}

View file

@ -36,13 +36,13 @@
"xml-writer": "^1.7.0"
},
"devDependencies": {
"@types/chart.js": "^2.9.19",
"@types/chart.js": "^2.9.21",
"@types/chroma-js": "^2.0.0",
"@types/d3-delaunay": "^4.1.0",
"@types/event-emitter-es6": "^1.1.0",
"@types/leaflet": "^1.5.12",
"@types/leaflet-fullscreen": "^1.0.4",
"nightdocs": "^1.0.6",
"nightdocs": "^1.0.8",
"postcss-copy": "^7.1.0",
"postcss-import": "^12.0.1",
"rollup": "^2.7.2",

View file

@ -7,6 +7,19 @@
# The operating mode. Can be either "development", or "production" (default; activates a number of optimisations which might make development harder, such as 3rd-party library caches)
mode = "production"
[http]
# HTTP related settings
# Whether to enable cross-origin-request-sharing. This allows HTTP API queries
# from origins other than that of the origin of the HTTP API itself.
# For example, if the HTTP API is running on sensors.connectedhumber.org, then
# Without CORS a client-side Javascript program running on foo.example.com would
# not be able to request data.
# Possible values: false (disabled), a string (an origin to allow; set via the access-control-allow-origin header), or the special string "*" (allows all origins)
cors = false
# cors = "subdomain.example.com"
# cors = "*"
[database]
# Settings that control the database, or the connection to it