Showing 1,088 of 2,665 total issues
Method ClickHouse.collectSystemParts
has 52 lines of code (exceeds 50 allowed). Consider refactoring. Open
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)
Function dygraphInitialize
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
NETDATA.dygraphInitialize = function (callback) {
if (typeof netdataNoDygraphs === 'undefined' || !netdataNoDygraphs) {
$.ajax({
url: NETDATA.dygraph_js,
cache: true,
Function axisLabelFormatter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
axisLabelFormatter: function (y) {
// unfortunately, we have to call this every single time
state.legendFormatValueDecimalsFromMinMax(
this.axes_[0].extremeRange[0],
Function googleInitialize
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
NETDATA.googleInitialize = function (callback) {
if (typeof netdataNoGoogleCharts === 'undefined' || !netdataNoGoogleCharts) {
$.ajax({
url: NETDATA.google_js,
cache: true,
Function hello
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
hello: function (host, callback) {
host = NETDATA.fixHost(host);
// send HELLO to a netdata server:
// 1. verifies the server is reachable
Function googleInitialize
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
NETDATA.googleInitialize = function (callback) {
if (typeof netdataNoGoogleCharts === 'undefined' || !netdataNoGoogleCharts) {
$.ajax({
url: NETDATA.google_js,
cache: true,
Function hello
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
hello: function (host, callback) {
host = NETDATA.fixHost(host);
// send HELLO to a netdata server:
// 1. verifies the server is reachable
Function dygraphInitialize
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
NETDATA.dygraphInitialize = function (callback) {
if (typeof netdataNoDygraphs === 'undefined' || !netdataNoDygraphs) {
$.ajax({
url: NETDATA.dygraph_js,
cache: true,
Function axisLabelFormatter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
axisLabelFormatter: function (y) {
// unfortunately, we have to call this every single time
state.legendFormatValueDecimalsFromMinMax(
this.axes_[0].extremeRange[0],
Function registryDelete
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
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"))
Method Logind.collectSessions
has 51 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (l *Logind) collectSessions(mx map[string]int64) error {
sessions, err := l.conn.ListSessions()
if err != nil {
return err
}
Function pgStatusCategory
has 51 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func pgStatusCategory(status string) string {
// 'status' is formated as 'status1+status2+...+statusN'
states := strings.Split(status, "+")
Function getLVType
has 51 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func getLVType(lvAttr string) string {
if len(lvAttr) == 0 {
return ""
}
Function gaugeInitialize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
NETDATA.gaugeInitialize = function (callback) {
if (typeof netdataNoGauge === 'undefined' || !netdataNoGauge) {
$.ajax({
url: NETDATA.gauge_js,
cache: true,
Function Exec
has 51 lines of code (exceeds 50 allowed). Consider refactoring. Open
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 != "" {
Function getIntlNumberFormat
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getIntlNumberFormat: function (min, max) {
let key = max;
if (min === max) {
if (typeof this.formattersFixed[key] === 'undefined') {
this.formattersFixed[key] = new Intl.NumberFormat(undefined, {
Function delete
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
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,
Function switch
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
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,
Function search
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
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,
Function gaugeInitialize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
NETDATA.gaugeInitialize = function (callback) {
if (typeof netdataNoGauge === 'undefined' || !netdataNoGauge) {
$.ajax({
url: NETDATA.gauge_js,
cache: true,