From fb575b0365ccd426fca3a7c129ae5be71dc2cb13 Mon Sep 17 00:00:00 2001 From: Oliver Roick Date: Wed, 26 Mar 2025 15:02:27 +1100 Subject: [PATCH 1/8] Update item page header --- runtimes/eoapi/stac/eoapi/stac/templates/item.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/runtimes/eoapi/stac/eoapi/stac/templates/item.html b/runtimes/eoapi/stac/eoapi/stac/templates/item.html index f61b009..c642d49 100644 --- a/runtimes/eoapi/stac/eoapi/stac/templates/item.html +++ b/runtimes/eoapi/stac/eoapi/stac/templates/item.html @@ -18,10 +18,13 @@ -

Collection Item: {{ response.id }}

+

+ Collection Item: + {{ response.id }} +

-
+

Properties

  • ID: {{ response.id }}
  • @@ -30,7 +33,7 @@

    Properties

    {% endfor %}
-
+
Loading...
From 3665b3b47141a90c48cd5a73fc6d238804c90995 Mon Sep 17 00:00:00 2001 From: Oliver Roick Date: Wed, 26 Mar 2025 15:04:28 +1100 Subject: [PATCH 2/8] Add item links --- runtimes/eoapi/stac/eoapi/stac/templates/item.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/runtimes/eoapi/stac/eoapi/stac/templates/item.html b/runtimes/eoapi/stac/eoapi/stac/templates/item.html index c642d49..ce2904c 100644 --- a/runtimes/eoapi/stac/eoapi/stac/templates/item.html +++ b/runtimes/eoapi/stac/eoapi/stac/templates/item.html @@ -32,6 +32,13 @@

Properties

  • {{ key }}: {{ value }}
  • {% endfor %} + +

    Links

    +
    Loading...
    From 91cad731f0bc845e00778480f489c6bc763d2f11 Mon Sep 17 00:00:00 2001 From: Oliver Roick Date: Wed, 26 Mar 2025 16:55:44 +1100 Subject: [PATCH 3/8] Add asset display --- .../eoapi/stac/eoapi/stac/templates/item.html | 45 ++++++++++++++++++- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/runtimes/eoapi/stac/eoapi/stac/templates/item.html b/runtimes/eoapi/stac/eoapi/stac/templates/item.html index ce2904c..58d1ff1 100644 --- a/runtimes/eoapi/stac/eoapi/stac/templates/item.html +++ b/runtimes/eoapi/stac/eoapi/stac/templates/item.html @@ -28,12 +28,53 @@

    Properties

    • ID: {{ response.id }}
    • - {% for key, value in response.properties.items() %} + {% for key, value in response.properties | dictsort %}
    • {{ key }}: {{ value }}
    • {% endfor %}
    -

    Links

    +

    Assets

    +
      + {% for key, asset in response.assets.items() %} +
    • +

      {{ key }}

      + {% if asset.title %}

      {{ asset.title }}

      {% endif %} + {% if asset.type %}

      {{ asset.type }}

      {% endif %} + {% if asset.description %}

      {{ asset.description }}

      {% endif %} + + {% if asset.roles and asset.roles|length > 0 %} +
        + {% for role in asset.roles %} +
      • {{ role }}
      • + {% endfor %} +
      + {% endif %} + +
      + Asset Properties + {% for asset_key, asset_opt in asset | dictsort if asset_key not in ["title", "type", "href", "roles", "alternate"] %} +
      +
      {{ asset_key }}
      +
      +
      {{ asset_opt | tojson(2) }}
      +
      +
      + {% else %} + No additional properties for this asset. + {% endfor %} +
      +
    • + {% endfor %} +
    + +

    Links

      {% for link in response.links %}
    • {{ link.title or link.rel }}
    • From c4940f773bef94093594721ffc1b4d784d89fb5f Mon Sep 17 00:00:00 2001 From: Oliver Roick Date: Wed, 26 Mar 2025 17:12:16 +1100 Subject: [PATCH 4/8] Style item properties --- .../eoapi/stac/eoapi/stac/templates/item.html | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/runtimes/eoapi/stac/eoapi/stac/templates/item.html b/runtimes/eoapi/stac/eoapi/stac/templates/item.html index 58d1ff1..93a5e27 100644 --- a/runtimes/eoapi/stac/eoapi/stac/templates/item.html +++ b/runtimes/eoapi/stac/eoapi/stac/templates/item.html @@ -26,10 +26,20 @@

      Properties

      -
        -
      • ID: {{ response.id }}
      • +
          +
        • +
          ID
          +
          +
          {{ response.id }}
          +
          +
        • {% for key, value in response.properties | dictsort %} -
        • {{ key }}: {{ value }}
        • +
        • +
          {{ key }}
          +
          +
          {{ value | tojson(2) | trim('"') }}
          +
          +
        • {% endfor %}
        @@ -60,10 +70,10 @@

        Assets

        Asset Properties {% for asset_key, asset_opt in asset | dictsort if asset_key not in ["title", "type", "href", "roles", "alternate"] %} -
        -
        {{ asset_key }}
        +
        +
        {{ asset_key }}
        -
        {{ asset_opt | tojson(2) }}
        +
        {{ asset_opt | tojson(2) }}
        {% else %} From 73bde6da3eaa395acdf93f4a481eff33cbf579f6 Mon Sep 17 00:00:00 2001 From: Oliver Roick Date: Wed, 26 Mar 2025 17:19:06 +1100 Subject: [PATCH 5/8] Stick map to position --- runtimes/eoapi/stac/eoapi/stac/templates/item.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtimes/eoapi/stac/eoapi/stac/templates/item.html b/runtimes/eoapi/stac/eoapi/stac/templates/item.html index 93a5e27..2b39ad9 100644 --- a/runtimes/eoapi/stac/eoapi/stac/templates/item.html +++ b/runtimes/eoapi/stac/eoapi/stac/templates/item.html @@ -92,7 +92,7 @@

        Links

      -
      Loading...
      +
      Loading...
      From c0eaf6337fb5d80bd2ce13fa2aeb3b76085f8257 Mon Sep 17 00:00:00 2001 From: Oliver Roick Date: Wed, 26 Mar 2025 17:20:30 +1100 Subject: [PATCH 6/8] Extend item page from base.html --- runtimes/eoapi/stac/eoapi/stac/templates/item.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/runtimes/eoapi/stac/eoapi/stac/templates/item.html b/runtimes/eoapi/stac/eoapi/stac/templates/item.html index 2b39ad9..a692989 100644 --- a/runtimes/eoapi/stac/eoapi/stac/templates/item.html +++ b/runtimes/eoapi/stac/eoapi/stac/templates/item.html @@ -1,10 +1,12 @@ -{% include "header.html" %} +{% extends "base.html" %} + {% if params %} {% set urlq = url + '?' + params + '&' %} {% else %} {% set urlq = url + '?' %} {% endif %} +{% block content %}