use "fs" instead of "spiffs" as spiffs is implementation specific

This commit is contained in:
Rick Watson 2020-05-25 11:04:13 +01:00
parent aa04cfd80c
commit 98f49fd024
3 changed files with 9 additions and 9 deletions

View File

@ -7,7 +7,7 @@ import DevicesIcon from '@material-ui/icons/Devices';
import MemoryIcon from '@material-ui/icons/Memory';
import ShowChartIcon from '@material-ui/icons/ShowChart';
import SdStorageIcon from '@material-ui/icons/SdStorage';
import StorageIcon from '@material-ui/icons/Storage';
import FolderIcon from '@material-ui/icons/Folder';
import DataUsageIcon from '@material-ui/icons/DataUsage';
import PowerSettingsNewIcon from '@material-ui/icons/PowerSettingsNew';
import RefreshIcon from '@material-ui/icons/Refresh';
@ -97,10 +97,10 @@ class SystemStatusForm extends Component<SystemStatusFormProps, SystemStatusForm
<ListItem >
<ListItemAvatar>
<Avatar>
<StorageIcon />
<FolderIcon />
</Avatar>
</ListItemAvatar>
<ListItemText primary="SPIFFS (Used / Total)" secondary={formatNumber(data.spiffs_used) + ' / ' + formatNumber(data.spiffs_total) + ' bytes (' + formatNumber(data.spiffs_total - data.spiffs_used) + ' bytes free)'} />
<ListItemText primary="File System (Used / Total)" secondary={formatNumber(data.fs_used) + ' / ' + formatNumber(data.fs_total) + ' bytes (' + formatNumber(data.fs_total - data.fs_used) + ' bytes free)'} />
</ListItem>
<Divider variant="inset" component="li" />
</Fragment>

View File

@ -8,8 +8,8 @@ export interface SystemStatus {
sdk_version: string;
flash_chip_size: number;
flash_chip_speed: number;
spiffs_used: number;
spiffs_total: number;
fs_used: number;
fs_total: number;
}
export interface OTASettings {

View File

@ -26,13 +26,13 @@ void SystemStatus::systemStatus(AsyncWebServerRequest* request) {
root["flash_chip_speed"] = ESP.getFlashChipSpeed();
#ifdef ESP32
root["spiffs_total"] = SPIFFS.totalBytes();
root["spiffs_used"] = SPIFFS.usedBytes();
root["fs_total"] = SPIFFS.totalBytes();
root["fs_used"] = SPIFFS.usedBytes();
#elif defined(ESP8266)
FSInfo fs_info;
SPIFFS.info(fs_info);
root["spiffs_total"] = fs_info.totalBytes;
root["spiffs_used"] = fs_info.usedBytes;
root["fs_total"] = fs_info.totalBytes;
root["fs_used"] = fs_info.usedBytes;
#endif
response->setLength();