firehol/netdata

View on GitHub

Showing 1,088 of 2,665 total issues

Method ClickHouse.collectSystemParts has 52 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (c *ClickHouse) collectSystemParts(mx map[string]int64) error {
    req, _ := web.NewHTTPRequest(c.RequestConfig)
    req.URL.RawQuery = makeURLQuery(querySystemParts)

    seen := make(map[string]*tableStats)
Severity: Minor
Found in src/go/plugin/go.d/modules/clickhouse/collect_system_parts.go - About 1 hr to fix

    Function dygraphInitialize has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    NETDATA.dygraphInitialize = function (callback) {
        if (typeof netdataNoDygraphs === 'undefined' || !netdataNoDygraphs) {
            $.ajax({
                url: NETDATA.dygraph_js,
                cache: true,
    Severity: Minor
    Found in src/web/gui/src/dashboard.js/charting/dygraph.js - About 1 hr to fix

      Function axisLabelFormatter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                      axisLabelFormatter: function (y) {
      
                          // unfortunately, we have to call this every single time
                          state.legendFormatValueDecimalsFromMinMax(
                              this.axes_[0].extremeRange[0],
      Severity: Minor
      Found in src/web/gui/src/dashboard.js/charting/dygraph.js - About 1 hr to fix

        Function googleInitialize has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        NETDATA.googleInitialize = function (callback) {
            if (typeof netdataNoGoogleCharts === 'undefined' || !netdataNoGoogleCharts) {
                $.ajax({
                    url: NETDATA.google_js,
                    cache: true,
        Severity: Minor
        Found in src/web/gui/src/dashboard.js/charting/google-charts.js - About 1 hr to fix

          Function hello has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              hello: function (host, callback) {
                  host = NETDATA.fixHost(host);
          
                  // send HELLO to a netdata server:
                  // 1. verifies the server is reachable
          Severity: Minor
          Found in src/web/gui/src/dashboard.js/registry.js - About 1 hr to fix

            Function googleInitialize has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            NETDATA.googleInitialize = function (callback) {
                if (typeof netdataNoGoogleCharts === 'undefined' || !netdataNoGoogleCharts) {
                    $.ajax({
                        url: NETDATA.google_js,
                        cache: true,
            Severity: Minor
            Found in src/web/gui/v1/dashboard.js - About 1 hr to fix

              Function hello has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  hello: function (host, callback) {
                      host = NETDATA.fixHost(host);
              
                      // send HELLO to a netdata server:
                      // 1. verifies the server is reachable
              Severity: Minor
              Found in src/web/gui/v1/dashboard.js - About 1 hr to fix

                Function dygraphInitialize has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                NETDATA.dygraphInitialize = function (callback) {
                    if (typeof netdataNoDygraphs === 'undefined' || !netdataNoDygraphs) {
                        $.ajax({
                            url: NETDATA.dygraph_js,
                            cache: true,
                Severity: Minor
                Found in src/web/gui/v1/dashboard.js - About 1 hr to fix

                  Function axisLabelFormatter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                  axisLabelFormatter: function (y) {
                  
                                      // unfortunately, we have to call this every single time
                                      state.legendFormatValueDecimalsFromMinMax(
                                          this.axes_[0].extremeRange[0],
                  Severity: Minor
                  Found in src/web/gui/v1/dashboard.js - About 1 hr to fix

                    Function registryDelete has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    NETDATA.registryDelete = function (getFromRegistry, serverDefault, delete_url, callback) {
                      // send DELETE to a netdata registry:
                      $.ajax({
                        url: getFromRegistry("registryServer") + '/api/v1/registry?action=delete&machine='
                          + getFromRegistry("machineGuid") + '&name=' + encodeURIComponent(getFromRegistry("hostname"))
                    Severity: Minor
                    Found in src/web/gui/v1/dashboard-react.js - About 1 hr to fix

                      Method Logind.collectSessions has 51 lines of code (exceeds 50 allowed). Consider refactoring.
                      Open

                      func (l *Logind) collectSessions(mx map[string]int64) error {
                          sessions, err := l.conn.ListSessions()
                          if err != nil {
                              return err
                          }
                      Severity: Minor
                      Found in src/go/plugin/go.d/modules/logind/collect.go - About 1 hr to fix

                        Function pgStatusCategory has 51 lines of code (exceeds 50 allowed). Consider refactoring.
                        Open

                        func pgStatusCategory(status string) string {
                            // 'status' is formated as 'status1+status2+...+statusN'
                        
                            states := strings.Split(status, "+")
                        
                        
                        Severity: Minor
                        Found in src/go/plugin/go.d/modules/ceph/collect_health.go - About 1 hr to fix

                          Function getLVType has 51 lines of code (exceeds 50 allowed). Consider refactoring.
                          Open

                          func getLVType(lvAttr string) string {
                              if len(lvAttr) == 0 {
                                  return ""
                              }
                          
                          
                          Severity: Minor
                          Found in src/go/plugin/go.d/modules/lvm/collect.go - About 1 hr to fix

                            Function gaugeInitialize has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            NETDATA.gaugeInitialize = function (callback) {
                                if (typeof netdataNoGauge === 'undefined' || !netdataNoGauge) {
                                    $.ajax({
                                        url: NETDATA.gauge_js,
                                        cache: true,
                            Severity: Minor
                            Found in src/web/gui/src/dashboard.js/charting/gauge.js - About 1 hr to fix

                              Function Exec has 51 lines of code (exceeds 50 allowed). Consider refactoring.
                              Open

                              func Exec(ctx context.Context, container string, cmd string, args ...string) ([]byte, error) {
                                  // based on https://github.com/moby/moby/blob/8e610b2b55bfd1bfa9436ab110d311f5e8a74dcb/integration/internal/container/exec.go#L38
                              
                                  addr := docker.DefaultDockerHost
                                  if v := FromEnv(); v != "" {
                              Severity: Minor
                              Found in src/go/plugin/go.d/pkg/dockerhost/dockerhost.go - About 1 hr to fix

                                Function getIntlNumberFormat has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    getIntlNumberFormat: function (min, max) {
                                        let key = max;
                                        if (min === max) {
                                            if (typeof this.formattersFixed[key] === 'undefined') {
                                                this.formattersFixed[key] = new Intl.NumberFormat(undefined, {
                                Severity: Minor
                                Found in src/web/gui/src/dashboard.js/utils.js - About 1 hr to fix

                                  Function delete has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      delete: function (delete_url, callback) {
                                          // send DELETE to a netdata registry:
                                          $.ajax({
                                              url: NETDATA.registry.server + '/api/v1/registry?action=delete&machine=' + NETDATA.registry.machine_guid + '&name=' + encodeURIComponent(NETDATA.registry.hostname) + '&url=' + encodeURIComponent(NETDATA.serverDefault) + '&delete_url=' + encodeURIComponent(delete_url),
                                              async: true,
                                  Severity: Minor
                                  Found in src/web/gui/src/dashboard.js/registry.js - About 1 hr to fix

                                    Function switch has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        switch: function (new_person_guid, callback) {
                                            // impersonate
                                            $.ajax({
                                                url: NETDATA.registry.server + '/api/v1/registry?action=switch&machine=' + NETDATA.registry.machine_guid + '&name=' + encodeURIComponent(NETDATA.registry.hostname) + '&url=' + encodeURIComponent(NETDATA.serverDefault) + '&to=' + new_person_guid,
                                                async: true,
                                    Severity: Minor
                                    Found in src/web/gui/src/dashboard.js/registry.js - About 1 hr to fix

                                      Function search has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          search: function (machine_guid, callback) {
                                              // SEARCH for the URLs of a machine:
                                              $.ajax({
                                                  url: NETDATA.registry.server + '/api/v1/registry?action=search&machine=' + NETDATA.registry.machine_guid + '&name=' + encodeURIComponent(NETDATA.registry.hostname) + '&url=' + encodeURIComponent(NETDATA.serverDefault) + '&for=' + machine_guid,
                                                  async: true,
                                      Severity: Minor
                                      Found in src/web/gui/src/dashboard.js/registry.js - About 1 hr to fix

                                        Function gaugeInitialize has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        NETDATA.gaugeInitialize = function (callback) {
                                            if (typeof netdataNoGauge === 'undefined' || !netdataNoGauge) {
                                                $.ajax({
                                                    url: NETDATA.gauge_js,
                                                    cache: true,
                                        Severity: Minor
                                        Found in src/web/gui/v1/dashboard.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language