diff --git a/NEWS.md b/NEWS.md index 1d5069f21598..d3410de707cd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,7 @@ Development - None yet ### Features +* Display GeoParquet link in Catalog [16453](https://github.com/CartoDB/cartodb/pull/16453) * Display notifications about the new CARTO platform release [16352](https://github.com/CartoDB/cartodb/pull/16352) * Upgrade to deck.gl 8.5.6 [16338](https://github.com/CartoDB/cartodb/pull/16338) * Update DO Catalog dependencies and some changes to use bundle on CARTO Workspace [#16325](https://github.com/CartoDB/cartodb/pull/16325) diff --git a/lib/assets/javascripts/new-dashboard/pages/Data/CatalogDatasetSummary.vue b/lib/assets/javascripts/new-dashboard/pages/Data/CatalogDatasetSummary.vue index 4b7a94d9d829..eaeb3ae36e84 100644 --- a/lib/assets/javascripts/new-dashboard/pages/Data/CatalogDatasetSummary.vue +++ b/lib/assets/javascripts/new-dashboard/pages/Data/CatalogDatasetSummary.vue @@ -101,6 +101,17 @@

+
  • +

    + GeoParquet +

    +

    + Download +

    +
  • @@ -112,6 +123,7 @@ import { temporalAggregationName } from 'new-dashboard/utils/catalog/temporal-ag import { geometryTypeName } from 'new-dashboard/utils/catalog/geometry-type-name'; import { updateFrequencyName } from 'new-dashboard/utils/catalog/update-frequency-name'; import { sendCustomDimensions } from 'new-dashboard/utils/catalog/custom-dimensions-ga'; +import { checkGeoparquetBucket } from 'new-dashboard/utils/catalog/geoparquet'; import CatalogMapPreview from 'new-dashboard/components/Catalog/CatalogMapPreview'; export default { @@ -119,6 +131,12 @@ export default { components: { CatalogMapPreview }, + data () { + return { + hasGeoparquetAvailable: false, + geoparquetUrl: undefined + }; + }, watch: { dataset: { handler (value) { @@ -169,10 +187,16 @@ export default { id: this.$route.params.entity_id, type: this.$route.params.entity_type }); + }, + async checkIfGeoparquetBucketExists () { + const { ok, url } = await checkGeoparquetBucket(this.$route.params.entity_id); + this.hasGeoparquetAvailable = ok; + this.geoparquetUrl = url; } }, mounted () { this.fetchKeyVariables(); + this.checkIfGeoparquetBucketExists(); } }; diff --git a/lib/assets/javascripts/new-dashboard/utils/catalog/geoparquet.js b/lib/assets/javascripts/new-dashboard/utils/catalog/geoparquet.js new file mode 100644 index 000000000000..40a040cdfbac --- /dev/null +++ b/lib/assets/javascripts/new-dashboard/utils/catalog/geoparquet.js @@ -0,0 +1,9 @@ +export async function checkGeoparquetBucket (dataset) { + try { + const url = `https://storage.googleapis.com/geoparquet/carto/${dataset}.parquet`; + const response = await fetch(url, { method: 'HEAD' }); + return { ok: response.ok, url }; + } catch (e) { + return { ok: false }; + } +} diff --git a/package.json b/package.json index fe3043707623..600b93fd4158 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cartodb-ui", - "version": "1.0.0-assets.290", + "version": "1.0.0-assets.291", "description": "CARTO UI frontend", "repository": { "type": "git", diff --git a/script/ci/known_hosts b/script/ci/known_hosts index 1bae52b8991a..fc1cf6629bf5 100644 --- a/script/ci/known_hosts +++ b/script/ci/known_hosts @@ -1 +1,3 @@ -github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== +|1|ueDZd5nj+jew6gJuR6J043fBwRc=|+HaH18kuYx21mjgs1Uz/SWRhQEY= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg= +|1|0RrLFzimw+0ZVQNhDVHeUHbG1xk=|MdpZry4/IdRdz3jpEKPAPiDEWmA= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg= +|1|IU85mbarZxbwrbxBhbXKiI7hSuw=|FXKLY4UBpBGMLAB0WDDeijtQ7u0= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=