18F/cg-dashboard

View on GitHub
static_src/components/usage_and_limits.jsx

Summary

Maintainability
B
6 hrs
Test Coverage

Function render has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  render() {
    let content = <div />;
    let controls;

    controls = (
Severity: Major
Found in static_src/components/usage_and_limits.jsx - About 2 hrs to fix

    File usage_and_limits.jsx has 262 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import PropTypes from "prop-types";
    import React from "react";
    
    import Action from "./action.jsx";
    import { Form, FormNumber } from "./form";
    Severity: Minor
    Found in static_src/components/usage_and_limits.jsx - About 2 hrs to fix

      Function memory has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        get memory() {
          const memory = this.state.editing
            ? this.state.form.fields.memory.value
            : this.props.app.memory;
          const maxMemory = Math.floor(
      Severity: Minor
      Found in static_src/components/usage_and_limits.jsx - About 1 hr to fix

        Function scale has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          get scale() {
            const instanceCount = this.state.editing
              ? this.state.form.fields.instances.value
              : this.props.app.instances;
        
        
        Severity: Minor
        Found in static_src/components/usage_and_limits.jsx - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status