diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index eb2d1624..5ba1f356 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -58,6 +58,10 @@ jobs: #run: echo "Testing... ${{ github.ref_name }}, ${{ steps.vars.outputs.sha_short }}" > ./sd-card/html/version.txt; mkdir -p ./code/.pio/build/esp32cam/; cd ./code/.pio/build/esp32cam/; echo "${{ steps.vars.outputs.sha_short }}" > firmware.bin; cp firmware.bin partitions.bin; cp firmware.bin bootloader.bin # Testing run: cd code; platformio run --environment esp32cam + - name: Set Hash in all Web UI files + run: cd sd-card/html; find . -type f -exec sed -i 's/$COMMIT_HASH/${{ steps.vars.outputs.sha_short }}/g' {} \; + + - name: Store generated files in cache uses: actions/cache@v3 with: @@ -65,7 +69,7 @@ jobs: ./code/.pio/build/esp32cam/firmware.bin ./code/.pio/build/esp32cam/partitions.bin ./code/.pio/build/esp32cam/bootloader.bin - ./sd-card/html/version.txt + ./sd-card/html/* key: ${{ github.run_number }} @@ -91,7 +95,7 @@ jobs: ./code/.pio/build/esp32cam/firmware.bin ./code/.pio/build/esp32cam/partitions.bin ./code/.pio/build/esp32cam/bootloader.bin - ./sd-card/html/version.txt + ./sd-card/html/* key: ${{ github.run_number }} - name: Set Variables @@ -149,7 +153,7 @@ jobs: ./code/.pio/build/esp32cam/firmware.bin ./code/.pio/build/esp32cam/partitions.bin ./code/.pio/build/esp32cam/bootloader.bin - ./sd-card/html/version.txt + ./sd-card/html/* key: ${{ github.run_number }} - name: Set Variables @@ -202,7 +206,7 @@ jobs: ./code/.pio/build/esp32cam/firmware.bin ./code/.pio/build/esp32cam/partitions.bin ./code/.pio/build/esp32cam/bootloader.bin - ./sd-card/html/version.txt + ./sd-card/html/* key: ${{ github.run_number }} - name: Set Variables diff --git a/sd-card/html/backup.html b/sd-card/html/backup.html index fccfced5..b5622027 100644 --- a/sd-card/html/backup.html +++ b/sd-card/html/backup.html @@ -1,7 +1,7 @@ - + Backup/Restore Configuration @@ -40,9 +40,9 @@ input[type=number] { - - - + + + +
@@ -38,14 +38,14 @@ - +



