Skip to content

A live bird collage card for your Home Assistant dashboard.

adding data backup button -- restore button coming soon edited php headers for new homepage layout

Patrick McGuirefaf1d16a867c
diff --git a/homepage/index.html b/homepage/index.html
index 5c6892a8..580efa5b 100644
--- a/homepage/index.html
+++ b/homepage/index.html
@@ -24,7 +24,7 @@ Note the following:
<frame name="topNav" src="top.html" scrolling="off">
<frameset cols="150,*" frameborder="0" border="0" framespacing="0">
<frame name="menu" src="menu.html" marginheight="0" marginwidth="0" scrolling="auto" noresize>
- <frame name="content" src="http://birdnetpi.local/viewdb.php" marginheight="0" marginwidth="0" scrolling="auto" noresize>
+ <frame name="content" src="/viewdb.php" marginheight="0" marginwidth="0" scrolling="auto" noresize>
</frameset>
<frame name="footer" src="footer.html" scrolling="off">
diff --git a/scripts/clear_all_data.php b/scripts/clear_all_data.php
index 4a187dea..b0be43d7 100644
--- a/scripts/clear_all_data.php
+++ b/scripts/clear_all_data.php
@@ -1,4 +1,4 @@
<?php
shell_exec("/home/pi/BirdNET-Pi/scripts/clear_all_data.sh");
-header('Location: http://birdnetpi.local/scripts/index.html?success=true');
+header('Location: /viewdb.php');
?>
diff --git a/scripts/index.html b/scripts/index.html
index 9690b51f..be416832 100644
--- a/scripts/index.html
+++ b/scripts/index.html
@@ -27,6 +27,10 @@
<input type="submit" value="Restart Caddy">
</form>
+<form action="/scripts/backup_data.php" onclick="return confirm('Backup ALL Data? Warning: This could take a long time.')">
+ <input type="submit" value="Backup ALL data">
+</form>
+
<form action="/scripts/clear_all_data.php" onclick="return confirm('Clear ALL Data? This cannot be undone.')">
<input type="submit" value="Clear ALL data">
</form>
diff --git a/scripts/reboot_system.php b/scripts/reboot_system.php
index df7c8d0c..e7f56d89 100644
--- a/scripts/reboot_system.php
+++ b/scripts/reboot_system.php
@@ -1,4 +1,3 @@
<?php
shell_exec("/home/pi/BirdNET-Pi/scripts/reboot_system.sh");
-header('Location: http://birdnetpi.local/scripts/index.html?success=true');
?>
diff --git a/scripts/restart_birdnet_analysis.php b/scripts/restart_birdnet_analysis.php
index d495ba97..f99e0136 100644
--- a/scripts/restart_birdnet_analysis.php
+++ b/scripts/restart_birdnet_analysis.php
@@ -1,4 +1,4 @@
<?php
shell_exec("/home/pi/BirdNET-Pi/scripts/restart_birdnet_analysis.sh");
-header('Location: http://birdnetpi.local/scripts/index.html?success=true');
+header('Location: /viewdb.php');
?>
diff --git a/scripts/restart_birdnet_recording.php b/scripts/restart_birdnet_recording.php
index b3a5a6e0..1712058d 100644
--- a/scripts/restart_birdnet_recording.php
+++ b/scripts/restart_birdnet_recording.php
@@ -1,4 +1,4 @@
<?php
shell_exec("/home/pi/BirdNET-Pi/scripts/restart_birdnet_recording.sh");
-header('Location: http://birdnetpi.local/scripts/index.html?success=true');
+header('Location: /viewdb.php');
?>
diff --git a/scripts/restart_caddy.php b/scripts/restart_caddy.php
index 80b539f1..fa9f6d25 100644
--- a/scripts/restart_caddy.php
+++ b/scripts/restart_caddy.php
@@ -1,4 +1,4 @@
<?php
shell_exec("/home/pi/BirdNET-Pi/scripts/restart_caddy.sh");
-header('Location: http://birdnetpi.local/scripts/index.html?success=true');
+header('Location: /viewdb.php');
?>
diff --git a/scripts/restart_extraction.php b/scripts/restart_extraction.php
index 83af5487..f52aa58a 100644
--- a/scripts/restart_extraction.php
+++ b/scripts/restart_extraction.php
@@ -1,4 +1,4 @@
<?php
shell_exec("/home/pi/BirdNET-Pi/scripts/restart_extraction.sh");
-header('Location: http://birdnetpi.local/scripts/index.html?success=true');
+header('Location: http://birdnetpi.local:8888');
?>
diff --git a/scripts/restart_services.php b/scripts/restart_services.php
index 2f9caf4c..c1e7b55a 100644
--- a/scripts/restart_services.php
+++ b/scripts/restart_services.php
@@ -1,4 +1,4 @@
<?php
shell_exec("/home/pi/BirdNET-Pi/scripts/restart_services.sh");
-header('Location: http://birdnetpi.local/scripts/index.html?success=true');
+header('Location: /viewdb.php');
?>
diff --git a/scripts/shutdown_system.php b/scripts/shutdown_system.php
index f344edc9..74ce980b 100644
--- a/scripts/shutdown_system.php
+++ b/scripts/shutdown_system.php
@@ -1,4 +1,3 @@
<?php
shell_exec("/home/pi/BirdNET-Pi/scripts/shutdown_system.sh");
-header('Location: http://birdnetpi.local/scripts/index.html?success=true');
?>