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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user