Showing 5,781 of 10,536 total issues

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

      Tab.prototype.activate = function (element, container, callback) {
        var $active    = container.find('> .active')
        var transition = callback
          && $.support.transition
          && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
    Severity: Minor
    Found in myems-admin/js/bootstrap/bootstrap.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 captcha has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function captcha() {
            return {
                restrict: 'AE',
                replace: true,
                name: 'captcha',
        Severity: Minor
        Found in myems-admin/app/directives/directives.js - About 1 hr to fix

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

          const Leaflet = () => {
            const { isDark } = useContext(AppContext);
            let map = useRef(null);
            const [mapWidth, setMapWidth] = useState();
          
          
          Severity: Minor
          Found in myems-web/src/components/plugins/Leaflet.js - About 1 hr to fix

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

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

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

              const RecentPurchasesTable = () => {
                const [isSelected, setIsSelected] = useState(false);
              
                return (
                  <Card className="mb-3">
              Severity: Minor
              Found in myems-web/src/components/MyEMS/Store/RecentPuchasesTable.js - About 1 hr to fix

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

                  const handleSubmit = e => {
                    e.preventDefault();
                    let isResponseOK = false;
                    fetch(APIBaseURL + '/users/newusers', {
                      method: 'POST',
                Severity: Minor
                Found in myems-web/src/components/MyEMS/auth/SentRegisterEmailMessageForm.js - About 1 hr to fix

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

                    const getSpaceList = async () => {
                      let isResponseOK = false;
                      fetch(APIBaseURL + '/spaces/tree', {
                        method: 'GET',
                        headers: {
                  Severity: Minor
                  Found in myems-web/src/components/MyEMS/Space/EnterProduction.js - About 1 hr to fix

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

                    const RecentPurchasesTable = () => {
                      const [isSelected, setIsSelected] = useState(false);
                    
                      return (
                        <Card className="mb-3">
                    Severity: Minor
                    Found in myems-web/src/components/MyEMS/Shopfloor/RecentPuchasesTable.js - About 1 hr to fix

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

                        const getAvatar = () => {
                          if (src) {
                            if (isIterableArray(src)) {
                              return (
                                <div className={`${mediaClasses} overflow-hidden h-100 d-flex`}>
                      Severity: Minor
                      Found in myems-web/src/components/common/Avatar.js - About 1 hr to fix

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

                        const RecentPurchasesTable = () => {
                          const [isSelected, setIsSelected] = useState(false);
                        
                          return (
                            <Card className="mb-3">
                        Severity: Minor
                        Found in myems-web/src/components/MyEMS/Tenant/RecentPuchasesTable.js - About 1 hr to fix

                          Function on_post has 38 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/meter.py - About 1 hr to fix

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

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

                              Function on_post has 38 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/virtualmeter.py - About 1 hr to fix

                                Function on_put has 38 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/space.py - About 1 hr to fix

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

                                      def on_put(req, resp):
                                          """Handles PUT requests"""
                                          if 'USER-UUID' not in req.headers or \
                                                  not isinstance(req.headers['USER-UUID'], str) or \
                                                  len(str.strip(req.headers['USER-UUID'])) == 0:
                                  Severity: Minor
                                  Found in myems-api/core/user.py - About 1 hr to fix

                                    Function byteArrayOutputStream has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      var byteArrayOutputStream = function() {
                                    
                                        var _bytes = [];
                                    
                                        var _this = {};
                                    Severity: Minor
                                    Found in myems-admin/js/angular/qrcode.js - About 1 hr to fix

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

                                        this.$get = [function() {
                                          return {
                                            cacheKey: function(node, method, addClass, removeClass) {
                                              var parentNode = node.parentNode;
                                              var parentID = parentNode[KEY] || (parentNode[KEY] = ++parentCounter);
                                      Severity: Minor
                                      Found in myems-admin/js/angular/angular-animate.js - About 1 hr to fix

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

                                          this.$get = function() {
                                            var $log = {
                                              log: function() { $log.log.logs.push(concat([], arguments, 0)); },
                                              warn: function() { $log.warn.logs.push(concat([], arguments, 0)); },
                                              info: function() { $log.info.logs.push(concat([], arguments, 0)); },
                                        Severity: Minor
                                        Found in myems-admin/js/angular/angular-mocks.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language