pull/1451/head
Rick Carlino 2019-09-19 10:03:31 -05:00
parent fc2c42161f
commit f295add527
2 changed files with 42 additions and 8 deletions

View File

@ -16,7 +16,7 @@ import { PowerAndReset } from "./fbos_settings/power_and_reset";
import { SendDiagnosticReport } from "./send_diagnostic_report";
import axios from "axios";
import { t } from "../../i18next_wrapper";
import { SequenceSelectBox } from "../../sequences/sequence_select_box";
import { BootSequenceSelector } from "./fbos_settings/boot_sequence_selector";
export enum ColWidth {
label = 3,
@ -100,19 +100,13 @@ export class FarmbotOsSettings
</Col>
</Row>
<Row>
{console.log("Move this under 'FIRMWARE' dropdown tomorrow.")}
<Col xs={ColWidth.label}>
<label>
{t("BOOT SEQUENCE")}
</label>
</Col>
<Col xs={9}>
<SequenceSelectBox
onChange={(ddi) => {
this.updateFbosConfig(ddi.value);
}}
resources={this.props.resources}
sequenceId={this.props.boot_sequence_id} />
<BootSequenceSelector {...({} as BootSequenceSelector["props"])} />
</Col>
</Row>
<Row>

View File

@ -0,0 +1,40 @@
import * as React from "react";
import { connect } from "react-redux";
// import { TaggedSequence, TaggedFbosConfig } from "farmbot";
import { Everything } from "../../../interfaces";
// import { selectAllSequences } from "../../../resources/selectors";
// import { getFbosConfig } from "../../../resources/getters";
// interface Props {
// fbosConfig: TaggedFbosConfig;
// sequences: TaggedSequence[];
// dispatch: Function;
// }
function mapStateToProps(_p: Everything) {
return {};
// const { index } = p.resources;
// const fbosConfig = getFbosConfig(index);
// if (fbosConfig) {
// return {
// fbosConfig,
// sequences: selectAllSequences(index),
// dispatch: p.dispatch,
// };
// } else {
// throw new Error("No config found?");
// }
}
@connect(mapStateToProps)
export class BootSequenceSelector extends React.Component<{}, {}> {
componentDidCatch() {
return <div>Not ready</div>;
}
render() {
return <div>
Loading...
</div>;
}
}