PoolManagerMinerExplorer
Pool-manager miner explorer page — searchable / filterable table of miners with multi-select and an "Assign Pool" bulk action. Submits the chosen pool change…
Pool-manager miner explorer page — searchable / filterable table of miners with multi-select and an "Assign Pool" bulk action. Submits the chosen pool change as a pending action via the adapter actions store, then opens a confirmation modal.
Must be rendered inside <MdkProvider> — the page uses useActions, useCheckPerm, and useContextualModal from @tetherto/mdk-react-adapter.
import { PoolManagerMinerExplorer } from "@tetherto/mdk-react-devkit";| Prop | Status | Type | Default | Description |
|---|---|---|---|---|
miners | Required | ListThingsDevice[] | — | Miners to render in the explorer table. |
poolConfig | Required | PoolConfigEntry[] | — | Pool configurations powering the "Assign Pool" dropdown. |
backButtonClick | Required | VoidFunction | — | Called when the operator clicks the "Pool Manager" back link. |
Usage
Pool-manager miner explorer page: searchable / filterable table of miners
with multi-select and an "Assign Pool" bulk action. Submits the chosen pool
assignment as a pending action through the adapter actions store.
Use this as the /pool-manager/miners route. For just the table primitive,
drop down to MinerExplorer.
Requirements
- Render inside
<MdkProvider>. The page reads / writes theactionsstore (useActions), reads the auth store (useCheckPermagainstAUTH_PERMISSIONS.ACTIONS:WRITE), and usesuseContextualModalfor the Assign Pool dialog.
Behaviour
- The "Assign Pool" button is gated behind
ASSIGN_POOL_POPUP_ENABLEDand theactions:writepermission. Tooltips explain why it's disabled. - Submitting a pool assignment calls
setAddPendingSubmissionActionwithACTION_TYPES.SETUP_POOLSfor every selected miner, then resets the selection via theMinerExplorerRefimperative handle. - A success
notifyInfotoast fires when the action is queued.
Data contracts
Device—foundation/types/device.PoolConfigData— exported from@tetherto/mdk-react-devkit.
Example
/** * Runnable example for PoolManagerMinerExplorer. * * Wrap the app in `<MdkProvider>`. The page reads / writes the actions store * and checks `actions:write` permission via the adapter hooks. */import { PoolManagerMinerExplorer } from '@tetherto/mdk-react-devkit'import type { Device, PoolConfigData } from '@tetherto/mdk-react-devkit'const mockMiners = [ { id: 'miner-A1', code: 'A1', name: 'Rig A1', last: { hashrate: 102.4, status: 'online' }, }, { id: 'miner-A2', code: 'A2', name: 'Rig A2', last: { hashrate: 98.7, status: 'online' }, },] as unknown as Device[]const mockPools = [ { id: 'pool-eu', name: 'EU primary', priority: 1 } as unknown as PoolConfigData, { id: 'pool-us', name: 'US backup', priority: 2 } as unknown as PoolConfigData,]export const PoolManagerMinerExplorerExample = () => { return ( <PoolManagerMinerExplorer miners={mockMiners} poolConfig={mockPools} backButtonClick={() => { // eslint-disable-next-line no-console console.log('back to pool manager') }} /> )}