fix: country in js file, docker build script
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Paul 2023-07-15 16:56:11 +02:00
parent 9e2662d1dd
commit 9b2e68ae0a
2 changed files with 3 additions and 6 deletions

View File

@ -4,3 +4,4 @@
docker build -t dip:latest . docker build -t dip:latest .
docker tag dip:latest registry.paulbsd.com/images/dip:latest docker tag dip:latest registry.paulbsd.com/images/dip:latest
docker push registry.paulbsd.com/images/dip:latest docker push registry.paulbsd.com/images/dip:latest
kubectl rollout restart deployment dip

View File

@ -2,20 +2,16 @@ function main() {
let dip_ip = document.getElementById("dip_ip"); let dip_ip = document.getElementById("dip_ip");
let dip_hostname = document.getElementById("dip_hostname"); let dip_hostname = document.getElementById("dip_hostname");
let dip_city = document.getElementById("dip_city"); let dip_city = document.getElementById("dip_city");
let dip_country = document.getElementById("dip_country");
let dip_as_number = document.getElementById("dip_as_number"); let dip_as_number = document.getElementById("dip_as_number");
let dip_as_org = document.getElementById("dip_as_org"); let dip_as_org = document.getElementById("dip_as_org");
var ip = "";
if (window.location.pathname.length > 4) {
ip = window.location.pathname.split("/")[1];
console.log(ip);
}
fetch(`/json/${ip}`).then((response) => { fetch(`/json/${ip}`).then((response) => {
response.json().then((res) => { response.json().then((res) => {
dip_ip.innerHTML = res["ip"]; dip_ip.innerHTML = res["ip"];
dip_hostname.innerHTML = res["hostname"]; dip_hostname.innerHTML = res["hostname"];
dip_city.innerHTML = res["city"]; dip_city.innerHTML = res["city"];
dip_country.innerHTML = res["country"];
dip_as_number.innerHTML = res["as"]["number"]; dip_as_number.innerHTML = res["as"]["number"];
dip_as_org.innerHTML = res["as"]["org"]; dip_as_org.innerHTML = res["as"]["org"];
}); });