feat(miner): fetch max hash rate, max power and model when creating a miner#51
Merged
markoceri merged 3 commits intoJul 2, 2026
Conversation
Enable the device-fetch buttons in the Add Miner form before the miner is
saved, querying the associated controller directly instead of the (not yet
existing) miner.
- Add GET /miner-controllers/{id}/info and /miner-controllers/{id}/limits
endpoints, backed by MinerActionService.get_controller_info /
get_controller_limits, which read a controller via a temporary miner.
- Extract shared _read_miner_info / _read_miner_limits helpers and a
_temp_miner_for_controller builder to avoid duplication.
- In the form, show the fetch buttons for Max Hash Rate, Max Power and Model
when a controller is selected; in creation mode the selected controllers are
tried until one returns a value.
Closes edge-mining#49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lets users fetch device data (max hash rate, max power and model/hostname) from the associated controller while creating a miner, without having to save it first. Previously the "fetch from miner" buttons were only available in edit mode, because the underlying reads operate on a persisted miner.
Backend
GET /miner-controllers/{controller_id}/infoandGET /miner-controllers/{controller_id}/limits, backed byMinerActionService.get_controller_info/get_controller_limits, which query a controller directly via a temporary miner (same approach already used byget_miner_details_from_controller)._read_miner_info/_read_miner_limitshelpers and a_temp_miner_for_controllerbuilder, reused by the miner- and controller-level reads to avoid duplication.Frontend
Closes #49
Test plan
ruff check/ruff formatclean;MinerActionServiceremains concrete.vue-tsc -bpasses.