estimancy/projestimate

View on GitHub

Showing 836 of 1,675 total issues

Function drawAllSegments has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        function drawAllSegments(animationDecimal) {
            var startAngle = -config.startAngle * (Math.PI / 180)+2*Math.PI,
      cumvalue = 0,
            angleStep = (Math.PI * 2) / data.length,
            scaleAnimation = 1,
Severity: Minor
Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

    Method get_label_widget_data has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def get_label_widget_data(view_widget_id)
        view_widget = ViewsWidget.find(view_widget_id)
        widget_data = {}
        initial_width = 60;  initial_height = 60
        value_to_show = nil # according to the widget type
    Severity: Minor
    Found in app/helpers/views_widgets_helper.rb - About 1 hr to fix

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

        initialize: function(controller){
          var $RGraph = $jit.RGraph;
      
          var config = {
            interpolation: 'linear',
      Severity: Minor
      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

          normalizeDims: function() {
            //number of elements
            var root = this.delegate.graph.getNode(this.delegate.root), l=0;
            root.eachAdjacency(function() {
              l++;
        Severity: Minor
        Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                  Bezier : function(params) {
                      var self = this,
                          _super = jsPlumb.Segments.AbstractSegment.apply(this, arguments),
                          curve = [    
                              { x:params.x1, y:params.y1},
          Severity: Minor
          Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

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

                jsPlumb.Overlays.Label = function(params) {
                    var self = this;        
                    this.labelStyle = params.labelStyle || jsPlumb.Defaults.LabelStyle;
                    this.cssClass = this.labelStyle != null ? this.labelStyle.cssClass : null;
                    params.create = function() {
            Severity: Minor
            Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

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

                      var ContinuousAnchor = function(anchorParams) {
                          jsPlumbUtil.EventGenerator.apply(this);
                          this.type = "Continuous";
                          this.isDynamic = true;
                          this.isContinuous = true;
              Severity: Minor
              Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

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

                        select: function(event, ui) { //bind click event to link
                            var tab_index =  ui.index+1;
                
                            var anchor_value = "";
                            $(".current_tab").val("tabs-" + tab_index);
                Severity: Minor
                Found in app/assets/javascripts/pager.js - About 1 hr to fix

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

                      fn.can_go_up_to_row = function(widget_grid_data, col, row) {
                          var ga = this.gridmap;
                          var result = true;
                          var urc = []; // upper_rows_in_columns
                          var actual_row = widget_grid_data.row;
                  Severity: Minor
                  Found in app/assets/javascripts/jquery.gridster.js - About 1 hr to fix

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

                                function computeThIndexes(t) {
                                    var matrix = [],
                                        lookup = {},
                                        cols = 0, // determine the number of columns
                                        trs = $(t).find('thead:eq(0), tfoot').children('tr'), // children tr in tfoot - see issue #196
                    Severity: Minor
                    Found in app/assets/javascripts/pager.js - About 1 hr to fix

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

                              function drawScale() {
                      
                                  //X axis line                                                          
                      
                                  ctx.lineWidth = config.scaleLineWidth;
                      Severity: Minor
                      Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

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

                                function drawScale() {
                        
                                    //X axis line                                                          
                        
                                    ctx.lineWidth = config.scaleLineWidth;
                        Severity: Minor
                        Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

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

                                  function drawScale() {
                          
                                      //X axis line                                                          
                          
                                      ctx.lineWidth = config.scaleLineWidth;
                          Severity: Minor
                          Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

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

                                function calculateScale(config, maxSteps, minSteps, maxValue, minValue, labelTemplateString) {
                                    var graphMin, graphMax, graphRange, stepValue, numberOfSteps, valueRange, rangeOrderOfMagnitude, decimalNum;
                            
                                    if (!config.logarithmic) { // no logarithmic scale
                                        valueRange = maxValue - minValue;
                            Severity: Minor
                            Found in app/assets/javascripts/ChartNew.js - About 1 hr to fix

                              Method is_validate has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                def is_validate(val)
                                  #deserialize options to do something like that : ['integer', '>=', 50]
                                  array = pe_attribute.options.compact.reject { |s| s.nil? or s.empty? or s.blank? }
                              
                                  #test attribute type and check validity (numeric = float and integer)
                              Severity: Minor
                              Found in app/models/attribute_module.rb - About 1 hr to fix

                                Method save_values has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  def save_values
                                    authorize! :manage_modules_instances, ModuleProject
                                    #set ratio values
                                    ratio_values = params[:ratio_values]
                                    ratio_values.each do |key, value|
                                Severity: Minor
                                Found in app/controllers/wbs_activity_ratio_elements_controller.rb - About 1 hr to fix

                                  Method add_wbs_activity_to_project has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    def add_wbs_activity_to_project
                                      @project = Project.find(params[:project_id])
                                  
                                      @pe_wbs_project_activity = @project.pe_wbs_projects.activities_wbs.first
                                      @wbs_project_elements_root = @project.wbs_project_element_root
                                  Severity: Minor
                                  Found in app/controllers/projects_controller.rb - About 1 hr to fix

                                    Function _updateAnchorList has 12 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                            var _updateAnchorList = function(lists, theta, order, conn, aBoolean, otherElId, idx, reverse, edgeId, elId, connsToPaint, endpointsToPaint) {        
                                    Severity: Major
                                    Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

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

                                            onCreateLabel: function(domElement, node) {
                                              var labelConf = config.Label,
                                                  valueArray = node.getData('valueArray'),
                                                  acumLeft = $.reduce(valueArray, function(x, y) { return x + y[0]; }, 0),
                                                  acumRight = $.reduce(valueArray, function(x, y) { return x + y[1]; }, 0);
                                      Severity: Minor
                                      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                buildSelect: function(table, column, arry, updating, onlyAvail) {
                                                    table = $(table)[0];
                                                    column = parseInt(column, 10);
                                                    if (!table.config.cache || $.isEmptyObject(table.config.cache)) { return; }
                                                    var indx, val, txt, t, $filters, $filter,
                                        Severity: Minor
                                        Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language