feat: type de jauge configurable (compact / standard)
- ServerConfig: champ gauge_type (défaut "compact") - CSS: classes .gs-* pour la BatteryGauge standard (label + bar 9px + gloss interne) - Grid: helper renderGaugeRow() — sélectionne compact ou standard selon la config - Grid: rerenderAll() pour appliquer le changement sans recharger la page - Popup config serveur: select "Type de jauge" dans la section Affichage des tuiles Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+13
-11
@@ -77,17 +77,18 @@ type MetricProto struct {
|
||||
}
|
||||
|
||||
type ServerConfig struct {
|
||||
TileMinWidth int `json:"tile_min_width"`
|
||||
FontSize int `json:"font_size"`
|
||||
WarnCPU int `json:"warn_cpu"`
|
||||
ErrCPU int `json:"err_cpu"`
|
||||
WarnDisk int `json:"warn_disk"`
|
||||
RetentionDays int `json:"retention_days"`
|
||||
ChartDurationMin int `json:"chart_duration_min"`
|
||||
HideOffline bool `json:"hide_offline"`
|
||||
Notifications bool `json:"notifications"`
|
||||
PopupDetailW int `json:"popup_detail_w"`
|
||||
PopupDetailH int `json:"popup_detail_h"`
|
||||
TileMinWidth int `json:"tile_min_width"`
|
||||
FontSize int `json:"font_size"`
|
||||
WarnCPU int `json:"warn_cpu"`
|
||||
ErrCPU int `json:"err_cpu"`
|
||||
WarnDisk int `json:"warn_disk"`
|
||||
RetentionDays int `json:"retention_days"`
|
||||
ChartDurationMin int `json:"chart_duration_min"`
|
||||
HideOffline bool `json:"hide_offline"`
|
||||
Notifications bool `json:"notifications"`
|
||||
PopupDetailW int `json:"popup_detail_w"`
|
||||
PopupDetailH int `json:"popup_detail_h"`
|
||||
GaugeType string `json:"gauge_type"`
|
||||
}
|
||||
|
||||
func DefaultAgentConfig() *AgentConfig {
|
||||
@@ -111,6 +112,7 @@ func DefaultServerConfig() ServerConfig {
|
||||
RetentionDays: 30, ChartDurationMin: 30,
|
||||
HideOffline: false, Notifications: true,
|
||||
PopupDetailW: 560, PopupDetailH: 600,
|
||||
GaugeType: "compact",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user