Showing 5,781 of 10,536 total issues

Function KanbanContainer has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const KanbanContainer = () => {
  const { kanbanColumns, UpdateColumnData, modalContent, modal, setModal } = useContext(KanbanContext);
  const containerRef = useRef(null);

  // Detect device
Severity: Minor
Found in myems-web/src/components/kanban/KanbanContainer.js - About 1 hr to fix

    Function ActiveUsersMap has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const ActiveUsersMap = () => {
      const [duration, setDuration] = useState('week');
    
      return (
        <Card className="h-100 mt-3 mt-lg-0">
    Severity: Minor
    Found in myems-web/src/components/dashboard/ActiveUsersMap.js - About 1 hr to fix

      Function generate_excel has 49 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: Minor
      Found in myems-api/excelexporters/spaceenergycategory.py - About 1 hr to fix

        Function generate_excel has 49 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: Minor
        Found in myems-api/excelexporters/storecost.py - About 1 hr to fix

          Function generate_excel has 49 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: Minor
          Found in myems-api/excelexporters/shopfloorenergycategory.py - About 1 hr to fix

            Function generate_excel has 49 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: Minor
            Found in myems-api/excelexporters/tenantenergycategory.py - About 1 hr to fix

              Function generate_excel has 49 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: Minor
              Found in myems-api/excelexporters/storeenergycategory.py - About 1 hr to fix

                Function generate_excel has 49 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: Minor
                Found in myems-api/excelexporters/storecarbon.py - About 1 hr to fix

                  Function generate_excel has 49 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: Minor
                  Found in myems-api/excelexporters/spaceoutput.py - About 1 hr to fix

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

                        def on_delete(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_METER_ID')
                    Severity: Minor
                    Found in myems-api/core/meter.py - About 1 hr to fix

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

                          def on_put(req, resp, id_, lid):
                              """Handles PUT 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/energyflowdiagram.py - About 1 hr to fix

                        Function on_post has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            def on_post(req, resp, id_):
                                """Handles POST requests"""
                                admin_control(req)
                                try:
                                    raw_json = req.stream.read().decode('utf-8')
                        Severity: Minor
                        Found in myems-api/core/microgrid.py - About 1 hr to fix

                          Function createStringToBytes has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            qrcode.createStringToBytes = function(unicodeData, numChars) {
                          
                              // create conversion map.
                          
                              var unicodeMap = function() {
                          Severity: Minor
                          Found in myems-admin/js/angular/qrcode.js - About 1 hr to fix

                            Function flush has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    StateQueueManager.prototype.flush = function () {
                                        var _this = this;
                                        var _a = this, queue = _a.queue, states = _a.states, builder = _a.builder;
                                        var registered = [], // states that got registered
                                        orphans = [], // states that don't yet have a parent registered
                            Severity: Minor
                            Found in myems-admin/js/ui-router/angular-ui-router.js - About 1 hr to fix

                              Function htmlParserImpl has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function htmlParserImpl(html, handler) {
                                  if (html === null || html === undefined) {
                                    html = '';
                                  } else if (typeof html !== 'string') {
                                    html = '' + html;
                              Severity: Minor
                              Found in myems-admin/js/angular/angular-sanitize.js - About 1 hr to fix

                                Function _addFilesFromDirectory has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    value: function _addFilesFromDirectory(directory, path) {
                                      var _this6 = this;
                                
                                      var dirReader = directory.createReader();
                                
                                
                                Severity: Minor
                                Found in myems-admin/js/plugins/dropzone/dropzone.js - About 1 hr to fix

                                  Function parseISO8601 has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function parseISO8601(s, ignoreTimezone) { // ignoreTimezone defaults to false
                                          // derived from http://delete.me.uk/2005/03/iso8601.html
                                          // TODO: for a know glitch/feature, read tests/issue_206_parseDate_dst.html
                                          var m = s.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2})(:?([0-9]{2}))?))?)?)?)?$/);
                                          if (!m) {
                                  Severity: Minor
                                  Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                    Function segResizeMousedown has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        segResizeMousedown: function(seg, ev) {
                                            var _this = this;
                                            var view = this.view;
                                            var el = seg.el;
                                            var event = seg.event;
                                    Severity: Minor
                                    Found in myems-admin/js/plugins/fullcalendar/fullcalendar.js - About 1 hr to fix

                                      Function slotSegHtml has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              function slotSegHtml(event, seg) {
                                                  var html = "<";
                                                  var url = event.url;
                                                  var skinCss = getSkinCss(event, opt);
                                                  var classes = ['fc-event', 'fc-event-vert'];
                                      Severity: Minor
                                      Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 1 hr to fix

                                        Function 1 has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o;"undefined"!=typeof window?o=window:"undefined"!=typeof global?o=global:"undefined"!=typeof self&&(o=self),o.angularFootable=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
                                            'use strict';
                                        
                                            angular
                                                .module('ui.footable', [])
                                        Severity: Minor
                                        Found in myems-admin/js/plugins/footable/angular-footable.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language