Showing 612 of 1,578 total issues
Function render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { group } = this.props;
const groupsPath = Path.groups();
!group && Path.startsWith(groupsPath) && history.back();
return <DesignerPanel panelName={"group-detail"} panel={Panel.Groups}>
Function PointsSection
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const PointsSection = (props: PointsSectionProps) => {
const { genericPoints, isOpen, dispatch, averageZ, toggleAction } = props;
return <div className={`points-section ${isOpen ? "open" : ""}`}>
<div className={"points-section-header"} onClick={props.toggleOpen}>
{props.color && <Saucer color={props.color} />}
Function LogSetting
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const LogSetting = (props: LogSettingProps) => {
const { label, setting, toolTip, setFilterLevel, sourceFbosConfig } = props;
/** Update the current filter level to a minimum needed for log display. */
const updateMinFilterLevel = (key: keyof Filters, level: number) => {
const currentLevel =
Function ShownInMapDetails
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ShownInMapDetails = (props: ImageShowProps) => {
const { dispatch, image, flags, size } = props;
const shownInMap = every(Object.values(flags));
return <div className={`shown-in-map-details ${shownInMap ? "shown" : ""}`}
onMouseEnter={() => shownInMap && dispatch(highlightMapImage(image?.body.id))}
Function waterFigure
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function waterFigure(
props: { i: number, cx: number, cy: number, animate: boolean }) {
const { i, cx, cy, animate } = props;
const color = "rgb(11, 83, 148)";
const copies = animate ? 3 : 1;
Function reduceMoveAbsolute
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const reduceMoveAbsolute = (
step: MoveAbsolute,
sequenceUuid: UUID | undefined,
): Position | undefined => {
const offset = step.args.offset.args;
Function textAnchorPosition
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const textAnchorPosition = (
pulloutDirection: ToolPulloutDirection,
quadrant: BotOriginQuadrant,
xySwap: boolean,
gantryMounted: boolean,
Function SensorReadingsLayer
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function SensorReadingsLayer(props: SensorReadingsLayerProps) {
const {
visible, sensorReadings, mapTransformProps, timeSettings, sensors
} = props;
const mostRecentSensorReading = last(sensorReadings);
Function DesignerPanelHeader
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const DesignerPanelHeader = (props: DesignerPanelHeaderProps) => {
const panelColor = props.panel ? TAB_COLOR[props.panel] : props.panelColor;
const colorClass = props.colorClass || `${panelColor || PanelColor.gray}-panel`;
const textColor = props.blackText ? "black" : "white";
return <div className={`panel-header ${colorClass}`}
Function PinNumberInputGroup
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const PinNumberInputGroup = (props: PinNumberInputGroupProps) => {
const { pinNumberInput, boundPins, setSelectedPin } = props;
const selectedPinNumber = isNumber(pinNumberInput)
? {
label: generatePinLabel(pinNumberInput),
Function Apology
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function Apology(_: {}) {
return <div style={OUTER_STYLE}>
<div style={INNER_STYLE}>
<h1 style={{ fontSize: "175%" }}>Page Error</h1>
<span>
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return <Row className={"zero-side-margins"}>
<label>
{t(this.props.title)}
</label>
Function commitBulkEditor
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function commitBulkEditor(): Thunk {
return function (dispatch, getState) {
const resources = getState().resources;
const { weeks, dailyOffsetMs, selectedSequenceUUID, currentRegimen } =
resources.consumers.regimens;
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const farmwareNames = Object.values(this.props.farmwares)
.map(fw => fw.name)
.filter(farmwareName => farmwareName != FarmwareName.MeasureSoilHeight)
.filter(fwName => !this.props.firstPartyFarmwareNames.includes(fwName));
Function ForgotPassword
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function ForgotPassword(props: ForgotPasswordProps) {
const {
onGoBack,
onSubmit,
email,
Function beforeEach
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const beforeEach = (state: RestResources,
action: ReduxAction<unknown>,
handler: ActionHandler<RestResources, unknown>) => {
const { byKind, references } = state.index;
const w = references[Object.keys(byKind.WebAppConfig)[0]];
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { dispatch, bot } = this.props;
return <div className={"logs-tab"}>
<div className={"search-row"}>
<SearchField nameKey={"logs"}
Consider simplifying this complex logical expression. Open
Open
if (box &&
isNumber(box.x0) && isNumber(box.y0) &&
isNumber(box.x1) && isNumber(box.y1)) {
return (
p.body.x >= Math.min(box.x0, box.x1) &&
Function PhotoResolutionSettingChanged
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(props: CaptureSizeSelectionProps) => {
const { env, dispatch, saveFarmwareEnv } = props;
const { width, height } = getCurrentSizeSetting(env);
const selectedLongEdge = Math.max(parseInt(width), parseInt(height));
const calibratedX = env["CAMERA_CALIBRATION_center_pixel_location_x"];
Function VariablesPart
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const VariablesPart = (props: StepParams<Assertion>) => {
let sequenceId: number | undefined;
const { _then } = props.currentStep.args;
if (_then.kind == "execute") {
sequenceId = _then.args.sequence_id;