firehol/netdata

View on GitHub

Showing 1,088 of 2,665 total issues

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

    notifyAll: function () {
        // console.log('FETCHING ALARM LOG');
        NETDATA.alarms.get_log(NETDATA.alarms.last_notification_id, function (data) {
            // console.log('ALARM LOG FETCHED');

Severity: Minor
Found in src/web/gui/v1/dashboard.js - About 1 hr to fix

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

    function update_netdata_badges() {
        netdata_loops++;
        netdata_is_live = false;
    
        var updated = 0;
    Severity: Minor
    Found in src/web/gui/v1/refresh-badges.js - About 1 hr to fix

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

          positionLabelGroups: function(pie, section) {
              if (pie.options.labels[section].format === "none")
                  return;
      
              pie.__labels[section]
      Severity: Minor
      Found in src/web/gui/v1/lib/d3pie-0.2.1-netdata-3.js - About 1 hr to fix

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

        function notifyForDeleteRegistry() {
            const responseEl = document.getElementById('deleteRegistryResponse');
        
            if (deleteRegistryUrl) {
                if (isSignedIn()) {
        Severity: Minor
        Found in src/web/gui/main.js - About 1 hr to fix

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

              def __init__(self, stream, canonical=None, indent=None, width=None,
                      allow_unicode=None, line_break=None):
          
                  # The stream should have the methods `write` and possibly `flush`.
                  self.stream = stream
          Severity: Minor
          Found in src/collectors/python.d.plugin/python_modules/pyyaml3/emitter.py - About 1 hr to fix

            Method KubeState.collectNodesState has 54 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func (ks *KubeState) collectNodesState(mx map[string]int64) {
                now := time.Now()
                for _, ns := range ks.state.nodes {
                    if ns.deleted {
                        delete(ks.state.nodes, nodeSource(ns.name))
            Severity: Minor
            Found in src/go/plugin/go.d/modules/k8s_state/collect.go - About 1 hr to fix

              Method Dnsmasq.collectCacheStatistics has 54 lines of code (exceeds 50 allowed). Consider refactoring.
              Open

              func (d *Dnsmasq) collectCacheStatistics(mx map[string]int64) error {
                  /*
                      ;; flags: qr aa rd ra; QUERY: 7, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 0
              
                      ;; QUESTION SECTION:
              Severity: Minor
              Found in src/go/plugin/go.d/modules/dnsmasq/collect.go - About 1 hr to fix

                Method SquidLog.createCharts has 54 lines of code (exceeds 50 allowed). Consider refactoring.
                Open

                func (s *SquidLog) createCharts(line *logLine) error {
                    if line.empty() {
                        return errors.New("empty line")
                    }
                    charts := &Charts{
                Severity: Minor
                Found in src/go/plugin/go.d/modules/squidlog/charts.go - About 1 hr to fix

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

                      prepare: function (state) {
                          let has_custom_colors = false;
                  
                          if (typeof state.tmp.__commonColors === 'undefined') {
                              let defname = state.chart.context;
                  Severity: Minor
                  Found in src/web/gui/src/dashboard.js/common.js - About 1 hr to fix

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

                                touchend: function (event, dygraph, context) {
                                    state.tmp.dygraph_mouse_down = false;
                    
                                    if (NETDATA.options.debug.dygraph || state.debug) {
                                        state.log('interactionModel.touchend()');
                    Severity: Minor
                    Found in src/web/gui/src/dashboard.js/charting/dygraph.js - About 1 hr to fix

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

                      NETDATA.easypiechartSetSelection = function (state, t) {
                          if (state.timeIsVisible(t) !== true) {
                              return NETDATA.easypiechartClearSelection(state, true);
                          }
                      
                      
                      Severity: Minor
                      Found in src/web/gui/src/dashboard.js/charting/easy-pie-chart.js - About 1 hr to fix

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

                            this.resetChart = function (dontClearMaster, dontUpdate) {
                                if (this.debug) {
                                    this.log('resetChart(' + dontClearMaster + ', ' + dontUpdate + ') called');
                                }
                        
                        
                        Severity: Minor
                        Found in src/web/gui/v1/dashboard.js - About 1 hr to fix

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

                              this.resetChart = function (dontClearMaster, dontUpdate) {
                                  if (this.debug) {
                                      this.log('resetChart(' + dontClearMaster + ', ' + dontUpdate + ') called');
                                  }
                          
                          
                          Severity: Minor
                          Found in src/web/gui/src/dashboard.js/main.js - About 1 hr to fix

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

                            NETDATA.easypiechartSetSelection = function (state, t) {
                                if (state.timeIsVisible(t) !== true) {
                                    return NETDATA.easypiechartClearSelection(state, true);
                                }
                            
                            
                            Severity: Minor
                            Found in src/web/gui/v1/dashboard.js - About 1 hr to fix

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

                                          touchend: function (event, dygraph, context) {
                                              state.tmp.dygraph_mouse_down = false;
                              
                                              if (NETDATA.options.debug.dygraph || state.debug) {
                                                  state.log('interactionModel.touchend()');
                              Severity: Minor
                              Found in src/web/gui/v1/dashboard.js - About 1 hr to fix

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

                                    prepare: function (state) {
                                        let has_custom_colors = false;
                                
                                        if (typeof state.tmp.__commonColors === 'undefined') {
                                            let defname = state.chart.context;
                                Severity: Minor
                                Found in src/web/gui/v1/dashboard.js - About 1 hr to fix

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

                                      getIncludes: function(val) {
                                          var addMainLabel  = false;
                                          var addValue      = false;
                                          var addPercentage = false;
                                  
                                  
                                  Severity: Minor
                                  Found in src/web/gui/v1/lib/d3pie-0.2.1-netdata-3.js - About 1 hr to fix

                                    Method Manager.dyncfgConfigRestart has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                                    Open

                                    func (m *Manager) dyncfgConfigRestart(fn functions.Function) {
                                        id := fn.Args[0]
                                        mn, jn, ok := extractModuleJobName(id)
                                        if !ok {
                                            m.Warningf("dyncfg: restart: could not extract module from id (%s)", id)
                                    Severity: Minor
                                    Found in src/go/plugin/go.d/agent/jobmgr/dyncfg.go - About 1 hr to fix

                                      Method SystemdUnits.collectUnits has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                                      Open

                                      func (s *SystemdUnits) collectUnits(mx map[string]int64, conn systemdConnection) error {
                                          var units []dbus.UnitStatus
                                          var err error
                                      
                                          if s.systemdVersion >= 230 {
                                      Severity: Minor
                                      Found in src/go/plugin/go.d/modules/systemdunits/collect_units.go - About 1 hr to fix

                                        Function collectSystemRebuild has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                                        Open

                                        func collectSystemRebuild(sm *systemMetrics, ss client.SystemStatistics) {
                                            m := &sm.Rebuild
                                        
                                            m.Forward.BW.set(
                                                calcBW(ss.FwdRebuildReadBwc),
                                        Severity: Minor
                                        Found in src/go/plugin/go.d/modules/scaleio/collect_system.go - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language