FanaHOVA/blazer

View on GitHub

Showing 544 of 841 total issues

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

        this.renderPieChart = function (chart) {
          waitForLoaded(function () {
            var chartOptions = {
              chartArea: {
                top: "10%",
Severity: Minor
Found in app/assets/javascripts/blazer/chartkick.js - About 1 hr to fix

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

            this.renderColumnChart = function (chart, chartType) {
              chartType = chartType || "column";
              var series = chart.data;
              var options = jsOptions(chart, chart.options), i, j, s, d, rows = [], categories = [];
              options.chart.type = chartType;
    Severity: Minor
    Found in app/assets/javascripts/blazer/chartkick.js - About 1 hr to fix

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

          Chart.Controller = function(item, config, instance) {
              var me = this;
      
              config = initConfig(config);
      
      
      Severity: Minor
      Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

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

                render: function(duration, lazy) {
                    var me = this;
        
                    if (plugins.notify(me, 'beforeRender') === false) {
                        return;
        Severity: Minor
        Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

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

            Tab.prototype.show = function () {
              var $this    = this.element
              var $ul      = $this.closest('ul:not(.dropdown-menu)')
              var selector = $this.data('target')
          
          
          Severity: Minor
          Found in app/assets/javascripts/blazer/bootstrap.js - About 1 hr to fix

            Method set_queries has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def set_queries(limit = nil)
                  @my_queries =
                    if limit && blazer_user && !params[:filter] && Blazer.audit
                      queries_by_ids(Blazer::Audit.where(user_id: blazer_user.id).where("created_at > ?", 30.days.ago).where("query_id IS NOT NULL").group(:query_id).order("count_all desc").count.keys)
                    else
            Severity: Minor
            Found in app/controllers/concerns/blazer/query_runner.rb - About 1 hr to fix

              Method run_statement has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def run_statement(statement, options = {})
                    run_id = options[:run_id]
                    async = options[:async]
                    result = nil
                    if cache_mode != "off"
              Severity: Minor
              Found in lib/blazer/data_source.rb - About 1 hr to fix

                Function html has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  html: function( value ) {
                    return access( this, function( value ) {
                      var elem = this[ 0 ] || {},
                        i = 0,
                        l = this.length;
                Severity: Minor
                Found in app/assets/javascripts/blazer/jquery.js - About 1 hr to fix

                  Function toggleClass has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    toggleClass: function( value, stateVal ) {
                      var type = typeof value;
                  
                      if ( typeof stateVal === "boolean" && type === "string" ) {
                        return stateVal ? this.addClass( value ) : this.removeClass( value );
                  Severity: Minor
                  Found in app/assets/javascripts/blazer/jquery.js - About 1 hr to fix

                    Function updateStyle has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function updateStyle (oldVnode, vnode) {
                      if ((!oldVnode.data || !oldVnode.data.style) && !vnode.data.style) {
                        return
                      }
                      var cur, name;
                    Severity: Minor
                    Found in app/assets/javascripts/blazer/vue.js - About 1 hr to fix

                      Function hsl2rgb has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function hsl2rgb(hsl) {
                        var h = hsl[0] / 360,
                            s = hsl[1] / 100,
                            l = hsl[2] / 100,
                            t1, t2, t3, rgb, val;
                      Severity: Minor
                      Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                        Function scaleMerge has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            helpers.scaleMerge = function(_base, extension) {
                                var base = helpers.clone(_base);
                        
                                helpers.each(extension, function(value, key) {
                                    if (key === 'xAxes' || key === 'yAxes') {
                        Severity: Minor
                        Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                          Function drawPointLabels has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function drawPointLabels(scale) {
                                  var ctx = scale.ctx;
                                  var getValueOrDefault = helpers.getValueOrDefault;
                                  var opts = scale.options;
                                  var angleLineOpts = opts.angleLines;
                          Severity: Minor
                          Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                            Function longestText has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                helpers.longestText = function(ctx, font, arrayOfThings, cache) {
                                    cache = cache || {};
                                    var data = cache.data = cache.data || {};
                                    var gc = cache.garbageCollect = cache.garbageCollect || [];
                            
                            
                            Severity: Minor
                            Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                              Function listenArrayEvents has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function listenArrayEvents(array, listener) {
                                      if (array._chartjs) {
                                          array._chartjs.listeners.push(listener);
                                          return;
                                      }
                              Severity: Minor
                              Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                Function runQueryHelper has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function runQueryHelper(query) {
                                  var xhr = $.ajax({
                                    url: Routes.run_queries_path(),
                                    method: "POST",
                                    data: query.data,
                                Severity: Minor
                                Found in app/assets/javascripts/blazer/queries.js - About 1 hr to fix

                                  Function initializePlugins has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      Interface.prototype.initializePlugins = function(plugins) {
                                        var i, n, key;
                                        var self  = this;
                                        var queue = [];
                                  
                                  
                                  Severity: Minor
                                  Found in app/assets/javascripts/blazer/selectize.js - About 1 hr to fix

                                    Method state_change has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        def state_change(check, state, state_was, rows_count, error, columns, rows, column_types, check_type)
                                    Severity: Major
                                    Found in app/mailers/blazer/check_mailer.rb - About 1 hr to fix

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

                                        finish: function( type ) {
                                          if ( type !== false ) {
                                            type = type || "fx";
                                          }
                                          return this.each(function() {
                                      Severity: Minor
                                      Found in app/assets/javascripts/blazer/jquery.js - About 1 hr to fix

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

                                          fix: function( event ) {
                                            if ( event[ jQuery.expando ] ) {
                                              return event;
                                            }
                                        
                                        
                                        Severity: Minor
                                        Found in app/assets/javascripts/blazer/jquery.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language