Feature: Expose parity check estimated remaining time and elapsed seconds in GraphQL schema
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 65/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- graphql, typescript
Rechercherichtung
Start with getParityCheckStatus in api/src/core/utils/clients/emcmd.ts, which already computes speed, progress and duration from the var data, and check how the ParityCheck ObjectType in api/src/unraid-api/graph/resolvers/array/array.model.ts maps those fields. Work out the remaining-time formula from mdResyncSize, mdResyncPos, mdResyncDb and mdResyncDt and handle the zero or missing cases. Done means estimatedRemaining and elapsed appear as nullable seconds in the GraphQL schema and resolve correctly while a check is running.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Is your feature request related to a problem?
When a parity check or disk rebuild/sync is in progress on Unraid OS, client integrations (such as Home Assistant, Unraid Connect, and third-party dashboards) need to display elapsed time and estimated time to completion.
Currently, the Unraid WebGUI (Dynamix) calculates these values locally on-the-fly from /var/local/emhttp/var.ini:
- Elapsed time:
now - sbSynced - Estimated finish:
(mdResyncSize - mdResyncPos) / (mdResyncDb / mdResyncDt)
However, in unraid/api, while getParityCheckStatus(varData) already computes speed, progress, and duration (now - sbSynced), it does not compute or expose an estimated / estimatedRemaining field in the GraphQL schema, and duration is not aliased or documented as elapsed. As a result, API clients are unable to display accurate completion estimates without reverse-engineering low-level driver variables.
Describe the solution you'd like
- In
api/src/core/utils/clients/emcmd.ts(orgetParityCheckStatus):- Add
estimatedRemaining: number | undefined(remaining time in seconds), calculated frommdResyncSize,mdResyncPos,mdResyncDb, andmdResyncDt. - Expose
elapsed: number | undefinedalongside (or aliased to)duration.
- Add
- Update the
ParityCheckGraphQL ObjectType inapi/src/unraid-api/graph/resolvers/array/array.model.tsto include:estimatedRemaining:Int(nullable, seconds remaining)elapsed:Int(nullable, elapsed seconds)
Describe alternatives you've considered
Clients could attempt to query raw state or estimate completion client-side using progress and speed, but this introduces clock skew and inconsistent calculations between the WebGUI, Unraid Connect, and external integrations. Computing this server-side ensures a single source of truth across all consumers.
Environment (if relevant)
Unraid OS Version: 7.0.0+ / 7.2.0+
Pre-submission Checklist
- I have searched existing issues to ensure this feature hasn't already been requested
- This is not an Unraid Connect related feature
- I have provided clear examples or use cases for the feature
- Vorherrschende Sprache
- TypeScript
- Sterne
- 123
- Forks
- 25
- Ø Merge
- 2 T. 16 Std.
- Gemergte PRs (30 T.)
- 9
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus unraid/api
-
Temperature metrics: lm-sensors voltages, fan speeds and power are reported as temperatures (°C)Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
flash { guid } always fails: resolver no longer returns guid but the schema marks it non-nullableOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
yavorsky/unbuilt.app#65 ·
-
CVE security
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
mckinsey/agents-at-scale-ark#4091 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
factory:subtask
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 94/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
NUS-Project-SaBai/project-sabai#386 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
android needs clarification
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
super-productivity/super-productivity#12105 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag