Showing 5,781 of 10,536 total issues

Function UIRouter has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var UIRouter = /** @class */ (function () {
        /**
         * Creates a new `UIRouter` object
         *
         * @param locationService a [[LocationServices]] implementation
Severity: Major
Found in myems-admin/js/ui-router/angular-ui-router.js - About 2 hrs to fix

    Function $get has 56 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

           function($browser,   $$intervalFactory) {
        var repeatFns = [],
            nextRepeatId = 0,
            now = 0,
            setIntervalFn = function(tick, delay, deferred, skipApply) {
    Severity: Major
    Found in myems-admin/js/angular/angular-mocks.js - About 2 hrs to fix

      Function makeMoment has 56 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function makeMoment(args, parseAsUTC, parseZone) {
          var input = args[0];
          var isSingleString = args.length == 1 && typeof input === 'string';
          var isAmbigTime;
          var isAmbigZone;
      Severity: Major
      Found in myems-admin/js/plugins/fullcalendar/fullcalendar.js - About 2 hrs to fix

        Function ia has 56 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function ia() {
              function b() {
                n = k - h.offset().left - ea;
                d()
              }
        Severity: Major
        Found in myems-admin/js/jquery/jquery.carousel.min.js - About 2 hrs to fix

          File angular.easypiechart.js has 260 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**!
           * easyPieChart
           * Lightweight plugin to render simple, animated and retina optimized pie charts
           *
           * @license
          Severity: Minor
          Found in myems-admin/js/plugins/easypiechart/angular.easypiechart.js - About 2 hrs to fix

            Function EventDetailContent has 56 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const EventDetailContent = () => {
              const { isDark } = useContext(AppContext);
            
              return (
                <Card>
            Severity: Major
            Found in myems-web/src/components/page/EventDetail.js - About 2 hrs to fix

              File DistributionSystem.js has 260 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import React, { Fragment, useState, useEffect } from 'react';
              import {
                Breadcrumb,
                BreadcrumbItem,
                Card,
              Severity: Minor
              Found in myems-web/src/components/MyEMS/AuxiliarySystem/DistributionSystem.js - About 2 hrs to fix

                Function FooterStandard has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const FooterStandard = () => {
                  return (
                    <Fragment>
                      <Section bg="dark" className="pt-8 pb-4">
                        <div className="position-absolute btn-back-to-top cursor-pointer bg-dark" onClick={animateScroll.scrollToTop}>
                Severity: Major
                Found in myems-web/src/components/landing/FooterStandard.js - About 2 hrs to fix

                  File datarepair.py has 260 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import time
                  from datetime import datetime, timedelta
                  from decimal import Decimal
                  
                  import mysql.connector
                  Severity: Minor
                  Found in myems-normalization/datarepair.py - About 2 hrs to fix

                    File metertracking.py has 260 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/metertracking.py - About 2 hrs to fix

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

                          def on_post(req, resp):
                              """Handles POST requests"""
                              admin_control(req)
                              try:
                                  raw_json = req.stream.read().decode('utf-8')
                      Severity: Major
                      Found in myems-api/core/tenant.py - About 2 hrs to fix

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

                        'use strict';
                        
                        app.controller('DistributionSystemController', function(
                            $scope,
                            $rootScope,

                          Function $ViewDirectiveFill has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function $ViewDirectiveFill($compile, $controller, $transitions, $view, $q) {
                                  var getControllerAs = parse('viewDecl.controllerAs');
                                  var getResolveAs = parse('viewDecl.resolveAs');
                                  return {
                                      restrict: 'ECA',
                          Severity: Major
                          Found in myems-admin/js/ui-router/angular-ui-router.js - About 2 hrs to fix

                            Function ngViewFactory has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function ngViewFactory($route, $anchorScroll, $animate) {
                              return {
                                restrict: 'ECA',
                                terminal: true,
                                priority: 400,
                            Severity: Major
                            Found in myems-admin/js/angular/angular-route.js - About 2 hrs to fix

                              Function buildHTMLForSegment has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      function buildHTMLForSegment(segment) {
                                          var html = '';
                                          var isRTL = opt('isRTL');
                                          var event = segment.event;
                                          var url = event.url;
                              Severity: Major
                              Found in myems-admin/js/plugins/fullcalendar/fullcalendar.min.js - About 2 hrs to fix

                                Function _addFormElementData has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    value: function _addFormElementData(formData) {
                                      // Take care of other input elements
                                      if (this.element.tagName === "FORM") {
                                        var _iteratorNormalCompletion23 = true;
                                        var _didIteratorError23 = false;
                                Severity: Major
                                Found in myems-admin/js/plugins/dropzone/dropzone.js - About 2 hrs to fix

                                  Function getOption has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    let getOption = () => {
                                      return {
                                        tooltip: {
                                          trigger: 'axis',
                                          backgroundColor: getGrays(isDark)[100],
                                  Severity: Major
                                  Found in myems-web/src/components/MyEMS/common/MultipleLineChart.js - About 2 hrs to fix

                                    Function Pricing has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const Pricing = () => {
                                      // State
                                      const [isYearly, setIsYearly] = useState(true);
                                    
                                      return (
                                    Severity: Major
                                    Found in myems-web/src/components/pricing/Pricing.js - About 2 hrs to fix

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

                                      def generate_excel(report, space_name, energy_category_name, reporting_start_datetime_local,
                                                         reporting_end_datetime_local, language):
                                      
                                          trans = get_translation(language)
                                          trans.install()
                                      Severity: Major
                                      Found in myems-api/excelexporters/metertracking.py - About 2 hrs to fix

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

                                        'use strict';
                                        
                                        app.controller('CommandController', function(
                                            $scope,
                                            $rootScope,
                                        Severity: Minor
                                        Found in myems-admin/app/controllers/settings/command/command.controller.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language