Commit Graph

139 Commits

Author SHA1 Message Date
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 e99129f5f5 Config.php - Replace apprise.txt hard-coded paths with calculated paths 2023-05-10 23:05:22 +10:00
jaredb7 92bd190334 Authenticate user for all system actions
Wired in an additional check to verify user is authenticated before executing any code that makes changes to the system like saving settings or command execution.
This is a 2nd layer on top of the front end pages authenticating the user

Added in escaping of arguments for set date and change timezone just in case
2023-05-10 23:02:11 +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 3fb6889364 Merge branch 'BirdNET-pi-main' into New-UI-API
Install langauge code was moved into a different file, updated changeLanguage() in common.php by removing sudo from 3K model language install.
2023-05-09 07:32:20 +10:00
ehpersonal38 8c4e457c1a removing sudo 2023-05-08 13:32:22 -04:00
jaredb7 b4977a62b6 Remove unused code from config.php 2023-05-08 23:32:56 +10:00
jaredb7 31730d58de Merge branch 'BirdNET-pi-main' into New-UI-API 2023-05-08 23:25:12 +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
gerritzen ef3916a043 Fixed year number 2023-05-03 23:58:49 +02:00
ehpersonal38 6d3857b86e Apprise ONLY notify for certain species 2023-05-02 15:51:10 -04:00
ehpersonal38 c016427083 Model Update: V2.3
note for me:
for f in BirdNET_GLOBAL_3K_V2.3_Labels_*.txt; do mv -- "$f" "labels_${f#BirdNET_GLOBAL_3K_V2.3_Labels_}"; done
2023-04-24 14:09:24 -04:00
ehpersonal38 c87d507b0b allow user to view Weekly Report page 2023-04-12 22:00:47 -04:00
ehpersonal38 f8e68551a3 Revert "Revert "Merge pull request #829 from lloydbayley/main""
This reverts commit 712f4b034a.
2023-04-07 21:24:49 -04:00
ehpersonal38 712f4b034a Revert "Merge pull request #829 from lloydbayley/main"
This reverts commit 3abc483ef5, reversing
changes made to 21beea2f2d.
2023-04-07 21:08:42 -04:00
lloydbayley a4b18fb066 Update config.php
Tidy Up UI
2023-04-07 23:22:47 +10:00
jaredb7 698cce0b65 Update config.php
Fix the request URL used to restart php once the settings have been saved
2023-04-01 22:14:35 +10:00
ehpersonal38 a45018b473 making things more secure 2023-03-30 14:15:01 -04:00
ehpersonal38 2a1d1693fe Fixing time display issues 2023-03-27 16:03:25 -04:00
ehpersonal38 a65d070837 Apprise exclude these species instead of include 2023-03-21 22:04:16 -04:00
smashery bd0d44b9c9 Fix de-sync between models and labels 2023-03-21 16:48:24 +11:00
ehpersonal38 2e10298b7b Apprise ONLY notify for certain species 2023-03-20 16:12:15 -04:00
ehpersonal38 f47b7b8f01 Forgot to add 'target="_blank"' to <a> 2023-03-13 14:43:59 -04:00
ehpersonal38 1001afd957 Update model descriptions in Tools -> Settings 2023-03-12 19:32:58 -04:00
ehpersonal38 35103c3efd Revert "Revert "Merge pull request #724 from knmurphy/enable-apprise-plugins""
This reverts commit e61a92475c.
2023-02-15 20:14:35 -05:00
ehpersonal38 0fc920f571 Merge branch 'main' of https://github.com/mcguirepr89/BirdNET-Pi 2023-02-15 10:34:06 -05:00
ehpersonal38 e61a92475c Revert "Merge pull request #724 from knmurphy/enable-apprise-plugins"
This reverts commit ee63821a69, reversing
changes made to 8491d216c4.
2023-02-15 10:33:50 -05:00
ehpersonal38 9c8f461ded polyfill 2023-02-14 22:24:57 -05:00
ehpersonal38 b1d6a5aca5 species list tester 2023-02-14 21:57:33 -05:00
Kevin N. Murphy 1b4c57f129 loading plugins with test button 2023-02-03 15:36:20 -08:00
ehpersonal38 dc70f262c0 Update config.php 2023-02-03 13:16:34 -05:00
ehpersonal38 3a687743fa Update config.php 2023-02-02 13:06:31 -05:00
ehpersonal38 0447f248c3 Update config.php 2023-01-19 12:38:57 -05:00
ehpersonal38 dd8c8e16b3 Update config.php 2023-01-19 12:35:41 -05:00
ehpersonal38 8be2a33dfe fix default sf_thresh 2023-01-16 21:16:36 -05:00
ehpersonal38 01dfd4f7c7 Update config.php 2023-01-16 18:54:09 -05:00
ehpersonal38 f7ab0272d0 Update config.php 2023-01-16 18:43:22 -05:00
ehpersonal38 4f57412d78 Update config.php 2023-01-16 13:30:44 -05:00
ehpersonal38 f03f69cc63 fixes 2023-01-16 13:21:44 -05:00
ehpersonal38 b8e54d1ded fixes 2023-01-15 18:48:51 -05:00
ehpersonal38 84d3f763bc Update config.php 2023-01-15 14:35:57 -05:00
ehpersonal38 57963d3513 Update config.php 2023-01-15 14:35:16 -05:00
ehpersonal38 d0fb381cf5 Update config.php 2023-01-15 13:23:36 -05:00
ehpersonal38 797fef4802 SF_THRESH config 2023-01-15 13:22:13 -05:00
ehpersonal38 458bef9a63 Update config.php 2023-01-15 11:07:32 -05:00
ehpersonal38 235b9ca94b Update config.php 2023-01-14 17:22:53 -05:00
ehpersonal38 84763bf5b7 New Model Implementation 2023-01-14 15:22:39 -05:00
ehpersonal38 c12ee56fbc Update config.php 2022-11-17 22:39:34 -05:00