From fce78b4684da6b9df6369d661fc0e85cf3625cb4 Mon Sep 17 00:00:00 2001 From: Ophir Lojkine Date: Sat, 28 Nov 2026 23:46:34 +0000 Subject: [PATCH] Move map, timeline, and tracking examples beside their references --- .../official-site/content/components/map.md | 87 ++++++ .../components/map/examples/01-marker.md | 11 + .../map/examples/02-geojson-and-tiles.md | 31 ++ .../components/map/examples/03-rich-links.md | 40 +++ .../examples/04-geometric-visualizations.md | 41 +++ .../content/components/timeline.md | 41 +++ .../components/timeline/examples/01-basic.md | 11 + .../timeline/examples/02-rich-items.md | 18 ++ .../content/components/tracking.md | 44 +++ .../tracking/examples/01-server-status.md | 15 + .../examples/02-server-status-history.md | 26 ++ .../sqlpage/migrations/10_map.sql | 266 ------------------ .../sqlpage/migrations/16_timeline.sql | 103 ------- .../migrations/28_tracking_component.sql | 136 --------- .../migrations/82_reference_catalog.sql | 3 - .../99_shared_id_class_attributes.sql | 12 +- 16 files changed, 367 insertions(+), 518 deletions(-) create mode 100644 examples/official-site/content/components/map.md create mode 100644 examples/official-site/content/components/map/examples/01-marker.md create mode 100644 examples/official-site/content/components/map/examples/02-geojson-and-tiles.md create mode 100644 examples/official-site/content/components/map/examples/03-rich-links.md create mode 100644 examples/official-site/content/components/map/examples/04-geometric-visualizations.md create mode 100644 examples/official-site/content/components/timeline.md create mode 100644 examples/official-site/content/components/timeline/examples/01-basic.md create mode 100644 examples/official-site/content/components/timeline/examples/02-rich-items.md create mode 100644 examples/official-site/content/components/tracking.md create mode 100644 examples/official-site/content/components/tracking/examples/01-server-status.md create mode 100644 examples/official-site/content/components/tracking/examples/02-server-status-history.md delete mode 100644 examples/official-site/sqlpage/migrations/10_map.sql delete mode 100644 examples/official-site/sqlpage/migrations/16_timeline.sql delete mode 100644 examples/official-site/sqlpage/migrations/28_tracking_component.sql diff --git a/examples/official-site/content/components/map.md b/examples/official-site/content/components/map.md new file mode 100644 index 000000000..42ea16e8e --- /dev/null +++ b/examples/official-site/content/components/map.md @@ -0,0 +1,87 @@ +--- +icon: map +since: 0.8.0 +category: display-data +summary: Plot locations and geographic shapes on an interactive map. +top: + - name: attribution + type: HTML + description: Text to display at the bottom right of the map. Defaults to "© OpenStreetMap". + - class + - name: height + type: INTEGER + description: Height of the map, in pixels. Default to 350px + - id + - name: latitude + type: REAL + description: Latitude of the center of the map. If omitted, the map will be centered on its markers. + - name: longitude + type: REAL + description: Longitude of the center of the map. + - name: max_zoom + type: INTEGER + description: How far the map can be zoomed in. Defaults to 18. Added in v0.15.2. + - name: tile_source + type: URL + description: Custom map tile images to use, as a URL. Defaults to "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png". + Added in v0.15.2. + - name: title + type: TEXT + description: A text header displayed above the map. + - name: zoom + type: REAL + description: Zoom Level to apply to the map. Defaults to 5. +row: + - name: color + type: COLOR + description: Background color of the marker on the map. Requires "icon" to be set. + - name: description + type: TEXT + description: Plain text description of the marker, to be displayed in a tooltip when the marker is clicked. + - name: description_md + type: TEXT + description: Description of the marker, in markdown, rendered in a tooltip when the marker is clicked. + - name: geojson + type: JSON + description: A GeoJSON geometry (line, polygon, ...) to display on the map. Can be styled using geojson + properties using the name of leaflet path options. Introduced in 0.15.1. Accepts raw strings in addition + to JSON objects since 0.15.2. + - name: icon + type: ICON + description: Name of the icon to use for the marker + - name: latitude + type: REAL + required: true + description: Latitude of the marker. Required only if geojson is not set. + - name: link + type: TEXT + description: A link to associate to the marker's title. If set, the marker tooltip's title will be clickable + and will open the link. + - name: longitude + type: REAL + required: true + description: Longitude of the marker. Required only if geojson is not set. + - name: size + type: INTEGER + description: Size of the marker icon. Requires "icon" to be set. Introduced in 0.15.2. + - name: title + type: TEXT + description: Title of the marker, displayed on hover and in the tooltip when the marker is clicked. +--- + +## Visualize SQL data on a map. + +The map component displays a custom interactive map with markers on it. + +In its simplest form, the component displays points on a map from a table of latitudes and longitudes. +But it can also be used by cartographers in combination with PostgreSQL's PostGIS or SQLite's spatialite, +to create custom visualizations of geospatial data. +Use the `geojson` property to generate rich maps from a GIS database. + +### Example Use Cases + +1. **Store Locator**: Build an interactive map to find the nearest store information using SQL-stored geospatial data. +2. **Delivery Route Optimization**: Visualize the results of delivery route optimization algorithms. +3. **Sales Heatmap**: Identify high-performing regions by mapping sales data stored in SQL. +4. **Real-Time Tracking**: Create dynamic dashboards that track vehicles, assets, or users live using PostGIS or MS SQL Server geospatial time series data. Use the [shell](?component=shell) component to auto-refresh the map. +5. **Demographic Insights**: Map customer demographics or trends geographically to uncover opportunities for growth or better decision-making. diff --git a/examples/official-site/content/components/map/examples/01-marker.md b/examples/official-site/content/components/map/examples/01-marker.md new file mode 100644 index 000000000..638f78a30 --- /dev/null +++ b/examples/official-site/content/components/map/examples/01-marker.md @@ -0,0 +1,11 @@ +--- +rows: + - component: map + - title: New Delhi + latitude: 28.6139 + longitude: 77.209 +--- + +### Adding a marker to a map + +Showing how to place a marker on a map. Useful for basic location displays like showing a single office location, event venue, or point of interest. The marker shows basic hover and click interactions. diff --git a/examples/official-site/content/components/map/examples/02-geojson-and-tiles.md b/examples/official-site/content/components/map/examples/02-geojson-and-tiles.md new file mode 100644 index 000000000..ad16d9b3a --- /dev/null +++ b/examples/official-site/content/components/map/examples/02-geojson-and-tiles.md @@ -0,0 +1,31 @@ +--- +rows: + - component: map + zoom: 5 + max_zoom: 8 + height: 600 + latitude: -25 + longitude: 28 + tile_source: https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png + attribution: '' + - icon: peace + size: 20 + link: https://en.wikipedia.org/wiki/Nelson_Mandela + geojson: '{"type":"Feature", "properties": { "title":"Mvezo, Birth Place of Nelson Mandela" }, "geometry": + { "type":"Point", "coordinates": [28.49, -31.96] }}' + - component: text + contents_md: >- + Map data: [© OpenStreetMap contributors](https://www.openstreetmap.org/copyright), SRTM. + Map style: [© OpenTopoMap](https://opentopomap.org/) ([CC BY-SA](https://creativecommons.org/licenses/by-sa/3.0/)). +--- + +### Advanced map customization using GeoJSON and custom map tiles + +This example demonstrates using topographic map tiles, custom marker styling, +and clickable markers that link to external content - perfect for educational or tourism applications. + +The [GeoJSON](https://en.wikipedia.org/wiki/GeoJSON) feature here is a single point. Its coordinates are `[longitude, latitude]`; the top-level `latitude` and `longitude` set the map's initial center. + + - You can generate GeoJSON data from PostGIS geometries using the [`ST_AsGeoJSON`](https://postgis.net/docs/ST_AsGeoJSON.html) function. + - In spatialite, you can use the [`AsGeoJSON`](https://www.gaia-gis.it/gaia-sins/spatialite-sql-5.1.0.html#p3misc) function. + - In MySQL, you can use the [`ST_AsGeoJSON()`](https://dev.mysql.com/doc/refman/8.0/en/spatial-geojson-functions.html#function_st-asgeojson) function. diff --git a/examples/official-site/content/components/map/examples/03-rich-links.md b/examples/official-site/content/components/map/examples/03-rich-links.md new file mode 100644 index 000000000..f7e7e1a50 --- /dev/null +++ b/examples/official-site/content/components/map/examples/03-rich-links.md @@ -0,0 +1,40 @@ +--- +rows: + - component: map + title: Paris + zoom: 13 + latitude: 48.85 + longitude: 2.34 + tile_source: https://api.maptiler.com/maps/streets-v2/{z}/{x}/{y}.png?key=RwoF6Y3gcKx4OBMbvqOY + - title: Notre Dame + icon: building-castle + color: indigo + latitude: 48.853 + longitude: 2.3498 + description_md: A beautiful cathedral. + link: https://en.wikipedia.org/wiki/Notre-Dame_de_Paris + - title: Eiffel Tower + icon: tower + color: red + latitude: 48.8584 + longitude: 2.2945 + description_md: A tall tower. [Wikipedia](https://en.wikipedia.org/wiki/Eiffel_Tower) + - title: Tower to Cathedral + geojson: + type: LineString + coordinates: + - - 2.2945 + - 48.8584 + - - 2.3498 + - 48.853 + color: teal + description: A nice 45 minutes walk. +--- + +### Maps with links and rich descriptions + +Demonstrates how to create an engaging map with custom icons, colors, rich descriptions with markdown support, and connecting points with lines. +Perfect for visualizing multi-dimensional relationships between points on a map, like routes between locations. + +Note that the map tile source is set to a MapTiler map. The API key included in the URL in this demo will not work on your own website. +You should get your own API key at [MapTiler](https://www.maptiler.com/cloud/). diff --git a/examples/official-site/content/components/map/examples/04-geometric-visualizations.md b/examples/official-site/content/components/map/examples/04-geometric-visualizations.md new file mode 100644 index 000000000..b19f39b10 --- /dev/null +++ b/examples/official-site/content/components/map/examples/04-geometric-visualizations.md @@ -0,0 +1,41 @@ +--- +rows: + - component: map + tile_source: false + - title: MySQL + color: red + description: This literal red square is defined as a GeoJSON polygon. Each (x,y) coordinate is a JSON array. + geojson: + type: Polygon + coordinates: + - - - 0 + - 0 + - - 0 + - 4 + - - 4 + - 4 + - - 4 + - 0 + - - 0 + - 0 + - title: SQLite + color: blue + description: This 2D shape was generated by a SQL query. + geojson: + type: Polygon + coordinates: + - - - 5 + - 0 + - - 9 + - 0 + - - 7 + - 4 + - - 5 + - 0 +--- + +### Abstract geometric visualizations + +Example showing how to create abstract geometric visualizations without a base map. +Useful for displaying spatial data that doesn't need geographic context, like floor plans, seating charts, +or abstract 2D data visualizations. diff --git a/examples/official-site/content/components/timeline.md b/examples/official-site/content/components/timeline.md new file mode 100644 index 000000000..fb727e9ec --- /dev/null +++ b/examples/official-site/content/components/timeline.md @@ -0,0 +1,41 @@ +--- +icon: git-commit +since: 0.13.0 +category: display-data +summary: Arrange events along a vertical timeline. +top: + - class + - id + - name: simple + type: BOOLEAN + description: If set to true, the timeline will be displayed in a condensed format without icons. +row: + - class + - name: color + type: TEXT + description: Color of the icon. See preview.tabler.io/colors.html for a list of available colors. + - name: date + type: TEXT + required: true + description: Date of the event. + - name: description + type: TEXT + description: Textual description of the event. + - name: description_md + type: TEXT + description: Description of the event in Markdown. + - name: icon + type: TEXT + description: Name of the icon to display next to the event. See tabler-icons.io for a list of available + icons. + - id + - name: link + type: TEXT + description: Link to a page with more information about the event. + - name: title + type: TEXT + required: true + description: Name of the event. +--- + +A list of events with a vertical line connecting them. diff --git a/examples/official-site/content/components/timeline/examples/01-basic.md b/examples/official-site/content/components/timeline/examples/01-basic.md new file mode 100644 index 000000000..91d2c899a --- /dev/null +++ b/examples/official-site/content/components/timeline/examples/01-basic.md @@ -0,0 +1,11 @@ +--- +rows: + - component: timeline + simple: true + - title: New message from Elon Musk + date: '13:00' + - title: Jeff Bezos assigned task "work more" to you. + date: yesterday, 16:35 +--- + +A basic timeline with just names and dates. diff --git a/examples/official-site/content/components/timeline/examples/02-rich-items.md b/examples/official-site/content/components/timeline/examples/02-rich-items.md new file mode 100644 index 000000000..0548505af --- /dev/null +++ b/examples/official-site/content/components/timeline/examples/02-rich-items.md @@ -0,0 +1,18 @@ +--- +rows: + - component: timeline + - title: v0.13.0 was just released ! + link: https://github.com/sqlpage/SQLPage/releases/ + date: '2023-10-16' + icon: brand-github + color: green + description_md: This version introduces the `timeline` component. + - title: They are talking about us... + description_md: '[This article](https://www.postgresql.org/about/news/announcing-sqlpage-build-dynamic-web-applications-in-sql-2672/) + on the official PostgreSQL website mentions SQLPage.' + date: '2023-07-12' + icon: database + color: blue +--- + +A full-fledged timeline with icons, colors, and rich text descriptions. diff --git a/examples/official-site/content/components/tracking.md b/examples/official-site/content/components/tracking.md new file mode 100644 index 000000000..ae6bfe0be --- /dev/null +++ b/examples/official-site/content/components/tracking.md @@ -0,0 +1,44 @@ +--- +icon: timeline-event-text +since: 0.18.0 +category: display-data +summary: Show a sequence of activity or status changes as colored segments. +top: + - name: center + type: BOOLEAN + description: Whether to center the component. + - class + - name: description + type: TEXT + description: A short paragraph. + - name: description_md + type: TEXT + description: A short paragraph formatted using markdown. + - id + - name: information + type: TEXT + description: A short text displayed below the title. + - name: placement + type: TEXT + description: Position of the tooltip (e.g. top, bottom, right, left) + - name: title + type: TEXT + required: true + description: Title of the tracking component. + - name: width + type: INTEGER + description: Width of the component, between 1 and 12. +row: + - name: color + type: TEXT + description: Color of the tracked item (e.g. success, warning, danger) + - name: link + type: URL + description: A URL to open when the user clicks on the tracked item. + - name: title + type: TEXT + required: true + description: Description of the state. +--- + +Component for visualising activity logs or other monitoring-related data. diff --git a/examples/official-site/content/components/tracking/examples/01-server-status.md b/examples/official-site/content/components/tracking/examples/01-server-status.md new file mode 100644 index 000000000..7edc7ddf4 --- /dev/null +++ b/examples/official-site/content/components/tracking/examples/01-server-status.md @@ -0,0 +1,15 @@ +--- +rows: + - component: tracking + title: Servers status + - title: No data + - title: No data + - title: No data + - title: No data + - title: No data + - title: No data + - title: No data + - title: No data +--- + +A basic example of servers tracking component diff --git a/examples/official-site/content/components/tracking/examples/02-server-status-history.md b/examples/official-site/content/components/tracking/examples/02-server-status-history.md new file mode 100644 index 000000000..808f7c8b9 --- /dev/null +++ b/examples/official-site/content/components/tracking/examples/02-server-status-history.md @@ -0,0 +1,26 @@ +--- +rows: + - component: tracking + title: Servers status + information: 60% are running + description_md: Status of all **currently running servers** + placement: top + width: 4 + - color: success + title: operational + - color: success + title: operational + - color: success + title: operational + - color: danger + title: Downtime + - title: No data + - color: success + title: operational + - color: warning + title: Big load + - color: success + title: operational +--- + +An example of servers tracking component diff --git a/examples/official-site/sqlpage/migrations/10_map.sql b/examples/official-site/sqlpage/migrations/10_map.sql deleted file mode 100644 index 33a6bbe4b..000000000 --- a/examples/official-site/sqlpage/migrations/10_map.sql +++ /dev/null @@ -1,266 +0,0 @@ -INSERT INTO - component (name, description, icon, introduced_in_version) -VALUES - ( - 'map', - ' - -## Visualize SQL data on a map. - -The map component displays a custom interactive map with markers on it. - -In its simplest form, the component displays points on a map from a table of latitudes and longitudes. -But it can also be used by cartographers in combination with PostgreSQL''s PostGIS or SQLite''s spatialite, -to create custom visualizations of geospatial data. -Use the `geojson` property to generate rich maps from a GIS database. - -### Example Use Cases - -1. **Store Locator**: Build an interactive map to find the nearest store information using SQL-stored geospatial data. -2. **Delivery Route Optimization**: Visualize the results of delivery route optimization algorithms. -3. **Sales Heatmap**: Identify high-performing regions by mapping sales data stored in SQL. -4. **Real-Time Tracking**: Create dynamic dashboards that track vehicles, assets, or users live using PostGIS or MS SQL Server geospatial time series data. Use the [shell](?component=shell) component to auto-refresh the map. -5. **Demographic Insights**: Map customer demographics or trends geographically to uncover opportunities for growth or better decision-making. -', - 'map', - '0.8.0' - ); - --- Insert the parameters for the http_header component into the parameter table -INSERT INTO - parameter ( - component, - name, - description, - type, - top_level, - optional - ) -VALUES - ( - 'map', - 'title', - 'A text header displayed above the map.', - 'TEXT', - TRUE, - TRUE - ), - ( - 'map', - 'latitude', - 'Latitude of the center of the map. If omitted, the map will be centered on its markers.', - 'REAL', - TRUE, - TRUE - ), - ( - 'map', - 'longitude', - 'Longitude of the center of the map.', - 'REAL', - TRUE, - TRUE - ), - ( - 'map', - 'zoom', - 'Zoom Level to apply to the map. Defaults to 5.', - 'REAL', - TRUE, - TRUE - ), - ( - 'map', - 'max_zoom', - 'How far the map can be zoomed in. Defaults to 18. Added in v0.15.2.', - 'INTEGER', - TRUE, - TRUE - ), - ( - 'map', - 'tile_source', - 'Custom map tile images to use, as a URL. Defaults to "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png". Added in v0.15.2.', - 'URL', - TRUE, - TRUE - ), - ( - 'map', - 'attribution', - 'Text to display at the bottom right of the map. Defaults to "© OpenStreetMap".', - 'HTML', - TRUE, - TRUE - ), - ( - 'map', - 'height', - 'Height of the map, in pixels. Default to 350px', - 'INTEGER', - TRUE, - TRUE - ), - ( - 'map', - 'latitude', - 'Latitude of the marker. Required only if geojson is not set.', - 'REAL', - FALSE, - FALSE - ), - ( - 'map', - 'longitude', - 'Longitude of the marker. Required only if geojson is not set.', - 'REAL', - FALSE, - FALSE - ), - ( - 'map', - 'title', - 'Title of the marker, displayed on hover and in the tooltip when the marker is clicked.', - 'TEXT', - FALSE, - TRUE - ), - ( - 'map', - 'link', - 'A link to associate to the marker''s title. If set, the marker tooltip''s title will be clickable and will open the link.', - 'TEXT', - FALSE, - TRUE - ), - ( - 'map', - 'description', - 'Plain text description of the marker, to be displayed in a tooltip when the marker is clicked.', - 'TEXT', - FALSE, - TRUE - ), - ( - 'map', - 'description_md', - 'Description of the marker, in markdown, rendered in a tooltip when the marker is clicked.', - 'TEXT', - FALSE, - TRUE - ), - ( - 'map', - 'icon', - 'Name of the icon to use for the marker', - 'ICON', - FALSE, - TRUE - ), - ( - 'map', - 'color', - 'Background color of the marker on the map. Requires "icon" to be set.', - 'COLOR', - FALSE, - TRUE - ), - ( - 'map', - 'geojson', - 'A GeoJSON geometry (line, polygon, ...) to display on the map. Can be styled using geojson properties using the name of leaflet path options. Introduced in 0.15.1. Accepts raw strings in addition to JSON objects since 0.15.2.', - 'JSON', - FALSE, - TRUE - ), - ( - 'map', - 'size', - 'Size of the marker icon. Requires "icon" to be set. Introduced in 0.15.2.', - 'INTEGER', - FALSE, - TRUE - ); - --- Insert an example usage of the map component into the example table -INSERT INTO - example (component, description, properties) -VALUES - ( - 'map', - ' -### Adding a marker to a map - -Showing how to place a marker on a map. Useful for basic location displays like showing a single office location, event venue, or point of interest. The marker shows basic hover and click interactions. -', - JSON ( - '[{ "component": "map" }, { "title": "New Delhi", "latitude": 28.6139, "longitude": 77.2090 }]' - ) - ), - ( - 'map', - ' -### Advanced map customization using GeoJSON and custom map tiles - -This example demonstrates using topographic map tiles, custom marker styling, -and clickable markers that link to external content - perfect for educational or tourism applications. - -The [GeoJSON](https://en.wikipedia.org/wiki/GeoJSON) feature here is a single point. Its coordinates are `[longitude, latitude]`; the top-level `latitude` and `longitude` set the map''s initial center. - - - You can generate GeoJSON data from PostGIS geometries using the [`ST_AsGeoJSON`](https://postgis.net/docs/ST_AsGeoJSON.html) function. - - In spatialite, you can use the [`AsGeoJSON`](https://www.gaia-gis.it/gaia-sins/spatialite-sql-5.1.0.html#p3misc) function. - - In MySQL, you can use the [`ST_AsGeoJSON()`](https://dev.mysql.com/doc/refman/8.0/en/spatial-geojson-functions.html#function_st-asgeojson) function. -', - JSON ( - '[{ "component": "map", "zoom": 5, "max_zoom": 8, "height": 600, "latitude": -25, "longitude": 28, "tile_source": "https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png", "attribution": "" }, - { "icon": "peace", - "size": 20, - "link": "https://en.wikipedia.org/wiki/Nelson_Mandela", - "geojson": "{\"type\":\"Feature\", \"properties\": { \"title\":\"Mvezo, Birth Place of Nelson Mandela\" }, \"geometry\": { \"type\":\"Point\", \"coordinates\": [28.49, -31.96] }}"}, - {"component": "text", "contents_md": "Map data: [© OpenStreetMap contributors](https://www.openstreetmap.org/copyright), SRTM. Map style: [© OpenTopoMap](https://opentopomap.org/) ([CC BY-SA](https://creativecommons.org/licenses/by-sa/3.0/))."}]' - ) - ), - ( - 'map', - ' -### Maps with links and rich descriptions - -Demonstrates how to create an engaging map with custom icons, colors, rich descriptions with markdown support, and connecting points with lines. -Perfect for visualizing multi-dimensional relationships between points on a map, like routes between locations. - -Note that the map tile source is set to a MapTiler map. The API key included in the URL in this demo will not work on your own website. -You should get your own API key at [MapTiler](https://www.maptiler.com/cloud/). -', - JSON ( - '[ - { "component": "map", "title": "Paris", "zoom": 13, "latitude": 48.85, "longitude": 2.34, "tile_source": "https://api.maptiler.com/maps/streets-v2/{z}/{x}/{y}.png?key=RwoF6Y3gcKx4OBMbvqOY" }, - { "title": "Notre Dame", "icon": "building-castle", "color": "indigo", "latitude": 48.8530, "longitude": 2.3498, "description_md": "A beautiful cathedral.", "link": "https://en.wikipedia.org/wiki/Notre-Dame_de_Paris" }, - { "title": "Eiffel Tower", "icon": "tower", "color": "red", "latitude": 48.8584, "longitude": 2.2945, "description_md": "A tall tower. [Wikipedia](https://en.wikipedia.org/wiki/Eiffel_Tower)" }, - { "title": "Tower to Cathedral", "geojson": {"type": "LineString", "coordinates": [[2.2945, 48.8584], [2.3498, 48.8530]]}, "color": "teal", "description": "A nice 45 minutes walk." } - ]' - ) - ), - ( - 'map', - ' -### Abstract geometric visualizations - -Example showing how to create abstract geometric visualizations without a base map. -Useful for displaying spatial data that doesn''t need geographic context, like floor plans, seating charts, -or abstract 2D data visualizations. -', - JSON ( - '[ - { "component": "map", "tile_source": false }, - { "title": "MySQL", - "color": "red", "description": "This literal red square is defined as a GeoJSON polygon. Each (x,y) coordinate is a JSON array.", - "geojson": {"type": "Polygon", "coordinates": [[[0, 0], [0, 4], [4, 4], [4, 0], [0, 0]]]} - }, - { - "title": "SQLite", - "color": "blue", "description": "This 2D shape was generated by a SQL query.", - "geojson": {"type": "Polygon", "coordinates": [[[5, 0], [9, 0], [7, 4], [5, 0]]]} - } - ]' - ) - ); diff --git a/examples/official-site/sqlpage/migrations/16_timeline.sql b/examples/official-site/sqlpage/migrations/16_timeline.sql deleted file mode 100644 index 78f19ba5f..000000000 --- a/examples/official-site/sqlpage/migrations/16_timeline.sql +++ /dev/null @@ -1,103 +0,0 @@ -INSERT INTO component (name, description, icon, introduced_in_version) -VALUES ( - 'timeline', - 'A list of events with a vertical line connecting them.', - 'git-commit', - '0.13.0' - ); -INSERT INTO parameter ( - component, - name, - description, - type, - top_level, - optional - ) -VALUES ( - 'timeline', - 'simple', - 'If set to true, the timeline will be displayed in a condensed format without icons.', - 'BOOLEAN', - TRUE, - TRUE - ), - ( - 'timeline', - 'title', - 'Name of the event.', - 'TEXT', - FALSE, - FALSE - ), - ( - 'timeline', - 'date', - 'Date of the event.', - 'TEXT', - FALSE, - FALSE - ), - ( - 'timeline', - 'icon', - 'Name of the icon to display next to the event. See tabler-icons.io for a list of available icons.', - 'TEXT', - FALSE, - TRUE - ), - ( - 'timeline', - 'color', - 'Color of the icon. See preview.tabler.io/colors.html for a list of available colors.', - 'TEXT', - FALSE, - TRUE - ), - ( - 'timeline', - 'description', - 'Textual description of the event.', - 'TEXT', - FALSE, - TRUE - ), - ( - 'timeline', - 'description_md', - 'Description of the event in Markdown.', - 'TEXT', - FALSE, - TRUE - ), - ( - 'timeline', - 'link', - 'Link to a page with more information about the event.', - 'TEXT', - FALSE, - TRUE - ); -INSERT INTO example (component, description, properties) -VALUES ( - 'timeline', - 'A basic timeline with just names and dates.', - JSON( - '[ - { "component": "timeline", "simple": true }, - { "title": "New message from Elon Musk", "date": "13:00" }, - { "title": "Jeff Bezos assigned task \"work more\" to you.", "date": "yesterday, 16:35" } - ]' - ) - ), - ( - 'timeline', - 'A full-fledged timeline with icons, colors, and rich text descriptions.', - JSON( - '[ - { "component": "timeline" }, - { "title": "v0.13.0 was just released !", "link": "https://github.com/sqlpage/SQLPage/releases/", "date": "2023-10-16", "icon": "brand-github", "color": "green", "description_md": "This version introduces the `timeline` component." }, - { "title": "They are talking about us...", "description_md": "[This article](https://www.postgresql.org/about/news/announcing-sqlpage-build-dynamic-web-applications-in-sql-2672/) on the official PostgreSQL website mentions SQLPage.", "date": "2023-07-12", "icon": "database", "color": "blue" } - ]' - ) - ) - ; \ No newline at end of file diff --git a/examples/official-site/sqlpage/migrations/28_tracking_component.sql b/examples/official-site/sqlpage/migrations/28_tracking_component.sql deleted file mode 100644 index e873f5bf0..000000000 --- a/examples/official-site/sqlpage/migrations/28_tracking_component.sql +++ /dev/null @@ -1,136 +0,0 @@ -INSERT INTO component (name, description, icon, introduced_in_version) -VALUES ( - 'tracking', - 'Component for visualising activity logs or other monitoring-related data.', - 'timeline-event-text', - '0.18.0' - ); - -INSERT INTO parameter ( - component, - name, - description, - type, - top_level, - optional - ) -VALUES ( - 'tracking', - 'title', - 'Title of the tracking component.', - 'TEXT', - TRUE, - FALSE - ), - ( - 'tracking', - 'information', - 'A short text displayed below the title.', - 'TEXT', - TRUE, - TRUE - ), - ( - 'tracking', - 'description', - 'A short paragraph.', - 'TEXT', - TRUE, - TRUE - ), - ( - 'tracking', - 'description_md', - 'A short paragraph formatted using markdown.', - 'TEXT', - TRUE, - TRUE - ), - ( - 'tracking', - 'width', - 'Width of the component, between 1 and 12.', - 'INTEGER', - TRUE, - TRUE - ), - ( - 'tracking', - 'placement', - 'Position of the tooltip (e.g. top, bottom, right, left)', - 'TEXT', - TRUE, - TRUE - ), - ( - 'tracking', - 'color', - 'Color of the tracked item (e.g. success, warning, danger)', - 'TEXT', - FALSE, - TRUE - ), - ( - 'tracking', - 'title', - 'Description of the state.', - 'TEXT', - FALSE, - FALSE - ), - ( - 'tracking', - 'link', - 'A URL to open when the user clicks on the tracked item.', - 'URL', - FALSE, - TRUE - ), - ( - 'tracking', - 'center', - 'Whether to center the component.', - 'BOOLEAN', - TRUE, - TRUE - ); - --- Insert example(s) for the component -INSERT INTO example(component, description, properties) -VALUES - ( - 'tracking', - 'A basic example of servers tracking component', - JSON( - '[ - {"component":"tracking","title":"Servers status"}, - {"title":"No data"}, - {"title":"No data"}, - {"title":"No data"}, - {"title":"No data"}, - {"title":"No data"}, - {"title":"No data"}, - {"title":"No data"}, - {"title":"No data"} - ]' - ) - ), - ( - 'tracking', - 'An example of servers tracking component', - JSON( - '[ - {"component":"tracking","title":"Servers status","information":"60% are running","description_md":"Status of all **currently running servers**","placement":"top","width":4}, - {"color":"success","title":"operational"}, - {"color":"success","title":"operational"}, - {"color":"success","title":"operational"}, - {"color":"danger","title":"Downtime"}, - {"title":"No data"}, - {"color":"success","title":"operational"}, - {"color":"warning","title":"Big load"}, - {"color":"success","title":"operational"} - ]' - ) - ); - - diff --git a/examples/official-site/sqlpage/migrations/82_reference_catalog.sql b/examples/official-site/sqlpage/migrations/82_reference_catalog.sql index 82bf65654..e897f6b0f 100644 --- a/examples/official-site/sqlpage/migrations/82_reference_catalog.sql +++ b/examples/official-site/sqlpage/migrations/82_reference_catalog.sql @@ -26,9 +26,6 @@ ALTER TABLE sqlpage_functions ADD COLUMN catalog_summary TEXT; ALTER TABLE sqlpage_function_parameters ADD COLUMN optional BOOLEAN NOT NULL DEFAULT FALSE; WITH copy(name, category, summary) AS (VALUES - ('map', 'display-data', 'Plot locations and geographic shapes on an interactive map.'), - ('timeline', 'display-data', 'Arrange events along a vertical timeline.'), - ('tracking', 'display-data', 'Show a sequence of activity or status changes as colored segments.'), diff --git a/examples/official-site/sqlpage/migrations/99_shared_id_class_attributes.sql b/examples/official-site/sqlpage/migrations/99_shared_id_class_attributes.sql index 752223634..e23572da4 100644 --- a/examples/official-site/sqlpage/migrations/99_shared_id_class_attributes.sql +++ b/examples/official-site/sqlpage/migrations/99_shared_id_class_attributes.sql @@ -13,19 +13,11 @@ INSERT INTO parameter(component, top_level, name, description, type, optional) SELECT *, 'id', 'id attribute added to the container in HTML. It can be used to target this item through css or for scrolling to this item through links (use "#id" in link url).', 'TEXT', TRUE FROM (VALUES - ('csv', TRUE), - ('map', TRUE), - ('timeline', TRUE), - ('timeline', FALSE), - ('tracking', TRUE) + ('csv', TRUE) ); INSERT INTO parameter(component, top_level, name, description, type, optional) SELECT *, 'class', 'class attribute added to the container in HTML. It can be used to apply custom styling to this item through css. Added in v0.18.0.', 'TEXT', TRUE FROM (VALUES - ('csv', TRUE), - ('map', TRUE), - ('timeline', TRUE), - ('timeline', FALSE), - ('tracking', TRUE) + ('csv', TRUE) );