diff --git a/monitoring/grafana/harbor-gateway.json b/monitoring/grafana/harbor-gateway.json index ffd5182..7730d48 100644 --- a/monitoring/grafana/harbor-gateway.json +++ b/monitoring/grafana/harbor-gateway.json @@ -357,6 +357,11 @@ "lineInterpolation": "smooth", "lineWidth": 2, "pointSize": 4, + "scaleDistribution": { + "linearThreshold": 1048576, + "log": 2, + "type": "symlog" + }, "showPoints": "never", "spanNulls": false, "stacking": { @@ -886,6 +891,6 @@ "timezone": "browser", "title": "Harbor Gateway: трафик", "uid": "harbor-gateway-traffic", - "version": 5, + "version": 6, "weekStart": "monday" } diff --git a/test/web/prometheus-instructions.test.js b/test/web/prometheus-instructions.test.js index b34ece2..34c8760 100644 --- a/test/web/prometheus-instructions.test.js +++ b/test/web/prometheus-instructions.test.js @@ -85,6 +85,11 @@ test('Grafana dashboard uses one all-or-one device scope and shows active device assert.ok(globalSpeed.targets.every(({ expr }) => expr.includes('device_id=~"$device_id"') && expr.endsWith('> 0'))); assert.match(deviceSpeed.targets[0].expr, /sum by \(device_id\)[\s\S]*device_id=~"\$device_id"[\s\S]*> 0[\s\S]*group_left \(name, ip\)/); assert.match(deviceSpeed.targets[0].legendFormat, /\{\{name\}\} · \{\{ip\}\}/); + assert.deepEqual(deviceSpeed.fieldConfig.defaults.custom.scaleDistribution, { + linearThreshold: 1048576, + log: 2, + type: 'symlog', + }); assert.match(sourceSpeed.targets[0].expr, /device_id=~"\$device_id"[\s\S]*> 0$/); assert.match(services.targets[0].expr, /device_id=~"\$device_id"[\s\S]*> 0\)$/); assert.deepEqual(domains.transformations[0].options.indexByName, { service: 0, domain: 1, Value: 2 });