Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion src/components/LayerChooser/LayerChooser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,23 @@
{{ selected ? 'mdi-clock-time-three' : 'mdi-clock-time-three-outline' }}
</v-icon>
</v-col>
<v-col class="ml-n5">
<v-tooltip
v-if="nonDownloadableLayers.includes(item.id)"
top
>
<template #activator="{ on, attrs }">
<v-icon
color="red"
v-bind="attrs"
v-on="on"
style="cursor: help;"
>
mdi-download-off
</v-icon>
</template>
</v-tooltip>
</v-col>
<v-col>
<v-icon v-if="item.layer">
{{ selected ? 'mdi-layers' : 'mdi-layers-outline' }}
Expand Down Expand Up @@ -158,7 +175,14 @@
computed: {
...mapGetters('app', [ 'viewerConfig', 'viewerName', 'viewerPrivacyStatement' ]),
...mapGetters('data', [ 'displayLayers', 'openedFolders' ]),
...mapGetters('map', [ 'activeFlattenedLayerIds' ]),
...mapGetters('map', [ 'activeFlattenedLayerIds', 'activeFlattenedLayers' ]),

nonDownloadableLayers() {
return this.activeFlattenedLayers
.filter(layer => layer.dataServiceType === 'Unknown')
.map(layer => layer.id)
},

layersWithParents() {
if (!this.searchString) {
return addParentIdToLayers(this.displayLayers);
Expand Down
6 changes: 3 additions & 3 deletions src/lib/get-capabilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@


const getTags = (tagName) => root =>
[ ...root ]
root ? [ ...root ]
.map(el => [ ...el.getElementsByTagName(tagName) ])
.flat()
.flat() : []

const getChildTags = (tagName) => root =>
[ ...root ]
Expand Down Expand Up @@ -73,10 +73,10 @@
try {
const res = await axios.get(url, { validateStatus: () => true })
if (res.status >= 200 && res.status < 300) {
console.log(`[Handled] ${ type.toUpperCase() } detected successfully: ${ url }`)

Check warning on line 76 in src/lib/get-capabilities.js

View workflow job for this annotation

GitHub Actions / deploy-application (nl2120, 1f6372f6-c532-4e0e-bba7-dee08678d518)

Unexpected console statement

Check warning on line 76 in src/lib/get-capabilities.js

View workflow job for this annotation

GitHub Actions / deploy-application (openearth-rws-viewer, 119b8ff3-5b22-4995-b43b-b31f21ba77c3)

Unexpected console statement

Check warning on line 76 in src/lib/get-capabilities.js

View workflow job for this annotation

GitHub Actions / deploy-application (openearth-data-viewer, 1785f3f6-b4cf-42de-bea6-b57d48a5c664)

Unexpected console statement
return res.data
} else if (res.status === 404) {
console.log(`[Handled] ${ type.toUpperCase() } check failed with 404: ${ url }`)

Check warning on line 79 in src/lib/get-capabilities.js

View workflow job for this annotation

GitHub Actions / deploy-application (nl2120, 1f6372f6-c532-4e0e-bba7-dee08678d518)

Unexpected console statement

Check warning on line 79 in src/lib/get-capabilities.js

View workflow job for this annotation

GitHub Actions / deploy-application (openearth-rws-viewer, 119b8ff3-5b22-4995-b43b-b31f21ba77c3)

Unexpected console statement

Check warning on line 79 in src/lib/get-capabilities.js

View workflow job for this annotation

GitHub Actions / deploy-application (openearth-data-viewer, 1785f3f6-b4cf-42de-bea6-b57d48a5c664)

Unexpected console statement
} else {
console.log(`[Handled] ${ type.toUpperCase() } check failed with status ${ res.status }: ${ url }`)
}
Expand Down Expand Up @@ -268,7 +268,7 @@
if (!keywords.length) {

keywords = pipe(
() => [ capabilities.querySelector('KeywordList') ],
() => [ capabilities.querySelector('KeywordList') ].filter(Boolean),
getTags('Keyword'),
map(getTagContent),
)()
Expand Down
10 changes: 6 additions & 4 deletions src/views/DownloadGeoserver.vue
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,12 @@
},

activeLayersList() {
return this.activeFlattenedLayers.map(({ id, name }) => ({
text: name,
value: id,
}))
return this.activeFlattenedLayers
.filter(layer => layer.dataServiceType && layer.dataServiceType !== 'Unknown')
.map(({ id, name }) => ({
text: name,
value: id,
}))
},

selectedLayerData() {
Expand Down
Loading