feat(network-map): add network speed thresholds for alerts and enhance settings UI for configuration
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 2m32s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 2m32s
This commit is contained in:
@@ -18,6 +18,12 @@ const DEFAULT_ALERT_SETTINGS = {
|
||||
highCpu: { enabled: true, thresholdPercent: 85, durationMinutes: 10 },
|
||||
highRam: { enabled: true, thresholdPercent: 85, durationMinutes: 10 },
|
||||
highHdd: { enabled: true, thresholdPercent: 90, durationMinutes: 10 },
|
||||
/** Глобальные пороги карты сети для UI-аналитики */
|
||||
networkMapNodeThresholds: {
|
||||
lowSpeedMbps: 40,
|
||||
belowNormSpeedMbps: 80,
|
||||
normalSpeedMbps: 120,
|
||||
},
|
||||
/** Индивидуальные пороги по туннелям (карта сети) */
|
||||
tunnelThresholds: [],
|
||||
};
|
||||
@@ -30,6 +36,12 @@ function getAlertSettings(uiSettings) {
|
||||
highCpu: { ...DEFAULT_ALERT_SETTINGS.highCpu, ...raw.highCpu },
|
||||
highRam: { ...DEFAULT_ALERT_SETTINGS.highRam, ...raw.highRam },
|
||||
highHdd: { ...DEFAULT_ALERT_SETTINGS.highHdd, ...raw.highHdd },
|
||||
networkMapNodeThresholds: {
|
||||
...DEFAULT_ALERT_SETTINGS.networkMapNodeThresholds,
|
||||
...(raw.networkMapNodeThresholds && typeof raw.networkMapNodeThresholds === 'object'
|
||||
? raw.networkMapNodeThresholds
|
||||
: {}),
|
||||
},
|
||||
tunnelThresholds: Array.isArray(raw.tunnelThresholds) ? raw.tunnelThresholds : [],
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user