mirror of
https://github.com/l5yth/potato-mesh.git
synced 2026-10-31 03:51:58 +01:00
web,data: cap ingested strings by column and check node ids (#997)
This commit is contained in:
31 files changed
+2649
-131
No files matched your search
@@ -282,6 +282,7 @@ module PotatoMesh
|
||||
# @param heard [Integer] unix seconds of receipt.
|
||||
# @return [void]
|
||||
def upsert_destination(db, node_id, destination, identity_hash:, name:, interface:, heard:)
|
||||
destination, identity_hash, name, interface = bound_destination_fields(destination, identity_hash, name, interface) # SPEC SL3
|
||||
return unless destination.is_a?(Hash)
|
||||
|
||||
id = string_or_nil(destination["id"])&.downcase
|
||||
@@ -431,6 +432,7 @@ module PotatoMesh
|
||||
# @param protocol [String] protocol identifier (default +meshtastic+).
|
||||
# @return [void]
|
||||
def upsert_node(db, node_id, n, protocol: "meshtastic")
|
||||
n = bound_node_payload(n) # SPEC SL3/SL10: bounded, Prometheus labels and gauges included
|
||||
user = n["user"] || {}
|
||||
met = pick_alias(n, "deviceMetrics", "device_metrics") || {}
|
||||
pos = n["position"] || {}
|
||||
|
||||
Reference in new issue
Block a user