Hola,
perdonad, pero la voy a liar un poco y voy a girar los números que propuso carlos porque me queda “más bonito”
# SPDX-License-Identifier: AGPL-3.0-or-later
## locations
library(leaflet)
library(data.table)
# https://stackoverflow.com/questions/37376398/how-to-create-an-empty-datatable-with-columns-names-and-then-append-datatables-t
dt <- data.table(edition=numeric(),lat=numeric(), long=numeric())
dt <- rbind(dt, list("L1", 41.4274254,2.1836920))
dt <- rbind(dt, list("L2", 41.4275830,2.1835510))
dt <- rbind(dt, list("L3", 41.4275745,2.1833688))
dt <- rbind(dt, list("L4", 41.4274227,2.1831934))
dt <- rbind(dt, list("L5", 41.4275750,2.1830070))
dt <- rbind(dt, list("L6", 41.4274375,2.1827042))
# thaanks https://stackoverflow.com/questions/31745525/leaflet-with-r-add-text-labels
leaflet(data = dt) %>% addTiles() %>%
addLabelOnlyMarkers(~long, ~lat, label = ~as.character(edition),
labelOptions = labelOptions(noHide = T, direction = 'center', textOnly = T, textsize = "15px")) %>%
addProviderTiles(providers$CartoDB.Positron)
este es el esquema lógico de red basada en la idea de ilario
graph LR
subgraph location1
direction LR
m0["ctrl0 (gw)"]
m1[ctrl1] --cable--- t1[test1]
end
subgraph location2
direction LR
m2[ctrl2] --- t2[test2]
end
subgraph location3
direction LR
m3[ctrl3] --- t3[test3]
end
subgraph location4
direction LR
m4[ctrl4] --- t4[test4]
end
subgraph location5
direction LR
m5[ctrl5] --- t5[test5]
end
subgraph location6
direction LR
m6[ctrl6] --- t6[test6]
end
m0 -.wifi-.- m1
location1 -.wifi-.- location2
location1 -.- location3
location1 -.- location4
location1 -.- location5
location1 -.- location6
VPN -.wg-.- location1
así pues, cambio la tabla que ha preparado ilario para que asigne a cada dispositivo en aquella tabla un rol, donde un rol puede ser ctrl0, ctrl1, test1, ctrl2, test2, etc.