Showing 5,781 of 10,536 total issues

Function addText has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    Canvas.prototype.addText = function(layer, x, y, text, font, angle, width, halign, valign) {

        var info = this.getTextInfo(layer, text, font, angle, width),
            positions = info.positions;

Severity: Minor
Found in myems-admin/js/plugins/flot/jquery.flot.js - About 1 hr to fix

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

            e.name = "Footable Filter", e.init = function(a) {
                if (e.footable = a, a.options.filter.enabled === !0) {
                    if (t(a.table).data("filter") === !1) return;
                    a.timers.register("filter"), t(a.table).unbind(".filtering").bind({
                        "footable_initialized.filtering": function() {
    Severity: Minor
    Found in myems-admin/js/plugins/footable/footable.all.min.js - About 1 hr to fix

      Function applyAttr has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      jvm.SVGShapeElement.prototype.applyAttr = function(attr, value){
        var patternEl,
            imageEl,
            that = this;
      
      
      Severity: Minor
      Found in myems-admin/js/plugins/jvectormap/jquery-jvectormap-2.0.2.min.js - About 1 hr to fix

        Function h has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    h = function(b) {
                      b &&
                        (b.bind("dragover", function(b) {
                          var c = a.getItemFromElem(this);
                          if (c && a.isItemEnabled(c)) {
        Severity: Minor
        Found in myems-admin/js/jcui/angular.integralui.treeview.min.js - About 1 hr to fix

          Function applyPlacement has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            Tooltip.prototype.applyPlacement = function (offset, placement) {
              var $tip   = this.tip()
              var width  = $tip[0].offsetWidth
              var height = $tip[0].offsetHeight
          
          
          Severity: Minor
          Found in myems-admin/js/bootstrap/bootstrap.js - About 1 hr to fix

            Function getAllMeters has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Function Success has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const Success = () => {
                const { setStep, setUser } = useContext(AuthWizardContext);
              
                const defaultOptions = {
                  loop: true,
              Severity: Minor
              Found in myems-web/src/components/auth/wizard/Success.js - About 1 hr to fix

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

                                                function ($ocLazyLoad) {
                                                    return $ocLazyLoad.load(['ui.select', '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 DropZoneWidget has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const DropZoneWidget = () => {
                    const [avatar, setAvatar] = useState([{ src: avatarImg }]);
                  
                    return (
                      <Card className="mt-3">
                  Severity: Minor
                  Found in myems-web/src/components/widgets/DropZoneWidget.js - About 1 hr to fix

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

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

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

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

                          Function on_get has 31 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/core/meter.py - About 1 hr to fix

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

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

                                  def on_post(req, resp, id_):
                                      """Handles POST requests"""
                                      admin_control(req)
                                      if not id_.isdigit() or int(id_) <= 0:
                                          raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                              Severity: Minor
                              Found in myems-api/core/combinedequipment.py - About 1 hr to fix

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

                                    def on_get(req, resp, id_, pid):
                                        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/combinedequipment.py - About 1 hr to fix

                                  Function on_get has 31 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/core/space.py - About 1 hr to fix

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

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

                                          def on_post(req, resp, id_):
                                              """Handles POST requests"""
                                              admin_control(req)
                                              if not id_.isdigit() or int(id_) <= 0:
                                                  raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
                                      Severity: Minor
                                      Found in myems-api/core/equipment.py - About 1 hr to fix

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

                                            def on_get(req, resp, id_, pid):
                                                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/equipment.py - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language