WebUI Default Number of displayed Records

Viewed 33

Dears,

Wouldn't it be nice to have these defaults in the chirpstack.toml file instead of being hardcoded (Chirpsatck v4.15.0)?

**src/config.rs** (line 241):

impl Default for Monitoring {
    fn default() -> Self {
        Monitoring {
            bind: "".to_string(),
            api_request_log_max_history: 10,
            backend_interfaces_log_max_history: 10,
            meta_log_max_history: 10,
            gateway_frame_log_max_history: 10,
            device_frame_log_max_history: 10,
            device_event_log_max_history: 10,
            per_gateway_frame_log_max_history: 10,
            per_device_frame_log_max_history: 10,
            per_device_event_log_max_history: 10,
            per_gateway_frame_log_ttl: Duration::from_secs(60 * 60 * 24 * 31), // 31 days
            per_device_frame_log_ttl: Duration::from_secs(60 * 60 * 24 * 31),
            per_device_event_log_ttl: Duration::from_secs(60 * 60 * 24 * 31),
        }
    }
}
2 Answers

Please note that impl Default implementations are implementing the default values, unless specificied (in the chirpstack.toml) configuration. So yes, you can configure these values in the chirpstack.toml file. See the [monitoring] section here: https://www.chirpstack.io/docs/chirpstack/configuration.html.

Please note that this does not change the number of items displayed in the UI. This value is currently set to 10 in code.

Thank you very much @Brocaar