on chain deals: Better deal display in SMA
This commit is contained in:
parent
cdd91914b9
commit
7c78105df5
@ -6,13 +6,11 @@ const dealStates = [
|
|||||||
"Unknown",
|
"Unknown",
|
||||||
"Rejected",
|
"Rejected",
|
||||||
"Accepted",
|
"Accepted",
|
||||||
"Started",
|
|
||||||
"Failed",
|
|
||||||
"Staged",
|
"Staged",
|
||||||
"Sealing",
|
"Sealing",
|
||||||
|
"Failed",
|
||||||
"Complete",
|
"Complete",
|
||||||
"Error",
|
"Error",
|
||||||
"Expired"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -83,7 +81,7 @@ class Client extends React.Component {
|
|||||||
|
|
||||||
let deals = this.state.deals.map((deal, i) => <div key={i}>
|
let deals = this.state.deals.map((deal, i) => <div key={i}>
|
||||||
<ul>
|
<ul>
|
||||||
<li>{i}. Proposal: {deal.ProposalCid['/'].substr(0, 18)}... <Address nobalance={true} client={this.props.client} addr={deal.Miner} mountWindow={this.props.mountWindow}/>: <b>{dealStates[deal.State]}</b>
|
<li>{i}. Proposal: {deal.ProposalCid['/'].substr(0, 18)}... <Address nobalance={true} client={this.props.client} addr={deal.Provider} mountWindow={this.props.mountWindow}/>: <b>{dealStates[deal.State]}</b>
|
||||||
{dealStates[deal.State] === 'Complete' ? <span> <a href="#" onClick={this.retrieve(deal)}>[Retrieve]</a></span> : <span/> }
|
{dealStates[deal.State] === 'Complete' ? <span> <a href="#" onClick={this.retrieve(deal)}>[Retrieve]</a></span> : <span/> }
|
||||||
<ul>
|
<ul>
|
||||||
<li>Data: {deal.PieceRef['/']}, <b>{deal.Size}</b>B; Duration: <b>{deal.Duration}</b>Blocks</li>
|
<li>Data: {deal.PieceRef['/']}, <b>{deal.Size}</b>B; Duration: <b>{deal.Duration}</b>Blocks</li>
|
||||||
|
@ -116,7 +116,18 @@ class MarketState extends React.Component {
|
|||||||
<div>
|
<div>
|
||||||
<div>---</div>
|
<div>---</div>
|
||||||
<div>Deals:</div>
|
<div>Deals:</div>
|
||||||
{Object.keys(this.state.deals).map(d => <div>{d}</div>)}
|
<table>
|
||||||
|
<tr><td>id</td><td>Active</td><td>Client</td><td>Provider</td><td>Size</td><td>Price</td><td>Duration</td></tr>
|
||||||
|
{Object.keys(this.state.deals).map(d => <tr>
|
||||||
|
<td>{d}</td>
|
||||||
|
<td>{this.state.deals[d].ActivationEpoch || "No"}</td>
|
||||||
|
<td><Address short={true} addr={this.state.deals[d].Deal.Proposal.Provider} client={this.props.client} mountWindow={this.props.mountWindow}/></td>
|
||||||
|
<td><Address short={true} addr={this.state.deals[d].Deal.Proposal.Client} client={this.props.client} mountWindow={this.props.mountWindow}/></td>
|
||||||
|
<td>{this.state.deals[d].Deal.Proposal.PieceSize}B</td>
|
||||||
|
<td>{this.state.deals[d].Deal.Proposal.StoragePrice}</td>
|
||||||
|
<td>{this.state.deals[d].Deal.Proposal.Duration}</td>
|
||||||
|
</tr>)}
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user