Showing 646 of 1,897 total issues
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { color, redirect } = this.props;
const style = {
animationPlayState: this.state.isHovered ? "paused" : "running",
};
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return <div className="grid">
<label>
{t(this.props.title)}
</label>
Function LogsTable
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const LogsTable = (props: LogsTableProps) => {
return <div className={"logs-table-wrapper"}>
<table className={LOG_TABLE_CLASS}>
<thead>
<tr>
Function curveDataTableRow
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
([day, value]: [string, number], index: number) => {
const { dispatch, curve, hovered, setHovered } = props;
const active = inData(curve.body.data, day);
return <tr key={day} className={hovered == day ? "hovered" : ""}
onMouseEnter={() => setHovered(day)}
Function StartTimeForm
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const StartTimeForm = (props: StartTimeFormProps) => {
const forceMidnight = props.isRegimen;
const isNew = !parseInt("" + props.fieldGet("id"));
const startDatetimeError = isNew && !forceMidnight &&
!moment(props.now).isBefore(moment(offsetTime(props.fieldGet("startDate"),
Function Feedback
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const Feedback = (props: FeedbackProps) => {
const [message, setMessage] = React.useState("");
const [sent, setSent] = React.useState(false);
const orderNumber =
maybeGetDevice(store.getState().resources.index)?.body.fb_order_number;
Function SlotLocationInputRow
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const SlotLocationInputRow = (props: SlotLocationInputRowProps) => {
const x = props.gantryMounted
? props.botPosition.x ?? props.slotLocation.x
: props.slotLocation.x;
const { y, z } = props.slotLocation;
Function joinFarmEventsToExecutable
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function joinFarmEventsToExecutable(
input: ResourceIndex): FarmEventWithExecutable[] {
const farmEvents: TaggedFarmEvent[] = selectAllFarmEvents(input);
const sequenceById = indexSequenceById(input);
const regimenById = indexRegimenById(input);
Function Diagnosis
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function Diagnosis(props: DiagnosisProps) {
const diagnosisBoolean = diagnosisStatus(props.statusFlags);
const diagnosisColor = diagnosisBoolean ? "green" : "red";
const navigate = useNavigate();
return <Row className="diagnosis-section grid-exp-2">
Function render
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const panelName = "designer-sequence-editor";
const { sequence } = this.state;
const viewCeleryScript = this.props.getWebAppConfigValue(
BooleanSetting.view_celery_script);
Function SequenceSettingsMenu
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(props: SequenceSettingsMenuProps) => {
const { dispatch, getWebAppConfigValue } = props;
const commonProps = { dispatch, getWebAppConfigValue };
return <div className="sequence-settings-menu">
<SequenceSetting {...commonProps}
Function If_
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function If_(props: StepParams<If>) {
const { currentStep, resources } = props;
const sequence = props.currentSequence;
const { op } = currentStep.args;
const lhsOptions = LHSOptions(resources, !!props.showPins);
Function PhotoFooter
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const PhotoFooter = (props: PhotoFooterProps) => {
const { image, timeSettings } = props;
const created_at = image
? formatTime(moment(image.body.created_at), timeSettings, "MMMM Do, YYYY")
: "";
Function newPlantKindAndBody
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const newPlantKindAndBody = (props: NewPlantKindAndBodyProps): {
kind: TaggedPlant["kind"],
body: TaggedPlant["body"],
} => {
const savedGardenId = props.openedSavedGarden || undefined;
Function generateTransform
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const generateTransform = (props: TransformProps): string => {
const {
quadrant, qCoords, size, imageOrigin, xySwap, rotate,
} = props;
const { qx, qy } = qCoords;
Function getMode
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getMode = (): Mode => {
if (store.getState().resources.consumers.farm_designer.profileOpen) {
return Mode.profile;
}
const panelSlug = Path.getSlug(Path.designer());
Function GardenMapLegend
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function GardenMapLegend(props: GardenMapLegendProps) {
const { getConfigValue } = props;
const menuClass = props.legendMenuOpen ? "active" : "";
const [zDisplayOpen, setZDisplayOpen] = React.useState(false);
return <div className={`garden-map-legend ${menuClass} ${props.className}`}>
Function render
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const panelName = "designer-regimen-list";
return <DesignerPanel panelName={panelName} panel={Panel.Regimens}>
<DesignerPanelTop
panel={Panel.Regimens}
Function render
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const farmware = this.props.farmwares[this.current || ""];
const panelName = "designer-farmware-info";
return <DesignerPanel panelName={panelName} panel={Panel.Farmware}>
<DesignerPanelHeader
Function DataLabels
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DataLabels = (props: DataLabelsProps) => {
const { curve, showHoverEffect } = props;
const { normX, normY } = props.plotTools;
const { data, type } = curve.body;
const label = (plus: string) =>