FarmBot/Farmbot-Web-App

View on GitHub

Showing 655 of 1,993 total issues

Function TimePeriodSelection has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const TimePeriodSelection = (props: TimePeriodSelectionProps) => {
  const { timePeriod, endDate, showPreviousPeriod,
    setEndDate, setPeriod, togglePrevious } = props;
  return <div className="sensor-history-time-selection">
    <Row>
Severity: Minor
Found in frontend/sensors/sensor_readings/time_period_selection.tsx - About 1 hr to fix

    Function render has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      render() {
        return <div className={"grid-and-row-planting"}>
          <h3>{t("Add Grid or Row")}</h3>
          <GridInput
            key={JSON.stringify(this.state.grid)}
    Severity: Minor
    Found in frontend/plants/grid/plant_grid.tsx - About 1 hr to fix

      Function SequencePreviewContent has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const SequencePreviewContent = (props: SequencePreviewContentProps) => {
        const { sequence, viewSequenceCeleryScript } = props;
        return <EmptyStateWrapper
          notEmpty={sequence && isTaggedSequence(sequence)}
          graphic={EmptyStateGraphic.sequences}
      Severity: Minor
      Found in frontend/sequences/panel/preview_support.tsx - About 1 hr to fix

        Method plants has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              def plants(product_line)
                spinach_row_count = product_line.include?("xl") ? 28 : 13
                spinach_col_count = product_line.include?("xl") ? 4 : 2
                (0..(spinach_row_count - 1)).map do |i|
                  (0..(spinach_col_count - 1)).map do |j|
        Severity: Minor
        Found in app/mutations/devices/seeders/demo_account_seeder.rb - About 1 hr to fix

          Function render has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            render() {
              const { dispatch, index, currentStep, currentSequence } = this.props;
              return <StepWrapper {...this.props}
                className={"send-message-step"}
                helpText={t(ToolTips.SEND_MESSAGE)}>
          Severity: Minor
          Found in frontend/sequences/step_tiles/tile_send_message.tsx - About 1 hr to fix

            Function ToolProfile has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            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
            Severity: Minor
            Found in frontend/farm_designer/map/profile/tools.tsx - About 1 hr to fix

              Function BotPeripherals has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function BotPeripherals(props: BotPeripheralsProps) {
                const {
                  peripheralValues, position, plantAreaOffset, mapTransformProps, getConfigValue,
                } = props;
                const { xySwap } = mapTransformProps;
              Severity: Minor
              Found in frontend/farm_designer/map/layers/farmbot/bot_peripherals.tsx - About 1 hr to fix

                Function FactoryResetRows has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const FactoryResetRows = (props: FactoryResetRowsProps) => {
                  const { botOnline } = props;
                  return <div className={"factory-reset-options"}>
                    <Highlight settingName={DeviceSetting.softReset}>
                      <Row>
                Severity: Minor
                Found in frontend/settings/fbos_settings/factory_reset_row.tsx - About 1 hr to fix

                  Function render has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    render() {
                      const { farmware, env, dispatch, botOnline } = this.props;
                  
                      const collapsed = (config: FarmwareConfig) =>
                        farmware.name == FarmwareName.MeasureSoilHeight
                  Severity: Minor
                  Found in frontend/farmware/farmware_forms.tsx - About 1 hr to fix

                    Function render has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      render() {
                        const { group, dispatch, slugs } = this.props;
                        const { criteria } = group.body;
                        const commonProps = { group, criteria, dispatch };
                        const dayProps = {
                    Severity: Minor
                    Found in frontend/point_groups/criteria/component.tsx - About 1 hr to fix

                      Function FolderNode has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const FolderNode = (props: FolderNodeProps) => {
                        const { node, sequences } = props;
                      
                        const sequenceItems = node.content
                          .filter(seqUuid => sequences[seqUuid])
                      Severity: Minor
                      Found in frontend/folders/component.tsx - About 1 hr to fix

                        Function fetchSyncData has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                        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
                        Severity: Minor
                        Found in frontend/sync/actions.ts - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          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
                          Severity: Critical
                          Found in frontend/farm_designer/map/layers/images/map_image.tsx - About 1 hr to fix

                            Function render has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            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}
                            Severity: Minor
                            Found in frontend/photos/images/image_flipper.tsx - About 1 hr to fix

                              Function TargetCoordinate has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                              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)) {
                              Severity: Minor
                              Found in frontend/farm_designer/map/background/target_coordinate.tsx - About 1 hr to fix

                                Function SoilSensorImplementProfile has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export const SoilSensorImplementProfile = (props: SpecificToolProfileProps) => {
                                  const { x, y, sideView } = props;
                                  const width = SoilSensorDimensions.width;
                                  const length = SoilSensorDimensions.length;
                                  const baseLength = SoilSensorDimensions.baseLength;
                                Severity: Minor
                                Found in frontend/farm_designer/map/tool_graphics/soil_sensor.tsx - About 1 hr to fix

                                  Function WateringNozzle has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const WateringNozzle = (props: ToolGraphicProps) => {
                                    const { x, y, hovered, uuid } = props;
                                    const r = 2;
                                    const ySpacing = 10;
                                    const xSpacing = 14;
                                  Severity: Minor
                                  Found in frontend/farm_designer/map/tool_graphics/watering_nozzle.tsx - About 1 hr to fix

                                    Function render has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      render() {
                                        const { figureName, position, plantAreaOffset, mapTransformProps,
                                        } = this.props;
                                        const { xySwap } = mapTransformProps;
                                        const mapSize = getMapSize(mapTransformProps, plantAreaOffset);
                                    Severity: Minor
                                    Found in frontend/farm_designer/map/layers/farmbot/bot_figure.tsx - About 1 hr to fix

                                      Function PromoInfo has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const PromoInfo = (props: PromoInfoProps) => {
                                        const { isGenesis } = props;
                                        return <div className="promo-info">
                                          <h2 className="title">Explore our models</h2>
                                          {isGenesis
                                      Severity: Minor
                                      Found in frontend/three_d_garden/config_overlays.tsx - About 1 hr to fix

                                        Function XAxisWaterTube has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                        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);
                                        Severity: Minor
                                        Found in frontend/three_d_garden/x_axis_water_tube.tsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language