Showing 5,781 of 10,536 total issues

Function qrAlphaNum has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  var qrAlphaNum = function(data) {

    var _mode = QRMode.MODE_ALPHA_NUM;
    var _data = data;

Severity: Minor
Found in myems-admin/js/angular/qrcode.js - About 1 hr to fix

    Function Queue has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        var Queue = /** @class */ (function () {
            function Queue(_items, _limit) {
                if (_items === void 0) { _items = []; }
                if (_limit === void 0) { _limit = null; }
                this._items = _items;
    Severity: Minor
    Found in myems-admin/js/ui-router/angular-ui-router.js - About 1 hr to fix

      Function exec has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              UrlMatcher.prototype.exec = function (path, search, hash, options) {
                  var _this = this;
                  if (search === void 0) { search = {}; }
                  var match = memoizeTo(this._cache, 'pattern', function () {
                      return new RegExp([
      Severity: Minor
      Found in myems-admin/js/ui-router/angular-ui-router.js - About 1 hr to fix

        Function start has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                start: function() {
                  if (runner) {
                    return runner;
                  }
        
        
        Severity: Minor
        Found in myems-admin/js/angular/angular-animate.js - About 1 hr to fix

          Function _addFilesFromItems has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              value: function _addFilesFromItems(items) {
                var _this5 = this;
          
                return function () {
                  var result = [];
          Severity: Minor
          Found in myems-admin/js/plugins/dropzone/dropzone.js - About 1 hr to fix

            Function init has 44 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    this.init = function () {
            
                        if (
                            this.v < this.o.min
                                || this.v > this.o.max
            Severity: Minor
            Found in myems-admin/js/plugins/jsKnob/jquery.knob.js - About 1 hr to fix

              Function transformOptions has 44 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function transformOptions(sourceOptions, start, end, timezone) {
              
                  var success = sourceOptions.success;
                  var data = $.extend({}, sourceOptions.data || {}, {
                      singleevents: true,
              Severity: Minor
              Found in myems-admin/js/plugins/fullcalendar/gcal.js - About 1 hr to fix

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

                        link: function(scope, element, attributes) {
                            var height, init, onDatasetChanged, onOptionsChanged, plot, plotArea, width, _ref, _ref1;
                            plot = null;
                            width = attributes.width || '100%';
                            height = attributes.height || '100%';
                Severity: Minor
                Found in myems-admin/js/plugins/flot/angular-flot.js - About 1 hr to fix

                  Function collapse has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        this.collapse = function(a) {
                          var d = b.getItemFromChildElem(document.activeElement);
                          b.expandList.length = [];
                          b.expandIndentList.length = [];
                          if (b.isItemExpanded(a)) {
                  Severity: Minor
                  Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 1 hr to fix

                    Function editStore has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        $scope.editStore = function(store) {
                            var modalInstance = $uibModal.open({
                                windowClass: "animated fadeIn",
                                templateUrl: 'views/settings/store/store.model.html',
                                controller: 'ModalEditStoreCtrl',
                    Severity: Minor
                    Found in myems-admin/app/controllers/settings/store/store.controller.js - About 1 hr to fix

                      Function addStore has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          $scope.addStore = function() {
                              var modalInstance = $uibModal.open({
                                  templateUrl: 'views/settings/store/store.model.html',
                                  controller: 'ModalAddStoreCtrl',
                                  windowClass: "animated fadeIn",
                      Severity: Minor
                      Found in myems-admin/app/controllers/settings/store/store.controller.js - About 1 hr to fix

                        Function SettingsChangePassword has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const SettingsChangePassword = () => {
                          const [oldPassword, setOldPassword] = useState('');
                          const [newPassword, setNewPassword] = useState('');
                          const [confirmPassword, setConfirmPassword] = useState('');
                          const [isDisabled, setIsDisabled] = useState(true);
                        Severity: Minor
                        Found in myems-web/src/components/Settings/SettingsChangePassword.js - About 1 hr to fix

                          Function LandingRightSideNavItem has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const LandingRightSideNavItem = () => {
                            const [showRegistrationModal, setShowRegistrationModal] = useState(false);
                          
                            return (
                              <Nav navbar className="ml-auto">
                          Severity: Minor
                          Found in myems-web/src/components/navbar/LandingRightSideNavItem.js - About 1 hr to fix

                            Function editMicrogridPowerconversionsystem has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                  $scope.editMicrogridPowerconversionsystem = function(microgridpowerconversionsystem) {
                                      var modalInstance = $uibModal.open({
                                          templateUrl: 'views/settings/microgrid/microgridpowerconversionsystem.model.html',
                                          controller: 'ModalEditMicrogridPowerconversionsystemCtrl',
                                        windowClass: "animated fadeIn",

                              Function refreshInterval has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  this.refreshInterval = setInterval(() => {
                                    let isResponseOK = false;
                                    if (typeof this.props.distributionSystemID !== 'undefined') {
                                      fetch(APIBaseURL + '/reports/distributionsystem?distributionsystemid=' + this.props.distributionSystemID, {
                                        method: 'GET',
                              Severity: Minor
                              Found in myems-web/src/components/MyEMS/AuxiliarySystem/RealtimeChart.js - About 1 hr to fix

                                Function FalconPricingAlt has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const FalconPricingAlt = () => {
                                  // State
                                  const [isYearly, setIsYearly] = useState(true);
                                
                                  return (
                                Severity: Minor
                                Found in myems-web/src/components/pricing/PricingAlt.js - About 1 hr to fix

                                  Function worker has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  def worker(virtual_meter):
                                      cnx_energy_db = None
                                      cursor_energy_db = None
                                  
                                      try:
                                  Severity: Minor
                                  Found in myems-normalization/virtualmeter.py - About 1 hr to fix

                                    Function onSpaceCascaderChange has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      let onSpaceCascaderChange = (value, selectedOptions) => {
                                        setSelectedSpaceName(selectedOptions.map(o => o.label).join('/'));
                                        setSelectedSpaceID(value[value.length - 1]);
                                    
                                        let isResponseOK = false;

                                      Function on_get has 44 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/reports/combinedequipmentbatch.py - About 1 hr to fix

                                        Function on_get has 44 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/reports/tenantbatch.py - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language