Showing 646 of 1,897 total issues
Function RawDesignerFarmwareAdd
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const RawDesignerFarmwareAdd = (props: DesignerFarmwareAddProps) => {
const [packageUrl, setPackageUrl] = React.useState("");
const navigate = useNavigate();
const clearUrl = () => navigate(Path.farmware());
Function mapStateToProps
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function mapStateToProps(props: Everything): AppProps {
const webAppConfigValue = getWebAppConfigValue(() => props);
return {
timeSettings: maybeGetTimeSettings(props.resources.index),
dispatch: props.dispatch,
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const panelName = "setup";
return <DesignerPanel panelName={panelName} panel={Panel.Controls}>
<DesignerPanelTop panel={Panel.Controls} />
<DesignerPanelContent panelName={panelName}>
Function calculatePlantPositions
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const calculatePlantPositions = (): Plant[] => {
const positions: Plant[] = [];
const startX = 350;
let nextX = startX;
let index = 0;
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const panelName = "designer-regimen-editor";
const regimen = this.props.current;
const regimenCount = selectAllRegimens(this.props.resources).length;
return <DesignerPanel panelName={panelName} panel={Panel.Regimens}>
Function FactoryResetRows
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const FactoryResetRows = (props: FactoryResetRowsProps) => {
const { botOnline } = props;
return <div className={"factory-reset-options grid"}>
<Highlight settingName={DeviceSetting.softReset}>
<Row className="grid-exp-1">
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { farmEvent } = this.props;
const variableCount = Object.values(this.variableData || {})
.filter(v => v?.celeryNode.kind == "parameter_declaration")
.length;
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const farmEvent = this.props.findFarmEventByUuid(this.state.uuid);
const panelName = "add-farm-event";
return <DesignerPanel panelName={panelName} panel={Panel.FarmEvents}>
<DesignerPanelHeader
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return <DesignerPanel panelName={"crop-catalog"} panel={Panel.Plants}>
<DesignerPanelHeader
panelName={"crop-catalog"}
panel={Panel.Plants}
Function move
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function move(props: MoveProps) {
const noun = t("Movement");
maybeNoop();
maybeAlertLocked();
const safeZ: SafeZ = { kind: "safe_z", args: {} };
Function renderCeleryNode
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function renderCeleryNode(props: StepParams) {
const step = props.currentStep;
switch (step.kind) {
case "_if": return <TileIf {...props} currentStep={step} />;
case "execute_script":
Function AddCommandButton
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const AddCommandButton = (props: AddCommandButtonProps) => {
const { index, dispatch, stepCount } = props;
const getPositionClass = () => {
switch (index) {
case 0: return "first";
Function RawZones
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const RawZones = (props: ZonesProps) => {
const navigate = useNavigate();
const navigateById = (id: number) => navigate(Path.zones(id));
const [searchTerm, setSearchTerm] = React.useState("");
return <DesignerPanel panelName={"zones-inventory"} panel={Panel.Zones}>
Function generateTransformStyle
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const generateTransformStyle = (props: GenerateTransformStyleProps) => {
const { zoomLvl, mapTransformProps } = props;
const { quadrant, xySwap } = mapTransformProps;
/** Determine if an axis is displayed vertically on the page. */
Function PowerAndReset
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function PowerAndReset(props: PowerAndResetProps) {
const { dispatch, botOnline } = props;
const { power_and_reset } = props.settingsPanelState;
return <Highlight className={"section advanced"}
settingName={DeviceSetting.powerAndReset}
Function semverCompare
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function semverCompare(left: string, right: string): SemverResult {
const leftSemVer = left.split("-")[0];
const rightSemVer = right.split("-")[0];
const leftHasSuffix = left.includes("-");
const rightHasSuffix = right.includes("-");
Function OtaTimeSelector
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const OtaTimeSelector = (props: OtaTimeSelectorProps) => {
const { device, dispatch, timeSettings } = props;
const { utcOffset, hour24 } = timeSettings;
const localHour = utcHourToLocalHour(device.body.ota_hour_utc, utcOffset) ??
device.body.ota_hour;
Function getData
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getData = (
all: TaggedTelemetry[],
metricName: keyof Telemetry,
): DataSegment[] => {
const data: DataRecord[] = [];
Function getLocationState
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getLocationState = (step: Move): {
location: LocationNode | undefined,
locationSelection: LocSelection | undefined,
} => {
/** Last axis_overwrite where axis_operand is a point, tool, or identifier. */
Function BotExtents
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function BotExtents(props: BotExtentsProps) {
const { stopAtHome, botSize, mapTransformProps } = props;
const { xySwap } = mapTransformProps;
const homeLength = transformXY(
botSize.x.value, botSize.y.value, mapTransformProps);