firehol/netdata

View on GitHub

Showing 1,088 of 2,665 total issues

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

NETDATA.dygraphGetSeriesStyle = function(dygraphOptions) {
    const seriesStyleStr = dygraphOptions.perSeriesStyle;
    let formattedStyles = {};

    if (seriesStyleStr === '') {
Severity: Minor
Found in src/web/gui/src/dashboard.js/charting/dygraph.js - About 1 hr to fix

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

        handler: function (entries, observer) {
            entries.forEach(function (entry) {
                let state = NETDATA.chartState(entry.target);
    
                let idx;
    Severity: Minor
    Found in src/web/gui/src/dashboard.js/main.js - About 1 hr to fix

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

          parsePersonUrls: function (person_urls) {
              NETDATA.registry.person_urls = person_urls;
      
              if (person_urls) {
                  NETDATA.registry.machines = {};
      Severity: Minor
      Found in src/web/gui/src/dashboard.js/registry.js - About 1 hr to fix

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

                const genLabel = function (state, parent, dim, name, count) {
                    let color = state.__chartDimensionColor(name);
        
                    let user_element = null;
                    let user_id = NETDATA.dataAttribute(state.element, 'show-value-of-' + name.toLowerCase() + '-at', null);
        Severity: Minor
        Found in src/web/gui/v1/dashboard.js - About 1 hr to fix

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

              handler: function (entries, observer) {
                  entries.forEach(function (entry) {
                      let state = NETDATA.chartState(entry.target);
          
                      let idx;
          Severity: Minor
          Found in src/web/gui/v1/dashboard.js - About 1 hr to fix

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

                parsePersonUrls: function (person_urls) {
                    NETDATA.registry.person_urls = person_urls;
            
                    if (person_urls) {
                        NETDATA.registry.machines = {};
            Severity: Minor
            Found in src/web/gui/v1/dashboard.js - About 1 hr to fix

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

                      const genLabel = function (state, parent, dim, name, count) {
                          let color = state.__chartDimensionColor(name);
              
                          let user_element = null;
                          let user_id = NETDATA.dataAttribute(state.element, 'show-value-of-' + name.toLowerCase() + '-at', null);
              Severity: Minor
              Found in src/web/gui/src/dashboard.js/main.js - About 1 hr to fix

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

                    d3pie.prototype.updateProp = function(propKey, value) {
                        switch (propKey) {
                            case "header.title.text":
                                var oldVal = helpers.processObj(this.options, propKey);
                                helpers.processObj(this.options, propKey, value);
                Severity: Minor
                Found in src/web/gui/v1/lib/d3pie-0.2.1-netdata-3.js - About 1 hr to fix

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

                  function getCloudAccountAgents() {
                      if (!isSignedIn()) {
                          return [];
                      }
                  
                  
                  Severity: Minor
                  Found in src/web/gui/main.js - About 1 hr to fix

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

                    function notifyForUpdate(force) {
                        versionLog('<p>checking for updates...</p>');
                    
                        var now = Date.now();
                    
                    
                    Severity: Minor
                    Found in src/web/gui/main.js - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                                  if (document.location.hostname.endsWith('.my-netdata.io') ||
                                      document.location.hostname.endsWith('.mynetdata.io') ||
                                      document.location.hostname.endsWith('.netdata.rocks') ||
                                      document.location.hostname.endsWith('.netdata.ai') ||
                                      document.location.hostname.endsWith('.netdata.live') ||
                      Severity: Critical
                      Found in src/web/gui/main.js - About 1 hr to fix

                        Method Manager.dyncfgConfigTest has 58 lines of code (exceeds 50 allowed). Consider refactoring.
                        Open

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

                          Function parseZpoolListVdevOutput has 58 lines of code (exceeds 50 allowed). Consider refactoring.
                          Open

                          func parseZpoolListVdevOutput(bs []byte) ([]vdevEntry, error) {
                              var headers []string
                              var vdevs []vdevEntry
                              sc := bufio.NewScanner(bytes.NewReader(bs))
                          
                          
                          Severity: Minor
                          Found in src/go/plugin/go.d/modules/zfspool/collect_zpool_list_vdev.go - About 1 hr to fix

                            Method intelGpuTopExec.run has 58 lines of code (exceeds 50 allowed). Consider refactoring.
                            Open

                            func (e *intelGpuTopExec) run() error {
                                var cmd *exec.Cmd
                            
                                if e.device != "" {
                                    cmd = exec.Command(e.ndsudoPath, "igt-device-json", "--interval", e.calcIntervalArg(), "--device", e.device)
                            Severity: Minor
                            Found in src/go/plugin/go.d/modules/intelgpu/exec.go - About 1 hr to fix

                              Method Litespeed.collectReport has 58 lines of code (exceeds 50 allowed). Consider refactoring.
                              Open

                              func (l *Litespeed) collectReport(mx map[string]int64, filename string) error {
                                  bs, err := os.ReadFile(filename)
                                  if err != nil {
                                      return err
                                  }
                              Severity: Minor
                              Found in src/go/plugin/go.d/modules/litespeed/collect.go - About 1 hr to fix

                                Function underlayCallback has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        underlayCallback: function (canvas, area, g) {
                                            // the chart is about to be drawn
                                
                                            // update history_tip_element
                                            if (state.tmp.dygraph_history_tip_element) {
                                Severity: Minor
                                Found in src/web/gui/src/dashboard.js/charting/dygraph.js - About 1 hr to fix

                                  Function underlayCallback has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          underlayCallback: function (canvas, area, g) {
                                              // the chart is about to be drawn
                                  
                                              // update history_tip_element
                                              if (state.tmp.dygraph_history_tip_element) {
                                  Severity: Minor
                                  Found in src/web/gui/v1/dashboard.js - About 1 hr to fix

                                    Function initializeDynamicDashboardWithData has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function initializeDynamicDashboardWithData(data) {
                                        if (data !== null) {
                                            options.hostname = data.hostname;
                                            options.data = data;
                                            options.version = data.version;
                                    Severity: Minor
                                    Found in src/web/gui/main.js - About 1 hr to fix

                                      Function smoothPlotter has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function smoothPlotter(e) {
                                        var ctx = e.drawingContext,
                                            points = e.points;
                                      
                                        ctx.beginPath();
                                      Severity: Minor
                                      Found in src/web/gui/v1/lib/dygraph-smooth-plotter-c91c859.js - About 1 hr to fix

                                        Function gotoServerModalHandler has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function gotoServerModalHandler(guid) {
                                            // console.log('goto server: ' + guid);
                                        
                                            gotoServerStop = false;
                                            var checked = {};
                                        Severity: Minor
                                        Found in src/web/gui/main.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language