savonarola/pulse_meter_visualizer

View on GitHub

Showing 37 of 114 total issues

File jquery-ui-timepicker-addon.js has 1294 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
* jQuery timepicker addon
* By: Trent Richardson [http://trentrichardson.com]
* Version 1.0.2
* Last Modified: 07/01/2012
Severity: Major
Found in lib/pulse_meter/visualize/public/js/jquery-ui-timepicker-addon.js - About 3 days to fix

    File bootstrap.js has 1120 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* ===================================================
     * bootstrap-transition.js v2.0.3
     * http://twitter.github.com/bootstrap/javascript.html#transitions
     * ===================================================
     * Copyright 2012 Twitter, Inc.
    Severity: Major
    Found in lib/pulse_meter/visualize/public/js/bootstrap.js - About 2 days to fix

      File application.js has 890 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      
      String.prototype.capitalize = function() {
        return this.charAt(0).toUpperCase() + this.slice(1);
      };
      
      
      Severity: Major
      Found in lib/pulse_meter/visualize/public/js/application.js - About 2 days to fix

        Function _injectTimePicker has 285 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _injectTimePicker: function() {
                var $dp = this.inst.dpDiv,
                    o = this.inst.settings,
                    tp_inst = this,
                    // Added by Peter Medeiros:
        Severity: Major
        Found in lib/pulse_meter/visualize/public/js/jquery-ui-timepicker-addon.js - About 1 day to fix

          Function _limitMinMaxDateTime has 103 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _limitMinMaxDateTime: function(dp_inst, adjustSliders){
                  var o = this._defaults,
                      dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay);
          
                  if(!this._defaults.showTimepicker) { return; } // No time so nothing to check here
          Severity: Major
          Found in lib/pulse_meter/visualize/public/js/jquery-ui-timepicker-addon.js - About 4 hrs to fix

            Function parseTime has 90 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            $.datepicker.parseTime = function(timeFormat, timeString, options) {
                
                //########################################################################
                // pattern for standard and localized AM/PM markers
                //########################################################################
            Severity: Major
            Found in lib/pulse_meter/visualize/public/js/jquery-ui-timepicker-addon.js - About 3 hrs to fix

              Function _newInst has 82 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _newInst: function($input, o) {
                      var tp_inst = new Timepicker(),
                          inlineSettings = {};
              
                      for (var attrName in this._defaults) {
              Severity: Major
              Found in lib/pulse_meter/visualize/public/js/jquery-ui-timepicker-addon.js - About 3 hrs to fix

                Function str has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function str(key, holder) {
                
                // Produce a string from holder[key].
                
                        var i,          // The loop counter.
                Severity: Major
                Found in lib/pulse_meter/visualize/public/js/json2.js - About 2 hrs to fix

                  Function Timepicker has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function Timepicker() {
                      this.regional = []; // Available regional settings, indexed by language code
                      this.regional[''] = { // Default regional settings
                          currentText: 'Now',
                          closeText: 'Done',
                  Severity: Major
                  Found in lib/pulse_meter/visualize/public/js/jquery-ui-timepicker-addon.js - About 2 hrs to fix

                    Function _optionDatepicker has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    $.datepicker._optionDatepicker = function(target, name, value) {
                        var inst = this._getInst(target);
                        if (!inst) { return null; }
                        
                        var tp_inst = this._get(inst, 'timepicker');
                    Severity: Major
                    Found in lib/pulse_meter/visualize/public/js/jquery-ui-timepicker-addon.js - About 2 hrs to fix

                      Function handleRange has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      $.timepicker.handleRange = function( method, startTime, endTime, options ) {
                          $.fn[method].call(startTime, $.extend({
                                  onClose: function(dateText, inst) {
                                      checkDates(this, endTime, dateText);
                                  },
                      Severity: Minor
                      Found in lib/pulse_meter/visualize/public/js/jquery-ui-timepicker-addon.js - About 1 hr to fix

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

                          , show: function () {
                              var $tip
                                , inside
                                , pos
                                , actualWidth
                        Severity: Minor
                        Found in lib/pulse_meter/visualize/public/js/bootstrap.js - About 1 hr to fix

                          Function formatTime has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          $.datepicker.formatTime = function(format, time, options) {
                              options = options || {};
                              options = $.extend({}, $.timepicker._defaults, options);
                              time = $.extend({hour:0, minute:0, second:0, millisec:0, timezone:'+0000'}, time);
                          
                          
                          Severity: Minor
                          Found in lib/pulse_meter/visualize/public/js/jquery-ui-timepicker-addon.js - About 1 hr to fix

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

                                _updateDateTime: function(dp_inst) {
                                    dp_inst = this.inst || dp_inst;
                                    var dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),
                                        dateFmt = $.datepicker._get(dp_inst, 'dateFormat'),
                                        formatCfg = $.datepicker._getFormatConfig(dp_inst),
                            Severity: Minor
                            Found in lib/pulse_meter/visualize/public/js/jquery-ui-timepicker-addon.js - About 1 hr to fix

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

                              $.datepicker._setTime = function(inst, date) {
                                  var tp_inst = this._get(inst, 'timepicker');
                                  if (tp_inst) {
                                      var defaults = tp_inst._defaults,
                                          // calling _setTime with no date sets time to defaults
                              Severity: Minor
                              Found in lib/pulse_meter/visualize/public/js/jquery-ui-timepicker-addon.js - About 1 hr to fix

                                Function _onTimeChange has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    _onTimeChange: function() {
                                        var hour   = (this.hour_slider) ? this.hour_slider.slider('value') : false,
                                            minute = (this.minute_slider) ? this.minute_slider.slider('value') : false,
                                            second = (this.second_slider) ? this.second_slider.slider('value') : false,
                                            millisec = (this.millisec_slider) ? this.millisec_slider.slider('value') : false,
                                Severity: Minor
                                Found in lib/pulse_meter/visualize/public/js/jquery-ui-timepicker-addon.js - About 1 hr to fix

                                  Function parse has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          JSON.parse = function (text, reviver) {
                                  
                                  // The parse method takes a text and an optional reviver function, and returns
                                  // a JavaScript value if the text is a valid JSON text.
                                  
                                  
                                  Severity: Minor
                                  Found in lib/pulse_meter/visualize/public/js/json2.js - About 1 hr to fix

                                    Function slide has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      , slide: function (type, next) {
                                          var $active = this.$element.find('.active')
                                            , $next = next || $active[type]()
                                            , isCycling = this.interval
                                            , direction = type == 'next' ? 'left' : 'right'
                                    Severity: Minor
                                    Found in lib/pulse_meter/visualize/public/js/bootstrap.js - About 1 hr to fix

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

                                      Number.prototype.humanize = function() {
                                        var d, h, interval, m, res, s;
                                        interval = this;
                                        res = "";
                                        s = interval % 60;
                                      Severity: Minor
                                      Found in lib/pulse_meter/visualize/public/js/application.js - About 1 hr to fix

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

                                                def series_data(from, till)
                                                  ensure_equal_intervals!
                                                  sensor_datas = sensors.map{ |s|
                                                    s.timeline_data(from, till, show_last_point)
                                                  }
                                        Severity: Minor
                                        Found in lib/pulse_meter/visualize/widgets/timeline.rb - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language