Loading Data file, please wait...
diff --git a/sd-card/html/edit_alignment.html b/sd-card/html/edit_alignment.html index a21c7ad2..d76682a3 100644 --- a/sd-card/html/edit_alignment.html +++ b/sd-card/html/edit_alignment.html @@ -1,7 +1,7 @@ - + Make Alignment @@ -41,9 +41,9 @@ select { font-size: 16px; } - - - + + + @@ -95,9 +95,9 @@ select { - - - + + + - + + + @@ -142,9 +142,9 @@ th, td { - - - + + + - + + - + + + @@ -43,8 +43,8 @@ textarea { - - + + - + + + @@ -1368,7 +1368,7 @@ textarea { Time zone in POSIX syntax (Europe/Berlin = "CET-1CEST,M3.5.0,M10.5.0/3" - incl. daylight saving)
- Use this table to find the settings for your region. + Use this table to find the settings for your region. @@ -1429,9 +1429,9 @@ textarea { - - - + + + - + + + @@ -133,11 +133,11 @@ th, td { - - - + + + - + - + + + @@ -44,9 +44,9 @@ p {font-size: 1em;}

- - - + + + - + + + @@ -95,9 +95,9 @@ table { - - - + + + diff --git a/sd-card/html/explain_1.html b/sd-card/html/explain_1.html index 7f21fdae..3cace8c1 100644 --- a/sd-card/html/explain_1.html +++ b/sd-card/html/explain_1.html @@ -1,7 +1,7 @@ - + AI on the edge diff --git a/sd-card/html/explain_2.html b/sd-card/html/explain_2.html index 2be8e775..766bfa43 100644 --- a/sd-card/html/explain_2.html +++ b/sd-card/html/explain_2.html @@ -1,7 +1,7 @@ - + AI on the edge diff --git a/sd-card/html/explain_3.html b/sd-card/html/explain_3.html index 308ec531..9c10b91c 100644 --- a/sd-card/html/explain_3.html +++ b/sd-card/html/explain_3.html @@ -1,7 +1,7 @@ - + AI on the edge diff --git a/sd-card/html/explain_4.html b/sd-card/html/explain_4.html index 73bb26e9..d1b787b6 100644 --- a/sd-card/html/explain_4.html +++ b/sd-card/html/explain_4.html @@ -1,7 +1,7 @@ - + AI on the edge diff --git a/sd-card/html/explain_5.html b/sd-card/html/explain_5.html index f913c0cd..118e1be0 100644 --- a/sd-card/html/explain_5.html +++ b/sd-card/html/explain_5.html @@ -1,7 +1,7 @@ - + AI on the edge diff --git a/sd-card/html/explain_6.html b/sd-card/html/explain_6.html index 71737441..2355fcfb 100644 --- a/sd-card/html/explain_6.html +++ b/sd-card/html/explain_6.html @@ -1,7 +1,7 @@ - + AI on the edge diff --git a/sd-card/html/file_server.html b/sd-card/html/file_server.html index 51d5009f..51cf37c5 100644 --- a/sd-card/html/file_server.html +++ b/sd-card/html/file_server.html @@ -1,8 +1,8 @@ - - - + + + - +
diff --git a/sd-card/html/ota_page.html b/sd-card/html/ota_page.html index 5c60f79c..e5f14006 100644 --- a/sd-card/html/ota_page.html +++ b/sd-card/html/ota_page.html @@ -1,7 +1,7 @@ - + OTA Update @@ -26,10 +26,10 @@ } - - - - + + + + @@ -183,7 +183,7 @@ xhttp.onreadystatechange = function() { if (xhttp.readyState == 4) { if (xhttp.status == 200) { - document.cookie = "page=overview.html" + "; path=/"; // Make sure after the reboot we go to the overview page + document.cookie = "page=overview.html?v=$COMMIT_HASH" + "; path=/"; // Make sure after the reboot we go to the overview page if (xhttp.responseText.startsWith("reboot")) { // Reboot required console.log("Upload completed, the device will now restart and install the update!"); @@ -201,8 +201,8 @@ if (action_runtime > 10) { // After 10 seconds, start to check if we are up again /* Check if the device is up again and forward to index page if so */ - fetch('reboot_page.html?' + Math.random(), {mode: 'no-cors'}).then( - r=>{parent.location.href=('index.html');} + fetch('reboot_page.html?v=$COMMIT_HASH&' + Math.random(), {mode: 'no-cors'}).then( + r=>{parent.location.href=('index.html?v=$COMMIT_HASH');} ) } diff --git a/sd-card/html/overview.html b/sd-card/html/overview.html index cf949350..1ad4eb44 100644 --- a/sd-card/html/overview.html +++ b/sd-card/html/overview.html @@ -1,7 +1,7 @@ - + Overview @@ -68,9 +68,9 @@ - - - + + + - + + + - - - + + + + diff --git a/sd-card/html/setup.html b/sd-card/html/setup.html index 1559138b..d64e893f 100644 --- a/sd-card/html/setup.html +++ b/sd-card/html/setup.html @@ -1,7 +1,7 @@ - + AI on the edge @@ -29,7 +29,7 @@ p {font-size: 1em;} - + @@ -58,7 +58,7 @@ p {font-size: 1em;} - + + - + + +

Digitizer - Initial Setup

An ESP32 all inclusive neural network recognition system for meter digitalization

@@ -59,7 +59,7 @@ if (!file.name.includes("remote-setup")){ document.getElementById("status").innerText = "Status: Update completed!"; document.getElementById("doUpdate").disabled = true; document.getElementById("newfile").disabled = false; - document.cookie = "page=overview.html" + "; path=/"; // Make sure after the reboot we go to the overview page + document.cookie = "page=overview.html?v=$COMMIT_HASH" + "; path=/"; // Make sure after the reboot we go to the overview page if (xhttp.responseText.startsWith("reboot")) {