FoxxMD / komodo-utilities

Small utilities to enhance Komodo
MIT License
1 stars 0 forks source link

Implement rounding of numerical values #1

Closed gitcatpeter closed 2 days ago

gitcatpeter commented 1 week ago

Thank you for the utilities. Regarding ntfy utility, do you think you could implement rounding of some numerical values passed by Komodo?

Especially CPU usage is being reported as a raw value with so many insignificant digits. Probably it is safe to say that every numerical value (so also RAM and disk usages) could be rounded just in case, before packing it back into JSON.

Personally I'd like no decimal points at all, but accuracy could be a docker environment parameter.

See: https://github.com/mbecker20/komodo/issues/198

case "ServerCpu":
                    message.push(`Hit ${data.percentage}%`);
FoxxMD commented 6 days ago

I'll make this change next week, thanks for reporting it.

FoxxMD commented 2 days ago

Available for ntfy and gotify on latest tag