Showing 5,781 of 10,536 total issues

Function PaymentsLineChart has 93 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const PaymentsLineChart = () => {
  const [paymentStatus, setPaymentStatus] = useState('successful');
  const { isDark } = useContext(AppContext);

  const config = {
Severity: Major
Found in myems-web/src/components/dashboard/PaymentsLineChart.js - About 3 hrs to fix

    Function handleAcknowledged has 93 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const handleAcknowledged = id => {
        console.log('Mark As Acknowledged: ', id);
        let isResponseOK = false;
        fetch(APIBaseURL + '/webmessages/' + id, {
          method: 'PUT',
    Severity: Major
    Found in myems-web/src/components/MyEMS/WorkOrder/Repair.js - About 3 hrs to fix

      Function handleAcknowledged has 93 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        const handleAcknowledged = id => {
          console.log('Mark As Acknowledged: ', id);
          let isResponseOK = false;
          fetch(APIBaseURL + '/webmessages/' + id, {
            method: 'PUT',
      Severity: Major
      Found in myems-web/src/components/MyEMS/WorkOrder/Installation.js - About 3 hrs to fix

        Function on_get has 93 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def on_get(req, resp):
                if 'API-KEY' not in req.headers or \
                        not isinstance(req.headers['API-KEY'], str) or \
                        len(str.strip(req.headers['API-KEY'])) == 0:
                    access_control(req)
        Severity: Major
        Found in myems-api/reports/microgriddashboard.py - About 3 hrs to fix

          Function on_get has 93 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def on_get(req, resp):
                  if 'API-KEY' not in req.headers or \
                          not isinstance(req.headers['API-KEY'], str) or \
                          len(str.strip(req.headers['API-KEY'])) == 0:
                      access_control(req)
          Severity: Major
          Found in myems-api/reports/equipmentenergyitem.py - About 3 hrs to fix

            Function prepareAnchoredAnimation has 92 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function prepareAnchoredAnimation(classes, outAnchor, inAnchor) {
                  var clone = jqLite(getDomNode(outAnchor).cloneNode(true));
                  var startingClasses = filterCssClasses(getClassVal(clone));
            
                  outAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME);
            Severity: Major
            Found in myems-admin/js/angular/angular-animate.js - About 3 hrs to fix

              Function handleRead has 92 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                const handleRead = id => {
                  console.log('Mark As Read: ', id);
                  let isResponseOK = false;
                  fetch(APIBaseURL + '/webmessages/' + id, {
                    method: 'PUT',
              Severity: Major
              Found in myems-web/src/components/MyEMS/WorkOrder/Installation.js - About 3 hrs to fix

                Function handleRead has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  const handleRead = id => {
                    console.log('Mark As Read: ', id);
                    let isResponseOK = false;
                    fetch(APIBaseURL + '/webmessages/' + id, {
                      method: 'PUT',
                Severity: Major
                Found in myems-web/src/components/MyEMS/WorkOrder/Repair.js - About 3 hrs to fix

                  Function handleRead has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    const handleRead = id => {
                      console.log('Mark As Read: ', id);
                      let isResponseOK = false;
                      fetch(APIBaseURL + '/webmessages/' + id, {
                        method: 'PUT',
                  Severity: Major
                  Found in myems-web/src/components/MyEMS/WorkOrder/Inspection.js - About 3 hrs to fix

                    Function generate_excel has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    def generate_excel(report,
                                       name,
                                       base_period_start_datetime_local,
                                       base_period_end_datetime_local,
                                       reporting_start_datetime_local,
                    Severity: Major
                    Found in myems-api/excelexporters/shopfloorload.py - About 3 hrs to fix

                      Function generate_excel has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      def generate_excel(report,
                                         name,
                                         base_period_start_datetime_local,
                                         base_period_end_datetime_local,
                                         reporting_start_datetime_local,
                      Severity: Major
                      Found in myems-api/excelexporters/storeload.py - About 3 hrs to fix

                        Consider simplifying this complex logical expression.
                        Open

                                    if (f.cols) {
                                        a.footable = t;
                                        var u = e(t.table);
                                        u.data("grid", a), e.isPlainObject(f.data) && u.data(f.data), a._items = [], r(f.cols), f.showCheckbox && (f.multiSelect = !0, f.cols.unshift({
                                            title: f.checkboxFormatter(!0),
                        Severity: Critical
                        Found in myems-admin/js/plugins/footable/footable.all.min.js - About 3 hrs to fix

                          Function PathUtils has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              var PathUtils = /** @class */ (function () {
                                  function PathUtils() {
                                  }
                                  /** Given a PathNode[], create an TargetState */
                                  PathUtils.makeTargetState = function (registry, path) {
                          Severity: Major
                          Found in myems-admin/js/ui-router/angular-ui-router.js - About 3 hrs to fix

                            Function _fetchEventSource has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function _fetchEventSource(source, callback) {
                                    var i;
                                    var fetchers = fc.sourceFetchers;
                                    var res;
                            
                            
                            Severity: Major
                            Found in myems-admin/js/plugins/fullcalendar/fullcalendar.js - About 3 hrs to fix

                              Function i has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function i() {
                                      var t = this;
                                      t.name = "Footable Paginate", t.init = function(a) {
                                          if (a.options.paginate === !0) {
                                              if (e(a.table).data("page") === !1) return;
                              Severity: Major
                              Found in myems-admin/js/plugins/footable/footable.all.min.js - About 3 hrs to fix

                                Function Tables has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const Tables = () => {
                                  return (
                                    <Fragment>
                                      <PageHeader
                                        title="Tables"
                                Severity: Major
                                Found in myems-web/src/components/bootstrap-components/Tables.js - About 3 hrs to fix

                                  Function controller has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                                      function ($scope, $element, $attrs) {
                                                          var states = [];
                                                          var activeEqClass;
                                                          var uiSrefActive;
                                                          // There probably isn't much point in $observing this
                                  Severity: Major
                                  Found in myems-admin/js/ui-router/angular-ui-router.js - About 3 hrs to fix

                                    Function TemplateFactory has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        var TemplateFactory = /** @class */ (function () {
                                            function TemplateFactory() {
                                                var _this = this;
                                                /** @hidden */ this._useHttp = ng.version.minor < 3;
                                                /** @hidden */ this.$get = [
                                    Severity: Major
                                    Found in myems-admin/js/ui-router/angular-ui-router.js - About 3 hrs to fix

                                      Function $Browser has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      angular.mock.$Browser = function($log, $$taskTrackerFactory) {
                                        var self = this;
                                        var taskTracker = $$taskTrackerFactory($log);
                                      
                                        this.isMock = true;
                                      Severity: Major
                                      Found in myems-admin/js/angular/angular-mocks.js - About 3 hrs to fix

                                        Function handleAcknowledged has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          const handleAcknowledged = id => {
                                            console.log('Mark As Acknowledged: ', id);
                                            let isResponseOK = false;
                                            fetch(APIBaseURL + '/webmessages/' + id, {
                                              method: 'PUT',
                                        Severity: Major
                                        Found in myems-web/src/components/MyEMS/Notification/Notification.js - About 3 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language