From 59076e9eb071786d0a982407464a6c0c36ff6589 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Sat, 7 Feb 2026 18:26:47 +0000 Subject: [PATCH] Add page for showing pool uploads --- html/template/sync/component/sidebar.html | 6 +- html/template/sync/dashboard.html | 272 +++++++++---------- html/template/sync/layout-test.html | 102 ++++--- html/template/sync/layout/authenticated.html | 4 +- sync/pool.go | 25 ++ sync/routes.go | 1 + sync/url.go | 15 + 7 files changed, 232 insertions(+), 193 deletions(-) create mode 100644 sync/pool.go create mode 100644 sync/url.go diff --git a/html/template/sync/component/sidebar.html b/html/template/sync/component/sidebar.html index 1a85d28f..1af7d599 100644 --- a/html/template/sync/component/sidebar.html +++ b/html/template/sync/component/sidebar.html @@ -17,9 +17,9 @@
  • - - - Analytics + + + Pool
  • diff --git a/html/template/sync/dashboard.html b/html/template/sync/dashboard.html index 4fdcaaff..a3f4a9ae 100644 --- a/html/template/sync/dashboard.html +++ b/html/template/sync/dashboard.html @@ -19,174 +19,172 @@ {{ end }} {{ define "content" }} -
    - -
    -
    -

    {{ .User.Organization.Name }} Dashboard

    -

    - Overview of mosquito control activities in your district + +

    +
    +

    {{ .User.Organization.Name }} Dashboard

    +

    + Overview of mosquito control activities in your district +

    +
    +
    + {{ if .IsSyncOngoing }} +

    + Syncing now...

    -
    -
    - {{ if .IsSyncOngoing }} -

    - Syncing now... -

    - {{ else }} -

    - Last updated: - {{ .LastSync | timeSincePtr }} - -

    - {{ end }} + {{ else }} +

    + Last updated: + {{ .LastSync | timeSincePtr }} + +

    + {{ end }} +
    +
    + + +
    + +
    +
    +
    +
    + +
    +
    Last Data Refresh
    +

    {{ .LastSync | timeSincePtr }}

    + +
    - -
    - -
    -
    -
    -
    - -
    -
    Last Data Refresh
    -

    {{ .LastSync | timeSincePtr }}

    - + +
    +
    +
    +
    +
    -
    -
    - - -
    -
    -
    -
    - -
    -
    Service Requests
    - {{ if .IsSyncOngoing }} -

    - {{ .CountServiceRequests | bigNumber }}...? -

    - {{ else }} -

    - {{ .CountServiceRequests | bigNumber }} -

    - {{ end }} - -
    +
    - -
    -
    -
    -
    - -
    -
    Mosquito Sources
    - {{ if .IsSyncOngoing }} -

    - {{ .CountMosquitoSources | bigNumber }}..? -

    - {{ else }} -

    - {{ .CountMosquitoSources | bigNumber }} -

    - {{ end }} - +
    +
    +
    +
    + +
    +
    Mosquito Sources
    + {{ if .IsSyncOngoing }} +

    + {{ .CountMosquitoSources | bigNumber }}..? +

    + {{ else }} +

    + {{ .CountMosquitoSources | bigNumber }} +

    + {{ end }} + -
    +
    - -
    -
    -
    -
    - -
    -
    Traps
    - {{ if .IsSyncOngoing }} -

    {{ .CountTraps | bigNumber }}...?

    - {{ else }} -

    {{ .CountTraps | bigNumber }}

    - {{ end }} - +
    +
    +
    +
    + +
    +
    Traps
    + {{ if .IsSyncOngoing }} +

    {{ .CountTraps | bigNumber }}...?

    + {{ else }} +

    {{ .CountTraps | bigNumber }}

    + {{ end }} + -
    +
    - -

    Mosquito Activity Heatmap

    -
    -
    - -
    + +

    Mosquito Activity Heatmap

    +
    +
    +
    +
    - -

    Recent Activity

    -
    -
    -
    -
    -
    - - + +

    Recent Activity

    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + {{ range $i, $sr := .RecentRequests }} - - - - - + + + + + - - - {{ range $i, $sr := .RecentRequests }} - - - - - - - - {{ end }} - -
    DateTypeLocationStatusAction
    DateTypeLocationStatusAction{{ $sr.Date | timeSincePtr }}Service Request{{ $sr.Location }}Completed + View +
    {{ $sr.Date | timeSincePtr }}Service Request{{ $sr.Location }}Completed - View -
    -
    + {{ end }} + +
    diff --git a/html/template/sync/layout-test.html b/html/template/sync/layout-test.html index e0e9a427..ca0bf4e5 100644 --- a/html/template/sync/layout-test.html +++ b/html/template/sync/layout-test.html @@ -14,64 +14,62 @@ {{ end }} {{ define "content" }} -
    -
    -
    -
    - - - - - - - - +
    +
    +
    + + + + + + + + - -
    + +
    -
    -
    -
    -
    Card 1
    -

    Some example content for the first card.

    -
    -
    -
    -
    -
    -
    -
    Card 2
    -

    Some example content for the second card.

    -
    +
    +
    +
    +
    Card 1
    +

    Some example content for the first card.

    -
    -
    -
    -
    Primary
    -
    Primary-100
    -
    Primary-200
    -
    Primary-300
    -
    -
    -
    Secondary
    -
    -
    -
    Success
    -
    -
    -
    -
    -
    Danger
    -
    -
    -
    Warning
    -
    -
    -
    Info
    +
    +
    +
    +
    Card 2
    +

    Some example content for the second card.

    +
    +
    +
    +
    +
    Primary
    +
    Primary-100
    +
    Primary-200
    +
    Primary-300
    +
    +
    +
    Secondary
    +
    +
    +
    Success
    +
    +
    +
    +
    +
    Danger
    +
    +
    +
    Warning
    +
    +
    +
    Info
    +
    +
    {{ end }} diff --git a/html/template/sync/layout/authenticated.html b/html/template/sync/layout/authenticated.html index 41554875..7130d0f9 100644 --- a/html/template/sync/layout/authenticated.html +++ b/html/template/sync/layout/authenticated.html @@ -28,7 +28,9 @@ {{ end }}
    - {{ template "content" . }} +
    + {{ template "content" . }} +