talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

Function onEndProxyDrag has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    onEndProxyDrag : function(e){
        Ext.get(this.proxy).setDisplayed(false);
        var endPoint = Ext.lib.Event.getXY(e);
        if(this.overlay){
            Ext.destroy(this.overlay);
Severity: Minor
Found in app/assets/javascripts/ext/src/widgets/SplitBar.js - About 1 hr to fix

    Function initComponent has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      initComponent: function() {
        this.doc_store = new Ext.data.JsonStore({
          url: '/documents/recent_documents.json',
          baseParams: {
            'num_documents': this.numDocuments
    Severity: Minor
    Found in app/assets/javascripts/dashboard/cms/portlets/documents.js - About 1 hr to fix

      Function setActiveTab has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        setActiveTab : function(item){
            item = this.getComponent(item);
            if(this.fireEvent('beforetabchange', this, item, this.activeTab) === false){
              return;
            }
      Severity: Minor
      Found in app/assets/javascripts/ext_extensions/PillPanel.js - About 1 hr to fix

        Function draw has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          draw: function(){    
            if(this.store.getCount() == 0){
              return;
            }
            
        Severity: Minor
        Found in app/assets/javascripts/ext_extensions/D3Graph.js - About 1 hr to fix

          Method create_from_json has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def create_from_json
              success = true
              error_messages = []
          
              user_list = JSON.parse(params[:user_batch][:users])
          Severity: Minor
          Found in app/controllers/admin/user_batch_controller.rb - About 1 hr to fix

            Function id has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                                functor = functors[ id ] = functors[ id ] || function( _data , thread ) {
                                    
                                    var data = _data,
                                        context = this;
                
            Severity: Minor
            Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 1 hr to fix

              Function _attachEvents has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _attachEvents: function(){
                      var self = this;              
                                
                      qq.attach(self._element, 'dragover', function(e){
                          if (!self._isValidFileDrag(e)) return;
              Severity: Minor
              Found in app/assets/javascripts/lib/fileuploader.js - About 1 hr to fix

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                            body.push(me.html.replace(me.compileARe, '\\\\').replace(me.compileBRe, '\\n').replace(me.compileCRe, "\\'").replace(me.re, fn));
                Severity: Major
                Found in app/assets/javascripts/ext/src/core/Template-more.js and 1 other location - About 1 hr to fix
                app/assets/javascripts/ext/src/core/Template-more.js on lines 120..120

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 57.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                    eachItem: function(fn, scope) {
                        if(this.items && this.items.each){
                            this.items.each(fn, scope || this);
                        }
                    },
                app/assets/javascripts/ext/src/widgets/form/CheckboxGroup.js on lines 471..475

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 57.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                  constrcutor: function(){
                    Talho.Dashboard.Apps.view.Index.superclass.constructor.apply(this, arguments);
                    this.addEvents('addapp');
                  },
                Severity: Major
                Found in app/assets/javascripts/dashboard/apps/views/Index.js and 3 other locations - About 1 hr to fix
                app/assets/javascripts/admin/apps/view/Helper.js on lines 10..14
                app/assets/javascripts/admin/apps/view/Index.js on lines 8..12
                app/assets/javascripts/admin/apps/view/RoleWindow.js on lines 8..11

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 57.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                                   me.html.replace(me.compileARe, '\\\\').replace(me.compileBRe, '\\n').replace(me.compileCRe, "\\'").replace(me.re, fn) +
                Severity: Major
                Found in app/assets/javascripts/ext/src/core/Template-more.js and 1 other location - About 1 hr to fix
                app/assets/javascripts/ext/src/core/Template-more.js on lines 124..124

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 57.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                                elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){
                                    return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?
                                        all :
                                        front + "></" + tag + ">";
                                });
                Severity: Major
                Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js and 1 other location - About 1 hr to fix
                app/assets/javascripts/jquery.js on lines 874..878

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 57.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                  constructor: function(){
                    Talho.Admin.Apps.view.RoleWindow.superclass.constructor.apply(this, arguments);
                    this.addEvents('save');
                  },
                Severity: Major
                Found in app/assets/javascripts/admin/apps/view/RoleWindow.js and 3 other locations - About 1 hr to fix
                app/assets/javascripts/admin/apps/view/Helper.js on lines 10..14
                app/assets/javascripts/admin/apps/view/Index.js on lines 8..12
                app/assets/javascripts/dashboard/apps/views/Index.js on lines 8..11

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 57.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                        if(o.clientValidation === false || this.form.isValid()){
                            // tag on any additional params to be posted in the
                            // form scope
                            this.success.params = this.getParams();
                            this.form.api.submit(this.form.el.dom, this.success, this);
                Severity: Major
                Found in app/assets/javascripts/ext/src/widgets/form/Action.js and 1 other location - About 1 hr to fix
                app/assets/javascripts/ext/src/widgets/form/Action.js on lines 342..376

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 57.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                                elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){
                                    return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?
                                        all :
                                        front + "></" + tag + ">";
                                });
                Severity: Major
                Found in app/assets/javascripts/jquery.js and 1 other location - About 1 hr to fix
                app/assets/javascripts/jquery-tooltip/lib/jquery.js on lines 938..942

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 57.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                        this.setLayout(new Ext.layout.CardLayout(Ext.apply({
                            layoutOnCardChange: this.layoutOnTabChange,
                            deferredRender: this.deferredRender
                        }, this.layoutConfig)));
                Severity: Major
                Found in app/assets/javascripts/ext/src/widgets/TabPanel.js and 1 other location - About 1 hr to fix
                app/assets/javascripts/ext_extensions/VerticalTabPanel/Ext.ux.tot2ivn.VrTabPanel.js on lines 191..194

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 57.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                        this.setLayout(new Ext.layout.CardLayout(Ext.apply({
                            layoutOnCardChange: this.layoutOnTabChange,
                            deferredRender: this.deferredRender
                        }, this.layoutConfig)));
                app/assets/javascripts/ext/src/widgets/TabPanel.js on lines 292..295

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 57.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                  constructor: function(){
                    Talho.Admin.Apps.view.Index.superclass.constructor.apply(this, arguments);
                    
                    this.addEvents('appselect')
                  },
                Severity: Major
                Found in app/assets/javascripts/admin/apps/view/Index.js and 3 other locations - About 1 hr to fix
                app/assets/javascripts/admin/apps/view/Helper.js on lines 10..14
                app/assets/javascripts/admin/apps/view/RoleWindow.js on lines 8..11
                app/assets/javascripts/dashboard/apps/views/Index.js on lines 8..11

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 57.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                    eachItem: function(fn, scope) {
                        if(this.items && this.items.each){
                            this.items.each(fn, scope || this);
                        }
                    },
                app/assets/javascripts/ext/src/widgets/form/CompositeField.js on lines 362..366

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 57.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                  constructor: function(){
                    Talho.Admin.Apps.view.Helper.superclass.constructor.apply(this, arguments);
                    
                    this.addEvents('change');
                  },
                Severity: Major
                Found in app/assets/javascripts/admin/apps/view/Helper.js and 3 other locations - About 1 hr to fix
                app/assets/javascripts/admin/apps/view/Index.js on lines 8..12
                app/assets/javascripts/admin/apps/view/RoleWindow.js on lines 8..11
                app/assets/javascripts/dashboard/apps/views/Index.js on lines 8..11

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 57.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Severity
                Category
                Status
                Source
                Language