Feature: Expose parity check estimated remaining time and elapsed seconds in GraphQL schema
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 65/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- graphql, typescript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 123
- Fork
- 25
- Merge trung bình
- 2 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của unraid/api
-
Temperature metrics: lm-sensors voltages, fan speeds and power are reported as temperatures (°C)Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
flash { guid } always fails: resolver no longer returns guid but the schema marks it non-nullableĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
parityHistory query fails with NaN when a parity-checks.log record has an empty errors fieldĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
yavorsky/unbuilt.app#65 ·
-
CVE security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
mckinsey/agents-at-scale-ark#4091 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
factory:subtask
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 94/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
NUS-Project-SaBai/project-sabai#386 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
android needs clarification
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
super-productivity/super-productivity#12105 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày