From b403d6441e8ac9d4efdb088ecb7e2cfa6c7def32 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 12 Jan 2024 10:18:21 +0100 Subject: [PATCH 01/88] Update CODEOWNERS (#397) --- .github/CODEOWNERS | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 32dc1f39..0a0904b2 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,5 +1,6 @@ * @m-mohr -Dockerfile @waystilos @geospatial-jeff +docker/ @waystilos @geospatial-jeff @constantinius +Dockerfile @waystilos @geospatial-jeff @constantinius src/locales/de-CH @p1d1d1 src/locales/es @rnanclares src/locales/fr @jfbourgon @@ -7,4 +8,4 @@ src/locales/fr-CA @jfbourgon src/locales/fr-CH @p1d1d1 src/locales/it @p1d1d1 src/locales/it-CH @p1d1d1 -src/locales/ro @mneagul \ No newline at end of file +src/locales/ro @mneagul From 6ba06fcf90a9f0d0107c9ec77206af15ff5681d2 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 12 Jan 2024 10:19:32 +0100 Subject: [PATCH 02/88] Improvements for Docker parametrization (#398) Co-authored-by: keul Co-authored-by: noelalonso --- Dockerfile | 20 ++++++++++++-------- README.md | 42 ++++++++++++++++++++++++++++++++++++------ docker/default.conf | 15 +++++++++++++++ public/index.html | 2 +- 4 files changed, 64 insertions(+), 15 deletions(-) create mode 100644 docker/default.conf diff --git a/Dockerfile b/Dockerfile index ce6973ac..6f5bffba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,27 @@ +ARG pathPrefix="/" + FROM node:lts-alpine3.18 AS build-step ARG DYNAMIC_CONFIG=true +ARG historyMode="history" +ARG pathPrefix WORKDIR /app COPY package*.json ./ RUN npm install COPY . . -RUN \[ "${DYNAMIC_CONFIG}" == "true" \] && sed -i 's//|g" public/index.html +RUN npm run build -- --historyMode="${historyMode}" --pathPrefix="${pathPrefix}" FROM nginx:1-alpine-slim +ARG pathPrefix -COPY --from=build-step /app/dist /usr/share/nginx/html -COPY ./config.schema.json /etc/nginx/conf.d/config.schema.json +RUN apk add jq pcre-tools -# change default port to 8080 -RUN apk add jq pcre-tools && \ - sed -i 's/\s*listen\s*80;/ listen 8080;/' /etc/nginx/conf.d/default.conf && \ - sed -i 's/\s*location \/ {/ location \/ {\n try_files $uri $uri\/ \/index.html;/' /etc/nginx/conf.d/default.conf +COPY ./config.schema.json /etc/nginx/conf.d/config.schema.json +COPY --from=build-step /app/dist /usr/share/nginx/html +COPY --from=build-step /app/docker/default.conf /etc/nginx/conf.d/default.conf +RUN sed -i "s||${pathPrefix}|" /etc/nginx/conf.d/default.conf EXPOSE 8080 diff --git a/README.md b/README.md index e6cde48e..1419c2f9 100644 --- a/README.md +++ b/README.md @@ -242,21 +242,51 @@ STAC Browser supports some non-standardized extensions to the STAC specification ## Docker -When building the Dockerfile, you can add the [`catalogUrl`](docs/options.md#catalogurl) -as a [build argument](https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables---build-arg). For example: +Building the Dockerfile without changing any build options: ```bash -docker build -t stac-browser:v1 --build-arg catalogURL=https://planetarycomputer.microsoft.com/api/stac/v1/ . +docker build -t stac-browser:v1 . ``` -If more arguments need to be passed to `npm run build`, you can add them to the Dockerfile as needed. +Run the container for a specific URL: -To run the container: +```bash +docker run -p 8080:8080 -e SB_catalogUrl="https://earth-search.aws.element84.com/v1/" stac-browser:v1 +``` + +STAC Browser is now available at `http://localhost:8080` + +--- + +You can pass further options to STAC Browser to customize it to your needs. + +The build-only options +[`pathPrefix`](docs/options.md#pathprefix) and [`historyMode`](docs/options.md#historymode) +can be provided as a +[build argument](https://docs.docker.com/engine/reference/commandline/build#set-build-time-variables---build-arg) +when building the Dockerfile. + +For example: ```bash -docker run -p 8080:8080 stac-browser:v1 +docker build -t stac-browser:v1 --build-arg pathPrefix="/browser/" --build-arg historyMode=hash . ``` +All other options, except the ones that are explicitly excluded from CLI/ENV usage, +can be passed as environment variables when running the container. +For example, to run the container with a pre-defined +[`catalogUrl`](docs/options.md#catalogurl) and [`catalogTitle`](docs/options.md#catalogtitle): + +```bash +docker run -p 8080:8080 -e SB_catalogUrl="https://earth-search.aws.element84.com/v1/" -e SB_catalogTitle="Earth Search" -e pathPrefix="/browser/" stac-browser:v1 +``` + +Please note that if given the `pathPrefix` also needs to be repeated in the `docker run` command. + +If you want to pass all the other arguments to `npm run build` directly, you can modify to the Dockerfile as needed. + +STAC browser is now available at `http://localhost:8080/browser` + ## Contributing We are happy to review and accept Pull Requests. diff --git a/docker/default.conf b/docker/default.conf new file mode 100644 index 00000000..64f8f983 --- /dev/null +++ b/docker/default.conf @@ -0,0 +1,15 @@ +server { + listen 8080; + server_name localhost; + + location { + alias /usr/share/nginx/html/; + index index.html; + try_files $uri $uri/ index.html; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } +} diff --git a/public/index.html b/public/index.html index cc206ac3..1cba2cf8 100644 --- a/public/index.html +++ b/public/index.html @@ -5,7 +5,7 @@ - + <%= htmlWebpackPlugin.options.title %> From b75d549389bd11e6288a9228b8ede2642bf1d61d Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 12 Jan 2024 11:21:19 +0100 Subject: [PATCH 03/88] Update docker docks again --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 1419c2f9..60d6af79 100644 --- a/README.md +++ b/README.md @@ -278,11 +278,9 @@ For example, to run the container with a pre-defined [`catalogUrl`](docs/options.md#catalogurl) and [`catalogTitle`](docs/options.md#catalogtitle): ```bash -docker run -p 8080:8080 -e SB_catalogUrl="https://earth-search.aws.element84.com/v1/" -e SB_catalogTitle="Earth Search" -e pathPrefix="/browser/" stac-browser:v1 +docker run -p 8080:8080 -e SB_catalogUrl="https://earth-search.aws.element84.com/v1/" -e SB_catalogTitle="Earth Search" stac-browser:v1 ``` -Please note that if given the `pathPrefix` also needs to be repeated in the `docker run` command. - If you want to pass all the other arguments to `npm run build` directly, you can modify to the Dockerfile as needed. STAC browser is now available at `http://localhost:8080/browser` From d8f89b7274ca546b4abbf9f6ba728d90bc5938ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roswita=20Tsch=C3=BCmperlin?= <108136714+tschumpr@users.noreply.github.com> Date: Mon, 15 Jan 2024 17:03:32 +0100 Subject: [PATCH 04/88] Github Action to create Docker image (#392) * Add action to build image on release Co-authored-by: Matthias Mohr --- .gitattributes | 2 ++ .github/workflows/publish.yml | 62 +++++++++++++++++++++++++++++++++++ README.md | 15 +++++++++ 3 files changed, 79 insertions(+) create mode 100644 .gitattributes create mode 100644 .github/workflows/publish.yml diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..79f1111a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# *nix shell scripts always use LF (see .editorconfig) +*.sh eol=lf \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..334c242d --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,62 @@ +name: Publish + +on: + release: + types: [released] + workflow_dispatch: + inputs: + TAG_NAME: + description: "Tag name" + required: true + +env: + REGISTRY: ghcr.io + TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} + +jobs: + retag-docker-image: + runs-on: ubuntu-latest + name: Push updated Docker image + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set environment variables + run: | + echo VERSION=${TAG_NAME#v} >> $GITHUB_ENV + echo IMAGE_NAME=$REGISTRY/$(echo ${GITHUB_REPOSITORY,,}) >> $GITHUB_ENV + echo COMMITED_AT=$(git show -s --format=%cI `git rev-parse HEAD`) >> $GITHUB_ENV + echo REVISION=$(git rev-parse --short HEAD) >> $GITHUB_ENV + + - name: Collect Docker image metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.IMAGE_NAME }} + labels: | + org.opencontainers.image.created=${{ env.COMMITED_AT }} + org.opencontainers.image.version=v${{ env.VERSION }} + org.opencontainers.image.maintainer=$({github.repository_owner}) + tags: | + type=semver,pattern={{version}},value=v${{ env.VERSION }} + + - name: Log in to the GitHub container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + build-args: | + VERSION=${{ env.VERSION }} + REVISION=${{ env.REVISION }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:edge + cache-to: type=inline diff --git a/README.md b/README.md index 60d6af79..a2165e9e 100644 --- a/README.md +++ b/README.md @@ -242,6 +242,8 @@ STAC Browser supports some non-standardized extensions to the STAC specification ## Docker +### Create a custom image + Building the Dockerfile without changing any build options: ```bash @@ -285,6 +287,19 @@ If you want to pass all the other arguments to `npm run build` directly, you can STAC browser is now available at `http://localhost:8080/browser` +### Use an existing image + +You can add an existing image from [Packages](https://github.com/radiantearth/stac-browser/pkgs/container/stac-browser) to your docker-compose.yml: +``` +services: + stac-browser: + image: ghcr.io/radiantearth/stac-browser:latest + ports: + - 8080:8080 + environment: + SB_catalogUrl: "https://localhost:7188" +``` + ## Contributing We are happy to review and accept Pull Requests. From e1a156a8adb1d05f97e5552a8b054190d9ad4ac8 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Mon, 15 Jan 2024 22:45:29 +0100 Subject: [PATCH 05/88] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a2165e9e..a73cfedb 100644 --- a/README.md +++ b/README.md @@ -289,7 +289,7 @@ STAC browser is now available at `http://localhost:8080/browser` ### Use an existing image -You can add an existing image from [Packages](https://github.com/radiantearth/stac-browser/pkgs/container/stac-browser) to your docker-compose.yml: +Since version 3.1.1, you can add an existing image from [Packages](https://github.com/radiantearth/stac-browser/pkgs/container/stac-browser) to your docker-compose.yml: ``` services: stac-browser: From b6f4692c44a585a1ed7cf8cd24c482aa5ffe43d8 Mon Sep 17 00:00:00 2001 From: Julia Yun Date: Tue, 6 Feb 2024 21:38:25 +1100 Subject: [PATCH 06/88] Fix sortby format for search POST #402 (#406) --- src/utils.js | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index 1ee4daf6..327dad41 100644 --- a/src/utils.js +++ b/src/utils.js @@ -243,6 +243,29 @@ export default class Utils { }).join('/'); } + static formatSortbyForPOST(value) { + // POST search requires sortby to be an array of objects containing a property name and sort direction. + // See spec here: https://api.stacspec.org/v1.0.0-rc.1/item-search/#tag/Item-Search/operation/postItemSearch + // This function converts the property name to the desired format. + const sortby = { + field: '', + direction: 'asc' + }; + + // Check if the value starts with a minus sign ("-") + if (value.startsWith('-')) { + // sort by descending order + sortby.field = value.substring(1); + sortby.direction = 'desc'; + } else { + //sort by ascending order + sortby.field = value; + } + + // Put the object in an array + return [sortby]; + } + static getPaginationLinks(data) { let pages = {}; if (Utils.isObject(data)) { @@ -284,7 +307,10 @@ export default class Utils { continue; } - if (key === 'datetime') { + if (key === 'sortby') { + value = Utils.formatSortbyForPOST(value); + } + else if (key === 'datetime') { value = Utils.formatDatetimeQuery(value); } else if (key === 'filters') { From 35d7d44be5bee43c3dee04122609c69c68923ab0 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Tue, 6 Feb 2024 11:56:21 +0100 Subject: [PATCH 07/88] Fix for Source pop up remains open #405 --- src/components/Source.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Source.vue b/src/components/Source.vue index 28243a42..39689b27 100644 --- a/src/components/Source.vue +++ b/src/components/Source.vue @@ -37,7 +37,7 @@ From 30f751f75abfafc91e068f1401be6a6a18121a4f Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 14 Feb 2024 13:02:06 +0100 Subject: [PATCH 08/88] Add funding info --- package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package.json b/package.json index e95aa874..82fe6d48 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,10 @@ "type": "git", "url": "https://github.com/radiantearth/stac-browser.git" }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/m-mohr" + }, "author": "Radiant Earth Foundation ", "contributors": [ { From ec6c40909e758c792fbffbf40fd3ce432c7f18e0 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 22 Feb 2024 15:31:57 +0100 Subject: [PATCH 09/88] Show JPEG/PNG images on map when role overview is set, regardless of whether thumbnail is set or not. --- src/components/HrefActions.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/HrefActions.vue b/src/components/HrefActions.vue index cda62f84..f730c0d3 100644 --- a/src/components/HrefActions.vue +++ b/src/components/HrefActions.vue @@ -108,7 +108,7 @@ export default { }, isThumbnail() { if (this.isAsset) { - return Array.isArray(this.data.roles) && this.data.roles.includes('thumbnail'); + return Array.isArray(this.data.roles) && this.data.roles.includes('thumbnail') && !this.data.roles.includes('overview'); } else { return this.data.rel === 'preview' && Utils.canBrowserDisplayImage(this.data); @@ -199,4 +199,4 @@ export default { } } }; - \ No newline at end of file + From 60855dcc390d7b9e2319238ca8f09c5306a18fbb Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 23 Feb 2024 15:21:24 +0100 Subject: [PATCH 10/88] s3:// links not always titled as being from "Amazon". Defaults to S3, can be customized via language file. #408 --- src/components/HrefActions.vue | 24 ++++++++++++++++++------ src/locales/de/texts.json | 5 ++++- src/locales/en/texts.json | 5 ++++- src/locales/es/texts.json | 5 ++++- src/locales/fr/texts.json | 5 ++++- src/locales/it/texts.json | 5 ++++- src/locales/ro/texts.json | 5 ++++- 7 files changed, 42 insertions(+), 12 deletions(-) diff --git a/src/components/HrefActions.vue b/src/components/HrefActions.vue index f730c0d3..7443b424 100644 --- a/src/components/HrefActions.vue +++ b/src/components/HrefActions.vue @@ -29,6 +29,7 @@ import Utils, { browserProtocols, imageMediaTypes, mapMediaTypes } from '../util import { mapGetters } from 'vuex'; import AssetActions from '../../assetActions.config'; import LinkActions from '../../linkActions.config'; +import URI from 'urijs'; export default { name: 'HrefActions', @@ -115,7 +116,7 @@ export default { } }, isGdalVfs() { - return Utils.isGdalVfsUri(this.data.href); + return Utils.isGdalVfsUri(this.href); }, href() { if (typeof this.data.href !== 'string') { @@ -129,11 +130,11 @@ export default { }, from() { if (this.isGdalVfs) { - let type = this.data.href.match(/^\/vsi([a-z\d]+)(_streaming)?\//); - return this.protocolName(type); + let type = this.href.match(/^\/vsi([a-z\d]+)(_streaming)?\//); + return this.protocolName(type, this.href); } else { - return this.protocolName(this.protocol); + return this.protocolName(this.protocol, this.href); } }, browserCanOpenFile() { @@ -168,13 +169,24 @@ export default { } }, methods: { - protocolName(protocol) { + protocolName(protocol, href = null) { if (typeof protocol !== 'string') { return ''; } switch(protocol.toLowerCase()) { case 's3': - return this.$t('protocol.s3'); + if (href) { + try { + const uri = new URI(href); + const key = `protocol.s3.${uri.domain()}`; + if (this.$te(key)) { + return this.$t(key); + } + } catch (e) { + // Fall back to the default + } + } + return this.$t('protocol.s3.default'); case 'abfs': case 'abfss': return this.$t('protocol.azure'); diff --git a/src/locales/de/texts.json b/src/locales/de/texts.json index c0176c15..fb93e42a 100644 --- a/src/locales/de/texts.json +++ b/src/locales/de/texts.json @@ -171,7 +171,10 @@ "ftp": "FTP", "gcs": "Google Cloud", "oss": "Alibaba Cloud", - "s3": "Amazon S3" + "s3": { + "default": "S3", + "amazonaws.com": "Amazon S3" + } }, "providers": { "email": "E-Mail senden", diff --git a/src/locales/en/texts.json b/src/locales/en/texts.json index 1cfd23c6..7294c26f 100644 --- a/src/locales/en/texts.json +++ b/src/locales/en/texts.json @@ -171,7 +171,10 @@ "ftp": "FTP", "gcs": "Google Cloud", "oss": "Alibaba Cloud", - "s3": "Amazon S3" + "s3": { + "default": "S3", + "amazonaws.com": "Amazon S3" + } }, "providers": { "email": "Send e-mail", diff --git a/src/locales/es/texts.json b/src/locales/es/texts.json index 269103b4..072ec0ee 100644 --- a/src/locales/es/texts.json +++ b/src/locales/es/texts.json @@ -171,7 +171,10 @@ "ftp": "FTP", "gcs": "Google Cloud", "oss": "Alibaba Cloud", - "s3": "Amazon S3" + "s3": { + "default": "S3", + "amazonaws.com": "Amazon S3" + } }, "providers": { "email": "Enviar e-mail", diff --git a/src/locales/fr/texts.json b/src/locales/fr/texts.json index fbdea90b..419bc38a 100644 --- a/src/locales/fr/texts.json +++ b/src/locales/fr/texts.json @@ -171,7 +171,10 @@ "ftp": "FTP", "gcs": "Google Cloud", "oss": "Alibaba Cloud", - "s3": "Amazon S3" + "s3": { + "default": "S3", + "amazonaws.com": "Amazon S3" + } }, "providers": { "email": "Envoyer un courriel", diff --git a/src/locales/it/texts.json b/src/locales/it/texts.json index 8def86d9..f6f05b13 100644 --- a/src/locales/it/texts.json +++ b/src/locales/it/texts.json @@ -171,7 +171,10 @@ "ftp": "FTP", "gcs": "Google Cloud", "oss": "Alibaba Cloud", - "s3": "Amazon S3" + "s3": { + "default": "S3", + "amazonaws.com": "Amazon S3" + } }, "providers": { "email": "Invia e-mail", diff --git a/src/locales/ro/texts.json b/src/locales/ro/texts.json index 835f8c2a..bd81ab8f 100644 --- a/src/locales/ro/texts.json +++ b/src/locales/ro/texts.json @@ -165,7 +165,10 @@ "ftp": "FTP", "gcs": "Google Cloud", "oss": "Alibaba Cloud", - "s3": "Amazon S3" + "s3": { + "default": "S3", + "amazonaws.com": "Amazon S3" + } }, "providers": { "email": "Trimite un email", From 65056ac879949fd88d9c72404f3b19b1c834bbec Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 7 Mar 2024 22:31:08 +0100 Subject: [PATCH 11/88] Fix acending -> ascending --- src/locales/en/texts.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locales/en/texts.json b/src/locales/en/texts.json index 7294c26f..dc8c4048 100644 --- a/src/locales/en/texts.json +++ b/src/locales/en/texts.json @@ -251,7 +251,7 @@ "sort": { "asc": { "label": "Ascending", - "title": "Sort in acending order (A-Z)" + "title": "Sort in ascending order (A-Z)" }, "desc": { "label": "Descending", From 9561db7b2549d7fe0696295f9a0d00c5230a0287 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 7 Mar 2024 22:35:45 +0100 Subject: [PATCH 12/88] Clarify what we filter by --- src/components/Catalogs.vue | 10 +++++----- src/locales/de/texts.json | 1 + src/locales/en/texts.json | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/Catalogs.vue b/src/components/Catalogs.vue index b520b44e..ae00e108 100644 --- a/src/components/Catalogs.vue +++ b/src/components/Catalogs.vue @@ -6,7 +6,7 @@ - + {{ $t('catalogs.noMatches') }}
@@ -102,6 +102,9 @@ export default { isComplete() { return !this.hasMore && !this.showPagination; }, + filterPlaceholder() { + return this.isComplete ? this.$t('catalogs.filterByTitleAndMore') : this.$t('catalogs.filterByTitle'); + }, showPagination() { // Check whether any pagination links are available return Object.values(this.pagination).some(link => !!link); @@ -118,15 +121,12 @@ export default { if (this.searchTerm) { catalogs = catalogs.filter(catalog => { let haystack = [ catalog.title ]; - if (catalog instanceof STAC) { + if (catalog instanceof STAC && this.isComplete) { haystack.push(catalog.id); if (Array.isArray(catalog.keywords)) { haystack = haystack.concat(catalog.keywords); } } - else { - haystack.push(catalog.href); - } return Utils.search(this.searchTerm, haystack); }); } diff --git a/src/locales/de/texts.json b/src/locales/de/texts.json index fb93e42a..93546f69 100644 --- a/src/locales/de/texts.json +++ b/src/locales/de/texts.json @@ -47,6 +47,7 @@ }, "catalogs": { "filterByTitle": "Kataloge anhand des Titels filtern", + "filterByTitleAndMore": "Kataloge anhand von Titel, Beschreibung oder Schlüsselwörtern filtern", "loadMore": "Lade mehr...", "noMatches": "Keiner der Kataloge entspricht den Suchkriterien." }, diff --git a/src/locales/en/texts.json b/src/locales/en/texts.json index dc8c4048..8e2bb17d 100644 --- a/src/locales/en/texts.json +++ b/src/locales/en/texts.json @@ -47,6 +47,7 @@ }, "catalogs": { "filterByTitle": "Filter catalogs by title", + "filterByTitleAndMore": "Filter catalogs by title, description or keywords", "loadMore": "Load more...", "noMatches": "No catalogs match the given search criteria." }, From 5263cd7fb282dc293de806faa566a298dcd28329 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 7 Mar 2024 23:10:12 +0100 Subject: [PATCH 13/88] Allow to show keywords in cards --- config.js | 2 ++ docs/options.md | 10 ++++++++++ src/components/Catalog.vue | 13 +++++++++++-- src/components/Item.vue | 13 +++++++++++-- src/components/Keywords.vue | 28 ++++++++++++++++++---------- src/views/Catalog.vue | 2 +- src/views/Item.vue | 2 +- 7 files changed, 54 insertions(+), 16 deletions(-) diff --git a/config.js b/config.js index d11922fd..2ab5d908 100644 --- a/config.js +++ b/config.js @@ -28,6 +28,8 @@ module.exports = { historyMode: "history", cardViewMode: "cards", cardViewSort: "asc", + showKeywordsInItemCards: false, + showKeywordsInCatalogCards: false, showThumbnailsAsAssets: false, stacLint: true, geoTiffResolution: 128, diff --git a/docs/options.md b/docs/options.md index 8be02d27..d959f355 100644 --- a/docs/options.md +++ b/docs/options.md @@ -36,6 +36,8 @@ The following ways to set config options are possible: * [maxPreviewsOnMap](#maxpreviewsonmap) * [cardViewMode](#cardviewmode) * [cardViewSort](#cardviewsort) +* [showKeywordsInItemCards](#showkeywordsinitemcards) +* [showKeywordsInCatalogCards](#showkeywordsincatalogcards) * [showThumbnailsAsAssets](#showthumbnailsasassets) * [defaultThumbnailSize](#defaultthumbnailsize) * [crossOriginMedia](#crossoriginmedia) @@ -244,6 +246,14 @@ The default sorting for lists of catalogs/collections or items. One of: - `"desc"`: descending sort - `null`: sorted as in the source files +## showKeywordsInItemCards + +Enables keywords in the lists of items if set to `true`. Defaults to `false`. + +## showKeywordsInCatalogCards + +Enables keywords in the lists of catalogs/collections if set to `true`. Defaults to `false`. + ## showThumbnailsAsAssets Defines whether thumbnails are shown in the lists of assets (`true`, default) or not. diff --git a/src/components/Catalog.vue b/src/components/Catalog.vue index 2db61511..c6774519 100644 --- a/src/components/Catalog.vue +++ b/src/components/Catalog.vue @@ -10,6 +10,7 @@ {{ format | formatMediaType }} {{ data.description | summarize }} + @@ -19,7 +20,7 @@ \ No newline at end of file + diff --git a/src/views/Catalog.vue b/src/views/Catalog.vue index c7617af2..5a7ea23c 100644 --- a/src/views/Catalog.vue +++ b/src/views/Catalog.vue @@ -9,7 +9,7 @@ - + From 9e03ecc873d6223599d5eeb7f922ac183870ccc7 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 8 Mar 2024 00:20:53 +0100 Subject: [PATCH 14/88] Add filter for keywords in catalog overview --- src/components/Catalogs.vue | 92 +++++++++++++++++++++++++++------ src/components/SearchBox.vue | 10 ++-- src/components/SearchFilter.vue | 54 ++----------------- src/locales/de/texts.json | 3 +- src/locales/en/texts.json | 1 + src/theme/page.scss | 55 +++++++++++++++++++- 6 files changed, 142 insertions(+), 73 deletions(-) diff --git a/src/components/Catalogs.vue b/src/components/Catalogs.vue index ae00e108..0adeb4bf 100644 --- a/src/components/Catalogs.vue +++ b/src/components/Catalogs.vue @@ -6,9 +6,19 @@ - +
+ + +
- {{ $t('catalogs.noMatches') }} + {{ $t('catalogs.noMatches') }}
@@ -39,7 +49,8 @@ export default { Loading, Pagination: () => import('./Pagination.vue'), SearchBox: () => import('./SearchBox.vue'), - SortButtons: () => import('./SortButtons.vue') + SortButtons: () => import('./SortButtons.vue'), + Multiselect: () => import('vue-multiselect') }, mixins: [ ViewMixin @@ -73,7 +84,8 @@ export default { data() { return { searchTerm: '', - sort: 0 + sort: 0, + selectedKeywords: [] }; }, computed: { @@ -109,25 +121,40 @@ export default { // Check whether any pagination links are available return Object.values(this.pagination).some(link => !!link); }, + allCatalogs() { + return this.catalogs.map(catalog => { + let stac = this.getStac(catalog); + return stac ? stac : catalog; + }); + }, + hasSearchCritera() { + return this.searchTerm || this.selectedKeywords.length > 0; + }, catalogView() { if (this.hasMore) { return this.catalogs; } - let catalogs = this.catalogs.map(catalog => { - let stac = this.getStac(catalog); - return stac ? stac : catalog; - }); // Filter - if (this.searchTerm) { + let catalogs = this.allCatalogs; + if (this.hasSearchCritera) { catalogs = catalogs.filter(catalog => { - let haystack = [ catalog.title ]; - if (catalog instanceof STAC && this.isComplete) { - haystack.push(catalog.id); - if (Array.isArray(catalog.keywords)) { - haystack = haystack.concat(catalog.keywords); + if (this.selectedKeywords.length > 0 && catalog instanceof STAC && Array.isArray(catalog.keywords)) { + let hasKeywords = this.selectedKeywords.every(keyword => catalog.keywords.includes(keyword)); + if (!hasKeywords) { + return false; + } + } + if (this.searchTerm) { + let haystack = [ catalog.title ]; + if (catalog instanceof STAC && this.isComplete) { + haystack.push(catalog.id); + if (Array.isArray(catalog.keywords)) { + haystack = haystack.concat(catalog.keywords); + } } + return Utils.search(this.searchTerm, haystack); } - return Utils.search(this.searchTerm, haystack); + return true; }); } // Sort @@ -138,6 +165,22 @@ export default { } } return catalogs; + }, + allKeywords() { + if (!this.isComplete) { + return []; + } + let keywords = []; + for(let catalog of this.allCatalogs) { + if (catalog instanceof STAC && Array.isArray(catalog.keywords)) { + for(let keyword of catalog.keywords) { + if (!keywords.includes(keyword)) { + keywords.push(keyword); + } + } + } + } + return keywords.sort(); } }, created() { @@ -157,7 +200,26 @@ export default { Utils.scrollTo(this.$refs.topPagination.$el); } this.$emit('paginate', link); + }, + limitText(count) { + return this.$t("multiselect.andMore", {count}); } } }; + + diff --git a/src/components/SearchBox.vue b/src/components/SearchBox.vue index 51fcf53d..63aeb067 100644 --- a/src/components/SearchBox.vue +++ b/src/components/SearchBox.vue @@ -42,13 +42,14 @@ export default { \ No newline at end of file + diff --git a/src/components/SearchFilter.vue b/src/components/SearchFilter.vue index c359eb8b..9fa4a3ee 100644 --- a/src/components/SearchFilter.vue +++ b/src/components/SearchFilter.vue @@ -580,8 +580,6 @@ export default { }; - - \ No newline at end of file + diff --git a/src/components/AssetAlternative.vue b/src/components/AssetAlternative.vue new file mode 100644 index 00000000..173b8399 --- /dev/null +++ b/src/components/AssetAlternative.vue @@ -0,0 +1,95 @@ + + + diff --git a/src/locales/de/texts.json b/src/locales/de/texts.json index bb0ba166..17f25d5b 100644 --- a/src/locales/de/texts.json +++ b/src/locales/de/texts.json @@ -8,6 +8,9 @@ "title": "Anonymisiert" }, "assets": { + "alternate": { + "main": "Bevorzugt" + }, "copyGdalVfsUrl": { "generic": "Kopiere GDAL VFS Adresse", "withSource": "Kopiere GDAL VFS Adresse für {source}" diff --git a/src/locales/en/texts.json b/src/locales/en/texts.json index 963e064c..002d9b59 100644 --- a/src/locales/en/texts.json +++ b/src/locales/en/texts.json @@ -8,6 +8,9 @@ "title": "Anonymized" }, "assets": { + "alternate": { + "main": "Preferred" + }, "copyGdalVfsUrl": { "generic": "Copy GDAL VFS URL", "withSource": "Copy GDAL VFS URL for {source}" From 0baf1176f70d189da53b81b30e07fb4419a9e4f1 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 15 Mar 2024 01:49:11 +0100 Subject: [PATCH 17/88] No local variables #400 (#401) --- docker/docker-entrypoint.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index d38acc13..4cc2a331 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -1,17 +1,18 @@ # echo a string, handling different types safe_echo() { - local value="$1" - if [ -z "$value" ]; then + # $1 = value + if [ -z "$1" ]; then echo -n "null" - elif printf '%s\n' "$value" | grep -qE '\n.+\n$'; then - echo -n "\`$value\`" + elif printf '%s\n' "$1" | grep -qE '\n.+\n$'; then + echo -n "\`$1\`" else - echo -n "'$value'" + echo -n "'$1'" fi } # handle boolean bool() { + # $1 = value case "$1" in true | TRUE | yes | t | True) echo -n true ;; @@ -25,17 +26,17 @@ bool() { # handle array values array() { - local value="$1" - local arraytype="$2" - if [ -z "$value" ]; then + # $1 = value + # $2 = arraytype + if [ -z "$1" ]; then echo -n "[]" else - case "$arraytype" in + case "$2" in string) - echo -n "['$(echo "$value" | sed "s/,/', '/g")']" + echo -n "['$(echo "$1" | sed "s/,/', '/g")']" ;; *) - echo -n "[$value]" + echo -n "[$1]" ;; esac fi @@ -43,11 +44,11 @@ array() { # handle object values object() { - local value="$1" - if [ -z "$value" ]; then + # $1 = value + if [ -z "$1" ]; then echo -n "null" else - echo -n "$value" + echo -n "$1" fi } From c4b347402fcd546c8f83e1dce066466fdaeaf1c4 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 15 Mar 2024 12:31:24 +0100 Subject: [PATCH 18/88] Deprecate stacLint option --- docs/options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/options.md b/docs/options.md index d959f355..ce9d30f0 100644 --- a/docs/options.md +++ b/docs/options.md @@ -117,7 +117,7 @@ I'd need help to test support for right-to-left languages. ## stacLint -***experimental*** +**deprecated** Enables or disables a feature that validates the STAC catalog when opening the "Source Data" popup. Validation uses the external service [staclint.com](https://staclint.com). From 7ef89dc22773b4063d94cbc5b6d440152abd2f2d Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 15 Mar 2024 14:05:40 +0100 Subject: [PATCH 19/88] Fix order in l10n files (#413) --- src/locales/es/fields.json | 4 ++-- src/locales/fr/fields.json | 4 ++-- src/locales/it/fields.json | 4 ++-- src/locales/ro/fields.json | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/locales/es/fields.json b/src/locales/es/fields.json index 587005f4..d1f61897 100644 --- a/src/locales/es/fields.json +++ b/src/locales/es/fields.json @@ -46,8 +46,8 @@ "Average spatial resolution": "Resolución espacial promedio", "Axis": "Eje", "Azimuth Looks": "Vista Acimutal", - "Azimuth Resolution": "Resolución Acimutal", "Azimuth Pixel Spacing": "Distancia Acimutal entre Pixels", + "Azimuth Resolution": "Resolución Acimutal", "Back-End Version": "Versión del Back-End", "Bands": "Bandas", "Based on IANA relation types": "Basado en tipos de relación IANA", @@ -211,6 +211,7 @@ "Language": "Idioma", "Latest version": "Última versión", "Latitude Band": "Banda de latitud", + "Layers": "Capas", "Level": "Nivel", "Level 0 column cell": "Nivel 0 columna de la celda", "Level 0 row cell": "Nivel 0 fila de la celda", @@ -467,7 +468,6 @@ "Vocabulary": "Vocabulario", "W/m²/μm": "W/m²/μm", "WKT2": "WKT2", - "Layers": "Capas", "WRS Path": "Columna (Path) WRS", "WRS Row": "Fila (Row) WRS", "WRS Type": "Tipo de WRS", diff --git a/src/locales/fr/fields.json b/src/locales/fr/fields.json index 068f3b13..aaa9f01f 100644 --- a/src/locales/fr/fields.json +++ b/src/locales/fr/fields.json @@ -46,8 +46,8 @@ "Average spatial resolution": "Résolution spatiale moyenne", "Axis": "Axe", "Azimuth Looks": "Azimut de visées", - "Azimuth Resolution": "Résolution en azimut", "Azimuth Pixel Spacing": "Espacement de pixel en azimut", + "Azimuth Resolution": "Résolution en azimut", "Back-End Version": "Version du système dorsal", "Bands": "Bandes", "Based on IANA relation types": "Basé sur les types de relations de l'IANA", @@ -212,6 +212,7 @@ "Language": "Langue", "Latest version": "Dernière version", "Latitude Band": "Bande de latitude", + "Layers": "Couches", "Level": "Niveau", "Level 0 column cell": "Niveau 0 de la colonne de la cellule", "Level 0 row cell": "Niveau 0 de la colonne de la cellule", @@ -469,7 +470,6 @@ "Vocabulary": "Vocabulaire", "W/m²/μm": "W/m²/μm", "WKT2": "WKT2", - "Layers": "Couches", "WRS Path": "Chemin WRS", "WRS Row": "Ligne WRS", "WRS Type": "Type WRS", diff --git a/src/locales/it/fields.json b/src/locales/it/fields.json index fcc82b56..4e7f7583 100644 --- a/src/locales/it/fields.json +++ b/src/locales/it/fields.json @@ -46,8 +46,8 @@ "Average spatial resolution": "Risoluzione spaziale media", "Axis": "Asse", "Azimuth Looks": "Viste (looks) azimutali", - "Azimuth Resolution": "Risoluzione azimutale", "Azimuth Pixel Spacing": "Spaziatura dei pixel in azimut", + "Azimuth Resolution": "Risoluzione azimutale", "Back-End Version": "Versione del back-end", "Bands": "Bande", "Based on IANA relation types": "Basato sui tipi di relazioni IANA", @@ -212,6 +212,7 @@ "Language": "Lingua", "Latest version": "Ultima versione", "Latitude Band": "Banda di latitudine", + "Layers": "Layers", "Level": "Livello", "Level 0 column cell": "Livello 0 della colonna delle cella", "Level 0 row cell": "Livello 0 della riga della cella", @@ -468,7 +469,6 @@ "Vocabulary": "Vocabolario", "W/m²/μm": "W/m²/μm", "WKT2": "WKT2", - "Layers": "Layers", "WRS Path": "Percorso (path) WRS", "WRS Row": "Riga WRS", "WRS Type": "Tipo WRS", diff --git a/src/locales/ro/fields.json b/src/locales/ro/fields.json index fedba59c..e180c6ac 100644 --- a/src/locales/ro/fields.json +++ b/src/locales/ro/fields.json @@ -45,8 +45,8 @@ "Average spatial resolution": "Rezoluție spațialămedie", "Axis": "Axă", "Azimuth Looks": "Azimutul obiectivelor", - "Azimuth Resolution": "Rezoluție azimutală", "Azimuth Pixel Spacing": "Spațierea pixelilor la azimut", + "Azimuth Resolution": "Rezoluție azimutală", "Back-End Version": "Versiune backend", "Bands": "Benzi", "Based on IANA relation types": "Pe baza tipurilor de relații IANA", @@ -203,6 +203,7 @@ "Language": "Limbă", "Latest version": "Ultima versiune", "Latitude Band": "Banda de latitudine", + "Layers": "Straturi", "Level": "Nivel", "Level 0 column cell": "Nivelul 0 al coloanei celulii", "Level 0 row cell": "Nivelul 0 al rândului celulii", @@ -437,7 +438,6 @@ "Visualizations": "Vizualizări", "W/m²/μm": "W/m²/μm", "WKT2": "WKT2", - "Layers": "Straturi", "WRS Path": "Coloană WRS", "WRS Row": "Rând WRS", "WRS Type": "Tip WRS", From bfcf48fd8548a0de56b0aec9cafe19317cff630c Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 15 Mar 2024 14:07:49 +0100 Subject: [PATCH 20/88] Add en-GB locales (#410) --- config.js | 1 + src/locales/en-GB/config.json | 4 ++++ src/locales/en-GB/datepicker.js | 4 ++++ src/locales/en-GB/default.js | 8 ++++++++ src/locales/en-GB/duration.js | 2 ++ src/locales/en-GB/fields.json | 27 +++++++++++++++++++++++++++ src/locales/en-GB/texts.json | 21 +++++++++++++++++++++ 7 files changed, 67 insertions(+) create mode 100644 src/locales/en-GB/config.json create mode 100644 src/locales/en-GB/datepicker.js create mode 100644 src/locales/en-GB/default.js create mode 100644 src/locales/en-GB/duration.js create mode 100644 src/locales/en-GB/fields.json create mode 100644 src/locales/en-GB/texts.json diff --git a/config.js b/config.js index 2ab5d908..efcca14e 100644 --- a/config.js +++ b/config.js @@ -12,6 +12,7 @@ module.exports = { // "de-CH", "es", "en", +// "en-GB", "fr", // "fr-CA", // "fr-CH", diff --git a/src/locales/en-GB/config.json b/src/locales/en-GB/config.json new file mode 100644 index 00000000..b45c3125 --- /dev/null +++ b/src/locales/en-GB/config.json @@ -0,0 +1,4 @@ +{ + "native": "English (UK)", + "global": "English (UK)" +} diff --git a/src/locales/en-GB/datepicker.js b/src/locales/en-GB/datepicker.js new file mode 100644 index 00000000..72c9bec3 --- /dev/null +++ b/src/locales/en-GB/datepicker.js @@ -0,0 +1,4 @@ +const format = 'DD/MM/YYYY'; +const locale = import('vue2-datepicker/locale/en'); +locale.formatLocale.firstDayOfWeek = 1; +export default {format, locale}; diff --git a/src/locales/en-GB/default.js b/src/locales/en-GB/default.js new file mode 100644 index 00000000..da27b39b --- /dev/null +++ b/src/locales/en-GB/default.js @@ -0,0 +1,8 @@ +import Utils from '../../utils'; +export default Utils.mergeDeep( + { + fields: require('./fields.json') + }, + require('./texts.json'), + require('../en/custom.json') +); diff --git a/src/locales/en-GB/duration.js b/src/locales/en-GB/duration.js new file mode 100644 index 00000000..84d16e1e --- /dev/null +++ b/src/locales/en-GB/duration.js @@ -0,0 +1,2 @@ +import { en as locale } from '@musement/iso-duration'; +export default locale; diff --git a/src/locales/en-GB/fields.json b/src/locales/en-GB/fields.json new file mode 100644 index 00000000..17078805 --- /dev/null +++ b/src/locales/en-GB/fields.json @@ -0,0 +1,27 @@ +{ + "Anonymized Location": "Anonymised Location", + "Center Frequency": "Centre Frequency", + "Cloud Cover": "Cloud Cover", + "Cloud Storage": "Cloud Storage", + "Cloud-Optimized GeoTIFF image": "Cloud-Optimised GeoTIFF image", + "Cloud-Optimized Point Cloud (LASzip)": "Cloud-Optimised Point Cloud (LASzip)", + "Color": "Colour", + "Finalized": "Finalised", + "Grayscale with relief": "Greyscale with relief", + "Grayscale without relief": "Greyscale without relief", + "Instruments": "Instruments", + "Internationalization / Localization": "Internationalisation / Localisation", + "License": "Licence", + "Normalized Radar Backscatter (SAR)": "Normalised Radar Backscatter (SAR)", + "Organization": "Organisation", + "Parent STAC Catalog": "Parent STAC Catalogue", + "Point (at pixel center)": "Point (at pixel centre)", + "Polarizations": "Polarisations", + "RGB color with relief": "RGB colour with relief", + "RGB color without relief": "RGB colour without relief", + "Root STAC Catalog": "Root STAC Catalogue", + "The center wavelength of the band": "The centre wavelength of the band", + "The size of one side of the anonymized bounding box": "The size of one side of the anonymised bounding box", + "Visualization": "Visualisation", + "Visualizations": "Visualisations" +} diff --git a/src/locales/en-GB/texts.json b/src/locales/en-GB/texts.json new file mode 100644 index 00000000..43e5b912 --- /dev/null +++ b/src/locales/en-GB/texts.json @@ -0,0 +1,21 @@ +{ + "anonymized": { + "title": "Anonymised" + }, + "catalogs": { + "filterByTitle": "Filter catalogues by title", + "filterByTitleAndMore": "Filter catalogues by title, description or keywords", + "noMatches": "No catalogues match the given search criteria." + }, + "errors": { + "noExternalAccess": "Accessing external catalogues is not allowed!" + }, + "index": { + "catalog": "Catalogue", + "specifyCatalog": "Please specify a STAC Catalogue or API..." + }, + "sidebar": { + "switchCatalog": "Switch Catalogue" + }, + "stacCatalog": "Catalogue | Catalogues" +} From 275b466d0cbfd6130ab7fee58af52e5d5a1e4bc2 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 15 Mar 2024 15:05:49 +0100 Subject: [PATCH 21/88] JS-based validation with results / remove stacLint (#412) * JS-based validation with results #307 --- README.md | 1 - config.js | 1 - config.schema.json | 5 -- docs/options.md | 13 --- package.json | 1 + src/StacBrowser.vue | 12 +-- src/components/ErrorAlert.vue | 4 +- src/components/SearchFilter.vue | 4 +- src/components/Source.vue | 43 ++------- src/components/StacHeader.vue | 29 +++++- src/components/Validation.vue | 73 +++++++++++++++ src/components/ValidationResult.vue | 132 ++++++++++++++++++++++++++++ src/locales/de/texts.json | 22 +++-- src/locales/en/texts.json | 20 ++++- src/router/index.js | 36 ++++---- src/store/index.js | 19 ---- src/views/Browse.vue | 112 ++--------------------- src/views/BrowseMixin.js | 111 +++++++++++++++++++++++ src/views/Validation.vue | 116 ++++++++++++++++++++++++ 19 files changed, 532 insertions(+), 222 deletions(-) create mode 100644 src/components/Validation.vue create mode 100644 src/components/ValidationResult.vue create mode 100644 src/views/BrowseMixin.js create mode 100644 src/views/Validation.vue diff --git a/README.md b/README.md index bc6ad841..be7d6ca4 100644 --- a/README.md +++ b/README.md @@ -231,7 +231,6 @@ You need to provide a field `stac_browser` and then you can set any of the follo - `defaultThumbnailSize` - `displayGeoTiffByDefault` - `showThumbnailsAsAssets` -- `stacLint` (can only be disabled) ### Custom extensions diff --git a/config.js b/config.js index efcca14e..ca88861b 100644 --- a/config.js +++ b/config.js @@ -32,7 +32,6 @@ module.exports = { showKeywordsInItemCards: false, showKeywordsInCatalogCards: false, showThumbnailsAsAssets: false, - stacLint: true, geoTiffResolution: 128, redirectLegacyUrls: false, itemsPerPage: 12, diff --git a/config.schema.json b/config.schema.json index add6bfd4..cad1a643 100644 --- a/config.schema.json +++ b/config.schema.json @@ -152,11 +152,6 @@ "boolean" ] }, - "stacLint": { - "type": [ - "boolean" - ] - }, "geoTiffResolution": { "type": [ "integer" diff --git a/docs/options.md b/docs/options.md index ce9d30f0..9e1f3cff 100644 --- a/docs/options.md +++ b/docs/options.md @@ -24,7 +24,6 @@ The following ways to set config options are possible: * [locale](#locale) * [fallbackLocale](#fallbacklocale) * [supportedLocales](#supportedlocales) -* [stacLint](#staclint) * [historyMode](#historymode) * [pathPrefix](#pathprefix) * [stacProxyUrl](#stacproxyurl) @@ -115,18 +114,6 @@ In CLI, please provide the languages separated by a space, e.g. `--supportedLoca Please note that only left-to-right languages have been tested. I'd need help to test support for right-to-left languages. -## stacLint - -**deprecated** - -Enables or disables a feature that validates the STAC catalog when opening the "Source Data" popup. -Validation uses the external service [staclint.com](https://staclint.com). - -Validation is automatically disabled in the following cases: -- the host of a catalog is `localhost`, `127.0.0.1` or `::1` -- [private query parameters](../README.md#private-query-parameters) have been set -- `stacProxyUrl` is set - ## historyMode ***build-only option*** diff --git a/package.json b/package.json index 0c4e76af..df2d3e8e 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "node-polyfill-webpack-plugin": "^2.0.0", "remove-markdown": "^0.5.0", "stac-layer": "^0.15.0", + "stac-node-validator": "^2.0.0-beta.6", "urijs": "^1.19.11", "v-clipboard": "^3.0.0-next.1", "vue": "^2.6.12", diff --git a/src/StacBrowser.vue b/src/StacBrowser.vue index f516c71e..666f8ee7 100644 --- a/src/StacBrowser.vue +++ b/src/StacBrowser.vue @@ -1,7 +1,7 @@