Tags: unraid/api
Tags
fix(ups): convert estimatedRuntime from minutes to seconds (#1822) ## Summary Fixes the `estimatedRuntime` field in the UPS GraphQL query to return values in **seconds** as documented, instead of **minutes**. ## Problem The `TIMELEFT` value from `apcupsd` is returned in minutes (e.g., `6.0` for 6 minutes), but the GraphQL schema documentation states: > Estimated runtime remaining on battery power. **Unit: seconds**. Example: 3600 means 1 hour of runtime remaining Currently, the API returns `6` (minutes) instead of `360` (seconds). ## Solution Convert the `TIMELEFT` value from minutes to seconds by multiplying by 60: ```typescript // Before estimatedRuntime: parseInt(upsData.TIMELEFT || '3600', 10), // After estimatedRuntime: Math.round(parseFloat(upsData.TIMELEFT || '60') * 60), ``` ## Testing 1. Query `upsDevices` before the fix → `estimatedRuntime: 6` (incorrect - minutes) 2. Query `upsDevices` after the fix → `estimatedRuntime: 360` (correct - seconds) Tested on Unraid server with APC UPS connected via apcupsd. ## Related Issues Fixes #1821 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Corrected UPS battery runtime calculation to interpret provider TIMELEFT as minutes, convert to seconds, and use a sensible default when missing—improves displayed battery runtime accuracy. * **Tests** * Updated UPS test fixtures to match the minute-based TIMELEFT format used by the UPS provider. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
chore(main): release 4.28.0 (#1807) 🤖 I have created a release *beep* *boop* --- ## [4.28.0](v4.27.2...v4.28.0) (2025-12-15) ### Features * when cancelling OS upgrade, delete any plugin files that were d… ([#1823](#1823)) ([74df938](74df938)) ### Bug Fixes * change keyfile watcher to poll instead of inotify on FAT32 ([#1820](#1820)) ([23a7120](23a7120)) * enhance dark mode support in theme handling ([#1808](#1808)) ([d6e2939](d6e2939)) * improve API startup reliability with timeout budget tracking ([#1824](#1824)) ([51f025b](51f025b)) * PHP Warnings in Management Settings ([#1805](#1805)) ([832e9d0](832e9d0)) * update @unraid/shared-callbacks to version 3.0.0 ([#1831](#1831)) ([73b2ce3](73b2ce3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
fix: issue with header flashing + issue with trial date Removed an empty line in the web testing rules.
chore(main): release 4.27.2 (#1802) 🤖 I have created a release *beep* *boop* --- ## [4.27.2](v4.27.1...v4.27.2) (2025-11-21) ### Bug Fixes * issue with header flashing + issue with trial date ([64875ed](64875ed)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
chore(main): release 4.27.1 (#1797) 🤖 I have created a release *beep* *boop* --- ## [4.27.1](v4.27.0...v4.27.1) (2025-11-21) ### Bug Fixes * missing translations for expiring trials ([#1800](#1800)) ([36c1049](36c1049)) * resolve header flash when background color is set ([#1796](#1796)) ([dc9a036](dc9a036)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
fix: auto-uninstallation of connect api plugin (#1791) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Plugin configuration now lives in a single API configuration object for consistent handling. * Connection plugin wiring simplified so the connect plugin is always provided without runtime fallbacks. * **Chores** * Startup now automatically removes stale connect-plugin entries from saved config when the plugin is absent, improving startup reliability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
chore(main): release 4.27.0 (#1795) 🤖 I have created a release *beep* *boop* --- ## [4.27.0](v4.26.2...v4.27.0) (2025-11-19) ### Features * remove Unraid API log download functionality ([#1793](#1793)) ([e4a9b82](e4a9b82)) ### Bug Fixes * auto-uninstallation of connect api plugin ([#1791](#1791)) ([e734043](e734043)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
PreviousNext