Showing 646 of 1,897 total issues
Function ToolProfile
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const ToolProfile = (props: ProfileToolProps) => {
const { toolName, x, y, width, height, sideView } = props;
const toolType = reduceToolName(toolName);
const fontColor = toolType == ToolName.seeder
? Color.darkGray
Function BotPeripherals
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function BotPeripherals(props: BotPeripheralsProps) {
const {
peripheralValues, position, plantAreaOffset, mapTransformProps, getConfigValue,
} = props;
const { xySwap } = mapTransformProps;
Function render
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { farmware, env, dispatch, botOnline } = this.props;
const collapsed = (config: FarmwareConfig) =>
farmware.name == FarmwareName.MeasureSoilHeight
Function render
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const weedGroups = pointGroupSubset(this.props.groups, "Weed");
const filteredGroups = weedGroups
.filter(p => p.body.name.toLowerCase()
.includes(this.state.searchTerm.toLowerCase()));
Function fetchSyncData
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export async function fetchSyncData(dispatch: Function) {
const get = download(dispatch);
/** Resources are placed into groups based on their dependencies.
* For example, if:
* * a Regimen relies on a Sequence
Function FolderNode
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const FolderNode = (props: FolderNodeProps) => {
const { node, sequences } = props;
const sequenceItems = node.content
.filter(seqUuid => sequences[seqUuid])
Consider simplifying this complex logical expression. Open
Open
if (isNumber(x) && isNumber(y) && height > 0 && width > 0 &&
isNumber(imageScale) && imageScale > 0 &&
isNumber(imageOffsetX) && isNumber(imageOffsetY) && imageOrigin) {
return {
x, y, width, height, imageScale, imageOffsetX, imageOffsetY, imageOrigin
Function SequencePreviewContent
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const SequencePreviewContent = (props: SequencePreviewContentProps) => {
const { sequence, viewSequenceCeleryScript } = props;
return <EmptyStateWrapper
notEmpty={sequence && isTaggedSequence(sequence)}
graphic={EmptyStateGraphic.sequences}
Function render
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { currentStep, currentSequence, resources,
} = this.props;
const { sequence_id } = currentStep.args;
const callee = sequence_id
Function WateringNozzle
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const WateringNozzle = (props: ToolGraphicProps) => {
const { x, y, hovered, uuid } = props;
const r = 2;
const ySpacing = 10;
const xSpacing = 14;
Function TargetCoordinate
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function TargetCoordinate(props: TargetCoordinateProps) {
const ID = "target-coordinate";
if (!props.chosenLocation) { return <g id={ID} />; }
const { x, y } = props.chosenLocation;
if (isNumber(x) && isNumber(y)) {
Function render
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { figureName, position, plantAreaOffset, mapTransformProps,
} = this.props;
const { xySwap } = mapTransformProps;
const mapSize = getMapSize(mapTransformProps, plantAreaOffset);
Function SoilSensorImplementProfile
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const SoilSensorImplementProfile = (props: SpecificToolProfileProps) => {
const { x, y, sideView } = props;
const width = SoilSensorDimensions.width;
const length = SoilSensorDimensions.length;
const baseLength = SoilSensorDimensions.baseLength;
Function render
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { images, currentImage } = this.props;
const multipleImages = images.length > 1;
const dark = this.props.id === "fullscreen-flipper";
return <div className={`image-flipper ${this.props.id}`} id={this.props.id}
Function PromoInfo
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const PromoInfo = (props: PromoInfoProps) => {
const { isGenesis } = props;
return <div className="promo-info">
<h2 className="title">Explore our models</h2>
{isGenesis
Function XAxisWaterTube
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const XAxisWaterTube = (props: XAxisWaterTubeProps) => {
const { config } = props;
const groundZ = -config.bedHeight - config.bedZOffset;
const barbX = threeSpace(config.bedLengthOuter / 2 + 400, config.bedLengthOuter);
const barbY = threeSpace(-50, config.bedWidthOuter);
Function render
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { maxCount } = this.state;
const { group, hovered, dispatch, iconDisplay } = this.props;
const manuallyAddedIds = group.body.point_ids;
const sortedPoints = this.sortedGroup;
Function Edit
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function Edit(props: WebcamPanelProps) {
const rows = sortedFeeds(props.feeds).map(wcf => {
return <KeyValEditRow key={wcf.uuid}
onClick={() => props.destroy(wcf)}
onLabelChange={(e) => props.edit(wcf, { name: e.currentTarget.value })}
Function render
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const commonProps = {
key: JSON.stringify(this.state)
+ JSON.stringify(this.props.currentSequence.body.args.locals),
resource: this.state.resource,
Function render
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return <div className="photos">
<Overlay isOpen={this.state.fullscreen}
onClose={this.toggleFullscreen}
backdropProps={{ style: { background: "#000d" } }}>