diff --git a/interface/src/system/SystemStatusForm.tsx b/interface/src/system/SystemStatusForm.tsx index 25cf1f1..88fc7aa 100644 --- a/interface/src/system/SystemStatusForm.tsx +++ b/interface/src/system/SystemStatusForm.tsx @@ -27,8 +27,8 @@ interface SystemStatusFormState { type SystemStatusFormProps = AuthenticatedContextProps & RestFormProps; -function asNum(num: number){ - return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " "); +function formatNumber(num: number){ + return new Intl.NumberFormat().format(num); } @@ -73,7 +73,7 @@ class SystemStatusForm extends Component - + @@ -82,7 +82,7 @@ class SystemStatusForm extends Component - + @@ -91,7 +91,7 @@ class SystemStatusForm extends Component - + @@ -99,7 +99,7 @@ class SystemStatusForm extends Component - + diff --git a/lib/framework/SystemStatus.cpp b/lib/framework/SystemStatus.cpp index f126e7b..0750184 100644 --- a/lib/framework/SystemStatus.cpp +++ b/lib/framework/SystemStatus.cpp @@ -1,6 +1,5 @@ #include #ifdef ESP32 -#include #include #elif defined(ESP8266) #include @@ -30,15 +29,8 @@ void SystemStatus::systemStatus(AsyncWebServerRequest* request) { root["sdk_version"] = ESP.getSdkVersion(); root["flash_chip_size"] = ESP.getFlashChipSize(); root["flash_chip_speed"] = ESP.getFlashChipSpeed(); -#ifdef ESP32 - if (esp_spiffs_mounted(NULL)) { - root["spiffs_used"] = SPIFFS.usedBytes(); - root["spiffs_size"] = SPIFFS.totalBytes(); - } -#elif !defined(PROGMEM_WWW) //couldn't find an esp8266 alternative to esp_spiffs_mounted() - root["spiffs_used"] = SPIFFS.usedBytes(); - root["spiffs_size"] = SPIFFS.totalBytes(); -#endif + root["spiffs_used"] = SPIFFS.usedBytes(); + root["spiffs_size"] = SPIFFS.totalBytes(); response->setLength(); request->send(response); }