diff --git a/.readthedocs.yaml b/.readthedocs.yaml deleted file mode 100644 index c4b4ce2..0000000 --- a/.readthedocs.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# Read the Docs configuration file -# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - -# Required -version: 2 - -# Set the OS, Python version, and other tools you might need -build: - os: ubuntu-24.04 - tools: - python: "3.13" - -# Build documentation in the "docs/" directory with Sphinx -sphinx: - configuration: docs/conf.py - -# Optionally, but recommended, -# declare the Python requirements required to build your documentation -# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html -# python: -# install: -# - requirements: docs/requirements.txt - \ No newline at end of file diff --git a/Watcher/Controllers/MonitoringController.cs b/Watcher/Controllers/MonitoringController.cs index 3357bf2..0a922b1 100644 --- a/Watcher/Controllers/MonitoringController.cs +++ b/Watcher/Controllers/MonitoringController.cs @@ -183,7 +183,7 @@ public class MonitoringController : Controller GPU_Temp = dto.GPU_Temp, GPU_Vram_Size = dto.GPU_Vram_Size, GPU_Vram_Usage = dto.GPU_Vram_Usage, - RAM_Load = dto.RAM_Load, + RAM_Load = sanitizeByteInput(dto.RAM_Load), RAM_Size = dto.RAM_Size, DISK_Size = dto.RAM_Size, DISK_Usage = dto.DISK_Usage, @@ -281,4 +281,18 @@ public class MonitoringController : Controller return Ok(data); } + + // Metric Input Byte zu Gigabyte umwandeln + public static double sanitizeByteInput(double metric_input) + { + // *10^-9 um auf Gigabyte zu kommen + double sanitizedMetric = metric_input * Math.Pow(10, -9); + + // Auf 2 Nachkommastellen runden + Math.Round(sanitizedMetric, 2); + + return sanitizedMetric; + } + + // Metric Input Bit zu Gigabit umwandeln } \ No newline at end of file