Configure symlog scaling for gateway traffic dashboard
Build and Deploy Gateway / build-and-push (push) Successful in 14s
Build and Deploy Gateway / deploy (push) Successful in 7s

This commit is contained in:
2026-08-08 08:09:47 +03:00
parent 6b17f1982b
commit 837f058025
2 changed files with 11 additions and 1 deletions
+6 -1
View File
@@ -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"
}
+5
View File
@@ -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 });