From 282b839f451ce03d7c2eced4a81c91ec9103b569 Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 8 Mar 2024 10:45:05 +0100 Subject: [PATCH] Add gen_apikey to template --- app/js/custom.js | 4 ++++ templates/restapi.php | 4 ++-- templates/restapi/general.php | 11 ++++++++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/js/custom.js b/app/js/custom.js index 8cbeeecf..febf7609 100644 --- a/app/js/custom.js +++ b/app/js/custom.js @@ -122,6 +122,10 @@ $(document).on("click", "#gen_wpa_passphrase", function(e) { $('#txtwpapassphrase').val(genPassword(63)); }); +$(document).on("click", "#gen_apikey", function(e) { + $('#txtapikey').val(genPassword(32).toLowerCase()); +}); + $(document).on("click", "#js-clearhostapd-log", function(e) { var csrfToken = $('meta[name=csrf_token]').attr('content'); $.post('ajax/logging/clearlog.php?',{'logfile':'/tmp/hostapd.log', 'csrf_token': csrfToken},function(data){ diff --git a/templates/restapi.php b/templates/restapi.php index 2e76b4c7..fc1d1437 100644 --- a/templates/restapi.php +++ b/templates/restapi.php @@ -2,9 +2,9 @@ " /> - class="btn btn-success " name="StartRestAPIservice" value="" /> + " /> - class="btn btn-warning " name="StopRestAPIservice" value="" /> + " /> diff --git a/templates/restapi/general.php b/templates/restapi/general.php index 41296084..b39c293c 100644 --- a/templates/restapi/general.php +++ b/templates/restapi/general.php @@ -5,9 +5,14 @@
- -
- +
+ +
+ +
+
+ +