Showing 5,781 of 10,536 total issues

Function deps has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

                                function ($ocLazyLoad) {
                                    return $ocLazyLoad.load(['ui.checkbox', 'ui.select', 'daterangepicker', 'toaster']).then(
                                        function () {
                                            return $ocLazyLoad.load(
                                                [{
Severity: Minor
Found in myems-admin/app/config.router.js - About 1 hr to fix

    Function deps has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                                    function ($ocLazyLoad) {
                                        return $ocLazyLoad.load(['ui.checkbox', 'ui.select', 'daterangepicker', 'toaster']).then(
                                            function () {
                                                return $ocLazyLoad.load(
                                                    [{
    Severity: Minor
    Found in myems-admin/app/config.router.js - About 1 hr to fix

      Function link has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              link: function(scope, element, attrs) {
      
                  var config = {
                      maxFilesize: 100,
                      paramName: "uploadfile",
      Severity: Minor
      Found in myems-admin/app/directives/directives.js - About 1 hr to fix

        Function deps has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                                        function ($ocLazyLoad) {
                                            return $ocLazyLoad.load(['ui.checkbox', 'ui.select', 'daterangepicker', 'toaster']).then(
                                                function () {
                                                    return $ocLazyLoad.load(
                                                        [{
        Severity: Minor
        Found in myems-admin/app/config.router.js - About 1 hr to fix

          Function deps has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                                          function ($ocLazyLoad) {
                                              return $ocLazyLoad.load(['ui.checkbox', 'ui.select', 'daterangepicker', 'toaster']).then(
                                                  function () {
                                                      return $ocLazyLoad.load(
                                                          [{
          Severity: Minor
          Found in myems-admin/app/config.router.js - About 1 hr to fix

            Function Activity has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const Activity = () => {
              const { loading, data: activities } = useFakeFetch(rawActivities);
            
              return (
                <Card>
            Severity: Minor
            Found in myems-web/src/components/page/Activity.js - About 1 hr to fix

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

                render() {
                  const { t } = this.props;
              
                  return (
                    <Card className="h-100 bg-gradient">
              Severity: Minor
              Found in myems-web/src/components/MyEMS/AuxiliarySystem/RealtimeChart.js - About 1 hr to fix

                Function LeafletMap has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const LeafletMap = () => {
                  const { isDark } = useContext(AppContext);
                  const filter = isDark
                    ? ['invert:98%', 'grayscale:69%', 'bright:89%', 'contrast:111%', 'hue:205deg', 'saturate:1000%']
                    : ['bright:101%', 'contrast:101%', 'hue:23deg', 'saturate:225%'];
                Severity: Minor
                Found in myems-web/src/components/dashboard/LeafletMap.js - About 1 hr to fix

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

                      def on_get(req, resp, id_, lid):
                          access_control(req)
                          if not id_.isdigit() or int(id_) <= 0:
                              raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                                     description='API.INVALID_ENERGY_FLOW_DIAGRAM_ID')
                  Severity: Minor
                  Found in myems-api/core/energyflowdiagram.py - About 1 hr to fix

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

                        def on_get(req, resp, id_):
                            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: Minor
                    Found in myems-api/core/meter.py - About 1 hr to fix

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

                          def on_get(req, resp, id_):
                              admin_control(req)
                              if not id_.isdigit() or int(id_) <= 0:
                                  raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                                         description='API.INVALID_DATA_SOURCE_ID')
                      Severity: Minor
                      Found in myems-api/core/datasource.py - About 1 hr to fix

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

                            def on_get(req, resp, id_, pid):
                                access_control(req)
                                if not id_.isdigit() or int(id_) <= 0:
                                    raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                                           description='API.INVALID_MICROGRID_ID')
                        Severity: Minor
                        Found in myems-api/core/microgrid.py - About 1 hr to fix

                          Function on_delete has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              def on_delete(req, resp, id_):
                                  """Handles DELETE requests"""
                                  admin_control(req)
                                  if not id_.isdigit() or int(id_) <= 0:
                                      raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                          Severity: Minor
                          Found in myems-api/core/costcenter.py - About 1 hr to fix

                            Function on_get has 30 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: Minor
                            Found in myems-api/core/notification.py - About 1 hr to fix

                              Function on_put has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  def on_put(req, resp, id_):
                                      """Handles PUT requests"""
                                      admin_control(req)
                              
                                      try:
                              Severity: Minor
                              Found in myems-api/core/user.py - About 1 hr to fix

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

                                    def on_get(req, resp, id_):
                                        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: Minor
                                Found in myems-api/core/space.py - About 1 hr to fix

                                  Function _handleInvalidTargetState has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          StateService.prototype._handleInvalidTargetState = function (fromPath, toState) {
                                              var _this = this;
                                              var fromState = PathUtils.makeTargetState(this.router.stateRegistry, fromPath);
                                              var globals = this.router.globals;
                                              var latestThing = function () { return globals.transitionHistory.peekTail(); };
                                  Severity: Minor
                                  Found in myems-admin/js/ui-router/angular-ui-router.js - About 1 hr to fix

                                    Function createASCII has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        _this.createASCII = function(cellSize, margin) {
                                          cellSize = cellSize || 1;
                                    
                                          if (cellSize < 2) {
                                            return _createHalfASCII(margin);
                                    Severity: Minor
                                    Found in myems-admin/js/angular/qrcode.js - About 1 hr to fix

                                      Function updateView has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                                              function updateView(config) {
                                                                  var newScope = scope.$new();
                                                                  var animEnter = $q.defer(), animLeave = $q.defer();
                                                                  var $uiViewData = {
                                                                      $cfg: config,
                                      Severity: Minor
                                      Found in myems-admin/js/ui-router/angular-ui-router.js - About 1 hr to fix

                                        Function qrBitBuffer has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          var qrBitBuffer = function() {
                                        
                                            var _buffer = [];
                                            var _length = 0;
                                        
                                        
                                        Severity: Minor
                                        Found in myems-admin/js/angular/qrcode.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language