Showing 5,781 of 10,536 total issues

Function keyup_checker has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        AbstractChosen.prototype.keyup_checker = function(evt) {
            var stroke, _ref;
            stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
            this.search_field_scale();
            switch (stroke) {
Severity: Minor
Found in myems-admin/js/plugins/chosen/chosen.jquery.js - About 1 hr to fix

    Function deleteContact has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $scope.deleteContact=function(contact){
            SweetAlert.swal({
                    title: $translate.instant("SWEET.TITLE"),
                    text: $translate.instant("SWEET.TEXT"),
                    type: "warning",
    Severity: Minor
    Found in myems-admin/app/controllers/settings/contact/contact.controller.js - About 1 hr to fix

      Function deleteMicrogrid has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          $scope.deleteMicrogrid=function(microgrid){
              SweetAlert.swal({
                      title: $translate.instant("SWEET.TITLE"),
                      text: $translate.instant("SWEET.TEXT"),
                      type: "warning",

        Function deleteEnergyItem has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            $scope.deleteEnergyItem=function(energyItem){
                SweetAlert.swal({
                    title: $translate.instant("SWEET.TITLE"),
                    text: $translate.instant("SWEET.TEXT"),
                    type: "warning",

          Function getAllSpaces has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              $scope.getAllSpaces = function () {
                  let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
                  SpaceService.getAllSpaces(headers, function (response) {
                      if (angular.isDefined(response.status) && response.status === 200) {
                          $scope.spaces = response.data;
          Severity: Minor
          Found in myems-admin/app/controllers/settings/space/space.controller.js - About 1 hr to fix

            Function deletePhotovoltaicPowerStation has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                $scope.deletePhotovoltaicPowerStation=function(photovoltaicpowerstation){
                    SweetAlert.swal({
                            title: $translate.instant("SWEET.TITLE"),
                            text: $translate.instant("SWEET.TEXT"),
                            type: "warning",

              Function deleteEmailServer has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  $scope.deleteEmailServer=function(emailserver){
                      SweetAlert.swal({
                              title: $translate.instant("SWEET.TITLE"),
                              text: $translate.instant("SWEET.TEXT"),
                              type: "warning",

                Function deleteStore has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    $scope.deleteStore=function(store){
                        SweetAlert.swal({
                                title: $translate.instant("SWEET.TITLE"),
                                text: $translate.instant("SWEET.TEXT"),
                                type: "warning",
                Severity: Minor
                Found in myems-admin/app/controllers/settings/store/store.controller.js - About 1 hr to fix

                  Function deleteEnergyStorageContainer has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      $scope.deleteEnergyStorageContainer=function(energystoragecontainer){
                          SweetAlert.swal({
                                  title: $translate.instant("SWEET.TITLE"),
                                  text: $translate.instant("SWEET.TEXT"),
                                  type: "warning",

                    Function deleteWindFarm has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        $scope.deleteWindFarm=function(windfarm){
                            SweetAlert.swal({
                                    title: $translate.instant("SWEET.TITLE"),
                                    text: $translate.instant("SWEET.TEXT"),
                                    type: "warning",

                      Function getAllMenus has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          $scope.getAllMenus = function () {
                              let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
                              MenuService.getAllMenus(headers, function (response) {
                                  if (angular.isDefined(response.status) && response.status === 200) {
                                      $scope.menus = response.data;
                      Severity: Minor
                      Found in myems-admin/app/controllers/settings/menu/menu.controller.js - About 1 hr to fix

                        Function iboxToolsFullScreen has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function iboxToolsFullScreen($timeout) {
                            return {
                                restrict: 'A',
                                scope: true,
                                templateUrl: 'views/common/ibox_tools_full_screen.html',
                        Severity: Minor
                        Found in myems-admin/app/directives/directives.js - About 1 hr to fix

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

                          def worker(space):
                          
                              ####################################################################################################################
                              # Step 1: get all combined equipments associated with the space
                              ####################################################################################################################
                          Severity: Minor
                          Found in myems-aggregation/space_energy_output_category.py - About 1 hr to fix

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

                            def generate_excel(report, space_name, reporting_start_datetime_local, reporting_end_datetime_local, language):
                            
                                trans = get_translation(language)
                                trans.install()
                                _ = trans.gettext
                            Severity: Minor
                            Found in myems-api/excelexporters/offlinemeterbatch.py - About 1 hr to fix

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

                              def generate_excel(report, space_name, reporting_start_datetime_local, reporting_end_datetime_local, language):
                              
                                  trans = get_translation(language)
                                  trans.install()
                                  _ = trans.gettext
                              Severity: Minor
                              Found in myems-api/excelexporters/virtualmeterbatch.py - About 1 hr to fix

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

                                def generate_excel(report, space_name, reporting_start_datetime_local, reporting_end_datetime_local, language):
                                
                                    trans = get_translation(language)
                                    trans.install()
                                    _ = trans.gettext
                                Severity: Minor
                                Found in myems-api/excelexporters/meterbatch.py - About 1 hr to fix

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

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

                                        def on_post(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/energyflowdiagram.py - About 1 hr to fix

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

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