Removed duplicated ram info

modified:   data/www/dashboard.html
	modified:   src/esp_info.cpp
	modified:   src/esp_info.h
	modified:   src/web_server.cpp
This commit is contained in:
2025-04-13 12:00:19 +02:00
parent 872a3d7269
commit 1080d3025c
4 changed files with 14 additions and 22 deletions

View File

@@ -31,21 +31,13 @@
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return response.json(); // Expect JSON response
return response.text(); // Changed from json() to text()
})
.then(data => {
console.log('Data received:', data);
if (!data) throw new Error('Empty response');
let html = '';
Object.entries(data).forEach(([key, value]) => {
html += `
<div class="card">
<h3>${key}</h3>
<p>${value}</p>
</div>`;
});
document.getElementById('dashboard').innerHTML = html;
document.getElementById('dashboard').innerHTML = data;
})
.catch(error => {
console.error('Error:', error);