BaseMetricScreen
fun <T> BaseMetricScreen(onNavigateUp: () -> Unit, telemetryType: TelemetryType?, titleRes: StringResource, nodeName: String, data: List<T>, timeProvider: (T) -> Double, infoData: List<InfoDialogData> = emptyList(), onRequestTelemetry: () -> Unit? = null, onExportCsv: () -> Unit? = null, extraActions: @Composable () -> Unit = {}, chartPart: @Composable (Modifier, Double?, VicoScrollState, (Double) -> Unit) -> Unit, listPart: @Composable (Modifier, Double?, LazyListState, (Double) -> Unit) -> Unit, controlPart: @Composable () -> Unit = {})(source)
A high-level template for metric screens that handles the Scaffold, AppBar, adaptive layout, and chart-to-list synchronisation.
Parameters
extraActions
Additional composable actions rendered in the app bar before the standard buttons (e.g. a cooldown traceroute button).
onExportCsv
When non-null, a Save IconButton is rendered in the app bar that invokes this callback. This centralises the CSV export affordance so individual screens only need to provide the export logic.