MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / getStorageSoftwareSettings

Function getStorageSoftwareSettings

src/astroprint/api/settings.py:440–454  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

438@api.route("/settings/software/storage", methods=["GET"])
439@restricted_access
440def getStorageSoftwareSettings():
441 pm = platformManager()
442
443 driveTotal, driveUsed, driveFree = pm.driveStats()
444 s = settings()
445 clearFiles = s.getBoolean(['clearFiles'])
446
447 return jsonify(
448 sizeLogs= pm.logsSize(),
449 sizeUploads= pm.uploadsSize(),
450 driveTotal= driveTotal,
451 driveUsed= driveUsed,
452 driveFree= driveFree,
453 clearFiles = clearFiles
454 )
455
456@api.route("/settings/software/storage", methods=["POST"])
457@restricted_access

Callers

nothing calls this directly

Calls 6

platformManagerFunction · 0.90
settingsFunction · 0.90
driveStatsMethod · 0.80
getBooleanMethod · 0.80
logsSizeMethod · 0.80
uploadsSizeMethod · 0.80

Tested by

no test coverage detected