Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add waittime param to ref page + renamed HTML files #2922

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sd-card/html/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
edit_config_param.html
edit_config.html
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ <h2>Configuration</h2>
<label for="ExpertModus_enabled">Show Expert Parameters</label>
</td>
<td>
<button style="display:none;" class="button" id="Edit_Config_Direct" onclick="editConfigDirect()">Edit Config file directly</button>
<button style="display:none;" class="button" id="Button_Edit_Config_Raw" onclick="editConfigRaw()">Edit Config file in raw mode</button>
</td>
</tr>

Expand Down Expand Up @@ -2508,11 +2508,11 @@ <h4><input type="checkbox" id="Category_GPIO_enabled" value="1" onclick='Update
// _style = '';
_style_pur = '';
_hidden = false;
document.getElementById("Edit_Config_Direct").style.display = "";
document.getElementById("Button_Edit_Config_Raw").style.display = "";
firework.launch("Expert view activated. Please use carefully", 'warning', 5000);
}
else {
document.getElementById("Edit_Config_Direct").style.display = "none";
document.getElementById("Button_Edit_Config_Raw").style.display = "none";
}

const expert = document.querySelectorAll(".expert");
Expand Down Expand Up @@ -2568,9 +2568,9 @@ <h4><input type="checkbox" id="Category_GPIO_enabled" value="1" onclick='Update
}


function editConfigDirect() {
if (confirm("Proceed to switch the view? Unsaved changes get lost")) {
var stringota = getDomainname() + "/edit_config.html?v=$COMMIT_HASH";
function editConfigRaw() {
if (confirm("Proceed to switch to raw edit mode? Unsaved changes will get lost")) {
var stringota = getDomainname() + "/edit_config_raw.html?v=$COMMIT_HASH";
window.location = stringota;
window.location.href = stringota;
window.location.assign(stringota);
Expand Down
12 changes: 12 additions & 0 deletions sd-card/html/edit_reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,18 @@ <h2>Reference Image and Camera Settings</h2>
</td>
<td>$TOOLTIP_TakeImage_Sharpness</td>
</tr>
<tr class="expert">
<td>
<label for="TakeImage_WaitBeforeTakingPicture" id="labelTakeImage_WaitBeforeTakingPicture">Wait Before Taking Picture: <b>*)</b></label></td>
<td>
<input required type="number" id="TakeImage_WaitBeforeTakingPicture_value1" size="13" min="0" step="any"
oninput="(!validity.rangeUnderflow||(value=0));">Seconds
</td>
<td>$TOOLTIP_TakeImage_WaitBeforeTakingPicture</td>
<td></td>
<td></td>
<td></td>
</tr>
</table>

<table>
Expand Down
12 changes: 6 additions & 6 deletions sd-card/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
'channelmode=no,directories=no,fullscreen=no,' +
'location=no,dependent=yes,menubar=no,resizable=no,scrollbars=no,' +
'status=no,toolbar=no,titlebar=no,' +
'left=10,top=250,width=640px,height=480px';
'left=10,top=260,width=640px,height=480px';

function loadPage(page) {
console.log("loadPage( " + page + " )");
Expand Down Expand Up @@ -88,21 +88,21 @@ <h2>An ESP32 all inclusive neural network recognition system for meter digitaliz
<ul>
<li><a href="#" onclick="loadPage('overview.html?v=$COMMIT_HASH');">Overview</a></li>
<li><a>Settings <i class="arrow down"></i></a>
<ul class="submenu">
<li><a href="#" onclick="loadPage('prevalue_set.html?v=$COMMIT_HASH');">Set "Previous Value"</a></li>
<li><a href="#" onclick="loadPage('edit_config_param.html?v=$COMMIT_HASH');">Configuration</a></li>
<li><a>Alignment <i class="arrow right"></i></a>
<ul class="submenu" style="width: 260px">
<li style="width: 260px"><a href="#" onclick="loadPage('prevalue_set.html?v=$COMMIT_HASH');">Set "Previous Value"</a></li>
<li style="width: 260px"><a>Reference <i class="arrow right"></i></a>
<ul style="width: 350px">
<li style="width: 350px"><a href="#" onclick="loadPage('edit_reference.html?v=$COMMIT_HASH');">Reference Image and Camera Settings</a></li>
<li style="width: 350px"><a href="#" onclick="loadPage('edit_alignment.html?v=$COMMIT_HASH');">Alignment Markers</a></li>
</ul>
</li>
<li><a><strong>R</strong>egions <strong>O</strong>f <strong>I</strong>nterest <i class="arrow right"></i></a>
<li style="width: 260px"><a>Regions of Interest (ROIs)<i class="arrow right"></i></a>
<ul>
<li><a href="#" onclick="loadPage('edit_digits.html?v=$COMMIT_HASH');">Digit ROI</a></li>
<li><a href="#" onclick="loadPage('edit_analog.html?v=$COMMIT_HASH');">Analog ROI</a></li>
</ul>
</li>
<li style="width: 260px"><a href="#" onclick="loadPage('edit_config.html?v=$COMMIT_HASH');">Configuration</a></li>
</ul>


Expand Down
2 changes: 1 addition & 1 deletion sd-card/html/ota_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ <h3><span id="status">Status: Idle</span></h3>
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?v=$COMMIT_HASH&' + Math.random(), {mode: 'no-cors'}).then(
r=>{parent.location.href=('index.html?v=$COMMIT_HASH');}
r=>{parent.location.href=('index.html?v=' + Math.random());}
caco3 marked this conversation as resolved.
Show resolved Hide resolved
)
}

Expand Down
2 changes: 1 addition & 1 deletion sd-card/html/setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ <h2>An ESP32 all inclusive neural network recognition system for meter digitaliz
break;

case 6: // Config page
document.getElementById('maincontent').src = 'edit_config_param.html?v=$COMMIT_HASH#description';
document.getElementById('maincontent').src = 'edit_config.html?v=$COMMIT_HASH#description';

document.getElementById('h_iframe_explain').style.display = "";
document.getElementById('h_iframe_explain').style="height:100px;"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

parameterDocsFolder = "../../param-docs/parameter-pages"
docsMainFolder = "../../sd-card/html"
configPageTemplate = "edit_config_param_template.html"
configPage = "edit_config_param.html"
configPageTemplate = "edit_config_template.html"
configPage = "edit_config.html"
refImagePage = "edit_reference.html"

htmlTooltipPrefix = """
Expand Down