Showing 5,781 of 10,536 total issues

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

    File offlinemetercarbon.py has 341 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

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

      File offlinemetercost.py has 341 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

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

        Function filesLoader has 104 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    $delegate.filesLoader = function filesLoader(config) {
                        var params = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
        
                        var cssFiles = [],
                            templatesFiles = [],
        Severity: Major
        Found in myems-admin/js/plugins/oclazyload/ocLazyLoad.js - About 4 hrs to fix

          Function b has 104 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      var b = q(function() {
                        Q = 0;
                        F = G = !1;
                        a.getTemplateUrl() || a.updateLongestItem();
                        if (
          Severity: Major
          Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 4 hrs to fix

            Function itemSelection has 104 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  this.itemSelection = function(a, h, e) {
                    if (h) {
                      if ("none" !== b.options.selectionMode)
                        if (b.isItemEnabled(h)) {
                          var d = b.itemSelection(),
            Severity: Major
            Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 4 hrs to fix

              Function EventCreateAside has 104 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const EventCreateAside = () => {
                // Get Data
                const { loading: loadingOrganizers, data: organizers } = useFakeFetch(rawOrganizers);
                const { loading: loadingSponsors, data: sponsors } = useFakeFetch(rawSponsors);
                const { loading: loadingEventTypes, data: eventTypes } = useFakeFetch(rawEventTypes);
              Severity: Major
              Found in myems-web/src/components/event/EventCreateAside.js - About 4 hrs to fix

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

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

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

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

                        File microgridsbilling.py has 339 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

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

                          File microgridscarbon.py has 339 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

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

                            File microgridsenergy.py has 339 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

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

                              Function browserTrigger has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                window.browserTrigger = function browserTrigger(element, eventType, eventData) {
                                  if (element && !element.nodeName) element = element[0];
                                  if (!element) return;
                              
                                  eventData = eventData || {};
                              Severity: Major
                              Found in myems-admin/js/angular/angular-mocks.js - About 4 hrs to fix

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

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

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

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

                                        File metertrend.py has 338 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/metertrend.py - About 4 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language