Showing 5,781 of 10,536 total issues

Function refreshSpaceTree has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  $scope.refreshSpaceTree = 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;

    Function refreshSpaceTree has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $scope.refreshSpaceTree = 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/spacemeter.controller.js - About 1 hr to fix

      Function refreshSpaceTree has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        $scope.refreshSpaceTree = 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;

        Function refreshSpaceTree has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          $scope.refreshSpaceTree = 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;

          Function refreshSpaceTree has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              $scope.refreshSpaceTree = 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/spacepoint.controller.js - About 1 hr to fix

            Function refreshSpaceTree has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              $scope.refreshSpaceTree = 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;

              Function refreshSpaceTree has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                $scope.refreshSpaceTree = 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/spacestore.controller.js - About 1 hr to fix

                Function refreshSpaceTree has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    $scope.refreshSpaceTree = 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;

                  Function refreshSpaceTree has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      $scope.refreshSpaceTree = 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;

                    Function refreshSpaceTree has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      $scope.refreshSpaceTree = 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;

                      Function refreshSpaceTree has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          $scope.refreshSpaceTree = 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;

                        Function controller has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                controller: function ($scope, $element) {
                                    // Function for collapse ibox
                                    $scope.showhide = function () {
                                        var ibox = $element.closest('div.ibox');
                                        var icon = $element.find('i:first');
                        Severity: Minor
                        Found in myems-admin/app/directives/directives.js - About 1 hr to fix

                          Function refreshSpaceTree has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            $scope.refreshSpaceTree = 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;

                            Function useBulkSelect has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const useBulkSelect = items => {
                              const [selectedItems, setSelectedItems] = useState([]);
                              const [isAllSelected, setIsAllSelected] = useState(false);
                              const [isIndeterminate, setIsIndeterminate] = useState(false);
                            
                            
                            Severity: Minor
                            Found in myems-web/src/hooks/useBulkSelect.js - About 1 hr to fix

                              Function fullscreen has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  $scope.fullscreen = function () {
                                      var docElm = document.documentElement;
                                      $scope.isFullScreen = document.fullScreen ||
                                          document.mozFullScreen ||
                                          document.webkitIsFullScreen;
                              Severity: Minor
                              Found in myems-admin/app/controllers/login/login.controller.js - About 1 hr to fix

                                Function logout has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    $scope.logout = function () {
                                        // close modal modalInstance(if present)
                                        if ($rootScope.modalInstance) {
                                            $rootScope.modalInstance.close();
                                        }
                                Severity: Minor
                                Found in myems-admin/app/controllers/login/login.controller.js - About 1 hr to fix

                                  Function Figures has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const Figures = () => {
                                    return (
                                      <Fragment>
                                        <PageHeader
                                          title="Figures"
                                  Severity: Minor
                                  Found in myems-web/src/components/utilities/Figures.js - About 1 hr to fix

                                    Function on_get has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        def on_get(req, resp):
                                            """Handles GET requests"""
                                            access_control(req)
                                            # Verify User Session
                                            token = req.headers.get('TOKEN')
                                    Severity: Minor
                                    Found in myems-api/core/webmessage.py - About 1 hr to fix

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

                                          def on_delete(req, resp, id_):
                                              access_control(req)
                                              if not id_.isdigit() or int(id_) <= 0:
                                                  raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                                                         description='API.INVALID_WEB_MESSAGE_ID')
                                      Severity: Minor
                                      Found in myems-api/core/webmessage.py - About 1 hr to fix

                                        Function on_get has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            def on_get(req, resp):
                                                access_control(req)
                                                cnx = mysql.connector.connect(**config.myems_system_db)
                                                cursor = cnx.cursor()
                                        
                                        
                                        Severity: Minor
                                        Found in myems-api/core/energystoragecontainer.py - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language