Commit Graph

102 Commits

Author SHA1 Message Date
Jason Rhubottom b18172304e Changed paths to relative to support home-assistant ingress (#179) 2024-08-25 09:55:17 +02:00
Alexandre b77f579e35 Feat : limit the number of audio files to keep per species (#121)
* New disk usage settings

* Use sudo for rm, just in case

* Remove set -x

* Correct code for png

* Correct today

* Correct dates

* Accepts date format of different distributions

* Avoid message

* Very significant processing time optimisation

* Update disk_species_clean.sh

* Avoid locking database

* Update disk_species_clean.sh

* Disable set -x (again)

* Add number of remaining files

* Add new variables to update_birdnet_snippets.sh

* Consolidate disk management elements

* Update disk_species_clean.sh

* Update disk_species_clean.sh

* Protect last 7 days

* Add options to advanced.php, in same style

* Remove from config

* Update config.php

* Reset max_disk_usage to hard 95

* Improve layout

* Remove automatic addition of MAX_FILE_SPECIES if not defined https://github.com/alexbelgium/hassio-addons/issues/1458

* Cosmetic white-listed changed to whitelist

* Add comma in text

* Update scripts/advanced.php

Co-authored-by: Nachtzuster <Nachtzuster@users.noreply.github.com>

* Update crontab if less than 5 #birdnet occurence (= all scripts not installed)

* Made .sh file executable

* Remove unused field k5 (second field of year) ; add explanations

* Call functions without ()

* Uninstall current cron before reinstalling them

* Update update_birdnet_snippets.sh

* Use $HOME instead of $mydir

---------

Co-authored-by: Nachtzuster <Nachtzuster@users.noreply.github.com>
2024-07-12 18:18:27 +02:00
Alexandre 18693fae06 Feat : add species whitelist (#110)
* Add white_list to server.py

https://github.com/Nachtzuster/BirdNET-Pi/issues/108

* Create whitelist_list.php

* Add whitelist to views

* Make more explicit the usage

* Update views.php

* Align with uppercase

* Align with "species"

https://github.com/Nachtzuster/BirdNET-Pi/issues/108

* Update views.php

* Correct python code

https://github.com/Nachtzuster/BirdNET-Pi/issues/108

* Align clear_all_data.sh

* Align install_services.sh

* Embed whitelist_species_list in PREDICTED_SPECIES_LIST

* Only embed whitelist in predicted list

* Correct python append @dalogue1

https://github.com/Nachtzuster/BirdNET-Pi/issues/108#issuecomment-2183508903

* Update scripts/server.py

Co-authored-by: Nachtzuster <Nachtzuster@users.noreply.github.com>

* Use preexisting functions

Co-authored-by: Nachtzuster <Nachtzuster@users.noreply.github.com>

* Alert not a recommended WoW

---------

Co-authored-by: Nachtzuster <Nachtzuster@users.noreply.github.com>
2024-06-30 10:18:32 +02:00
Alexandre f84c44bad4 Feature proposal : darkmode (#85)
* Create dark-style.css

* Add call to get_color_scheme

* Add call to get_color_scheme

* Create get_color_scheme function

* Add selection box in config.php

* Accept both lower and uppercase COLOR_SCHEME

* Add COLOR_SCHEME

* Add COLOR_SCHEME

* Change birdnet.conf after color scheme selection

* Move css to static to enable it

* Adapt css location to static

* Improve opacity value

* Fix logo background issues on smaller screens

* Avoid overlap of logos

* Ensure clean look (same margin as before but different location)

* Default background as transparent to avoid white on white

* Avoid black on dark ; improve readability

* Last element of green is homogenized to grayscale

* Enable site reload after color_scheme change
2024-06-08 11:44:21 +02:00
Alexandre a06b5bacf4 Feat : Add Weekly report button in views.php (#73)
* Add Weekly report button

* Put weekly report next to daily charts

https://github.com/Nachtzuster/BirdNET-Pi/pull/73
2024-06-02 10:48:41 +02:00
Alexandre eeb2048ca6 Adminer iframe ? (#78)
* Show Adminer in iframe

* Add a link to open in a new page if needed

* X-Frame-Options to SameOrigin

* Use uppercase as per standard
2024-06-01 09:03:54 +02:00
frederik a22c7c089f fix topnav formatting 2024-04-10 13:04:08 +02:00
frederik 665184f360 fix: ignore y-swipes and scrolls 2024-04-10 08:30:56 +02:00
frederik b0fcf9551e fix 2024-04-09 17:52:39 +02:00
frederik ba2081148c cleanup spinner 2024-04-09 17:52:39 +02:00
frederik 4f8300d5a1 views.php: cleanup html 2024-04-09 17:52:39 +02:00
frederik 464b2240d8 convert to standard html 2024-04-09 17:52:39 +02:00
frederik 5f03b703f2 convert views.php 2024-03-29 13:21:18 +01:00
Nachtzuster 26311d4cd1 Added swipeL + swipeR + arrowL + arrowR events to DailyCharts form (#22)
* Added swipeL + swipeR + arrowL + arrowR events to DailyCharts form

* Added swipeL + swipeR + arrowL + arrowR events to DailyCharts form

* changed indicator from div to img, using spinner.gif

* changed indicator from div to img, using spinner.gif

* invert swipe directions

---------

Co-authored-by: Louis Croisez <louis.croisez@gmail.com>
2024-03-17 09:34:56 +01:00
frederik 68e61d2517 only check git when logged in 2024-03-09 13:17:49 +01:00
frederik 1ff01f1b4f make sure config is defined 2024-03-09 13:17:49 +01:00
frederik 1d2c2d6faa make casual git checking non-blocking-y, also check every 24h 2024-03-09 13:17:49 +01:00
frederik 421575423c fix: do not rely on /etc/timezone to get the time zone. timedatectl does not update it immediately (anymore), it only gets updated after a reboot 2024-02-24 11:31:36 +01:00
frederik 189ef116d0 Add ram drive support in the ui 2024-02-13 18:06:57 +01:00
frederik 18c51f80d1 fix: un-escape quotes before writing to file 2024-02-13 10:57:35 +01:00
frederik da80128436 remove obsolete services 2024-02-13 10:57:35 +01:00
ehpersonal38 5336736b38 reinstate scrollbars 2023-06-01 22:30:24 -04:00
ehpersonal38 f050a60cc1 Revert "fix the things"
This reverts commit 88ccda11f3.
2023-05-28 13:40:16 -04:00
ehpersonal38 509a63e4f4 fix # of updates needed text overflow if > 99 2023-05-27 21:44:58 -04:00
ehpersonal38 88ccda11f3 fix the things 2023-05-25 15:54:54 -04:00
lloydbayley ed9b7c8055 Security Fixes, Mainly 2023-05-22 23:55:11 +10:00
ehpersonal38 9c1f4175e2 Revert "Code Consolidation for API preparations & hard coded path replacements" 2023-05-19 20:03:02 -04:00
jaredb7 a80d39d7b6 Replace all authentication code with a function that does the auth for us
Makes things a little tidier and easier to change in the future, a custom message can be passed to authenticateUser() and this is output if the authentication fails.

Added protection around Include and Exclude species pages as these still accessible & data can still be written to include and exclude species.txt even with a password.
2023-05-13 01:07:19 +10:00
jaredb7 eee84587f9 Merge branch 'BirdNET-pi-main' into New-UI-API
# Resolve Conflicts due to code movement:
#	homepage/views.php
#	scripts/config.php
#	scripts/play.php
2023-05-10 22:57:49 +10:00
ehpersonal38 4cc4406083 Update views.php 2023-05-09 13:58:24 -04:00
jaredb7 69c4a6d3b1 Move remaining files to use new code
Include and Exclude list updated to use the calculated path to their respective x_species_list.txt files

Move play.php over to also use the new calculated paths to disk_check_exclude

Spectrogram.php remove unused code & replace setting save code with new function

Stats.php removed old code, update paths to use calculated path.

Rename setSetting func to saveSetting
Remove old code from other pages
2023-05-09 20:29:57 +10:00
jaredb7 ac9a0e4cbe Consolidate code in remaining pages, setting page updates
The Config and Advanced setting pages received changes to use the new setSetting() function which looks after creating or updated the setting in the required config files.
Optionally it also specification of a command to run after saving the settings.
Some variables like models, audio formats and frequency shift tools were also moved into common.php

Service Controls page received changes with the replacement of the actual command to execute with a sort of shorthand human friendly version e.g. service <action> <service_name> -- service restart livestream.service

These commands map to the original commands in serviceMaintenance() so this could be called through the API without needing the full-blown commend.
views.php was updated to accommodate this also

System Controls page received a small change to make the process checking for new git updates or getting the last commit hash a single function call.

Include and Exclude species updated to use getFilePath() to generate a path to the required file instead of the hard coded path

Views.php also received similar treatment with replacing some hard coded paths with generated paths, but logic changes to handle the change in running service commands
2023-05-08 23:24:15 +10:00
ehpersonal38 712121e432 warn user on every page if lon/lat aren't set 2023-04-17 11:05:46 -04:00
ehpersonal38 9359f78a59 more cache busting
Co-Authored-By: Jared <799998+jaredb7@users.noreply.github.com>
2023-04-10 21:26:15 -04:00
jaredb7 94481bf915 Update service restart command to support multi service resstart
When restarting the Livestream service, the IceCast2 is restarted too, after fixing command to restart IceCast only it's status returned (since it's the last service)

Added in a small loop to try get both the service names so we can get the status of both.
2023-04-09 21:59:59 +10:00
jaredb7 d16d4f60a3 Fix error when restarting the Live Stream service
Changed command to use systemctl to restart the icecast2 service, the error wasn't fatal but just made it look like restarting the live stream service had failed.
2023-04-08 11:14:04 +10:00
jaredb7 7972452d61 Merge branch 'BirdNET-pi-main' into Misc-Fixes-and-Enhancements__mcguirepr89- 2023-04-07 08:50:29 +10:00
ehpersonal38 815e744755 nocache for this update 2023-04-06 14:46:55 -04:00
jaredb7 e695852d19 Make PHP use the systems timezone setting
The timezone in the PHP INI file could differ from the timezone set on the system itself and result incorrect time display on webpages and wherever date functions are used.

Simple fix to read the systems timezone and make PHP use the correct one.
2023-04-02 00:27:08 +10:00
ehpersonal38 e799b7154a Patching minor XSS vulnerability
The update output shows the name of the current commit your local installation is on. So if a commit is named <script>alert("xss");</script>, for example, that code will execute when someone updates their installation.

Not a huge deal since we'd notice if someone made a rogue pull request with any commit names like that before ever accepting it into the repo.
2023-03-07 18:57:50 -05:00
ehpersonal38 77356659a2 Switching <b> for font-weight:bold 2023-03-07 18:26:55 -05:00
ehpersonal38 7e825d6009 Handle # of commits behind by, in case the main branch is amended/rebased 2023-03-07 18:20:51 -05:00
ehpersonal38 5e40772b42 More colorizing 2023-03-06 18:21:26 -05:00
ehpersonal38 73bd2a4e2c Fixing colorize bugs - it works now! 2023-03-06 18:10:14 -05:00
ehpersonal38 60700ac2bc Trying to colorize diff --stat in Update output 2023-03-06 16:51:02 -05:00
ehpersonal38 292e63c76c better update count 2023-02-15 11:54:03 -05:00
ehpersonal38 b11ae6c10f issue #704 2023-01-20 14:37:26 -05:00
ehpersonal38 18d933759c kiosk mode 2023-01-11 17:44:48 -05:00
ehpersonal38 9ffdc928bf update timer 2022-08-05 15:01:34 -04:00
ehpersonal38 29358943ba password obfuscation in advanced 2022-07-24 13:17:17 -04:00