talho/openphin

View on GitHub
app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js

Summary

Maintainability
F
3 mos
Test Coverage

File TreeGrid.js has 1408 lines of code (exceeds 250 allowed). Consider refactoring.
Open

if (Ext.version == '3.0') {
    Ext.override(Ext.grid.GridView, {
        ensureVisible : function(row, col, hscroll) {
        
            var resolved = this.resolveCell(row, col, hscroll);
Severity: Major
Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 3 days to fix

    AbstractTreeStore has 46 functions (exceeds 20 allowed). Consider refactoring.
    Open

    {
        /**
         * @cfg {String} is_leaf_field_name Record leaf flag field name.
         */
        leaf_field_name : '_is_leaf',
    Severity: Minor
    Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 6 hrs to fix

      Function doRender has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
      Open

          doRender : function(cs, rs, ds, startRow, colCount, stripe)
          {
              var ts = this.templates, ct = ts.cell, rt = ts.row, last = colCount-1;
              var tstyle = 'width:'+this.getTotalWidth()+';';
              // buffers
      Severity: Minor
      Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 5 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function loadRecords has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
      Open

          loadRecords : function(o, options, success)
          {
              if (!o || success === false) {
                  if (success !== false) {
                      this.fireEvent("load", this, [], options);
      Severity: Minor
      Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 4 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function renderCellTreeUI has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
      Open

          renderCellTreeUI : function(record, store)
          {
              var tpl = this.templates.treeui,
                  line_tpl = this.templates.elbow_line,
                  tpl_data = {},
      Severity: Minor
      Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 4 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function loadRecords has 85 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          loadRecords : function(o, options, success)
          {
              if (!o || success === false) {
                  if (success !== false) {
                      this.fireEvent("load", this, [], options);
      Severity: Major
      Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 3 hrs to fix

        Function renderCellTreeUI has 69 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            renderCellTreeUI : function(record, store)
            {
                var tpl = this.templates.treeui,
                    line_tpl = this.templates.elbow_line,
                    tpl_data = {},
        Severity: Major
        Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 2 hrs to fix

          Function load has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
          Open

              load : function(options)
              {
                  if (options) {
                      if (options.params) {
                          if (options.params[this.paramNames.active_node] === undefined) {
          Severity: Minor
          Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 2 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function doRender has 57 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              doRender : function(cs, rs, ds, startRow, colCount, stripe)
              {
                  var ts = this.templates, ct = ts.cell, rt = ts.row, last = colCount-1;
                  var tstyle = 'width:'+this.getTotalWidth()+';';
                  // buffers
          Severity: Major
          Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 2 hrs to fix

            Function ensureVisible has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                    ensureVisible : function(row, col, hscroll) {
                    
                        var resolved = this.resolveCell(row, col, hscroll);
                        if(!resolved || !resolved.row){
                            return;
            Severity: Minor
            Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 1 hr to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function setActiveNode has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                setActiveNode : function(rc)
                {
                    if (this.active_node !== rc) {
                        if (rc) {
                            if (this.data.indexOf(rc) != -1) {
            Severity: Minor
            Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 1 hr to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function initTemplates has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                initTemplates : function()
                {
                    var ts = this.templates || {};
                    
                    if (!ts.row) {
            Severity: Minor
            Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 1 hr to fix

              Function expandRow has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  expandRow : function(record, skip_process)
                  {
                      var ds = this.ds,
                          i, len, row, pmel, children, index, child_index;
                      
              Severity: Minor
              Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

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

                  expandRow : function(record, skip_process)
                  {
                      var ds = this.ds,
                          i, len, row, pmel, children, index, child_index;
                      
              Severity: Minor
              Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 1 hr to fix

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

                        ensureVisible : function(row, col, hscroll) {
                        
                            var resolved = this.resolveCell(row, col, hscroll);
                            if(!resolved || !resolved.row){
                                return;
                Severity: Minor
                Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 1 hr to fix

                  Function collapseRow has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      collapseRow : function(record, skip_process)
                      {
                          var ds = this.ds,
                              i, len, children, row, index, child_index;
                                  
                  Severity: Minor
                  Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 1 hr to fix

                    Function updateAllColumnWidths has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                    Open

                        updateAllColumnWidths : function()
                        {
                            var tw = this.getTotalWidth(),
                            clen = this.cm.getColumnCount(),
                            ws = [],
                    Severity: Minor
                    Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 1 hr to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function collapseRow has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                    Open

                        collapseRow : function(record, skip_process)
                        {
                            var ds = this.ds,
                                i, len, children, row, index, child_index;
                                    
                    Severity: Minor
                    Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 1 hr to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function updateColumnHidden has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                    Open

                        updateColumnHidden : function(col, hidden)
                        {
                            var tw = this.getTotalWidth();
                            this.innerHd.firstChild.style.width = this.getOffsetWidth();
                            this.innerHd.firstChild.firstChild.style.width = tw;
                    Severity: Minor
                    Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 1 hr to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function updateAllColumnWidths has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        updateAllColumnWidths : function()
                        {
                            var tw = this.getTotalWidth(),
                            clen = this.cm.getColumnCount(),
                            ws = [],
                    Severity: Minor
                    Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 1 hr to fix

                      Function updateColumnWidth has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          updateColumnWidth : function(col, width)
                          {
                              var w = this.getColumnWidth(col);
                              var tw = this.getTotalWidth();
                              this.innerHd.firstChild.style.width = this.getOffsetWidth();
                      Severity: Minor
                      Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 1 hr to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function onTreeGridSelectionChange has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          onTreeGridSelectionChange : function(sm, selection)
                          {
                              var record, ancestors, store = this.getStore();
                              // Row selection model
                              if (sm.getSelected) {
                      Severity: Minor
                      Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 55 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function onTreeGridSelectionChange has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          onTreeGridSelectionChange : function(sm, selection)
                          {
                              var record, ancestors, store = this.getStore();
                              // Row selection model
                              if (sm.getSelected) {
                      Severity: Minor
                      Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 45 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function onClick has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          onClick : function(e)
                          {
                              var target = e.getTarget(),
                                  view = this.getView(),
                                  row = view.findRowIndex(target),
                      Severity: Minor
                      Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 45 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function onClick has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          onClick : function(e)
                          {
                              var target = e.getTarget(),
                                  view = this.getView(),
                                  row = view.findRowIndex(target),
                      Severity: Minor
                      Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 45 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function doRender has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          doRender : function(cs, rs, ds, startRow, colCount, stripe)
                      Severity: Minor
                      Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 45 mins to fix

                        Function sortData has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                        Open

                            sortData : function(f, direction) 
                            {
                                direction = direction || 'ASC';
                                var st = this.fields.get(f).sortType;
                                var fn = function(r1, r2){
                        Severity: Minor
                        Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 45 mins to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function renderRow has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            renderRow : function(record, index, col_count, ds, total_width)
                        Severity: Minor
                        Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 35 mins to fix

                          Function initTemplates has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                              initTemplates : function()
                              {
                                  var ts = this.templates || {};
                                  
                                  if (!ts.row) {
                          Severity: Minor
                          Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 35 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function sort has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              sort : function(fieldName, dir)
                              {
                                  if (this.remoteSort) {
                                      this.setActiveNode(null);
                                      if (this.lastOptions) {
                          Severity: Minor
                          Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 25 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function ensureVisible has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              ensureVisible : function(row, col, hscroll)
                              {
                                  var ancestors, record = this.ds.getAt(row);
                                  
                                  if (!this.ds.isVisibleNode(record)) {
                          Severity: Minor
                          Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 25 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

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

                          Ext.ux.maximgb.tg.GridView = Ext.extend(Ext.grid.GridView, 
                          {   
                              expanded_icon_class : 'ux-maximgb-tg-elbow-minus',
                              last_expanded_icon_class : 'ux-maximgb-tg-elbow-end-minus',
                              collapsed_icon_class : 'ux-maximgb-tg-elbow-plus',
                          Severity: Major
                          Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js and 1 other location - About 1 mo to fix
                          app/assets/javascripts/ext_extensions/TreeGrid/src/GridView.js on lines 1..529

                          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 4845.

                          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 2 locations. Consider refactoring.
                          Open

                          Ext.ux.maximgb.tg.AbstractTreeStore = Ext.extend(Ext.data.Store,
                          {
                              /**
                               * @cfg {String} is_leaf_field_name Record leaf flag field name.
                               */
                          Severity: Major
                          Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js and 1 other location - About 1 mo to fix
                          app/assets/javascripts/ext_extensions/TreeGrid/src/AbstractTreeStore.js on lines 6..883

                          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 4584.

                          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 2 locations. Consider refactoring.
                          Open

                          Ext.ux.maximgb.tg.PagingToolbar = Ext.extend(Ext.PagingToolbar,
                          {
                              onRender : function(ct, position)
                              {
                                  Ext.ux.maximgb.tg.PagingToolbar.superclass.onRender.call(this, ct, position);
                          Severity: Major
                          Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js and 1 other location - About 1 wk to fix
                          app/assets/javascripts/ext_extensions/TreeGrid/src/PagingToolbar.js on lines 4..137

                          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 1158.

                          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

                          Ext.ux.maximgb.tg.GridPanel = Ext.extend(Ext.grid.GridPanel, 
                          {
                              /**
                               * @cfg {String|Integer} master_column_id Master column id. Master column cells are nested.
                               * Master column cell values are used to build breadcrumbs.
                          Severity: Major
                          Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js and 1 other location - About 4 days to fix
                          app/assets/javascripts/ext_extensions/TreeGrid/src/GridPanel.js on lines 1..118

                          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 812.

                          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

                          Ext.ux.maximgb.tg.EditorGridPanel = Ext.extend(Ext.grid.EditorGridPanel, 
                          {
                              /**
                               * @cfg {String|Integer} master_column_id Master column id. Master column cells are nested.
                               * Master column cell values are used to build breadcrumbs.
                          Severity: Major
                          Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js and 1 other location - About 4 days to fix
                          app/assets/javascripts/ext_extensions/TreeGrid/src/EditorGridPanel.js on lines 1..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 800.

                          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

                          Ext.ux.maximgb.tg.NestedSetStore = Ext.extend(Ext.ux.maximgb.tg.AbstractTreeStore,
                          {
                              /**
                               * @cfg {String} left_field_name Record NS-left bound field name.
                               */
                          Severity: Major
                          Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js and 1 other location - About 4 days to fix
                          app/assets/javascripts/ext_extensions/TreeGrid/src/NestedSetStore.js on lines 4..110

                          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 757.

                          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 (Ext.version == '3.0') {
                              Ext.override(Ext.grid.GridView, {
                                  ensureVisible : function(row, col, hscroll) {
                                  
                                      var resolved = this.resolveCell(row, col, hscroll);
                          Severity: Major
                          Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js and 1 other location - About 2 days to fix
                          app/assets/javascripts/ext_extensions/TreeGrid/src/ExtOverride.js on lines 1..51

                          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 457.

                          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

                          Ext.ux.maximgb.tg.AdjacencyListStore = Ext.extend(Ext.ux.maximgb.tg.AbstractTreeStore,
                          {
                              /**
                               * @cfg {String} parent_id_field_name Record parent id field name.
                               */
                          Severity: Major
                          Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js and 1 other location - About 2 days to fix
                          app/assets/javascripts/ext_extensions/TreeGrid/src/AdjacencyListStore.js on lines 4..63

                          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 423.

                          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

                          There are no issues that match your filters.

                          Category
                          Status