mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-25 10:05:02 +03:00
miners: adds options to the GUI
This commit is contained in:
parent
5541173432
commit
660d77f98d
@ -23,14 +23,14 @@ export default class SceneMiners extends React.Component {
|
||||
|
||||
let miners = [];
|
||||
try {
|
||||
const response = await fetch("https://sentinel.slate.host/api/static-global-miners");
|
||||
const response = await fetch("https://sentinel.slate.host/api/mapped-static-global-miners");
|
||||
const json = await response.json();
|
||||
const sources = json.data.buckets;
|
||||
const sources = json.data;
|
||||
|
||||
sources.forEach((group) => {
|
||||
miners = [
|
||||
...group.minerAddresses.map((name) => {
|
||||
return { location: group.name, name };
|
||||
...group.minerAddresses.map((entity) => {
|
||||
return { location: group.name, ...entity };
|
||||
}),
|
||||
...miners,
|
||||
];
|
||||
@ -47,32 +47,42 @@ export default class SceneMiners extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<ScenePage>
|
||||
<ScenePageHeader title="Trusted miners">
|
||||
<ScenePageHeader title="Miners">
|
||||
Whenever you make a deal against the Filecoin Network, Slate works with Textile's
|
||||
infrastructure to find the best possible miner to make a storage deal with.
|
||||
</ScenePageHeader>
|
||||
|
||||
<Section title="Miners" style={{ maxWidth: 960, minWidth: "auto" }}>
|
||||
<Section title="Listing" style={{ maxWidth: 960, minWidth: "auto" }}>
|
||||
<System.Table
|
||||
data={{
|
||||
columns: [
|
||||
{
|
||||
key: "miner",
|
||||
name: "Miner",
|
||||
width: "100%",
|
||||
width: "96px",
|
||||
},
|
||||
{
|
||||
key: "minPieceSizeFormatted",
|
||||
name: "Minimum size",
|
||||
width: "124px",
|
||||
},
|
||||
{
|
||||
key: "minDealDuration",
|
||||
name: "Minimum duration",
|
||||
width: "140px",
|
||||
},
|
||||
{
|
||||
key: "location",
|
||||
name: "Location",
|
||||
width: "188px",
|
||||
},
|
||||
{
|
||||
key: "priceFIL",
|
||||
name: "Price",
|
||||
width: "100%",
|
||||
},
|
||||
],
|
||||
rows: this.state.miners.map((miner) => {
|
||||
return {
|
||||
miner: miner.name,
|
||||
location: miner.location,
|
||||
};
|
||||
}),
|
||||
rows: this.state.miners,
|
||||
}}
|
||||
/>
|
||||
</Section>
|
||||
|
Loading…
Reference in New Issue
Block a user