Merge pull request #2439 from proddy/dev

ESPAsyncWebServer @ 3.7.2
This commit is contained in:
Proddy
2025-03-02 21:39:54 +01:00
committed by GitHub
6 changed files with 8 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ export const ACCESS_TOKEN = 'access_token';
export const alovaInstance = createAlova({ export const alovaInstance = createAlova({
statesHook: ReactHook, statesHook: ReactHook,
// timeout: 3000, // 3 seconds before throwing a timeout error, default is 0 = none // timeout: 3000, // 3 seconds before throwing a timeout error, default is 0 = none
cacheFor: null, // disable cache // cacheFor: null, // disable cache
// cacheFor: { // cacheFor: {
// GET: { // GET: {
// mode: 'memory', // mode: 'memory',

View File

@@ -14,8 +14,10 @@ export const updateLogSettings = (data: LogSettings) =>
export const fetchLogES = () => alovaInstance.Get('/es/log'); export const fetchLogES = () => alovaInstance.Get('/es/log');
// Get versions from GitHub // Get versions from GitHub
// cache for 10 minutes to stop getting the IP blocked by GitHub
export const getStableVersion = () => export const getStableVersion = () =>
alovaInstanceGH.Get('latest', { alovaInstanceGH.Get('latest', {
cacheFor: 60 * 10 * 1000,
transform(response: { data: { name: string; published_at: string } }) { transform(response: { data: { name: string; published_at: string } }) {
return { return {
name: response.data.name.substring(1), name: response.data.name.substring(1),
@@ -25,6 +27,7 @@ export const getStableVersion = () =>
}); });
export const getDevVersion = () => export const getDevVersion = () =>
alovaInstanceGH.Get('tags/latest', { alovaInstanceGH.Get('tags/latest', {
cacheFor: 60 * 10 * 1000,
transform(response: { data: { name: string; published_at: string } }) { transform(response: { data: { name: string; published_at: string } }) {
return { return {
name: response.data.name.split(/\s+/).splice(-1)[0].substring(1), name: response.data.name.split(/\s+/).splice(-1)[0].substring(1),

View File

@@ -201,7 +201,7 @@ const SystemLog = () => {
name="level" name="level"
label={LL.LOG_LEVEL()} label={LL.LOG_LEVEL()}
value={data.level} value={data.level}
sx={{ width: '10ch' }} sx={{ width: '14ch' }}
variant="outlined" variant="outlined"
onChange={updateFormValue} onChange={updateFormValue}
margin="normal" margin="normal"

View File

@@ -105,7 +105,7 @@ export default () => {
let message = 'message #' + count; let message = 'message #' + count;
if (count % 6 === 1) { if (count % 6 === 1) {
message += message +=
' with a long message that will be wrapped, to see if it stays one a single line'; ' that is a long message that will be wrapped, to test if it gets truncated';
} }
const data = { const data = {
t: new Date().toISOString(), t: new Date().toISOString(),

View File

@@ -127,7 +127,7 @@ board_build.filesystem = littlefs
lib_deps = lib_deps =
bblanchon/ArduinoJson @ 7.3.1 bblanchon/ArduinoJson @ 7.3.1
ESP32Async/AsyncTCP @ 3.3.6 ESP32Async/AsyncTCP @ 3.3.6
ESP32Async/ESPAsyncWebServer @ 3.7.1 ESP32Async/ESPAsyncWebServer @ 3.7.2
https://github.com/emsesp/EMS-ESP-Modules.git @ 1.0.5 https://github.com/emsesp/EMS-ESP-Modules.git @ 1.0.5
; ;

View File

@@ -2115,7 +2115,7 @@ bool System::readCommand(const char * data) {
strlcpy(value, p, 10); // get string strlcpy(value, p, 10); // get string
device_id = (uint8_t)Helpers::hextoint(value); // convert hex to int device_id = (uint8_t)Helpers::hextoint(value); // convert hex to int
if (!EMSESP::valid_device(device_id)) { if (!EMSESP::valid_device(device_id)) {
LOG_ERROR("Invalid device ID (%d) in read command", device_id); LOG_ERROR("Invalid device ID (0x%02X) in read command", device_id);
return false; // invalid device return false; // invalid device
} }
} }