2020-06-19 06:57:57 +03:00
|
|
|
import * as React from "react";
|
|
|
|
import * as System from "~/components/system";
|
2020-04-09 00:29:13 +03:00
|
|
|
|
2020-06-19 06:57:57 +03:00
|
|
|
import ScenePage from "~/components/core/ScenePage";
|
|
|
|
import Section from "~/components/core/Section";
|
2020-04-09 00:29:13 +03:00
|
|
|
|
|
|
|
export default class SceneDataTransfer extends React.Component {
|
2020-06-19 06:57:57 +03:00
|
|
|
state = { sub_navigation: "1" };
|
2020-04-09 00:29:13 +03:00
|
|
|
|
|
|
|
_handleChange = (e) => {
|
|
|
|
this.setState({ [e.target.name]: e.target.value });
|
|
|
|
};
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<ScenePage>
|
|
|
|
<System.H1>Data transfers</System.H1>
|
|
|
|
|
|
|
|
<System.CardTabGroup
|
|
|
|
style={{ marginTop: 24 }}
|
|
|
|
name="sub_navigation"
|
|
|
|
options={[
|
2020-06-19 06:57:57 +03:00
|
|
|
{ value: "1", label: "Current transfers" },
|
|
|
|
{ value: "2", label: "Past transfers" },
|
2020-04-09 00:29:13 +03:00
|
|
|
]}
|
|
|
|
value={this.state.sub_navigation}
|
|
|
|
onChange={this._handleChange}
|
|
|
|
/>
|
|
|
|
|
2020-06-19 06:57:57 +03:00
|
|
|
{this.state.sub_navigation === "2" ? (
|
2020-09-29 07:39:05 +03:00
|
|
|
<Section title="Past transfers" onAction={this.props.onAction}>
|
2020-04-09 00:29:13 +03:00
|
|
|
<System.Table
|
|
|
|
data={{
|
2020-08-20 08:45:43 +03:00
|
|
|
columns: [
|
|
|
|
{
|
|
|
|
key: "data-cid",
|
|
|
|
name: "Data CID",
|
|
|
|
copyable: true,
|
|
|
|
tooltip: "Data CID explainer.",
|
|
|
|
width: "224px",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: "deal-cid",
|
|
|
|
name: "Deal CID",
|
|
|
|
copyable: true,
|
|
|
|
tooltip: "Deal CID explainer.",
|
|
|
|
width: "100%",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: "data-source",
|
|
|
|
name: "Source",
|
|
|
|
width: "120px",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: "data-destination",
|
|
|
|
name: "Destination",
|
|
|
|
width: "120px",
|
|
|
|
},
|
|
|
|
{ key: "size", name: "Size", width: "140px" },
|
|
|
|
],
|
2020-04-09 00:29:13 +03:00
|
|
|
rows: this.props.viewer.data_transfers,
|
|
|
|
}}
|
|
|
|
selectedRowId={this.state.table_past_transfer}
|
|
|
|
onChange={this._handleChange}
|
|
|
|
onAction={this.props.onAction}
|
|
|
|
name="table_past_transfer"
|
|
|
|
/>
|
|
|
|
</Section>
|
|
|
|
) : null}
|
|
|
|
|
2020-06-19 06:57:57 +03:00
|
|
|
{this.state.sub_navigation === "1" ? (
|
2020-09-29 07:39:05 +03:00
|
|
|
<Section onAction={this.props.onAction} title="Current transfers">
|
2020-04-09 00:29:13 +03:00
|
|
|
<System.P style={{ padding: 24 }}>There are no transfers</System.P>
|
|
|
|
</Section>
|
|
|
|
) : null}
|
|
|
|
</ScenePage>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|