Showing 646 of 1,897 total issues
Function render
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const panelName = "add-tool-slot";
return <DesignerPanel panelName={panelName} panel={Panel.Tools}>
<DesignerPanelHeader
panelName={panelName}
Function render
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const panelType = this.panel == "weeds" ? Panel.Weeds : Panel.Points;
const panelDescription = this.panel == "weeds"
? Content.CREATE_WEEDS_DESCRIPTION
: Content.CREATE_POINTS_DESCRIPTION;
Function VersionChangeLines
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const VersionChangeLines = (props: VersionChangeLinesProps) => {
const changes: VersionChangeRecord[] = [];
const mostRecent = last(sortBy(props.telemetry, "body.created_at"));
props.telemetry.map((d, i) => {
if (i == 0) { return; }
Function TileAssertion
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const TileAssertion = (props: StepParams<Assertion>) => {
const [monaco, setMonaco] = React.useState(!isMobile());
const [expanded, setExpanded] = React.useState(false);
const stateToggles = {
[StateToggleKey.monacoEditor]:
Function ImageListItem
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const ImageListItem = (props: ImageListItemProps) => {
const images = sortBy(props.images.items, "body.created_at").reverse();
const [currentImage, setCurrentImage] = React.useState(images[0]);
return <div className={"image-items"}>
<ImageFlipper id={"image-items-flipper"}
Function EncoderType
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function EncoderType(props: EncoderTypeProps) {
const { hardware } = props;
const handleChange = (key: McuParamName) => (d: DropDownItem) => {
const val = d.value;
if (isEncoderValue(val)) {
Function updateViaAjax
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function updateViaAjax(payl: AjaxUpdatePayload) {
const { uuid, statusBeforeError, dispatch, index } = payl;
const resource = findByUuid(index, uuid);
const { body, kind } = resource;
let verb: "post" | "put";
Function render
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
direction, axis, locked, arduinoBusy, botOnline, botPosition, movementState,
} = this.props;
const title = `${t("move {{axis}} axis", { axis })} (${this.distance})`;
Function PlantCurveBulkUpdate
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const PlantCurveBulkUpdate = (props: PlantCurveBulkUpdateProps) => {
const points = props.allPoints.filter(point =>
props.selected.includes(point.uuid) && point.kind === "Point" &&
point.body.pointer_type == "Plant")
.map((p: TaggedPlantPointer) => p);
Function FbosMetricHistoryPlot
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const FbosMetricHistoryPlot = (props: FbosMetricHistoryPlotProps) => {
const mostRecent = last(sortBy(props.telemetry, "body.created_at"));
const hoveredSeconds = clipX(props.hoveredTime, mostRecent);
return <svg
className={"fbos-metric-history-plot-border"}
Function render
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
/** Change document meta title on every route change. */
updatePageInfo(Path.getSlug(Path.app()), Path.getSlug(Path.designer()));
return <ErrorBoundary>
Function AdditionalWeedProperties
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
{Object.entries(props.point.body.meta).map(([key, value]) => {
switch (key) {
case "color":
case "type": return <div key={key}
className={`meta-${key}-not-displayed`} />;
Method typical_sequence
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.typical_sequence
{
kind: "sequence",
name: "move_abs(1,2,3), move_rel(4,5,6), write_pin(13, off, digital)",
color: "gray",
Function requestAutoGeneration
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const requestAutoGeneration = (props: RequestAutoGenerationProps) => {
fetch(API.current.aiPath, {
method: "post",
headers: {
Authorization: `Bearer: ${store.getState().auth?.token.encoded}`,
Function OFSearchRaw
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(dispatch: Function) => {
dispatch({ type: Actions.OF_SEARCH_RESULTS_START, payload: undefined });
(specific
? openFarmSearchQuerySpecific(searchTerm)
: openFarmSearchQuery(searchTerm))
Function SpreadLayer
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function SpreadLayer(props: SpreadLayerProps) {
const {
plants, visible, mapTransformProps, currentPlant, hoveredSpread,
dragging, zoomLvl, activeDragXY, activeDragSpread, editing, animate
} = props;
Function render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { radius, x, y, id } = this.props.plant.body;
const { visible, mapTransformProps, animate } = this.props;
const { qx, qy } = transformXY(round(x), round(y), mapTransformProps);
const spreadDiaCm = this.state.loaded
Function MapBackground
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function MapBackground(props: MapBackgroundProps) {
const { mapTransformProps, plantAreaOffset, templateView } = props;
const gridSize = getMapSize(mapTransformProps);
const boardWidth = 20;
const mapSize = getMapSize(mapTransformProps, plantAreaOffset);
Function modifyConfigsFromUrlParams
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const modifyConfigsFromUrlParams = (config: Config) => {
let newConfig: Config = { ...config };
const urlParams = new URLSearchParams(window.location.search);
const kit = urlParams.get("kit")?.toLowerCase();
if (kit) {
Function WizardStepHeader
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const WizardStepHeader = (props: WizardStepHeaderProps) => {
const stepOpen = props.stepOpen == props.step.slug;
const resultDate = props.stepResult?.updated_at;
const stepDone = props.stepResult?.answer;
const stepFail = stepDone == false;