Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 43 additions & 31 deletions store/fakeimsdb/seed.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
insert into EVENT (ID, NAME)
values (1, '2025'),
(2, '2031'),
(3, '2032'),
(4, 'Test');
insert into EVENT (ID, NAME, IS_GROUP, PARENT_GROUP)
values (6, 'TestBRC', true, null);

insert into EVENT (ID, NAME, IS_GROUP, PARENT_GROUP)
values (1, '2025', false, 6),
(2, '2026', false, 6),
(3, '2031', false, 6),
(4, '2032', false, 6),
(5, 'Test', false, null);

insert into CONCENTRIC_STREET (EVENT, ID, NAME)
values (1, '0', 'Esplanade'),
Expand All @@ -20,17 +24,19 @@ values (1, '0', 'Esplanade'),
(4, '5', 'Ersatz');

insert into EVENT_ACCESS (ID, EVENT, EXPRESSION, MODE, VALIDITY)
values (1, 1, '*', 'write', 'always'),
values (1, 6, '*', 'write', 'always'),
(2, 2, '*', 'read', 'always'),
(3, 3, '*', 'report', 'always'),
(4, 4, '*', 'write', 'always');

insert into INCIDENT (EVENT, NUMBER, CREATED, PRIORITY, STATE, STARTED, SUMMARY, LOCATION_NAME, LOCATION_CONCENTRIC, LOCATION_RADIAL_HOUR, LOCATION_RADIAL_MINUTE, LOCATION_DESCRIPTION)
values (4, 1, 1748459852.644699, 3, 'dispatched', 1748459852.644699, 'Something bad!', 'Dog Camp', '2', 2, 10, null),
(4, 2, 1748460242.68441, 3, 'new', 1748460242.68441, 'Report from the field', null, null, null, null, null);
values (1, 1, 1748459852.644699, 3, 'dispatched', 1748459852.644699, 'Something bad 2025!', 'Dog Camp', null, null, null, null),
(1, 2, 1748460242.68441, 3, 'new', 1748460242.68441, 'Report from the field 2025', null, null, null, null, null),
(2, 1, 1748459852.644699, 3, 'dispatched', 1748459852.644699, 'Something bad 2026!', 'Dog Camp', null, null, null, null),
(2, 2, 1748460242.68441, 3, 'new', 1748460242.68441, 'Report from the field 2026', null, null, null, null, null);

insert into FIELD_REPORT (EVENT, NUMBER, CREATED, SUMMARY, INCIDENT_NUMBER)
values (4, 1, 1748460231.287398, 'Report from the field', 2);
values (1, 1, 1748460231.287398, 'Report from the field', 2);

