Update nidus to show new csv upload and maps

This commit is contained in:
Eli Ribble 2026-03-05 18:57:33 +00:00
parent ced83c3547
commit ee0a35bce2
No known key found for this signature in database
3 changed files with 122 additions and 27 deletions

View file

@ -14,18 +14,18 @@ uri = "postgres://tegola:@localhost:/nidus-sync?host=/var/run/postgresql&sslmode
srid = 4326 # The default srid for this provider. If not provided it will be WebMercator (3857)
[[providers.layers]]
name = "service-area-bounds"
name = "address"
geometry_fieldname = "geometry"
geometry_type="polygon"
geometry_type="point"
id_fieldname = "id"
sql = "SELECT ST_AsMVTGeom(service_area_geometry, !BBOX!) AS geometry, id FROM organization WHERE service_area_geometry && !BBOX! !PARAM_ID!"
sql = "SELECT ST_AsMVTGeom(geom, !BBOX!) AS geometry, id, unit, number_, street, postal_code FROM address WHERE geom && !BBOX!"
[[providers.layers]]
name = "fileupload-pool"
geometry_fieldname = "geometry"
geometry_type="point"
id_fieldname = "id"
sql = "SELECT ST_AsMVTGeom(geom, !BBOX!) AS geometry, condition, id, is_new, is_in_district FROM fileupload.pool WHERE geom && !BBOX! !PARAM_ORGANIZATION_ID! !PARAM_CSV_FILE!"
sql = "SELECT ST_AsMVTGeom(geom, !BBOX!) AS geometry, condition, id, is_new, is_in_district FROM fileupload.pool WHERE geom && !BBOX! !PARAM_CSV_FILE!"
[[providers.layers]]
name = "mosquito_source"
@ -34,6 +34,20 @@ srid = 4326 # The default srid for this provider. If not provided it
id_fieldname = "id"
sql = "SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, cell, count_, resolution FROM h3_aggregation WHERE type_ = 'MosquitoSource' AND geometry && !BBOX! !PARAM_ORGANIZATION_ID!"
[[providers.layers]]
name = "parcel"
geometry_fieldname = "geometry"
geometry_type="multipolygon"
id_fieldname = "id"
sql = "SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, apn, description, id FROM parcel WHERE geometry && !BBOX!"
[[providers.layers]]
name = "service-area-bounds"
geometry_fieldname = "geometry"
geometry_type="polygon"
id_fieldname = "id"
sql = "SELECT ST_AsMVTGeom(service_area_geometry, !BBOX!) AS geometry, id FROM organization WHERE service_area_geometry && !BBOX! !PARAM_ID!"
[[providers.layers]]
name = "service_request"
geometry_fieldname = "geometry"
@ -99,20 +113,26 @@ name = "nidus"
center = [-119.175, 36.24, 11.0] # set the center of the map so the user is auto navigated to visalia
[[maps.layers]]
provider_layer = "nidus.mosquito_source"
[[maps.layers]]
provider_layer = "nidus.service_request"
[[maps.layers]]
provider_layer = "nidus.trap"
provider_layer = "nidus.address"
[[maps.layers]]
provider_layer = "nidus.fileupload-pool"
[[maps.layers]]
provider_layer = "nidus.mosquito_source"
[[maps.layers]]
provider_layer = "nidus.parcel"
[[maps.layers]]
provider_layer = "nidus.service_request"
[[maps.layers]]
provider_layer = "nidus.service-area-bounds"
[[maps.layers]]
provider_layer = "nidus.trap"
[[maps.params]]
name = "csv_file"
token = "!PARAM_CSV_FILE!"
@ -134,3 +154,9 @@ center = [-119.175, 36.24, 11.0] # set the center of the map so the user is auto
sql = "AND organization_id = ?"
default_sql = " "
[[maps.params]]
name = "file_organization_id"
token = "!PARAM_FILE_ORGANIZATION_ID!"
type = "int"
sql = "AND file.organization_id = ?"
default_sql = " "

99
flake.lock generated
View file

