Showing 173 of 964 total issues
Function TreeViewExample
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const TreeViewExample = () => {
const styles = {
card: {
margin: 16,
width: 250,
Function EnhancedTable
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const EnhancedTable = props => {
const {
data,
rowsPerPage,
totalRecords,
Function getSideBarConfig
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getSideBarConfig() {
return {
all: {
items: [],
},
Function render
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const styles = {
card: {
margin: 16,
width: 370,
Function render
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
classes,
createdByValue,
searchValue,
Function render
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const years = this.getYears();
return (
<div className="options-area">
Function render
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const isDescriptionValid = () => this.state.description && this.state.description.trim();
return (
<Column>
Function constructor
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(props) {
super(props);
props.d2.i18n.translations['start_value'] = 'start value';
props.d2.i18n.translations['end_value'] = 'end value';
Function subscribeDataElementActionsToStore
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function subscribeDataElementActionsToStore(dataElementOperandSelectorActions, dataElementOperandStore) {
const loadListSubscription = dataElementOperandSelectorActions.loadList.subscribe(() => {
getInstance()
.then(d2 => d2.Api.getApi().get('dataElementOperands', { fields: 'id,displayName', totals: true, filter: ['dataElement.domainType:eq:AGGREGATE'] }))
.then(createFakePager)
Function render
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { classes, placeholderText, suggestions, searchText } = this.props;
return (
<div className={classes.root}>
File PeriodPicker.component.js
has 279 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import PropTypes from 'prop-types';
import log from 'loglevel';
import SelectField from 'material-ui/SelectField';
import MenuItem from 'material-ui/MenuItem';
File svg-icon.js
has 278 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { SvgIcon } from '@dhis2/d2-ui-core';
const style = {
margin: 16,
Interpretation
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export class Interpretation extends React.Component {
constructor(props) {
super(props);
this.notifyChange = this.notifyChange.bind(this);
this.onSaveInterpretation = this.onSaveInterpretation.bind(this);
File OrgUnitSelector.js
has 272 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component, Fragment } from 'react';
import { OrgUnitTreeMultipleRoots } from '@dhis2/d2-ui-org-unit-tree';
import i18n from '@dhis2/d2-i18n';
import PropTypes from 'prop-types';
Function render
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const currentOu = this.props.root;
const hasChildren = this.hasChildren();
const isSelectable = !!this.props.onSelectClick;
const pathRegEx = new RegExp(`/${currentOu.id}$`);
NewInterpretationField
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export class NewInterpretationField extends Component {
constructor(props) {
super(props);
this.textarea = React.createRef();
this.id = Math.random().toString(36);
Function fetchData
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const fetchData = () => {
return (dispatch, getState) => {
const state = getState();
dispatch(toggleLoading());
Function render
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const color = this.state.color;
const styles = {
wrapper: {
Function getPeriod
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getPeriod() {
const week = this.props.periodType === 'BiWeekly' && this.state.biWeek
? biWeekToWeek(this.state.biWeek)
: this.state.week;
const date = this.state.year && week && getFirstDateOfWeek(this.state.year, week);
File FormBuilder.component.js
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import PropTypes from 'prop-types';
import { isObject, get } from 'lodash';
import AsyncValidatorRunner from './AsyncValidatorRunner';