Merge pull request #804 from meshtastic/devicemetrics-graph-lines

New Device Metrics Rule Mark Lines
This commit is contained in:
Garth Vander Houwen 2024-07-17 00:40:36 -07:00 committed by GitHub
commit d416b7b6ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 32 additions and 12 deletions

View file

@ -191,6 +191,9 @@
},
"8" : {
},
"10% Airtime" : {
},
"25" : {
@ -672,6 +675,9 @@
}
}
}
},
"Airtime" : {
},
"AirTm" : {
@ -1406,6 +1412,9 @@
},
"Backup Database" : {
},
"Bad" : {
},
"Bandwidth" : {
@ -8264,13 +8273,13 @@
"How long the screen remains on after the user button is pressed or messages are received." : {
},
"How often device metrics are sent out over the mesh. Default is 15 minutes." : {
"How often device metrics are sent out over the mesh. Default is 30 minutes." : {
},
"How often power metrics are sent out over the mesh. Default is 15 minutes." : {
"How often power metrics are sent out over the mesh. Default is 30 minutes." : {
},
"How often sensor metrics are sent out over the mesh. Default is 15 minutes." : {
"How often sensor metrics are sent out over the mesh. Default is 30 minutes." : {
},
"How often should we try to get a GPS position." : {
@ -10843,9 +10852,6 @@
},
"Licensed Operator" : {
},
"Limit" : {
},
"Limit all periodic broadcast intervals especially telemetry and position. If you need to increase hops, do it on nodes at the edges, not the ones in the middle. MQTT is not advised when you are duty cycle restricted because the gateway node is then doing all the work." : {
@ -15225,6 +15231,12 @@
}
}
}
},
"Network Status Orange" : {
},
"Network Status Red" : {
},
"network.config" : {
"localizations" : {

View file

@ -18,7 +18,7 @@ struct DeviceMetricsLog: View {
@State var exportString = ""
@State private var batteryChartColor: Color = .blue
@State private var airtimeChartColor: Color = .orange
@State private var airtimeChartColor: Color = .yellow
@State private var channelUtilizationChartColor: Color = .green
@ObservedObject var node: NodeInfoEntity
@ -57,9 +57,17 @@ struct DeviceMetricsLog: View {
.accessibilityValue("X: \(point.time!), Y: \(point.channelUtilization)")
.foregroundStyle(channelUtilizationChartColor)
RuleMark(y: .value("Limit", 10))
RuleMark(y: .value("10% Airtime", 10))
.lineStyle(StrokeStyle(lineWidth: 1, dash: [5, 10]))
.foregroundStyle(airtimeChartColor)
.foregroundStyle(.yellow)
RuleMark(y: .value("Network Status Orange", 25))
.lineStyle(StrokeStyle(lineWidth: 1, dash: [5, 10]))
.foregroundStyle(.orange)
RuleMark(y: .value("Network Status Red", 50))
.lineStyle(StrokeStyle(lineWidth: 1, dash: [5, 10]))
.foregroundStyle(.red)
Plot {
PointMark(
@ -79,9 +87,9 @@ struct DeviceMetricsLog: View {
.chartXAxis(.automatic)
.chartYScale(domain: 0...100)
.chartForegroundStyleScale([
"Battery Level": .blue,
"Channel Utilization": .green,
"Airtime": .orange
"Battery Level": batteryChartColor,
"Channel Utilization": channelUtilizationChartColor,
"Airtime": airtimeChartColor
])
.chartLegend(position: .automatic, alignment: .bottom)
}