Migrate LeafletJS to new URL (#298)

This commit is contained in:
Tim Wilkinson 2022-03-16 19:42:26 -07:00 committed by GitHub
parent 73278ac99c
commit 8947e6f23c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 6 deletions

View File

@ -8,8 +8,8 @@ config usb
option passthrough '1' option passthrough '1'
config map config map
option leafletjs 'http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js' option leafletjs 'http://unpkg.com/leaflet@0.7.7/dist/leaflet.js'
option leafletcss 'http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css' option leafletcss 'http://unpkg.com/leaflet@0.7.7/dist/leaflet.css'
option maptiles 'http://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.jpg' option maptiles 'http://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.jpg'
config meshstatus config meshstatus

View File

@ -21,6 +21,6 @@ config button
option max '20' option max '20'
config map config map
option leafletjs 'http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js' option leafletjs 'http://unpkg.com/leaflet@0.7.7/dist/leaflet.js'
option leafletcss 'http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css' option leafletcss 'http://unpkg.com/leaflet@0.7.7/dist/leaflet.css'
option maptiles 'http://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.jpg' option maptiles 'http://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.jpg'

View File

@ -0,0 +1,6 @@
#!/bin/sh
if [ "$(/sbin/uci -c /etc/config.mesh -q get aredn.@map[0].leafletjs)" = "http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js" ]; then
/sbin/uci -c /etc/config.mesh -q set aredn.@map[0].leafletjs="http://unpkg.com/leaflet@0.7.7/dist/leaflet.js"
/sbin/uci -c /etc/config.mesh -q set aredn.@map[0].leafletcss="http://unpkg.com/leaflet@0.7.7/dist/leaflet.css"
/sbin/uci -c /etc/config.mesh -q commit aredn
fi

View File

@ -89,13 +89,13 @@ local settings = {
key = "aredn.@map[0].leafletcss", key = "aredn.@map[0].leafletcss",
type = "string", type = "string",
desc = "Specifies the URL of the leaflet.css file", desc = "Specifies the URL of the leaflet.css file",
default = "http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" default = "http://unpkg.com/leaflet@0.7.7/dist/leaflet.css"
}, },
{ {
key = "aredn.@map[0].leafletjs", key = "aredn.@map[0].leafletjs",
type = "string", type = "string",
desc = "Specifies the URL of the leaflet.js file", desc = "Specifies the URL of the leaflet.js file",
default = "http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js" default = "http://unpkg.com/leaflet@0.7.7/dist/leaflet.js"
}, },
{ {
key = "aredn.@downloads[0].firmwarepath", key = "aredn.@downloads[0].firmwarepath",