@ -216,6 +216,24 @@
"type": "github"
}
},
"flake-utils_5": {
"inputs": {
"systems": "systems_5"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -294,20 +312,21 @@
"nidus-sync": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_2",
"proj": "proj"
},
"locked": {
"lastModified": 1771368616,
"narHash": "sha256-qRQEoEWFG1W3NBie7NhcA0oMHYClzLiR14KSDD4OqWU=",
"lastModified": 1772626360,
"narHash": "sha256-halLUUXU4KPyQrb+oPZS4IdqT/gtxky+/SD7QuimqGs=",
"owner": "Gleipnir-Technology",
"repo": "nidus-sync",
"rev": "18c7a5f84b99b76e2d21a2c2c0b8846c5ba25db7",
"rev": "33029908370f4c0fb123e9c0219f3ca964761c0b",
"type": "github"
},
"original": {
"owner": "Gleipnir-Technology",
"repo": "nidus-sync",
"rev": "18c7a5f84b99b76e2d21a2c2c0b8846c5ba25db7",
"rev": "33029908370f4c0fb123e9c0219f3ca964761c0b",
"type": "github"
}
},
@ -359,11 +378,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1767480499,
"narHash": "sha256-8IQQUorUGiSmFaPnLSo2+T+rjHtiNWc+OAzeHck7N48=",
"lastModified": 1772465433,
"narHash": "sha256-ywy9troNEfpgh0Ee+zaV1UTgU8kYBVKtvPSxh6clYGU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "30a3c519afcf3f99e2c6df3b359aec5692054d92",
"rev": "c581273b8d5bdf1c6ce7e0a54da9841e6a763913",
"type": "github"
},
"original": {
@ -374,6 +393,22 @@
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1772542754,
"narHash": "sha256-WGV2hy+VIeQsYXpsLjdr4GvHv5eECMISX1zKLTedhdg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8c809a146a140c5c8806f13399592dbcb1bb5dc4",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1768028080,
"narHash": "sha256-50aDK+8eLvsLK39TzQhKNq50/HcXyP4hyxOYoPoVxjo=",
@ -389,7 +424,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_5": {
"locked": {
"lastModified": 1768032153,
"narHash": "sha256-6kD1MdY9fsE6FgSwdnx29hdH2UcBKs3/+JJleMShuJg=",
@ -405,7 +440,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_6": {
"locked": {
"lastModified": 1758763312,
"narHash": "sha256-puBMviZhYlqOdUUgEmMVJpXqC/ToEqSvkyZ30qQ09xM=",
@ -426,7 +461,7 @@
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"systems": "systems_5"
"systems": "systems_6"
},
"locked": {
"lastModified": 1767448089,
@ -445,7 +480,7 @@
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils_4",
"flake-utils": "flake-utils_5",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
@ -466,6 +501,25 @@
"type": "github"
}
},
"proj": {
"inputs": {
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1772585816,
"narHash": "sha256-OzcpuCRUCxWKxDqp6H8tE/a0UpJh8IJKZsISbYrrqlg=",
"owner": "Gleipnir-Technology",
"repo": "proj",
"rev": "5147c51d86481dbe88e7996c71401ea9be2e536f",
"type": "github"
},
"original": {
"owner": "Gleipnir-Technology",
"repo": "proj",
"type": "github"
}
},
"pyproject-build-systems": {
"inputs": {
"nixpkgs": [
@ -545,7 +599,7 @@
"home-manager": "home-manager",
"nidus-sync": "nidus-sync",
"nixos-facter-modules": "nixos-facter-modules",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_4",
"nixvim": "nixvim",
"sops-nix": "sops-nix",
"timecard-bot": "timecard-bot"
@ -553,7 +607,7 @@
},
"sops-nix": {
"inputs": {
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1768104471,
@ -644,9 +698,24 @@
"type": "github"
}
},
"systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"timecard-bot": {
"inputs": {
"nixpkgs": "nixpkgs_5",
"nixpkgs": "nixpkgs_6",
"pyproject-nix": "pyproject-nix_2"
},
"locked": {

View file

@ -27,7 +27,7 @@
type = "github";
owner = "Gleipnir-Technology";
repo = "nidus-sync";
rev = "f20067b323c0e1001d9d51ecafbbb8e0cb05b65a";
rev = "72a4ef9fff81875590213931254ef01df13ce733";
};
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";