Showing 5,781 of 10,536 total issues

Function changePwd has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $scope.changePwd = function () {
        var modalInstance = $uibModal.open({
            windowClass: "animated fadeIn",
            templateUrl: 'views/users/user/change-password.model.html',
            controller: 'ModalChangePasswordCtrl',
Severity: Minor
Found in myems-admin/app/controllers/login/login.controller.js - About 1 hr to fix

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

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

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

              link: function(scope, el, attrs, controller) {
                  var id = angular.element(el).attr("id");
                  if (!id) {
                      id = uuid.new()
                      angular.element(el).attr("id", id);
      Severity: Minor
      Found in myems-admin/app/directives/jc-drag-drop/jc-drag-drop.js - About 1 hr to fix

        Function usePagination has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const usePagination = (items, defaultItemsPerPage = 5) => {
          const [data, setData] = useState([]);
          const [itemsChunk, setItemsChunk] = useState([]);
          const [total, setTotal] = useState(0);
          const [lastPageNo, setLastPageNo] = useState(0);
        Severity: Minor
        Found in myems-web/src/hooks/usePagination.js - About 1 hr to fix

          Function fetchScheduleDetails has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            const fetchScheduleDetails = () => {
              let url = APIBaseURL + '/reports/energystoragepowerstationdetails/' + selectedStation + '/schedule'
              console.log('fetchScheduleDetails with url:' + url);
              let isResponseOK = false;
              fetch(url, {

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

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

              Function on_post has 39 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 on_post has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    def on_post(req, resp):
                        try:
                            raw_json = req.stream.read().decode('utf-8')
                            new_values = json.loads(raw_json)
                        except Exception as ex:
                Severity: Minor
                Found in myems-api/core/user.py - About 1 hr to fix

                  Function qrNumber has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    var qrNumber = function(data) {
                  
                      var _mode = QRMode.MODE_NUMBER;
                      var _data = data;
                  
                  
                  Severity: Minor
                  Found in myems-admin/js/angular/qrcode.js - About 1 hr to fix

                    Function $StateRefDirective has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function $StateRefDirective($uiRouter, $timeout) {
                                var $state = $uiRouter.stateService;
                                return {
                                    restrict: 'A',
                                    require: ['?^uiSrefActive', '?^uiSrefActiveEq'],
                    Severity: Minor
                    Found in myems-admin/js/ui-router/angular-ui-router.js - About 1 hr to fix

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

                              link : function(scope, iElem, iAttr){
                                //Set options for dropzone {override from dropzone options provider}
                                scope.options = scope.options || {};
                                var initOps = angular.extend({}, dropzoneOps, scope.options);
                                
                      Severity: Minor
                      Found in myems-admin/js/plugins/dropzone/ng-dropzone.js - About 1 hr to fix

                        Function readEntries has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              var readEntries = function readEntries() {
                                return dirReader.readEntries(function (entries) {
                                  if (entries.length > 0) {
                                    var _iteratorNormalCompletion15 = true;
                                    var _didIteratorError15 = false;
                        Severity: Minor
                        Found in myems-admin/js/plugins/dropzone/dropzone.js - About 1 hr to fix

                          Function contentLoaded has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          var contentLoaded = function contentLoaded(win, fn) {
                            var done = false;
                            var top = true;
                            var doc = win.document;
                            var root = doc.documentElement;
                          Severity: Minor
                          Found in myems-admin/js/plugins/dropzone/dropzone.js - About 1 hr to fix

                            Function renderSegHtml has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                renderSegHtml: function(seg, disableResizing) {
                                    var view = this.view;
                                    var isRTL = view.opt('isRTL');
                                    var event = seg.event;
                                    var isDraggable = view.isEventDraggable(event);
                            Severity: Minor
                            Found in myems-admin/js/plugins/fullcalendar/fullcalendar.js - About 1 hr to fix

                              Function toggle has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                    this.toggle = function(a, c) {
                                      if (a) {
                                        if (
                                          (a[b.options.dataFields.hasChildren] ||
                                            (a[b.options.dataFields.items] &&
                              Severity: Minor
                              Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 1 hr to fix

                                Function getMergedMeters has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    $scope.getMergedMeters = function () {
                                        $scope.mergedmeters = [];
                                        $scope.meters = [];
                                        $scope.offlinemeters = [];
                                        $scope.virtualmeters = [];

                                  Function editDistributionSystem has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      $scope.editDistributionSystem = function(distributionsystem) {
                                          var modalInstance = $uibModal.open({
                                              windowClass: "animated fadeIn",
                                              templateUrl: 'views/settings/distributionsystem/distributionsystem.model.html',
                                              controller: 'ModalEditDistributionSystemCtrl',

                                    Function editDataSource has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        $scope.editDataSource = function(datasource) {
                                            var modalInstance = $uibModal.open({
                                                windowClass: "animated fadeIn",
                                                templateUrl: 'views/settings/datasource/datasource.model.html',
                                                controller: 'ModalEditDataSourceCtrl',

                                      Function getValue has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        getValue: function(value) {
                                          var lengthes = [],
                                              fullLength = 0,
                                              l,
                                              i = 0,
                                      Severity: Minor
                                      Found in myems-admin/js/plugins/jvectormap/jquery-jvectormap-2.0.2.min.js - About 1 hr to fix

                                        Function addRule has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            $scope.addRule = function() {
                                                var modalInstance = $uibModal.open({
                                                    templateUrl: 'views/fdd/rule.model.html',
                                                    controller: 'ModalAddRuleCtrl',
                                                    windowClass: "animated fadeIn",
                                        Severity: Minor
                                        Found in myems-admin/app/controllers/fdd/rule/rule.controller.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language