mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-11 05:56:57 +03:00
consolidate test-ip definition, added missing Access-Control-Allow-Origin,
This commit is contained in:
@@ -40,20 +40,18 @@ input[type=number] {
|
||||
</body>
|
||||
|
||||
|
||||
<script src="common.js"></script>
|
||||
<script src="jszip.min.js"></script>
|
||||
<script src="FileSaver.min.js"></script>
|
||||
<script>
|
||||
|
||||
//var domain = "http://192.168.1.153"; // Testing
|
||||
var domain = "";
|
||||
|
||||
function startBackup() {
|
||||
document.getElementById("progress").innerHTML = "Creating backup...<br>\n";
|
||||
|
||||
// Get hostname
|
||||
try {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.open("GET", domain + "/info?type=Hostname", false);
|
||||
xhttp.open("GET", getDomainname() + "/info?type=Hostname", false);
|
||||
xhttp.send();
|
||||
hostname = xhttp.responseText;
|
||||
}
|
||||
@@ -72,7 +70,7 @@ function startBackup() {
|
||||
setStatus("Fetching File List...");
|
||||
try {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.open("GET", domain + "/fileserver/config/", false);
|
||||
xhttp.open("GET", getDomainname() + "/fileserver/config/", false);
|
||||
xhttp.send();
|
||||
|
||||
var parser = new DOMParser();
|
||||
@@ -88,7 +86,7 @@ function startBackup() {
|
||||
|
||||
for (a of list) {
|
||||
url = a.getAttribute("href");
|
||||
urls.push(domain + url);
|
||||
urls.push(getDomainname() + url);
|
||||
}
|
||||
|
||||
// Pack as zip and download
|
||||
|
||||
Reference in New Issue
Block a user