fix commas
parent
25d944e4b7
commit
4013291787
|
@ -54,5 +54,5 @@ export const fakeImages: TaggedImage[] = [
|
|||
}
|
||||
},
|
||||
"uuid": "Image.7.5"
|
||||
}
|
||||
},
|
||||
];
|
||||
|
|
|
@ -29,7 +29,7 @@ import {
|
|||
} from "farmbot";
|
||||
import { fakeResource } from "../fake_resource";
|
||||
import {
|
||||
ExecutableType, PinBindingType, Folder
|
||||
ExecutableType, PinBindingType, Folder,
|
||||
} from "farmbot/dist/resources/api_resources";
|
||||
import { FirmwareConfig } from "farmbot/dist/resources/configs/firmware";
|
||||
import { MessageType } from "../../sequences/interfaces";
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Coordinate } from "farmbot";
|
|||
import { VariableNameSet } from "../resources/interfaces";
|
||||
|
||||
export const fakeVariableNameSet = (
|
||||
label = "parent", vector = { x: 0, y: 0, z: 0 }
|
||||
label = "parent", vector = { x: 0, y: 0, z: 0 },
|
||||
): VariableNameSet => {
|
||||
const data_value: Coordinate = {
|
||||
kind: "coordinate", args: vector
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import moment from "moment";
|
||||
import {
|
||||
FarmEventWithExecutable
|
||||
FarmEventWithExecutable,
|
||||
} from "../farm_designer/farm_events/calendar/interfaces";
|
||||
|
||||
export const TIME = {
|
||||
|
@ -24,7 +24,7 @@ export const fakeFarmEventWithExecutable = (): FarmEventWithExecutable => {
|
|||
color: "red",
|
||||
name: "faker",
|
||||
kind: "sequence",
|
||||
args: { version: 0, locals: { kind: "scope_declaration", args: {} }, }
|
||||
args: { version: 0, locals: { kind: "scope_declaration", args: {} } }
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -84,7 +84,7 @@ export const calendarRows = [
|
|||
"subheading": "25",
|
||||
"id": 79,
|
||||
"childExecutableName": "Goto 0, 0, 0 123"
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -171,7 +171,7 @@ export const calendarRows = [
|
|||
"subheading": "25",
|
||||
"id": 79,
|
||||
"childExecutableName": "Goto 0, 0, 0 123"
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -258,7 +258,7 @@ export const calendarRows = [
|
|||
"subheading": "25",
|
||||
"id": 79,
|
||||
"childExecutableName": "Goto 0, 0, 0 123"
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
];
|
||||
|
|
|
@ -62,7 +62,7 @@ const tr0: TaggedResource = {
|
|||
},
|
||||
"speed": 100
|
||||
}
|
||||
}
|
||||
},
|
||||
],
|
||||
"args": {
|
||||
"version": 4,
|
||||
|
@ -287,7 +287,7 @@ const tr12: TaggedResource = {
|
|||
"regimen_id": 11,
|
||||
"sequence_id": 23,
|
||||
"time_offset": 345900000
|
||||
}
|
||||
},
|
||||
],
|
||||
body: [],
|
||||
},
|
||||
|
@ -345,7 +345,7 @@ export const FAKE_RESOURCES: TaggedResource[] = [
|
|||
tr0,
|
||||
tr14,
|
||||
tr15,
|
||||
log
|
||||
log,
|
||||
];
|
||||
const KIND: keyof TaggedResource = "kind"; // Safety first, kids.
|
||||
type ResourceGroupNumber = 0 | 1 | 2 | 3 | 4;
|
||||
|
|
|
@ -9,11 +9,11 @@ import { RawApp as App, AppProps, mapStateToProps } from "../app";
|
|||
import { mount } from "enzyme";
|
||||
import { bot } from "../__test_support__/fake_state/bot";
|
||||
import {
|
||||
fakeUser, fakeWebAppConfig, fakeFbosConfig, fakeFarmwareEnv
|
||||
fakeUser, fakeWebAppConfig, fakeFbosConfig, fakeFarmwareEnv,
|
||||
} from "../__test_support__/fake_state/resources";
|
||||
import { fakeState } from "../__test_support__/fake_state";
|
||||
import {
|
||||
buildResourceIndex
|
||||
buildResourceIndex,
|
||||
} from "../__test_support__/resource_index_builder";
|
||||
import { ResourceName } from "farmbot";
|
||||
import { fakeTimeSettings } from "../__test_support__/fake_time_settings";
|
||||
|
@ -125,7 +125,7 @@ describe("<App />: NavBar", () => {
|
|||
"Device",
|
||||
"Sequences",
|
||||
"Regimens",
|
||||
"Farmware"
|
||||
"Farmware",
|
||||
];
|
||||
strings.map(string => expect(t).toContain(string));
|
||||
wrapper.unmount();
|
||||
|
|
|
@ -10,7 +10,7 @@ jest.mock("../redux/store", () => {
|
|||
});
|
||||
|
||||
jest.mock("../account/dev/dev_support", () => ({
|
||||
DevSettings: { futureFeaturesEnabled: () => false, }
|
||||
DevSettings: { futureFeaturesEnabled: () => false }
|
||||
}));
|
||||
|
||||
jest.mock("../config/actions", () => {
|
||||
|
|
|
@ -19,7 +19,7 @@ jest.mock("../session", () => ({
|
|||
}));
|
||||
|
||||
import {
|
||||
responseFulfilled, isLocalRequest, requestFulfilled, responseRejected
|
||||
responseFulfilled, isLocalRequest, requestFulfilled, responseRejected,
|
||||
} from "../interceptors";
|
||||
import { AxiosResponse, Method } from "axios";
|
||||
import { uuid } from "farmbot";
|
||||
|
|
|
@ -9,7 +9,7 @@ jest.mock("axios", () => ({
|
|||
|
||||
}));
|
||||
|
||||
jest.mock("../session", () => ({ Session: { clear: jest.fn(), } }));
|
||||
jest.mock("../session", () => ({ Session: { clear: jest.fn() } }));
|
||||
|
||||
import { maybeRefreshToken } from "../refresh_token";
|
||||
import { API } from "../api/index";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {
|
||||
buildResourceIndex,
|
||||
FAKE_RESOURCES
|
||||
FAKE_RESOURCES,
|
||||
} from "../__test_support__/resource_index_builder";
|
||||
import { TaggedFarmEvent, SpecialStatus } from "farmbot";
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ type Info = UnboundRouteConfig<{}, {}>;
|
|||
const fakeCallback = (
|
||||
component: ConnectedComponent,
|
||||
child: ConnectedComponent | undefined,
|
||||
info: Info
|
||||
info: Info,
|
||||
) => {
|
||||
if (info.$ == "*") {
|
||||
expect(component.name).toEqual("FourOhFour");
|
||||
|
|
|
@ -11,7 +11,7 @@ jest.mock("axios", () => ({
|
|||
import { API } from "../../api";
|
||||
import { Content } from "../../constants";
|
||||
import {
|
||||
requestAccountExport, generateFilename
|
||||
requestAccountExport, generateFilename,
|
||||
} from "../request_account_export";
|
||||
import { success } from "../../toast/toast";
|
||||
import axios from "axios";
|
||||
|
|
|
@ -3,7 +3,7 @@ import {
|
|||
Widget,
|
||||
WidgetHeader,
|
||||
WidgetBody,
|
||||
SaveBtn
|
||||
SaveBtn,
|
||||
} from "../../ui/index";
|
||||
import { SpecialStatus } from "farmbot";
|
||||
import Axios from "axios";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from "react";
|
||||
import {
|
||||
BlurableInput, Widget, WidgetHeader, WidgetBody, SaveBtn
|
||||
BlurableInput, Widget, WidgetHeader, WidgetBody, SaveBtn,
|
||||
} from "../../ui/index";
|
||||
import { SettingsPropTypes } from "../interfaces";
|
||||
import { t } from "../../i18next_wrapper";
|
||||
|
|
|
@ -8,7 +8,7 @@ import { DevMode } from "../dev_mode";
|
|||
import * as React from "react";
|
||||
import { range } from "lodash";
|
||||
import {
|
||||
setWebAppConfigValue
|
||||
setWebAppConfigValue,
|
||||
} from "../../../config_storage/actions";
|
||||
import { warning } from "../../../toast/toast";
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ jest.mock("../../../config_storage/actions", () => ({
|
|||
import * as React from "react";
|
||||
import { mount, shallow } from "enzyme";
|
||||
import {
|
||||
DevWidget, DevWidgetFERow, DevWidgetFBOSRow, DevWidgetDelModeRow
|
||||
DevWidget, DevWidgetFERow, DevWidgetFBOSRow, DevWidgetDelModeRow,
|
||||
} from "../dev_widget";
|
||||
import { DevSettings } from "../dev_support";
|
||||
import { setWebAppConfigValue } from "../../../config_storage/actions";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { store } from "../../redux/store";
|
||||
import {
|
||||
getWebAppConfigValue, setWebAppConfigValue
|
||||
getWebAppConfigValue, setWebAppConfigValue,
|
||||
} from "../../config_storage/actions";
|
||||
import { BooleanConfigKey } from "farmbot/dist/resources/configs/web_app";
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from "react";
|
||||
import {
|
||||
Widget, WidgetHeader, WidgetBody, Row, Col, BlurableInput
|
||||
Widget, WidgetHeader, WidgetBody, Row, Col, BlurableInput,
|
||||
} from "../../ui";
|
||||
import { ToggleButton } from "../../controls/toggle_button";
|
||||
import { setWebAppConfigValue } from "../../config_storage/actions";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import {
|
||||
Settings, ChangePassword, ExportAccountPanel, DangerousDeleteWidget
|
||||
Settings, ChangePassword, ExportAccountPanel, DangerousDeleteWidget,
|
||||
} from "./components";
|
||||
import { Props } from "./interfaces";
|
||||
import { Page, Row, Col } from "../ui";
|
||||
|
|
|
@ -5,7 +5,7 @@ const mockFeatures = [
|
|||
storageKey: "weedDetector",
|
||||
callback: jest.fn(),
|
||||
value: false
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
const mocks = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { BooleanSetting } from "../../session_keys";
|
||||
import { Content } from "../../constants";
|
||||
import {
|
||||
GetWebAppConfigValue, setWebAppConfigValue
|
||||
GetWebAppConfigValue, setWebAppConfigValue,
|
||||
} from "../../config_storage/actions";
|
||||
import { BooleanConfigKey } from "farmbot/dist/resources/configs/web_app";
|
||||
import { t } from "../../i18next_wrapper";
|
||||
|
@ -78,7 +78,7 @@ export const fetchLabFeatures =
|
|||
storageKey: BooleanSetting.user_interface_read_only_mode,
|
||||
value: false,
|
||||
displayInvert: false,
|
||||
}
|
||||
},
|
||||
].map(fetchSettingValue(getConfigValue)));
|
||||
|
||||
/** Always allow toggling from true => false (deactivate).
|
||||
|
|
|
@ -18,7 +18,7 @@ import { validBotLocationData, validFwConfig, validFbosConfig } from "./util";
|
|||
import { BooleanSetting } from "./session_keys";
|
||||
import { getPathArray } from "./history";
|
||||
import {
|
||||
getWebAppConfigValue, GetWebAppConfigValue
|
||||
getWebAppConfigValue, GetWebAppConfigValue,
|
||||
} from "./config_storage/actions";
|
||||
import { takeSortedLogs } from "./logs/state_to_props";
|
||||
import { FirmwareConfig } from "farmbot/dist/resources/configs/firmware";
|
||||
|
@ -99,7 +99,7 @@ const MUST_LOAD: ResourceName[] = [
|
|||
"FarmEvent",
|
||||
"Point",
|
||||
"Device",
|
||||
"Tool" // Sequence editor needs this for rendering.
|
||||
"Tool", // Sequence editor needs this for rendering.
|
||||
];
|
||||
|
||||
export class RawApp extends React.Component<AppProps, {}> {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import axios from "axios";
|
||||
import {
|
||||
fetchReleases, fetchMinOsFeatureData,
|
||||
fetchLatestGHBetaRelease
|
||||
fetchLatestGHBetaRelease,
|
||||
} from "../devices/actions";
|
||||
import { AuthState } from "./interfaces";
|
||||
import { ReduxAction } from "../redux/interfaces";
|
||||
|
@ -10,7 +10,7 @@ import { API } from "../api";
|
|||
import {
|
||||
responseFulfilled,
|
||||
responseRejected,
|
||||
requestFulfilled
|
||||
requestFulfilled,
|
||||
} from "../interceptors";
|
||||
import { Actions } from "../constants";
|
||||
import { connectDevice } from "../connectivity/connect_device";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {
|
||||
toggleWebAppBool, getWebAppConfigValue, setWebAppConfigValue
|
||||
toggleWebAppBool, getWebAppConfigValue, setWebAppConfigValue,
|
||||
} from "../actions";
|
||||
import { BooleanSetting, NumericSetting } from "../../session_keys";
|
||||
import { edit, save } from "../../api/crud";
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
BooleanConfigKey,
|
||||
WebAppConfig,
|
||||
NumberConfigKey,
|
||||
StringConfigKey
|
||||
StringConfigKey,
|
||||
} from "farmbot/dist/resources/configs/web_app";
|
||||
import { getWebAppConfig } from "../resources/getters";
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import { fakeState } from "../../__test_support__/fake_state";
|
|||
import { GetState } from "../../redux/interfaces";
|
||||
import { handleInbound } from "../auto_sync_handle_inbound";
|
||||
import {
|
||||
handleCreateOrUpdate
|
||||
handleCreateOrUpdate,
|
||||
} from "../auto_sync";
|
||||
import { destroyOK } from "../../resources/actions";
|
||||
import { SkipMqttData, BadMqttData, UpdateMqttData, DeleteMqttData } from "../interfaces";
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
asTaggedResource,
|
||||
handleCreate,
|
||||
handleUpdate,
|
||||
handleCreateOrUpdate
|
||||
handleCreateOrUpdate,
|
||||
} from "../auto_sync";
|
||||
import { SpecialStatus, TaggedSequence } from "farmbot";
|
||||
import { Actions } from "../../constants";
|
||||
|
|
|
@ -35,7 +35,7 @@ describe("attachEventListeners", () => {
|
|||
].map(e => expect(dev.on).toHaveBeenCalledWith(e, expect.any(Function)));
|
||||
[
|
||||
"message",
|
||||
"reconnect"
|
||||
"reconnect",
|
||||
].map(e => {
|
||||
if (dev.client) {
|
||||
expect(dev.client.on).toHaveBeenCalledWith(e, expect.any(Function));
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
incomingStatus,
|
||||
incomingLegacyStatus,
|
||||
onLegacyStatus,
|
||||
HACKY_FLAGS
|
||||
HACKY_FLAGS,
|
||||
} from "../../connect_device";
|
||||
import { slowDown } from "../../slow_down";
|
||||
import { fakeState } from "../../../__test_support__/fake_state";
|
||||
|
|
|
@ -20,7 +20,7 @@ import { getDevice } from "../../device";
|
|||
import { store } from "../../redux/store";
|
||||
import { Actions } from "../../constants";
|
||||
import {
|
||||
startTracking, outstandingRequests, stopTracking, cleanUUID
|
||||
startTracking, outstandingRequests, stopTracking, cleanUUID,
|
||||
} from "../data_consistency";
|
||||
|
||||
const unprocessedUuid = "~UU.ID~";
|
||||
|
|
|
@ -8,7 +8,7 @@ jest.mock("../index", () => ({
|
|||
import {
|
||||
readPing,
|
||||
startPinging,
|
||||
PING_INTERVAL
|
||||
PING_INTERVAL,
|
||||
} from "../ping_mqtt";
|
||||
import { Farmbot, RpcRequest, RpcRequestBodyItem } from "farmbot";
|
||||
import { FarmBotInternalConfig } from "farmbot/dist/config";
|
||||
|
|
|
@ -41,7 +41,7 @@ describe("connectivity reducer", () => {
|
|||
it("broadcasts PING_OK", () => {
|
||||
pingOK("yep", 123);
|
||||
expect(store.dispatch).toHaveBeenCalledWith({
|
||||
payload: { at: 123, id: "yep", },
|
||||
payload: { at: 123, id: "yep" },
|
||||
type: "PING_OK",
|
||||
});
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@ import { TaggedResource, SpecialStatus } from "farmbot";
|
|||
import { overwrite, init } from "../api/crud";
|
||||
import { handleInbound } from "./auto_sync_handle_inbound";
|
||||
import {
|
||||
SyncPayload, MqttDataResult, Reason, UpdateMqttData
|
||||
SyncPayload, MqttDataResult, Reason, UpdateMqttData,
|
||||
} from "./interfaces";
|
||||
import { outstandingRequests } from "./data_consistency";
|
||||
import { newTaggedResource } from "../sync/actions";
|
||||
|
|
|
@ -3,7 +3,7 @@ import {
|
|||
actOnChannelName,
|
||||
showLogOnScreen,
|
||||
speakLogAloud,
|
||||
initLog
|
||||
initLog,
|
||||
} from "./connect_device";
|
||||
import { GetState } from "../redux/interfaces";
|
||||
import { Log } from "farmbot/dist/resources/api_resources";
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
dispatchNetworkUp,
|
||||
dispatchQosStart,
|
||||
pingOK,
|
||||
pingNO
|
||||
pingNO,
|
||||
} from "./index";
|
||||
import { isNumber } from "lodash";
|
||||
import axios from "axios";
|
||||
|
|
|
@ -2,7 +2,7 @@ import { generateReducer } from "../redux/generate_reducer";
|
|||
import { Actions } from "../constants";
|
||||
import {
|
||||
ConnectionState,
|
||||
EdgeStatus
|
||||
EdgeStatus,
|
||||
} from "./interfaces";
|
||||
import { startPing, completePing, failPing } from "../devices/connectivity/qos";
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import { mount } from "enzyme";
|
|||
import { RawControls as Controls } from "../controls";
|
||||
import { bot } from "../../__test_support__/fake_state/bot";
|
||||
import {
|
||||
fakePeripheral, fakeWebcamFeed, fakeSensor
|
||||
fakePeripheral, fakeWebcamFeed, fakeSensor,
|
||||
} from "../../__test_support__/fake_state/resources";
|
||||
import { Dictionary } from "farmbot";
|
||||
import { Props } from "../interfaces";
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import {
|
||||
BotState, Xyz, BotPosition, ShouldDisplay, UserEnv
|
||||
BotState, Xyz, BotPosition, ShouldDisplay, UserEnv,
|
||||
} from "../devices/interfaces";
|
||||
import { Vector3, McuParams, FirmwareHardware } from "farmbot/dist";
|
||||
import {
|
||||
TaggedWebcamFeed,
|
||||
TaggedPeripheral,
|
||||
TaggedSensor,
|
||||
TaggedSensorReading
|
||||
TaggedSensorReading,
|
||||
} from "farmbot";
|
||||
import { NetworkState } from "../connectivity/interfaces";
|
||||
import { GetWebAppConfigValue } from "../config_storage/actions";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {
|
||||
calcMicrostepsPerMm, calculateAxialLengths
|
||||
calcMicrostepsPerMm, calculateAxialLengths,
|
||||
} from "../direction_axes_props";
|
||||
import { fakeFirmwareConfig } from "../../../__test_support__/fake_state/resources";
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ jest.mock("../../../device", () => ({
|
|||
import * as React from "react";
|
||||
import { mount } from "enzyme";
|
||||
import {
|
||||
DirectionButton, directionDisabled, calculateDistance
|
||||
DirectionButton, directionDisabled, calculateDistance,
|
||||
} from "../direction_button";
|
||||
import { DirectionButtonProps } from "../interfaces";
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import * as React from "react";
|
|||
import { mount } from "enzyme";
|
||||
import { BooleanSetting } from "../../../session_keys";
|
||||
import {
|
||||
moveWidgetSetting, MoveWidgetSettingsMenu, MoveWidgetSettingsMenuProps
|
||||
moveWidgetSetting, MoveWidgetSettingsMenu, MoveWidgetSettingsMenuProps,
|
||||
} from "../settings_menu";
|
||||
|
||||
describe("moveWidgetSetting()", () => {
|
||||
|
|
|
@ -6,7 +6,7 @@ import { getDevice } from "../../device";
|
|||
import { buildDirectionProps } from "./direction_axes_props";
|
||||
import { t } from "../../i18next_wrapper";
|
||||
import {
|
||||
cameraBtnProps
|
||||
cameraBtnProps,
|
||||
} from "../../devices/components/fbos_settings/camera_selection";
|
||||
const DEFAULT_STEP_SIZE = 100;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import moment from "moment";
|
|||
import { BotLocationData, BotPosition } from "../../devices/interfaces";
|
||||
import { trim } from "../../util";
|
||||
import {
|
||||
cloneDeep, max, get, isNumber, isEqual, takeRight, ceil, range
|
||||
cloneDeep, max, get, isNumber, isEqual, takeRight, ceil, range,
|
||||
} from "lodash";
|
||||
import { t } from "../../i18next_wrapper";
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ export interface MoveWidgetSettingsMenuProps {
|
|||
}
|
||||
|
||||
export const MoveWidgetSettingsMenu = (
|
||||
{ toggle, getValue, firmwareHardware }: MoveWidgetSettingsMenuProps
|
||||
{ toggle, getValue, firmwareHardware }: MoveWidgetSettingsMenuProps,
|
||||
) => {
|
||||
const Setting = moveWidgetSetting(toggle, getValue);
|
||||
return <div className="move-settings-menu">
|
||||
|
|
|
@ -21,16 +21,13 @@ export class StepSizeSelector extends React.Component<StepSizeSelectorProps, {}>
|
|||
|
||||
render() {
|
||||
return <div className="move-amount-wrapper">
|
||||
{
|
||||
this.props.choices.map(
|
||||
(item: number, inx: number) => <button key={inx}
|
||||
title={t("{{ amount }}mm", { amount: item })}
|
||||
className={this.cssForIndex(item)}
|
||||
onClick={() => this.props.selector(item)}>
|
||||
{item}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
{this.props.choices.map((item: number, inx: number) =>
|
||||
<button key={inx}
|
||||
title={t("{{ amount }}mm", { amount: item })}
|
||||
className={this.cssForIndex(item)}
|
||||
onClick={() => this.props.selector(item)}>
|
||||
{item}
|
||||
</button>)}
|
||||
</div>;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import { mount } from "enzyme";
|
|||
import { PeripheralList } from "../peripheral_list";
|
||||
import {
|
||||
TaggedPeripheral,
|
||||
SpecialStatus
|
||||
SpecialStatus,
|
||||
} from "farmbot";
|
||||
import { Pins } from "farmbot/dist";
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ export class Peripherals
|
|||
|
||||
newPeripheral = (
|
||||
pin: number | undefined = undefined,
|
||||
label = t("New Peripheral")
|
||||
label = t("New Peripheral"),
|
||||
) => {
|
||||
this.props.dispatch(init("Peripheral", { pin, label }));
|
||||
};
|
||||
|
|
|
@ -26,6 +26,5 @@ export const PeripheralForm = (props: PeripheralFormProps) =>
|
|||
dispatch={props.dispatch}
|
||||
uuid={peripheral.uuid} />
|
||||
</Col>
|
||||
</Row>
|
||||
)}
|
||||
</Row>)}
|
||||
</div>;
|
||||
|
|
|
@ -2,7 +2,7 @@ import * as React from "react";
|
|||
import { edit } from "../api/crud";
|
||||
import { FBSelect } from "../ui";
|
||||
import {
|
||||
pinDropdowns
|
||||
pinDropdowns,
|
||||
} from "../sequences/step_tiles/pin_and_peripheral_support";
|
||||
import { PIN_MODES } from "../sequences/step_tiles/tile_pin_support";
|
||||
import { t } from "../i18next_wrapper";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {
|
||||
fakeSensorReading, fakeSensor
|
||||
fakeSensorReading, fakeSensor,
|
||||
} from "../../../__test_support__/fake_state/resources";
|
||||
import { filterSensorReadings } from "../filter_readings";
|
||||
import { SensorReadingsState } from "../interfaces";
|
||||
|
|
|
@ -3,7 +3,7 @@ import { mount } from "enzyme";
|
|||
import { SensorReadingsPlot, calcTimeParams } from "../graph";
|
||||
import { SensorReadingPlotProps } from "../interfaces";
|
||||
import {
|
||||
fakeSensorReading
|
||||
fakeSensorReading,
|
||||
} from "../../../__test_support__/fake_state/resources";
|
||||
import { fakeTimeSettings } from "../../../__test_support__/fake_time_settings";
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import { mount } from "enzyme";
|
|||
import { SensorReadings } from "../sensor_readings";
|
||||
import { SensorReadingsProps } from "../interfaces";
|
||||
import {
|
||||
fakeSensorReading, fakeSensor
|
||||
fakeSensorReading, fakeSensor,
|
||||
} from "../../../__test_support__/fake_state/resources";
|
||||
import moment from "moment";
|
||||
import { fakeTimeSettings } from "../../../__test_support__/fake_time_settings";
|
||||
|
|
|
@ -3,7 +3,7 @@ import { mount } from "enzyme";
|
|||
import { SensorReadingsTable } from "../table";
|
||||
import { SensorReadingsTableProps } from "../interfaces";
|
||||
import {
|
||||
fakeSensorReading, fakeSensor
|
||||
fakeSensorReading, fakeSensor,
|
||||
} from "../../../__test_support__/fake_state/resources";
|
||||
import { fakeTimeSettings } from "../../../__test_support__/fake_time_settings";
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as React from "react";
|
||||
import { mount, shallow } from "enzyme";
|
||||
import {
|
||||
TimePeriodSelection, getEndDate, DateDisplay
|
||||
TimePeriodSelection, getEndDate, DateDisplay,
|
||||
} from "../time_period_selection";
|
||||
import { fakeSensorReading } from "../../../__test_support__/fake_state/resources";
|
||||
import { TimePeriodSelectionProps, DateDisplayProps } from "../interfaces";
|
||||
|
|
|
@ -10,7 +10,7 @@ const oneDay = 3600 * 24;
|
|||
export const calcEndOfPeriod = (
|
||||
timePeriod: number,
|
||||
endDate: number,
|
||||
period: "current" | "previous"
|
||||
period: "current" | "previous",
|
||||
) => endDate + oneDay
|
||||
- timePeriod * (period === "current" ? 0 : 1);
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import { SensorReadingsProps, SensorReadingsState } from "./interfaces";
|
|||
import { SensorReadingsTable } from "./table";
|
||||
import { filterSensorReadings } from "./filter_readings";
|
||||
import {
|
||||
TimePeriodSelection, DateDisplay, getEndDate
|
||||
TimePeriodSelection, DateDisplay, getEndDate,
|
||||
} from "./time_period_selection";
|
||||
import { LocationSelection, LocationDisplay } from "./location_selection";
|
||||
import { SensorSelection } from "./sensor_selection";
|
||||
|
|
|
@ -46,7 +46,7 @@ const SensorReadingDisplay =
|
|||
const classNames = [
|
||||
"sensor-reading-display",
|
||||
moistureSensor, toolSensor,
|
||||
mode ? "analog" : "digital"
|
||||
mode ? "analog" : "digital",
|
||||
];
|
||||
return <div className={classNames.join(" ")}>
|
||||
{isNumber(value) && value >= 0 &&
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
selectAllWebcamFeeds,
|
||||
selectAllSensors,
|
||||
selectAllSensorReadings,
|
||||
maybeGetTimeSettings
|
||||
maybeGetTimeSettings,
|
||||
} from "../resources/selectors";
|
||||
import { Props } from "./interfaces";
|
||||
import { validFwConfig, validFbosConfig } from "../util";
|
||||
|
|
|
@ -23,7 +23,7 @@ describe("<Edit/>", () => {
|
|||
p.feeds[0].body.name,
|
||||
p.feeds[0].body.url,
|
||||
p.feeds[1].body.name,
|
||||
p.feeds[1].body.url
|
||||
p.feeds[1].body.url,
|
||||
].map(text =>
|
||||
expect(wrapper.html()).toContain(text));
|
||||
});
|
||||
|
|
|
@ -6,7 +6,7 @@ import { ControlsPopupProps } from "./controls/move/interfaces";
|
|||
import { commandErr } from "./devices/actions";
|
||||
import { mapPanelClassName } from "./farm_designer/map/util";
|
||||
import {
|
||||
cameraBtnProps
|
||||
cameraBtnProps,
|
||||
} from "./devices/components/fbos_settings/camera_selection";
|
||||
import { t } from "./i18next_wrapper";
|
||||
|
||||
|
|
|
@ -32,11 +32,11 @@ jest.mock("axios", () => ({ get: jest.fn(() => mockGetRelease) }));
|
|||
|
||||
import * as actions from "../actions";
|
||||
import {
|
||||
fakeFirmwareConfig, fakeFbosConfig
|
||||
fakeFirmwareConfig, fakeFbosConfig,
|
||||
} from "../../__test_support__/fake_state/resources";
|
||||
import { fakeState } from "../../__test_support__/fake_state";
|
||||
import {
|
||||
changeStepSize, commandErr
|
||||
changeStepSize, commandErr,
|
||||
} from "../actions";
|
||||
import { Actions } from "../../constants";
|
||||
import { buildResourceIndex } from "../../__test_support__/resource_index_builder";
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Props } from "../interfaces";
|
|||
import { auth } from "../../__test_support__/fake_state/token";
|
||||
import { bot } from "../../__test_support__/fake_state/bot";
|
||||
import {
|
||||
fakeDevice, buildResourceIndex, FAKE_RESOURCES
|
||||
fakeDevice, buildResourceIndex, FAKE_RESOURCES,
|
||||
} from "../../__test_support__/resource_index_builder";
|
||||
import { FarmbotOsSettings } from "../components/farmbot_os_settings";
|
||||
import { fakeTimeSettings } from "../../__test_support__/fake_time_settings";
|
||||
|
|
|
@ -2,7 +2,7 @@ import {
|
|||
fakeFbosConfig,
|
||||
fakeImage,
|
||||
fakeFarmwareEnv,
|
||||
fakeWebAppConfig
|
||||
fakeWebAppConfig,
|
||||
} from "../../__test_support__/fake_state/resources";
|
||||
|
||||
let mockFbosConfig: TaggedFbosConfig | undefined = fakeFbosConfig();
|
||||
|
|
|
@ -3,7 +3,7 @@ import {
|
|||
lessThan,
|
||||
mcuParamValidator,
|
||||
OK,
|
||||
McuErrors
|
||||
McuErrors,
|
||||
} from "../update_interceptor";
|
||||
|
||||
describe("greaterThan() and lessThan()", () => {
|
||||
|
|
|
@ -3,13 +3,13 @@ import { success, warning, info, error } from "../toast/toast";
|
|||
import { getDevice } from "../device";
|
||||
import { Everything } from "../interfaces";
|
||||
import {
|
||||
GithubRelease, MoveRelProps, MinOsFeatureLookup, SourceFwConfig, Axis
|
||||
GithubRelease, MoveRelProps, MinOsFeatureLookup, SourceFwConfig, Axis,
|
||||
} from "./interfaces";
|
||||
import { Thunk } from "../redux/interfaces";
|
||||
import {
|
||||
McuParams, TaggedFirmwareConfig, ParameterApplication,
|
||||
ALLOWED_PIN_MODES,
|
||||
FirmwareHardware
|
||||
FirmwareHardware,
|
||||
} from "farmbot";
|
||||
import { ControlPanelState } from "../devices/interfaces";
|
||||
import { oneOf, versionOK, trim } from "../util";
|
||||
|
@ -144,7 +144,7 @@ export function sync(): Thunk {
|
|||
|
||||
export function execSequence(
|
||||
sequenceId: number | undefined,
|
||||
bodyVariables?: ParameterApplication[]
|
||||
bodyVariables?: ParameterApplication[],
|
||||
) {
|
||||
const noun = t("Sequence execution");
|
||||
if (sequenceId) {
|
||||
|
@ -287,7 +287,7 @@ export function MCUFactoryReset() {
|
|||
export function settingToggle(
|
||||
key: ConfigKey,
|
||||
sourceFwConfig: SourceFwConfig,
|
||||
displayAlert?: string | undefined
|
||||
displayAlert?: string | undefined,
|
||||
) {
|
||||
return function (dispatch: Function, getState: () => Everything) {
|
||||
if (displayAlert) { alert(trim(displayAlert)); }
|
||||
|
@ -325,7 +325,7 @@ export function pinToggle(pin_number: number) {
|
|||
}
|
||||
|
||||
export function readPin(
|
||||
pin_number: number, label: string, pin_mode: ALLOWED_PIN_MODES
|
||||
pin_number: number, label: string, pin_mode: ALLOWED_PIN_MODES,
|
||||
) {
|
||||
const noun = t("Read pin");
|
||||
return getDevice()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {
|
||||
axisTrackingStatus, disabledAxisMap, enabledAxisMap
|
||||
axisTrackingStatus, disabledAxisMap, enabledAxisMap,
|
||||
} from "../axis_tracking_status";
|
||||
import { bot } from "../../../__test_support__/fake_state/bot";
|
||||
|
||||
|
@ -16,7 +16,7 @@ const expected =
|
|||
{
|
||||
"axis": "z",
|
||||
"disabled": true
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
describe("axisTrackingStatus()", () => {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { BotConfigInputBox, BotConfigInputBoxProps } from "../bot_config_input_b
|
|||
import { fakeState } from "../../../__test_support__/fake_state";
|
||||
import { fakeFbosConfig } from "../../../__test_support__/fake_state/resources";
|
||||
import {
|
||||
buildResourceIndex
|
||||
buildResourceIndex,
|
||||
} from "../../../__test_support__/resource_index_builder";
|
||||
import { edit, save } from "../../../api/crud";
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@ import { Actions } from "../../../constants";
|
|||
import { bot } from "../../../__test_support__/fake_state/bot";
|
||||
import { panelState } from "../../../__test_support__/control_panel_state";
|
||||
import {
|
||||
fakeFirmwareConfig
|
||||
fakeFirmwareConfig,
|
||||
} from "../../../__test_support__/fake_state/resources";
|
||||
import { clickButton } from "../../../__test_support__/helpers";
|
||||
import {
|
||||
buildResourceIndex
|
||||
buildResourceIndex,
|
||||
} from "../../../__test_support__/resource_index_builder";
|
||||
import type { FirmwareConfig } from "farmbot/dist/resources/configs/firmware";
|
||||
import { Color } from "../../../ui";
|
||||
|
|
|
@ -5,7 +5,7 @@ jest.mock("../../actions", () => ({
|
|||
import * as React from "react";
|
||||
import { mount } from "enzyme";
|
||||
import {
|
||||
Highlight, HighlightProps, maybeHighlight, maybeOpenPanel, highlight
|
||||
Highlight, HighlightProps, maybeHighlight, maybeOpenPanel, highlight,
|
||||
} from "../maybe_highlight";
|
||||
import { DeviceSetting } from "../../../constants";
|
||||
import { panelState } from "../../../__test_support__/control_panel_state";
|
||||
|
|
|
@ -7,7 +7,7 @@ import { PinGuardMCUInputGroupProps } from "../interfaces";
|
|||
import { bot } from "../../../__test_support__/fake_state/bot";
|
||||
import { settingToggle } from "../../actions";
|
||||
import {
|
||||
buildResourceIndex
|
||||
buildResourceIndex,
|
||||
} from "../../../__test_support__/resource_index_builder";
|
||||
|
||||
describe("<PinGuardMCUInputGroup/>", () => {
|
||||
|
|
|
@ -5,10 +5,10 @@ import { mount, shallow } from "enzyme";
|
|||
import { PinNumberDropdown } from "../pin_number_dropdown";
|
||||
import { PinGuardMCUInputGroupProps } from "../interfaces";
|
||||
import {
|
||||
buildResourceIndex
|
||||
buildResourceIndex,
|
||||
} from "../../../__test_support__/resource_index_builder";
|
||||
import {
|
||||
fakeFirmwareConfig, fakePeripheral
|
||||
fakeFirmwareConfig, fakePeripheral,
|
||||
} from "../../../__test_support__/fake_state/resources";
|
||||
import { TaggedFirmwareConfig } from "farmbot";
|
||||
import { FBSelect } from "../../../ui";
|
||||
|
|
|
@ -2,7 +2,7 @@ import { sourceFbosConfigValue, sourceFwConfigValue } from "../source_config_val
|
|||
import { bot } from "../../../__test_support__/fake_state/bot";
|
||||
import {
|
||||
fakeFbosConfig,
|
||||
fakeFirmwareConfig
|
||||
fakeFirmwareConfig,
|
||||
} from "../../../__test_support__/fake_state/resources";
|
||||
|
||||
describe("sourceFbosConfigValue()", () => {
|
||||
|
|
|
@ -15,7 +15,7 @@ import { fakeState } from "../../../../__test_support__/fake_state";
|
|||
import { edit, save } from "../../../../api/crud";
|
||||
import { fakeFbosConfig } from "../../../../__test_support__/fake_state/resources";
|
||||
import {
|
||||
buildResourceIndex
|
||||
buildResourceIndex,
|
||||
} from "../../../../__test_support__/resource_index_builder";
|
||||
|
||||
describe("<AutoSyncRow/>", () => {
|
||||
|
|
|
@ -11,7 +11,7 @@ import { fakeState } from "../../../../__test_support__/fake_state";
|
|||
import { edit, save } from "../../../../api/crud";
|
||||
import { fakeFbosConfig } from "../../../../__test_support__/fake_state/resources";
|
||||
import {
|
||||
buildResourceIndex
|
||||
buildResourceIndex,
|
||||
} from "../../../../__test_support__/resource_index_builder";
|
||||
|
||||
describe("<AutoUpdateRow/>", () => {
|
||||
|
|
|
@ -9,15 +9,15 @@ import { BoardType } from "../board_type";
|
|||
import { BoardTypeProps } from "../interfaces";
|
||||
import { fakeState } from "../../../../__test_support__/fake_state";
|
||||
import {
|
||||
fakeFbosConfig
|
||||
fakeFbosConfig,
|
||||
} from "../../../../__test_support__/fake_state/resources";
|
||||
import {
|
||||
buildResourceIndex
|
||||
buildResourceIndex,
|
||||
} from "../../../../__test_support__/resource_index_builder";
|
||||
import { edit, save } from "../../../../api/crud";
|
||||
import { bot } from "../../../../__test_support__/fake_state/bot";
|
||||
import {
|
||||
fakeTimeSettings
|
||||
fakeTimeSettings,
|
||||
} from "../../../../__test_support__/fake_time_settings";
|
||||
|
||||
describe("<BoardType/>", () => {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import {
|
||||
sequence2ddi, mapStateToProps, RawBootSequenceSelector
|
||||
sequence2ddi, mapStateToProps, RawBootSequenceSelector,
|
||||
} from "../boot_sequence_selector";
|
||||
import {
|
||||
fakeSequence, fakeFbosConfig
|
||||
fakeSequence, fakeFbosConfig,
|
||||
} from "../../../../__test_support__/fake_state/resources";
|
||||
import { fakeState } from "../../../../__test_support__/fake_state";
|
||||
import {
|
||||
buildResourceIndex
|
||||
buildResourceIndex,
|
||||
} from "../../../../__test_support__/resource_index_builder";
|
||||
import React from "react";
|
||||
import { mount } from "enzyme";
|
||||
|
|
|
@ -11,7 +11,7 @@ import { FbosDetailsProps } from "../interfaces";
|
|||
import { fakeFbosConfig } from "../../../../__test_support__/fake_state/resources";
|
||||
import { fakeState } from "../../../../__test_support__/fake_state";
|
||||
import {
|
||||
buildResourceIndex, fakeDevice
|
||||
buildResourceIndex, fakeDevice,
|
||||
} from "../../../../__test_support__/resource_index_builder";
|
||||
import { fakeTimeSettings } from "../../../../__test_support__/fake_time_settings";
|
||||
import { updateConfig } from "../../../actions";
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
FirmwareHardwareStatusDetailsProps, FirmwareHardwareStatusDetails,
|
||||
FirmwareHardwareStatusIconProps, FirmwareHardwareStatusIcon,
|
||||
FirmwareHardwareStatusProps, FirmwareHardwareStatus,
|
||||
FirmwareActions, FirmwareActionsProps
|
||||
FirmwareActions, FirmwareActionsProps,
|
||||
} from "../firmware_hardware_status";
|
||||
import { bot } from "../../../../__test_support__/fake_state/bot";
|
||||
import { clickButton } from "../../../../__test_support__/helpers";
|
||||
|
|
|
@ -16,7 +16,7 @@ import { fakeState } from "../../../../__test_support__/fake_state";
|
|||
import { clickButton } from "../../../../__test_support__/helpers";
|
||||
import { fakeFbosConfig } from "../../../../__test_support__/fake_state/resources";
|
||||
import {
|
||||
buildResourceIndex
|
||||
buildResourceIndex,
|
||||
} from "../../../../__test_support__/resource_index_builder";
|
||||
import { edit, save } from "../../../../api/crud";
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import { BoardTypeProps } from "./interfaces";
|
|||
import { t } from "../../../i18next_wrapper";
|
||||
import { FirmwareHardwareStatus } from "./firmware_hardware_status";
|
||||
import {
|
||||
isFwHardwareValue, getFirmwareChoices, FIRMWARE_CHOICES_DDI
|
||||
isFwHardwareValue, getFirmwareChoices, FIRMWARE_CHOICES_DDI,
|
||||
} from "../firmware_hardware_support";
|
||||
import { Highlight } from "../maybe_highlight";
|
||||
import { DeviceSetting } from "../../../constants";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as React from "react";
|
||||
import { DropDownItem, Row, Col, FBSelect } from "../../../ui/index";
|
||||
import {
|
||||
CameraSelectionProps, CameraSelectionState
|
||||
CameraSelectionProps, CameraSelectionState,
|
||||
} from "./interfaces";
|
||||
import { info, success, error } from "../../../toast/toast";
|
||||
import { getDevice } from "../../../device";
|
||||
|
|
|
@ -41,7 +41,7 @@ interface ChipTemperatureDisplayProps {
|
|||
|
||||
/** RPI CPU temperature display row: label, temperature, indicator. */
|
||||
export function ChipTemperatureDisplay(
|
||||
{ chip, temperature }: ChipTemperatureDisplayProps
|
||||
{ chip, temperature }: ChipTemperatureDisplayProps,
|
||||
): JSX.Element {
|
||||
return <div className="chip-temp-display">
|
||||
<p>
|
||||
|
@ -60,7 +60,7 @@ interface WiFiStrengthDisplayProps {
|
|||
|
||||
/** WiFi signal strength display row: label, strength, indicator. */
|
||||
export function WiFiStrengthDisplay(
|
||||
{ wifiStrength, wifiStrengthPercent, extraInfo }: WiFiStrengthDisplayProps
|
||||
{ wifiStrength, wifiStrengthPercent, extraInfo }: WiFiStrengthDisplayProps,
|
||||
): JSX.Element {
|
||||
const percent = wifiStrength
|
||||
? Math.round(-0.0154 * wifiStrength ** 2 - 0.4 * wifiStrength + 98)
|
||||
|
@ -180,7 +180,7 @@ interface CommitDisplayProps {
|
|||
|
||||
/** GitHub commit display row: label, commit link. */
|
||||
const CommitDisplay = (
|
||||
{ title, repo, commit }: CommitDisplayProps
|
||||
{ title, repo, commit }: CommitDisplayProps,
|
||||
): JSX.Element => {
|
||||
const shortCommit = shortenCommit(commit);
|
||||
return <p>
|
||||
|
@ -222,7 +222,7 @@ export interface BetaReleaseOptInButtonProps {
|
|||
|
||||
/** Label and toggle button for opting in to FBOS beta releases. */
|
||||
export const BetaReleaseOptIn = (
|
||||
{ dispatch, sourceFbosConfig }: BetaReleaseOptInButtonProps
|
||||
{ dispatch, sourceFbosConfig }: BetaReleaseOptInButtonProps,
|
||||
): JSX.Element => {
|
||||
const betaOptIn = sourceFbosConfig("update_channel" as ConfigurationName).value;
|
||||
return <fieldset className={"os-release-channel"}>
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
SaveFarmwareEnv,
|
||||
ShouldDisplay,
|
||||
SourceFbosConfig,
|
||||
UserEnv
|
||||
UserEnv,
|
||||
} from "../../interfaces";
|
||||
import {
|
||||
Alert,
|
||||
|
|
|
@ -61,7 +61,7 @@ export function downloadProgress(job: JobProgress | undefined) {
|
|||
const getLatestVersion = (
|
||||
currentOSVersion: string | undefined,
|
||||
currentBetaOSVersion: string | undefined,
|
||||
betaOptIn: boolean
|
||||
betaOptIn: boolean,
|
||||
): string | undefined => {
|
||||
if (!betaOptIn) { return currentOSVersion; }
|
||||
switch (semverCompare(currentOSVersion || "", currentBetaOSVersion || "")) {
|
||||
|
@ -90,7 +90,7 @@ const betaCommitsAreEqual = (
|
|||
/** Determine the FBOS update button state. */
|
||||
const compareWithBotVersion = (
|
||||
candidate: string | undefined,
|
||||
installedVersion: string | undefined
|
||||
installedVersion: string | undefined,
|
||||
): UpdateButton => {
|
||||
if (!isString(installedVersion)) { return UpdateButton.none; }
|
||||
if (!isString(candidate)) { return UpdateButton.unknown; }
|
||||
|
@ -108,14 +108,14 @@ const compareWithBotVersion = (
|
|||
/** Installed version equal to latest. */
|
||||
const equalToLatest = (
|
||||
latest: string | undefined,
|
||||
installedVersion: string | undefined
|
||||
installedVersion: string | undefined,
|
||||
): boolean =>
|
||||
isString(installedVersion) && isString(latest) &&
|
||||
semverCompare(installedVersion, latest) === SemverResult.EQUAL;
|
||||
|
||||
/** Color, text, and hover text for update button: release version status. */
|
||||
const buttonVersionStatus =
|
||||
({ bot, betaOptIn }: { bot: BotState, betaOptIn: boolean, }): ButtonProps => {
|
||||
({ bot, betaOptIn }: { bot: BotState, betaOptIn: boolean }): ButtonProps => {
|
||||
// Information about available releases.
|
||||
const { currentOSVersion, currentBetaOSVersion, currentBetaOSCommit } = bot;
|
||||
// Currently installed FBOS version data.
|
||||
|
|
|
@ -5,7 +5,7 @@ export const isFwHardwareValue = (x?: unknown): x is FirmwareHardware => {
|
|||
"arduino",
|
||||
"farmduino", "farmduino_k14", "farmduino_k15",
|
||||
"express_k10",
|
||||
"none"
|
||||
"none",
|
||||
];
|
||||
return !!values.includes(x as FirmwareHardware);
|
||||
};
|
||||
|
|
|
@ -11,7 +11,7 @@ import { EndStops } from "./hardware_settings/endstops";
|
|||
import { Motors } from "./hardware_settings/motors";
|
||||
import { SpacePanelHeader } from "./hardware_settings/space_panel_header";
|
||||
import {
|
||||
HomingAndCalibration
|
||||
HomingAndCalibration,
|
||||
} from "./hardware_settings/homing_and_calibration";
|
||||
import { Popover, Position } from "@blueprintjs/core";
|
||||
import { FwParamExportMenu } from "./hardware_settings/export_menu";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from "react";
|
||||
import {
|
||||
EncoderType, EncoderTypeProps, LOOKUP, findByType, isEncoderValue
|
||||
EncoderType, EncoderTypeProps, LOOKUP, findByType, isEncoderValue,
|
||||
} from "../encoder_type";
|
||||
import { shallow } from "enzyme";
|
||||
import { FBSelect } from "../../../../ui/index";
|
||||
|
|
|
@ -12,10 +12,10 @@ import { bot } from "../../../../__test_support__/fake_state/bot";
|
|||
import { edit, save } from "../../../../api/crud";
|
||||
import { fakeState } from "../../../../__test_support__/fake_state";
|
||||
import {
|
||||
fakeFirmwareConfig
|
||||
fakeFirmwareConfig,
|
||||
} from "../../../../__test_support__/fake_state/resources";
|
||||
import {
|
||||
buildResourceIndex
|
||||
buildResourceIndex,
|
||||
} from "../../../../__test_support__/resource_index_builder";
|
||||
|
||||
describe("<ErrorHandling />", () => {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import * as React from "react";
|
||||
import { mount } from "enzyme";
|
||||
import {
|
||||
FwParamExportMenu, condenseFwConfig, uncondenseFwConfig
|
||||
FwParamExportMenu, condenseFwConfig, uncondenseFwConfig,
|
||||
} from "../export_menu";
|
||||
import {
|
||||
fakeFirmwareConfig
|
||||
fakeFirmwareConfig,
|
||||
} from "../../../../__test_support__/fake_state/resources";
|
||||
|
||||
describe("<FwParamExportMenu />", () => {
|
||||
|
|
|
@ -16,7 +16,7 @@ import { HomingAndCalibration } from "../homing_and_calibration";
|
|||
import { bot } from "../../../../__test_support__/fake_state/bot";
|
||||
import { updateMCU } from "../../../actions";
|
||||
import {
|
||||
fakeFirmwareConfig
|
||||
fakeFirmwareConfig,
|
||||
} from "../../../../__test_support__/fake_state/resources";
|
||||
import { error, warning } from "../../../../toast/toast";
|
||||
import { inputEvent } from "../../../../__test_support__/fake_html_events";
|
||||
|
|
|
@ -11,10 +11,10 @@ import { McuParamName } from "farmbot";
|
|||
import { panelState } from "../../../../__test_support__/control_panel_state";
|
||||
import { fakeState } from "../../../../__test_support__/fake_state";
|
||||
import {
|
||||
fakeFirmwareConfig
|
||||
fakeFirmwareConfig,
|
||||
} from "../../../../__test_support__/fake_state/resources";
|
||||
import {
|
||||
buildResourceIndex
|
||||
buildResourceIndex,
|
||||
} from "../../../../__test_support__/resource_index_builder";
|
||||
import { edit, save } from "../../../../api/crud";
|
||||
|
||||
|
@ -37,7 +37,7 @@ describe("<Motors/>", () => {
|
|||
it("renders the base case", () => {
|
||||
const wrapper = render(<Motors {...fakeProps()} />);
|
||||
["Enable 2nd X Motor",
|
||||
"Max Speed (mm/s)"
|
||||
"Max Speed (mm/s)",
|
||||
].map(string =>
|
||||
expect(wrapper.text().toLowerCase()).toContain(string.toLowerCase()));
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@ import { PinBindings } from "../pin_bindings";
|
|||
import { PinBindingsProps } from "../../interfaces";
|
||||
import { panelState } from "../../../../__test_support__/control_panel_state";
|
||||
import {
|
||||
buildResourceIndex
|
||||
buildResourceIndex,
|
||||
} from "../../../../__test_support__/resource_index_builder";
|
||||
|
||||
describe("<PinBindings />", () => {
|
||||
|
|
|
@ -19,7 +19,7 @@ const OPTIONS = [LOOKUP[Encoder.differential], LOOKUP[Encoder.quadrature]];
|
|||
const KEYS: McuParamName[] = [
|
||||
"encoder_type_x",
|
||||
"encoder_type_y",
|
||||
"encoder_type_z"
|
||||
"encoder_type_z",
|
||||
];
|
||||
|
||||
export function isEncoderValue(x: unknown): x is Encoder {
|
||||
|
|
|
@ -90,7 +90,6 @@ export const uncondenseFwConfig =
|
|||
Object.entries(obj).map(([subKey, value]) => {
|
||||
const fwConfigKey = subKey != "" ? `${key}_${subKey}` : key;
|
||||
uncondensedFwConfig[fwConfigKey] = value;
|
||||
}
|
||||
));
|
||||
}));
|
||||
return uncondensedFwConfig;
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {
|
||||
BotState, Xyz, SourceFwConfig,
|
||||
ControlPanelState, Axis
|
||||
ControlPanelState, Axis,
|
||||
} from "../interfaces";
|
||||
import { McuParamName, McuParams, FirmwareHardware } from "farmbot/dist";
|
||||
import { IntegerSize } from "../../util";
|
||||
|
|
|
@ -4,7 +4,7 @@ import { McuInputBoxProps } from "../interfaces";
|
|||
import { updateMCU } from "../actions";
|
||||
import { BlurableInput } from "../../ui/index";
|
||||
import {
|
||||
clampUnsignedInteger, IntegerSize, getMaxInputFromIntSize
|
||||
clampUnsignedInteger, IntegerSize, getMaxInputFromIntSize,
|
||||
} from "../../util";
|
||||
|
||||
import { isUndefined } from "lodash";
|
||||
|
|
|
@ -4,10 +4,10 @@ import { updateMCU } from "../actions";
|
|||
import { isNumber } from "lodash";
|
||||
import { t } from "../../i18next_wrapper";
|
||||
import {
|
||||
pinDropdowns, celery2DropDown, PinGroupName, PERIPHERAL_HEADING
|
||||
pinDropdowns, celery2DropDown, PinGroupName, PERIPHERAL_HEADING,
|
||||
} from "../../sequences/step_tiles/pin_and_peripheral_support";
|
||||
import {
|
||||
selectAllPeripherals, selectAllSavedPeripherals
|
||||
selectAllPeripherals, selectAllSavedPeripherals,
|
||||
} from "../../resources/selectors";
|
||||
import { Dictionary, NamedPin, McuParamName } from "farmbot";
|
||||
import { ResourceIndex } from "../../resources/interfaces";
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import {
|
||||
Configuration, ConfigurationName, McuParams, McuParamName
|
||||
Configuration, ConfigurationName, McuParams, McuParamName,
|
||||
} from "farmbot";
|
||||
import { SourceFbosConfig, SourceFwConfig } from "../interfaces";
|
||||
import { FbosConfig } from "farmbot/dist/resources/configs/fbos";
|
||||
import { FirmwareConfig } from "farmbot/dist/resources/configs/firmware";
|
||||
|
||||
export const sourceFbosConfigValue =
|
||||
(apiConfig: FbosConfig | undefined, botConfig: Configuration
|
||||
(apiConfig: FbosConfig | undefined, botConfig: Configuration,
|
||||
): SourceFbosConfig =>
|
||||
(setting: ConfigurationName) => {
|
||||
const apiValue = apiConfig && apiConfig[setting as keyof FbosConfig];
|
||||
|
@ -18,7 +18,7 @@ export const sourceFbosConfigValue =
|
|||
};
|
||||
|
||||
export const sourceFwConfigValue =
|
||||
(apiConfig: FirmwareConfig | undefined, botConfig: McuParams
|
||||
(apiConfig: FirmwareConfig | undefined, botConfig: McuParams,
|
||||
): SourceFwConfig =>
|
||||
(setting: McuParamName) => {
|
||||
const apiValue = apiConfig && apiConfig[setting];
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
getTextPosition,
|
||||
getLineProps,
|
||||
DiagramNodes,
|
||||
getConnectionColor
|
||||
getConnectionColor,
|
||||
} from "../diagram";
|
||||
import { Color } from "../../../ui/index";
|
||||
import { svgMount } from "../../../__test_support__/svg_mount";
|
||||
|
|
|
@ -4,10 +4,10 @@ import {
|
|||
completePing,
|
||||
startPing,
|
||||
failPing,
|
||||
PingDictionary
|
||||
PingDictionary,
|
||||
} from "../qos";
|
||||
import {
|
||||
fakePings
|
||||
fakePings,
|
||||
} from "../../../__test_support__/fake_state/pings";
|
||||
|
||||
describe("QoS helpers", () => {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue