Showing 5,781 of 10,536 total issues

File offlinemeter.controller.js has 350 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

app.controller('OfflineMeterController', function(
    $scope,
    $rootScope,
Severity: Minor
Found in myems-admin/app/controllers/settings/meter/offlinemeter.controller.js - About 4 hrs to fix

    Function on_get has 110 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/shopfloorplan.py - About 4 hrs to fix

      Function on_get has 110 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/shopfloorsaving.py - About 4 hrs to fix

        File energystoragepowerstationreportingenergy.py has 349 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import base64
        from core.utilities import get_translation
        import os
        import re
        import uuid
        Severity: Minor
        Found in myems-api/excelexporters/energystoragepowerstationreportingenergy.py - About 4 hrs to fix

          File energystoragepowerstationreportingrevenue.py has 349 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import base64
          from core.utilities import get_translation
          import os
          import re
          import uuid
          Severity: Minor
          Found in myems-api/excelexporters/energystoragepowerstationreportingrevenue.py - About 4 hrs to fix

            Function TransitionHook has 109 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var TransitionHook = /** @class */ (function () {
                    function TransitionHook(transition, stateContext, registeredHook, options) {
                        var _this = this;
                        this.transition = transition;
                        this.stateContext = stateContext;
            Severity: Major
            Found in myems-admin/js/ui-router/angular-ui-router.js - About 4 hrs to fix

              Function renderSlotSegs has 109 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      function renderSlotSegs(segs, modifiedEventId) {
              
                          var i, segCnt=segs.length, seg,
                              event,
                              top,
              Severity: Major
              Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 4 hrs to fix

                Function on_get has 109 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/spaceincome.py - About 4 hrs to fix

                  Function on_get has 109 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/storeplan.py - About 4 hrs to fix

                    Function on_get has 109 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/tenantsaving.py - About 4 hrs to fix

                      Function on_get has 109 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/tenantplan.py - About 4 hrs to fix

                        Function on_get has 109 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/storesaving.py - About 4 hrs to fix

                          File energystoragepowerstationitemenergy.py has 348 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import re
                          from datetime import datetime, timedelta, timezone
                          from decimal import Decimal
                          import falcon
                          import mysql.connector
                          Severity: Minor
                          Found in myems-api/reports/energystoragepowerstationitemenergy.py - About 4 hrs to fix

                            File energystoragepowerstationitemcarbon.py has 348 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import re
                            from datetime import datetime, timedelta, timezone
                            from decimal import Decimal
                            import falcon
                            import mysql.connector
                            Severity: Minor
                            Found in myems-api/reports/energystoragepowerstationitemcarbon.py - About 4 hrs to fix

                              File energystoragepowerstationitembilling.py has 348 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              import re
                              from datetime import datetime, timedelta, timezone
                              from decimal import Decimal
                              import falcon
                              import mysql.connector
                              Severity: Minor
                              Found in myems-api/reports/energystoragepowerstationitembilling.py - About 4 hrs to fix

                                Consider simplifying this complex logical expression.
                                Open

                                                  if (p && a.isItemEnabled(p) && 0 != a.callKeyDown(g, p)) {
                                                    a.callKeyDown(g, p);
                                                    var t = 0;
                                                    switch (g.keyCode) {
                                                      case 9:
                                Severity: Critical
                                Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 4 hrs to fix

                                  Function parseOptions has 108 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          function parseOptions(opts) {
                                  
                                              $.extend(true, options, opts);
                                  
                                              // $.extend merges arrays, rather than replacing them.  When less
                                  Severity: Major
                                  Found in myems-admin/js/plugins/flot/jquery.flot.js - About 4 hrs to fix

                                    Function on_get has 108 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/microgridreportingrevenue.py - About 4 hrs to fix

                                      Function on_get has 108 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/microgridreportingenergy.py - About 4 hrs to fix

                                        Function on_get has 108 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/microgridreportingcarbon.py - About 4 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language