parent
35797793ec
commit
6a957b17b2
@ -584,7 +584,7 @@ function geo_view()
|
|||||||
else
|
else
|
||||||
geo_type, file_path = "geosite", geosite_path
|
geo_type, file_path = "geosite", geosite_path
|
||||||
end
|
end
|
||||||
cmd = string.format("geoview -type %s -action lookup -input '%s' -value '%s'", geo_type, file_path, value)
|
cmd = string.format("geoview -type %s -action lookup -input '%s' -value '%s' -lowmem=true", geo_type, file_path, value)
|
||||||
geo_string = luci.sys.exec(cmd):lower()
|
geo_string = luci.sys.exec(cmd):lower()
|
||||||
if geo_string ~= "" then
|
if geo_string ~= "" then
|
||||||
local lines = {}
|
local lines = {}
|
||||||
@ -603,7 +603,7 @@ function geo_view()
|
|||||||
if prefix and list and list ~= "" then
|
if prefix and list and list ~= "" then
|
||||||
geo_type = prefix:sub(1, -2)
|
geo_type = prefix:sub(1, -2)
|
||||||
file_path = (geo_type == "geoip") and geoip_path or geosite_path
|
file_path = (geo_type == "geoip") and geoip_path or geosite_path
|
||||||
cmd = string.format("geoview -type %s -action extract -input '%s' -list '%s'", geo_type, file_path, list)
|
cmd = string.format("geoview -type %s -action extract -input '%s' -list '%s' -lowmem=true", geo_type, file_path, list)
|
||||||
geo_string = luci.sys.exec(cmd)
|
geo_string = luci.sys.exec(cmd)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -78,5 +78,19 @@ local api = require "luci.passwall.api"
|
|||||||
btn.value = QueryText;
|
btn.value = QueryText;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.getElementById("geoview.lookup").addEventListener("keydown", function(event) {
|
||||||
|
if (event.key === "Enter") {
|
||||||
|
event.preventDefault();
|
||||||
|
lookup_btn.click();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
document.getElementById("geoview.extract").addEventListener("keydown", function(event) {
|
||||||
|
if (event.key === "Enter") {
|
||||||
|
event.preventDefault();
|
||||||
|
extract_btn.click();
|
||||||
|
}
|
||||||
|
});
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user