cnap-cobre/synapse

View on GitHub
frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js

Summary

Maintainability
F
3 days
Test Coverage

Showing 8 of 8 total issues

File AddSftpFileSystemForm.js has 288 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// @flow
 
import Button from 'react-bootstrap/lib/Button';
import Col from 'react-bootstrap/lib/Col';
import { connect } from 'react-redux';

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    <FormGroup controlId="systemPublicKey">
    <Col componentClass={ControlLabel} sm={3}>
    Public Key*
    </Col>
    <Col sm={9}>
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 119..138
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 241..260

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    <FormGroup controlId="systemPrivateKey">
    <Col componentClass={ControlLabel} sm={3}>
    Private Key*
    </Col>
    <Col sm={9}>
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 119..138
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 219..239

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    <FormGroup controlId="systemDescription">
    <Col componentClass={ControlLabel} sm={3}>
    Description
    </Col>
    <Col sm={9}>
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 219..239
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 241..260

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    <FormGroup controlId="systemName">
    <Col componentClass={ControlLabel} sm={3}>
    Name*
    </Col>
    <Col sm={9}>
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 79..97
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 140..158
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 160..178

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    <FormGroup controlId="systemHost">
    <Col componentClass={ControlLabel} sm={3}>
    Host URL*
    </Col>
    <Col sm={9}>
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 79..97
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 99..117
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 140..158

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    <FormGroup controlId="systemSite">
    <Col componentClass={ControlLabel} sm={3}>
    Site
    </Col>
    <Col sm={9}>
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 79..97
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 99..117
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 160..178

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    <FormGroup controlId="systemId">
    <Col componentClass={ControlLabel} sm={3}>
    Id*
    </Col>
    <Col sm={9}>
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 99..117
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 140..158
    frontend/src/components/AddSftpFileSystemForm/AddSftpFileSystemForm.js on lines 160..178

    There are no issues that match your filters.

    Category
    Status