added Debug-CLI on WebUI
This commit is contained in:
@@ -1,27 +1,42 @@
|
||||
$(document).ready(function () {
|
||||
$(".navbar-nav a").on("click", function () {
|
||||
$(".navbar-collapse").collapse("hide");
|
||||
});
|
||||
|
||||
$("#show_hide_password a").on("click", function (event) {
|
||||
event.preventDefault();
|
||||
if ($("#show_hide_password input").attr("type") == "text") {
|
||||
$("#show_hide_password input").attr("type", "password");
|
||||
$("#show_hide_password i").addClass("fa-eye-slash");
|
||||
$("#show_hide_password i").removeClass("fa-eye");
|
||||
} else if ($("#show_hide_password input").attr("type") == "password") {
|
||||
$("#show_hide_password input").attr("type", "text");
|
||||
$("#show_hide_password i").removeClass("fa-eye-slash");
|
||||
$("#show_hide_password i").addClass("fa-eye");
|
||||
}
|
||||
});
|
||||
// Event-Listener für Navbar-Links
|
||||
$(".navbar-nav a").on("click", function () {
|
||||
$(".navbar-collapse").collapse("hide");
|
||||
});
|
||||
|
||||
document
|
||||
.querySelector(".custom-file-input")
|
||||
.addEventListener("change", function (e) {
|
||||
var fileName = document.getElementById("fw-update-file").files[0].name;
|
||||
var nextSibling = e.target.nextElementSibling;
|
||||
nextSibling.innerText = fileName;
|
||||
});
|
||||
|
||||
|
||||
// Event-Listener für Passwort zeigen/verborgen
|
||||
$("#show_hide_password a").on("click", function (event) {
|
||||
event.preventDefault();
|
||||
var inputField = $("#show_hide_password input");
|
||||
var icon = $("#show_hide_password i");
|
||||
if (inputField.attr("type") == "text") {
|
||||
inputField.attr("type", "password");
|
||||
icon.addClass("fa-eye-slash");
|
||||
icon.removeClass("fa-eye");
|
||||
} else if (inputField.attr("type") == "password") {
|
||||
inputField.attr("type", "text");
|
||||
icon.removeClass("fa-eye-slash");
|
||||
icon.addClass("fa-eye");
|
||||
}
|
||||
});
|
||||
|
||||
// Event-Listener für Datei-Upload
|
||||
$(".custom-file-input").on("change", function (e) {
|
||||
var fileName = document.getElementById("fw-update-file").files[0].name;
|
||||
var nextSibling = e.target.nextElementSibling;
|
||||
nextSibling.innerText = fileName;
|
||||
});
|
||||
|
||||
// Event-Listener für Live-Debug-Eingabe
|
||||
$('#livedebug-in').on('keydown', function(event) {
|
||||
if (event.key === 'Enter' || event.keyCode === 13) {
|
||||
event.preventDefault(); // Verhindert, dass die Enter-Taste die Standardaktion ausführt (z.B. Absenden eines Formulars)
|
||||
|
||||
const command = $('#livedebug-in').val(); // Den Befehl aus dem Eingabefeld holen
|
||||
executeCommand(command); // Den Befehl an die Funktion übergeben
|
||||
|
||||
$('#livedebug-in').val(''); // Leert das Eingabefeld
|
||||
$('#livedebug-in').focus(); // Setzt den Fokus zurück auf das Eingabefeld
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@@ -139,6 +139,10 @@ function websocket_sendevent(element_id, element_value) {
|
||||
websocket.send(element_id + ":" + element_value);
|
||||
}
|
||||
|
||||
function websocket_sendDebugCommand(command) {
|
||||
websocket.send("debug-in:" + command);
|
||||
}
|
||||
|
||||
function do_resize(textbox) {
|
||||
var maxrows = 15;
|
||||
var minrows = 3;
|
||||
|
Reference in New Issue
Block a user