diff --git a/esp8266/data - for more than 64K SPIFFS/settings.tpl b/esp8266/data - for more than 64K SPIFFS/settings.tpl index 438be91f..6a469c86 100644 --- a/esp8266/data - for more than 64K SPIFFS/settings.tpl +++ b/esp8266/data - for more than 64K SPIFFS/settings.tpl @@ -35,7 +35,12 @@ $SUCCESS_MSG$ function dispatchstatus(jsonresponse) { var content =""; -document.getElementById('status').innerHTML=jsonresponse.status; +content ="Status: "+jsonresponse.status; +content +="  Total space: "+jsonresponse.total; +content +="  Used space: "+jsonresponse.used; +content +="  Occupation: "+jsonresponse.occupation; +document.getElementById('status').innerHTML=content; +content =""; for (var i=0;i "; content +=jsonresponse.files[i].name; diff --git a/esp8266/webinterface.cpp b/esp8266/webinterface.cpp index a3accca2..a3ea5aad 100644 --- a/esp8266/webinterface.cpp +++ b/esp8266/webinterface.cpp @@ -2394,7 +2394,15 @@ void handleFileList() { f.close(); } jsonfile+="],"; - jsonfile+="\"status\":\"" + status + "\""; + jsonfile+="\"status\":\"" + status + "\","; + uint32_t total; + uint32_t used; + SPIFFS.info(&total,&used); + jsonfile+="\"total\":\"" + formatBytes(total) + "\","; + jsonfile+="\"used\":\"" + formatBytes(used) + "\","; + jsonfile+="\"occupation\":\"" ; + jsonfile+= intTostr(100*used/total); + jsonfile+="%\""; jsonfile+="}"; path = ""; web_interface->WebServer.send(200, "application/json", jsonfile);