Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca76343
commit 42dc75f
Showing
9 changed files
with
294 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'renterd': minor | ||
--- | ||
|
||
Contracts now have a details view that shows a graph of the contract's daily funding and spending. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { ChartXY, Text, stripPrefix } from '@siafoundation/design-system' | ||
import { useContracts } from '../../contexts/contracts' | ||
|
||
export function ContractMetrics() { | ||
const { selectedContract, contractMetrics } = useContracts() | ||
|
||
if (!selectedContract) { | ||
return null | ||
} | ||
|
||
return ( | ||
<ChartXY | ||
id="fundingAndSpending" | ||
height="100%" | ||
data={contractMetrics.data} | ||
config={contractMetrics.config} | ||
isLoading={contractMetrics.isLoading} | ||
actionsLeft={ | ||
<> | ||
<Text font="mono" weight="semibold"> | ||
Contract {stripPrefix(selectedContract.id).slice(0, 6)}: funding & | ||
spending | ||
</Text> | ||
</> | ||
} | ||
/> | ||
) | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.