insert into REPORT_ENTRY (ID, AUTHOR, TEXT, CREATED, GENERATED, STRICKEN, ATTACHED_FILE)
values (1, 'Abraham', 'Changed priority: 3
Expand All @@ -55,9 +61,9 @@ Added Ranger: Abraham', 1748460242.688133, 1, 0, null),
(17, 'Abraham', 'Removed Ranger: Abraham', 1748460256.071517, 1, 0, null);

insert into FIELD_REPORT__REPORT_ENTRY (EVENT, FIELD_REPORT_NUMBER, REPORT_ENTRY)
values (4, 1, 12),
(4, 1, 13),
(4, 1, 15);
values (1, 1, 12),
(1, 1, 13),
(1, 1, 15);

insert into INCIDENT_TYPE (ID, NAME, HIDDEN)
values (3, 'Sound Complaint', 0),
Expand All @@ -68,26 +74,32 @@ values (3, 'Sound Complaint', 0),
(8, 'Transport', 0);

insert into INCIDENT__INCIDENT_TYPE (EVENT, INCIDENT_NUMBER, INCIDENT_TYPE)
values (4, 1, 1),
(4, 1, 6);
values (1, 1, 1),
(1, 1, 6);

insert into INCIDENT__RANGER (ID, EVENT, INCIDENT_NUMBER, RANGER_HANDLE)
values (1, 4, 1, 'Hardware'),
(2, 4, 1, 'Defect'),
(4, 4, 2, 'Loosy');
values (1, 1, 1, 'Hardware'),
(2, 1, 1, 'Defect'),
(4, 1, 2, 'Loosy');

insert into INCIDENT__REPORT_ENTRY (EVENT, INCIDENT_NUMBER, REPORT_ENTRY)
values (4, 1, 1),
(4, 1, 2),
(4, 1, 3),
(4, 1, 4),
(4, 1, 5),
(4, 1, 6),
(4, 1, 7),
(4, 1, 8),
(4, 1, 9),
(4, 1, 10),
(4, 1, 11),
(4, 2, 14),
(4, 2, 16),
(4, 2, 17);
values (1, 1, 1),
(1, 1, 2),
(1, 1, 3),
(1, 1, 4),
(1, 1, 5),
(1, 1, 6),
(1, 1, 7),
(1, 1, 8),
(1, 1, 9),
(1, 1, 10),
(1, 1, 11),
(1, 2, 14),
(1, 2, 16),
(1, 2, 17);

insert into DESTINATION (EVENT, TYPE, NUMBER, NAME, LOCATION_STRING, EXTERNAL_DATA)
values (1, 'camp', 0, 'Ranger Outpost Berlin', '3:00 & C', '{"contact_email":"[email protected]","description":"Ranger Outpost Berlin - The Black Rock Ranger Station in the 3:00 sector where participants in need of assistance can\\nseek out the help of a friendly Black Rock Ranger. Located at 3:00 and C.","hometown":"Black Rock City","images":[],"landmark":"Ranger Outpost Berlin","location":{"dimensions":"100+ x 300","exact_location":"Corner - facing man \\u0026 6:00","frontage":"3:00","intersection":"C","intersection_type":"\\u0026"},"location_string":"3:00 \\u0026 C","name":"Ranger Outpost Berlin","uid":"a1XVI00000A0O7p2AF","url":"https://rangers.burningman.org","year":2025}'),
(1, 'camp', 1, 'Kidsville', '5:00 & E', '{"contact_email":null,"description":"Burning Man\'s best place for kids! Come enjoy our trampolines, playgrounds, kid-friendly treats, and meet other families that burn with people under 18.","hometown":null,"images":[],"landmark":"Big Rainbow \\"Kidsville\\" Perimeter","location":{"dimensions":"450 x 575-","exact_location":"Corner - facing man \\u0026 2:00","frontage":"5:00","intersection":"E","intersection_type":"\\u0026"},"location_string":"5:00 \\u0026 E","name":"Kidsville","uid":"a1XVI000009Cb532AC","url":"http://kidsville.org","year":2025}'),
(1, 'art', 0, 'Temple of the Deep', '12:00 2500\', Open Playa', '{"artist":"Miguel Arraiz","category":"Open Playa","contact_email":null,"description":"The Temple of the Deep is a sanctuary for grief, love, and introspection, formed beneath a massive black stone that appears to hover above participants. This dark, fractured element symbolizes the weight of loss and the strength found in healing, inspired by kintsugi, where brokenness is embraced and honored. Seven narrow entrances guide visitors through the journey of mourning, leading to a central gathering space mirroring BRC\'s layout. Alcoves and chapels offer solitude and remembrance, while the seamless integration with the desert transforms sorrow into connection, grounding participants in shared reflection.","donation_link":null,"guided_tours":false,"hometown":"Valencia, Spain","images":[{"gallery_ref":null,"thumbnail_url":null}],"location":{"category":"Open Playa","distance":2500,"gps_latitude":40.791799176283455,"gps_longitude":-119.19660218660613,"hour":12,"minute":0},"location_string":"12:00 2500\', Open Playa","name":"Temple of the Deep","program":"Honorarium","self_guided_tour_map":true,"uid":"a2IVI000000yWeZ2AU","url":"https://www.2025temple.com/","year":2025}'),
(1, 'other', 0, 'Ranger Outpost Geneva', '7:20 & H', '{"contact_email":null,"description":"It\'s Ranger Outpost Geneva!","hometown":null,"images":[],"landmark":"A bunch of Rangers","location_string":"7:20 \\u0026 H","name":"Ranger Outpost Geneva","year":2025}');
12 changes: 6 additions & 6 deletions web/static/destinations.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,20 @@ function destinationToHTML(destination) {
}
}
switch (destination.type) {
case "other":
case "camp": {
const camp = destination.external_data;
const campTemplate = document.getElementById("camp_template");
// Clone the new row and insert it into the table
const campEl = campTemplate.content.cloneNode(true);
campEl.getElementById("camp_name").textContent = camp.name;
campEl.getElementById("location_label").textContent = `frontage ${camp.location?.intersection_type} intersection`;
campEl.getElementById("location_label").textContent = (camp.location?.intersection_type)
? (` - frontage ${camp.location?.intersection_type} intersection`)
: "";
campEl.getElementById("location_string").textContent =
`${camp.location_string ?? "Unknown"}\n` +
`${camp.location?.exact_location ?? ""}\n` +
`${camp.location?.dimensions ?? "Unknown"}`;
`${camp.location?.dimensions ?? ""}`;
campEl.getElementById("description").textContent = camp.description ?? "None provided";
campEl.getElementById("landmark").textContent = camp.landmark ?? "None provided";
let imageURL = camp.images?.find((value) => {
Expand Down Expand Up @@ -256,10 +259,7 @@ function destinationToHTML(destination) {
return artEl;
}
default:
// TODO: implement something to present ad-hoc locations better
const el = document.createElement("p");
el.textContent = JSON.stringify(destination.external_data, null, 2);
return el;
throw new Error("Found no destination type");
}
}
function renderWithMaxLength(maxLength) {
Expand Down
2 changes: 1 addition & 1 deletion web/template/destinations.templ
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ templ Destinations(deployment, versionName, versionRef, eventName string) {
<dt>Name</dt>
<dd id="camp_name"></dd>

<dt>Location - <span id="location_label"></span></dt>
<dt>Location<span id="location_label"></span></dt>
<dd id="location_string"></dd>

<dt>Description</dt>
Expand Down
2 changes: 1 addition & 1 deletion web/template/destinations_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions web/typescript/destinations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ function destinationToHTML(destination: ims.Destination): Node {
}

switch (destination.type) {
case "other":
case "camp": {
const camp = destination.external_data as ims.BMCamp;

Expand All @@ -221,11 +222,13 @@ function destinationToHTML(destination: ims.Destination): Node {
const campEl = campTemplate.content.cloneNode(true) as DocumentFragment;

campEl.getElementById("camp_name")!.textContent = camp.name;
campEl.getElementById("location_label")!.textContent = `frontage ${camp.location?.intersection_type} intersection`;
campEl.getElementById("location_label")!.textContent = (camp.location?.intersection_type)
? (` - frontage ${camp.location?.intersection_type} intersection`)
: "";
campEl.getElementById("location_string")!.textContent =
`${camp.location_string ?? "Unknown"}\n` +
`${camp.location?.exact_location ?? ""}\n` +
`${camp.location?.dimensions ?? "Unknown"}`;
`${camp.location?.dimensions ?? ""}`;
campEl.getElementById("description")!.textContent = camp.description ?? "None provided";
campEl.getElementById("landmark")!.textContent = camp.landmark ?? "None provided";
let imageURL = camp.images?.find((value: object): boolean => {
Expand Down Expand Up @@ -289,10 +292,7 @@ function destinationToHTML(destination: ims.Destination): Node {
return artEl;
}
default:
// TODO: implement something to present ad-hoc locations better
const el = document.createElement("p");
el.textContent = JSON.stringify(destination.external_data, null, 2);
return el;
throw new Error("Found no destination type");
}
}

Expand Down
Loading