reForis merge requestshttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests2021-12-10T11:02:41+01:00https://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/294Fix mqtt custom port2021-12-10T11:02:41+01:00Štěpán HenekFix mqtt custom portport in the config is suppose to be int otherwise
paho-mqtt fails with an error.port in the config is suppose to be int otherwise
paho-mqtt fails with an error.Aleksandr GumroianAleksandr Gumroianhttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/293Add endpoints for static DHCP leases2022-05-10T14:54:32+02:00Martin MatějekAdd endpoints for static DHCP leases## Overview
Add following endpoints:
* /lan/update_client - update DHCP client config
* /lan/delete_client - delete DHCP client
The difference between `set_client` and `update_client` is that
`set_client` should fail to add DHCP client ...## Overview
Add following endpoints:
* /lan/update_client - update DHCP client config
* /lan/delete_client - delete DHCP client
The difference between `set_client` and `update_client` is that
`set_client` should fail to add DHCP client which already exists.
I.e. don't accidentally overwrite existing config when setting new static lease.
`update_client` should fail to update non-existing client.
`delete_client` should fail on deleting non-existing client.
## Input data
`ip`, `mac` and `hostname` has to be unique, unless you are overwriting the same host - e.g. update just IP address of dhcp client, but keep the same hostname
* `set_client` + `update_client`
```json
{
"type": "object",
"properties": {
"mac": {"type": "string", "format": "macaddress"},
"ip": {
"oneOf": [
{"type": "string", "format": "ipv4"},
{"enum": ["ignore"]}
]
},
"hostname": {"type": "string", "minLength": 1}
},
"additionalProperties": false,
"required": ["ip", "mac", "hostname"]
}
```
* `delete_client`
```json
{
"type": "object",
"properties": {
"mac": {"type": "string", "format": "macaddress"}
},
"additionalProperties": false,
"required": ["mac"]
}
```
Foris-controller return either `{'result': True}` on success or `{'result':
False, 'reason': 'reason-what-went-wrong'}` on failure.
Reasons for failure for particular operations are defined in json schema (`set/update/dhcp_client_{set,update,delete}_reply`):
https://gitlab.nic.cz/turris/foris-controller/foris-controller/-/blob/214-dhcp-allow-managing-of-static-leases/foris_controller_modules/lan/schema/lan.json#L134-208
## return values
But we don't handle these failures in flask yet, because we would need to refactor error handling in reforis and re-test whole reforis again.
So I propose two approaches
* either endpoints will return either `{'result': True}` or string with error message (e.g. `Cannot add lease`). It won't be the great UX at the moment, but we could add better error handling as separate MR.
* or return either `{'result': True}` on success or `{'result': False, 'reason': 'reason-what-went-wrong'}` on failure and handle that failure in JS - effectively bypassing API errors
cc: @msasek, @agumroian
Part of https://gitlab.nic.cz/turris/reforis/reforis/-/issues/168reForis 1.3.0Aleksandr GumroianAleksandr Gumroianhttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/292Fix time expiration for static leases in both DHCP tables2021-12-08T11:55:24+01:00Aleksandr GumroianFix time expiration for static leases in both DHCP tablesCloses: https://gitlab.nic.cz/turris/reforis/reforis/-/issues/313, https://gitlab.nic.cz/turris/reforis/reforis/-/issues/368Closes: https://gitlab.nic.cz/turris/reforis/reforis/-/issues/313, https://gitlab.nic.cz/turris/reforis/reforis/-/issues/368Aleksandr GumroianAleksandr Gumroianhttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/291Bump v1.1.32021-11-16T11:32:02+01:00Marek SasekBump v1.1.3* NPM audit fix* NPM audit fixhttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/290Revert "NPM audit fix"2021-11-15T17:28:48+01:00Aleksandr GumroianRevert "NPM audit fix"As the latest npm audit fix was problematic, this reverts that commit 73e6cdeb94c31fdb899d5a58eda7fe56743432a9.As the latest npm audit fix was problematic, this reverts that commit 73e6cdeb94c31fdb899d5a58eda7fe56743432a9.https://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/289WAN.js language reworked2022-01-22T16:05:05+01:00Allan NordhøyWAN.js language reworkedAleksandr GumroianAleksandr Gumroianhttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/288Add & update translations2021-11-09T14:25:22+01:00Marek SasekAdd & update translationsAleksandr GumroianAleksandr Gumroianhttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/287Bump v1.1.22021-11-09T17:26:38+01:00Marek SasekBump v1.1.2* Add external link to UserOptions
* Improve intro description of Packages
* Provide info whether user is logged in to JS
* Add & update translations
* Add light/dark favicon switch
* backend.py: new linter version requires encoding
* Fi...* Add external link to UserOptions
* Improve intro description of Packages
* Provide info whether user is logged in to JS
* Add & update translations
* Add light/dark favicon switch
* backend.py: new linter version requires encoding
* Fix python linting f-string errors
* Rename Data Collection card to Threat Detection
* Don't set socket when starting WSGIServer
* Respond with 401 and rename the file
* NPM audit fixhttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/286Improve some drop-downs ordering2022-01-10T19:16:43+01:00Marek SasekImprove some drop-downs orderingIt closes https://gitlab.nic.cz/turris/reforis/reforis/-/issues/345.
This can be merged after [this foris-js MR](https://gitlab.nic.cz/turris/reforis/foris-js/-/merge_requests/168) is merged.It closes https://gitlab.nic.cz/turris/reforis/reforis/-/issues/345.
This can be merged after [this foris-js MR](https://gitlab.nic.cz/turris/reforis/foris-js/-/merge_requests/168) is merged.Aleksandr GumroianAleksandr Gumroianhttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/285Rename Data Collection card to Threat Detection2021-09-30T09:54:00+02:00Marek SasekRename Data Collection card to Threat DetectionIt arises from [this comment](https://gitlab.nic.cz/turris/os/org/-/issues/3#note_226817).It arises from [this comment](https://gitlab.nic.cz/turris/os/org/-/issues/3#note_226817).Aleksandr GumroianAleksandr Gumroianhttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/284Don't set socket when starting WSGIServer2021-09-06T11:32:39+02:00Štěpán HenekDon't set socket when starting WSGIServerNote that if reforis is started using lighttpd, lighttpd
is responsible for creating the socket not reforis.
Kudos to Glenn Strauss
see https://flask.palletsprojects.com/en/2.0.x/deploying/fastcgi/#configuring-lighttpdNote that if reforis is started using lighttpd, lighttpd
is responsible for creating the socket not reforis.
Kudos to Glenn Strauss
see https://flask.palletsprojects.com/en/2.0.x/deploying/fastcgi/#configuring-lighttpdAleksandr GumroianAleksandr Gumroianhttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/283improve handling of loading translations2022-02-09T15:34:57+01:00Martin Matějekimprove handling of loading translationsImprove handling of loading translations by at least simple validation of loaded message catalog.
Fixes crash when .mo files are missing and also properly loads plugins
.mo files, so they are now actually passed to reForis UI.
related ...Improve handling of loading translations by at least simple validation of loaded message catalog.
Fixes crash when .mo files are missing and also properly loads plugins
.mo files, so they are now actually passed to reForis UI.
related to #356
closes #357Aleksandr GumroianAleksandr Gumroianhttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/282Make the unauthenticated page respond with a HTTP 4012021-10-04T11:43:29+02:00Filip TroníčekMake the unauthenticated page respond with a HTTP 401More info in #352.More info in #352.https://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/281Remove reForis login page2021-12-15T17:43:08+01:00Marek SasekRemove reForis login pageThere will be the new separated login instead of reForis current login page.
It closes https://gitlab.nic.cz/turris/reforis/reforis/-/issues/355.There will be the new separated login instead of reForis current login page.
It closes https://gitlab.nic.cz/turris/reforis/reforis/-/issues/355.Aleksandr GumroianAleksandr Gumroianhttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/280backend.py: new linter version requires encoding2021-08-27T16:10:46+02:00Aleksandr Gumroianbackend.py: new linter version requires encodingThis fixes the [lint issue](https://gitlab.nic.cz/turris/reforis/reforis/-/jobs/591885#L662) (unspecified-encoding) while doing the `make lint-web` command. Probably caused by the update of pylint.This fixes the [lint issue](https://gitlab.nic.cz/turris/reforis/reforis/-/jobs/591885#L662) (unspecified-encoding) while doing the `make lint-web` command. Probably caused by the update of pylint.Aleksandr GumroianAleksandr Gumroianhttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/279Add ability to set static leases2022-05-31T13:35:04+02:00Marek SasekAdd ability to set static leasesIt closes https://gitlab.nic.cz/turris/reforis/reforis/-/issues/168.
Should be tested with https://gitlab.nic.cz/turris/foris-controller/foris-controller/-/merge_requests/96 & https://gitlab.nic.cz/turris/reforis/reforis/-/merge_request...It closes https://gitlab.nic.cz/turris/reforis/reforis/-/issues/168.
Should be tested with https://gitlab.nic.cz/turris/foris-controller/foris-controller/-/merge_requests/96 & https://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/293reForis 1.3.0Aleksandr GumroianAleksandr Gumroianhttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/278Add light/dark favicon switch2021-08-25T11:43:44+02:00Aleksandr GumroianAdd light/dark favicon switchAdd light/dark favicon switch if the browser is using dark mode.
You can test it via DevTools -> More tools -> Rendering -> Emulate CSS media feature prefers-colors-scheme (dark/light).
Please don't forget to restart the webserver (Lig...Add light/dark favicon switch if the browser is using dark mode.
You can test it via DevTools -> More tools -> Rendering -> Emulate CSS media feature prefers-colors-scheme (dark/light).
Please don't forget to restart the webserver (Lighttpd) after uploading HTML files on the router.
Closes: https://gitlab.nic.cz/turris/reforis/reforis/-/issues/220.Aleksandr GumroianAleksandr Gumroianhttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/277Add & update translations2021-08-13T10:46:39+02:00Aleksandr GumroianAdd & update translationsAleksandr GumroianAleksandr Gumroianhttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/276Language and parsing fixes for Password.js2022-01-25T16:03:44+01:00Allan NordhøyLanguage and parsing fixes for Password.jsAleksandr GumroianAleksandr Gumroianhttps://gitlab.nic.cz/turris/reforis/reforis/-/merge_requests/275Draft: Add Configuration Backup & Restore sections2022-02-23T13:20:01+01:00Aleksandr GumroianDraft: Add Configuration Backup & Restore sectionsIn this MR, we're adding configuration backup and restore sections on the Maintenance page.
Closes: https://gitlab.nic.cz/turris/reforis/reforis/-/issues/225In this MR, we're adding configuration backup and restore sections on the Maintenance page.
Closes: https://gitlab.nic.cz/turris/reforis/reforis/-/issues/225Aleksandr GumroianAleksandr Gumroian