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
4 changes: 2 additions & 2 deletions web/client/epics/featuregrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ import { MapLibraries } from '../utils/MapTypeUtils';

const setupDrawSupport = (state, original) => {
const defaultFeatureProj = getDefaultFeatureProjection();
const geomType = findGeometryProperty(describeSelector(state)).localType;
const geomType = findGeometryProperty(describeSelector(state))?.localType;
const drawOptions = {
featureProjection: defaultFeatureProj,
stopAfterDrawing: MapUtils.isSimpleGeomType(geomType),
Expand Down Expand Up @@ -478,7 +478,7 @@ export const enableGeometryFilterOnEditMode = (action$, store) =>
.switchMap(() => {
const currentFilter = find(getAttributeFilters(store.getState()), f => f.type === 'geometry') || {};
return currentFilter.value ? Rx.Observable.empty() : Rx.Observable.of(updateFilter({
attribute: findGeometryProperty(describeSelector(store.getState())).name,
attribute: findGeometryProperty(describeSelector(store.getState()))?.name,
enabled: true,
type: "geometry"
}));
Expand Down
10 changes: 10 additions & 0 deletions web/client/epics/layerdownload.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,16 @@ export const fetchFormatsWFSDownload = (action$) =>
return getLayerWFSCapabilities(action)
.map((data) => {
return updateFormats(hasOutputFormat(data));
})
.catch((e) => {
return Rx.Observable.of(
updateFormats([]),
error({
error: e,
title: "layerdownload.error.title",
message: "layerdownload.error.fetchFormatsFailed"
})
);
});
});
export const startFeatureExportDownload = (action$, store) =>
Expand Down
1 change: 1 addition & 0 deletions web/client/plugins/FeatureEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ import {isViewportFilterActive} from "../selectors/featuregrid";
* @prop {boolean} cfg.useUTCOffset avoid using UTC dates in attribute table and datetime editor, should be kept consistent with dateFormats
* @prop {object} cfg.dateFormats Allows to specify custom date formats ( in [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format) to use to display dates in the table. `date` `date-time` and `time` are the supported entries for the date format. Example:
* @prop {boolean} cfg.showPopoverSync default false. Hide the popup of map sync if false, shows the popup of map sync if true
* @prop {boolean} cfg.resizable default true. Enable resizable feature grid.
* ```
* "dateFormats": {
* "date-time": "MM DD YYYY - HH:mm:ss",
Expand Down
15 changes: 9 additions & 6 deletions web/client/plugins/featuregrid/hoc/withResize.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import './style.less';
* @returns {React.Component} A component wrapped in a resizable div
*
* Props:
* @prop {boolean} hasNoGeometry - When true, disables resize functionality.
* If true, the wrapped component is rendered to fill the available height without resize functionality.
* @prop {boolean} resizable - When true, enables resize functionality.
* If false, the wrapped component is rendered to fill the available height without resize functionality.
* @prop {number} defaultHeight - Initial height in pixels (default: 300)
* @prop {number} minHeight - Minimum height in pixels (default: 75)
* @prop {number} maxHeight - Maximum height in pixels (default: 70% of the window inner height)
*/
const withResize = (Component) => {
return (props) => {
const { hasNoGeometry, defaultHeight = 300, minHeight = 75, maxHeight = '70%' } = props;
const { resizable = true, defaultHeight = 300, minHeight = 75, maxHeight = '70%' } = props;
const [height, setHeight] = useState(defaultHeight);
const [isResizing, setIsResizing] = useState(false);
const containerRef = useRef(null);
Expand Down Expand Up @@ -58,10 +58,13 @@ const withResize = (Component) => {
startHeightRef.current = height;
};

// If hasNoGeometry is true, render the component without the resize container
if (hasNoGeometry && typeof hasNoGeometry === 'boolean') {
// If resizable is false, render the component without the resize container
if (!resizable) {
return (
<div className="ms-featuregrid-fill">
<div
className="ms-featuregrid-container"
style={{ minHeight: `${defaultHeight}px` }}
>
<Component {...props} />
</div>
);
Expand Down
6 changes: 0 additions & 6 deletions web/client/themes/default/less/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,6 @@
.ms-map-viewer-layout {
.ms-map-viewer-layout-body {
z-index: 0;
&:has(.ms-featuregrid-fill) {
.ms-map-viewer-layout-bottom,
.ms-featuregrid-fill {
height: 100%;
}
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.da-DK.json
Original file line number Diff line number Diff line change
Expand Up @@ -1998,7 +1998,8 @@
"title": "Fejl under eksport",
"invalidOutputFormat": "Det valgte eksportformat er ikke tilgængeligt",
"downloadEstimatorTitle": "DownloadEstimator-fejl",
"downloadEstimatorFailed": "DownloadEstimator-anmodningen mislykkedes, hvilket betyder, at den eksporterede fil overstiger konfigurerede servergrænser. Prøv at ændre downloadindstillinger eller tilføj et filter til dit lag og prøv igen."
"downloadEstimatorFailed": "DownloadEstimator-anmodningen mislykkedes, hvilket betyder, at den eksporterede fil overstiger konfigurerede servergrænser. Prøv at ændre downloadindstillinger eller tilføj et filter til dit lag og prøv igen.",
"fetchFormatsFailed": "Kunne ikke hente tilgængelige formater for laget. Prøv igen senere."
},
"exportResultsMessages": {
"newExport": "Filen vil være tilgængelig her, når eksporten er fuldført",
Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -2087,7 +2087,8 @@
"title": "Fehler beim Export",
"invalidOutputFormat": "Das ausgewählte Exportformat ist nicht verfügbar",
"downloadEstimatorTitle": "DownloadEstimator-Fehler",
"downloadEstimatorFailed": "Die DownloadEstimator-Anforderung ist fehlgeschlagen. Dies bedeutet, dass die exportierte Datei die konfigurierten Serverlimits überschreitet. Versuchen Sie, die Download-Optionen zu ändern oder Filter zu Ihrer Ebene hinzuzufügen, und versuchen Sie es erneut."
"downloadEstimatorFailed": "Die DownloadEstimator-Anforderung ist fehlgeschlagen. Dies bedeutet, dass die exportierte Datei die konfigurierten Serverlimits überschreitet. Versuchen Sie, die Download-Optionen zu ändern oder Filter zu Ihrer Ebene hinzuzufügen, und versuchen Sie es erneut.",
"fetchFormatsFailed": "Fehler beim Abrufen der verfügbaren Formate für den Layer. Bitte versuchen Sie es später erneut."
},
"exportResultsMessages": {
"newExport": "Die Datei ist hier verfügbar, wenn der Export abgeschlossen ist",
Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -2048,7 +2048,8 @@
"title": "Error during export",
"invalidOutputFormat": "The selected export format is not available",
"downloadEstimatorTitle": "DownloadEstimator error",
"downloadEstimatorFailed": "DownloadEstimator request failed which means that exported file exceeds configured server limits. Try to change download options or add filter to your layer and try again."
"downloadEstimatorFailed": "DownloadEstimator request failed which means that exported file exceeds configured server limits. Try to change download options or add filter to your layer and try again.",
"fetchFormatsFailed": "Failed to fetch available formats for the layer. Please try again later."
},
"exportResultsMessages": {
"newExport": "The file will be available here when the export completes",
Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -2048,7 +2048,8 @@
"title": "Error en la exportación",
"invalidOutputFormat": "Formato de exportación no disponible",
"downloadEstimatorTitle": "Error de DownloadEstimator",
"downloadEstimatorFailed": "La solicitud de DownloadEstimator falló, lo que significa que el archivo exportado excede los límites del servidor configurado. Intente cambiar las opciones de descarga o agregue un filtro a su capa y vuelva a intentarlo."
"downloadEstimatorFailed": "La solicitud de DownloadEstimator falló, lo que significa que el archivo exportado excede los límites del servidor configurado. Intente cambiar las opciones de descarga o agregue un filtro a su capa y vuelva a intentarlo.",
"fetchFormatsFailed": "Error al obtener los formatos disponibles para la capa. Inténtalo de nuevo más tarde."
},
"exportResultsMessages": {
"newExport": "El archivo estará disponible aquí cuando se complete la exportación",
Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.fi-FI.json
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,8 @@
"downloadonlycurrentpage": "Lataa vain nykyinen sivu",
"error": {
"title": "Virhe viennin aikana",
"invalidOutputFormat": "Valittu vientimuoto ei ole käytettävissä"
"invalidOutputFormat": "Valittu vientimuoto ei ole käytettävissä",
"fetchFormatsFailed": "Tason käytettävissä olevien formaattien hakeminen epäonnistui. Yritä myöhemmin uudelleen."
}
},
"widgets": {
Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -2048,7 +2048,8 @@
"title": "Erreur lors de l'export",
"invalidOutputFormat": "Le format d'export sélectionné n'est pas disponible",
"downloadEstimatorTitle": "Erreur DownloadEstimator",
"downloadEstimatorFailed": "La demande DownloadEstimator a échoué, ce qui signifie que le fichier exporté dépasse les limites configurées du serveur. Essayez de modifier les options de téléchargement ou d'ajouter un filtre à votre couche et réessayez."
"downloadEstimatorFailed": "La demande DownloadEstimator a échoué, ce qui signifie que le fichier exporté dépasse les limites configurées du serveur. Essayez de modifier les options de téléchargement ou d'ajouter un filtre à votre couche et réessayez.",
"fetchFormatsFailed": "Échec de la récupération des formats disponibles pour la couche. Veuillez réessayer plus tard."
},
"exportResultsMessages": {
"newExport": "Le fichier sera disponible ici lorsque l'export sera terminé.",
Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.hr-HR.json
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,8 @@
"downloadonlycurrentpage": "Izvezi samo trenutnu stranicu",
"error": {
"title": "Greška prilikom izvoza",
"invalidOutputFormat": "Odabrani format nije podržan"
"invalidOutputFormat": "Odabrani format nije podržan",
"fetchFormatsFailed": "Nije moguće dohvatiti dostupne formate za sloj. Pokušajte ponovno kasnije."
}
},
"widgets": {
Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.is-IS.json
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,8 @@
"title": "Error during export",
"invalidOutputFormat": "The selected export format is not available",
"downloadEstimatorTitle": "DownloadEstimator error",
"downloadEstimatorFailed": "DownloadEstimator request failed which means that exported file exceeds configured server limits. Try to change download options or add filter to your layer and try again."
"downloadEstimatorFailed": "DownloadEstimator request failed which means that exported file exceeds configured server limits. Try to change download options or add filter to your layer and try again.",
"fetchFormatsFailed": "Failed to fetch available formats for the layer. Please try again later."
},
"exportResultsMessages": {
"newExport": "The file will be available here when the export completes",
Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.it-IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -2048,7 +2048,8 @@
"title": "Errore durante l'esportazione",
"invalidOutputFormat": "Il formato selezionato non è disponibile",
"downloadEstimatorTitle": "Errore DownloadEstimator",
"downloadEstimatorFailed": "Richiesta DownloadEstimator non riuscita, il che significa che il file esportato supera i limiti del server configurato. Prova a modificare le opzioni di download o aggiungi un filtro al tuo livello e riprova."
"downloadEstimatorFailed": "Richiesta DownloadEstimator non riuscita, il che significa che il file esportato supera i limiti del server configurato. Prova a modificare le opzioni di download o aggiungi un filtro al tuo livello e riprova.",
"fetchFormatsFailed": "Impossibile recuperare i formati disponibili per il layer. Riprova più tardi."
},
"exportResultsMessages": {
"newExport": "Il file sarà disponibile qui al termine dell'esportazione",
Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.nl-NL.json
Original file line number Diff line number Diff line change
Expand Up @@ -2027,7 +2027,8 @@
"title": "Fout tijdens exporteren",
"invalidOutputFormat": "Het geselecteerde exportformaat is niet beschikbaar",
"downloadEstimatorTitle": "DownloadEstimator error",
"downloadEstimatorFailed": "DownloadEstimator-aanvraag is mislukt, wat betekent dat het geëxporteerde bestand de geconfigureerde serverlimieten overschrijdt. Probeer de downloadopties te wijzigen of een filter aan uw laag toe te voegen en probeer het opnieuw."
"downloadEstimatorFailed": "DownloadEstimator-aanvraag is mislukt, wat betekent dat het geëxporteerde bestand de geconfigureerde serverlimieten overschrijdt. Probeer de downloadopties te wijzigen of een filter aan uw laag toe te voegen en probeer het opnieuw.",
"fetchFormatsFailed": "Ophalen van beschikbare formaten voor de laag is mislukt. Probeer het later opnieuw."
},
"exportResultsMessages": {
"newExport": "Het bestand is hier beschikbaar wanneer het exporteren is voltooid",
Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -2029,7 +2029,8 @@
"title": "Erro durante a exportação",
"invalidOutputFormat": "O formato de exportação selecionado não está disponível",
"downloadEstimatorTitle": "Erro do DownloadEstimator",
"downloadEstimatorFailed": "A solicitação DownloadEstimator falhou, o que significa que o arquivo exportado excede os limites configurados do servidor. Tente alterar as opções de download ou adicionar um filtro à sua camada e tente novamente."
"downloadEstimatorFailed": "A solicitação DownloadEstimator falhou, o que significa que o arquivo exportado excede os limites configurados do servidor. Tente alterar as opções de download ou adicionar um filtro à sua camada e tente novamente.",
"fetchFormatsFailed": "Falha ao buscar os formatos disponíveis para a camada. Tente novamente mais tarde."
},
"exportResultsMessages": {
"newExport": "O arquivo estará disponível aqui quando a exportação for concluída",
Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,8 @@
"downloadonlycurrentpage": "Download only current page",
"error": {
"title": "Error during export",
"invalidOutputFormat": "The selected export format is not available"
"invalidOutputFormat": "The selected export format is not available",
"fetchFormatsFailed": "Failed to fetch available formats for the layer. Please try again later."
}
},
"widgets": {
Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.sk-SK.json
Original file line number Diff line number Diff line change
Expand Up @@ -1711,7 +1711,8 @@
"title": "Nastala chyba pri exportovaní",
"invalidOutputFormat": "Vybratý formát exportu nie je k dispozícii",
"downloadEstimatorTitle": "DownloadEstimator error",
"downloadEstimatorFailed": "DownloadEstimator request failed which means that exported file exceeds configured server limits. Try to change download options or add filter to your layer and try again."
"downloadEstimatorFailed": "DownloadEstimator request failed which means that exported file exceeds configured server limits. Try to change download options or add filter to your layer and try again.",
"fetchFormatsFailed": "Nepodarilo sa načítať dostupné formáty pre vrstvu. Skúste to znova neskôr."
},
"exportResultsMessages": {
"newExport": "Súbor bude k dispozícii po dokončení exportovania",
Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.sv-SE.json
Original file line number Diff line number Diff line change
Expand Up @@ -2023,7 +2023,8 @@
"title": "Fel vid export",
"invalidOutputFormat": "Det valda exportformatet är inte tillgängligt",
"downloadEstimatorTitle": "Fel i DownloadEstimator",
"downloadEstimatorFailed": "DownloadEstimator-begäran misslyckades, vilket innebär att den exporterade filen överskrider konfigurerade servergränser. Försök att ändra nedladdningsalternativ eller lägg till filter i ditt lager och försök igen."
"downloadEstimatorFailed": "DownloadEstimator-begäran misslyckades, vilket innebär att den exporterade filen överskrider konfigurerade servergränser. Försök att ändra nedladdningsalternativ eller lägg till filter i ditt lager och försök igen.",
"fetchFormatsFailed": "Det gick inte att hämta tillgängliga format för lagret. Försök igen senare."
},
"exportResultsMessages": {
"newExport": "Filen är tillgänglig här när exporten är klar",
Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.vi-VN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1823,7 +1823,8 @@
"downloadonlycurrentpage": "Chỉ tải xuống trang hiện tại",
"error": {
"invalidOutputFormat": "Định dạng xuất đã chọn không khả dụng",
"title": "Lỗi trong khi xuất"
"title": "Lỗi trong khi xuất",
"fetchFormatsFailed": "Không thể tải các định dạng có sẵn cho lớp này. Vui lòng thử lại sau."
},
"export": "Xuất",
"format": "Định dạng tệp",
Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.zh-ZH.json
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,8 @@
"downloadonlycurrentpage": "Download only current page",
"error": {
"title": "Error during export",
"invalidOutputFormat": "The selected export format is not available"
"invalidOutputFormat": "The selected export format is not available",
"fetchFormatsFailed": "无法获取该图层的可用格式。请稍后重试。"
}
},
"widgets": {
Expand Down
23 changes: 22 additions & 1 deletion web/client/utils/LayersUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,28 @@ export const getCapabilitiesUrl = (layer) => {
if (urlParts.length === 2) {
let layerParts = layer.name.split(":");
if (layerParts.length === 2) {
reqUrl = urlParts[0] + matchedGeoServerName + layerParts [0] + "/" + layerParts[1] + "/" + urlParts[1];
const [workspace, layerName] = layerParts;
const rawTail = urlParts[1] || '';
const urlTail = rawTail.replace(/^\/+/, '');

// /geoserver/{workspace}/{layerName}/... -> already layer‑specific, leave as is
const isAlreadyLayerSpecific =
urlTail === `${workspace}/${layerName}` ||
urlTail.startsWith(`${workspace}/${layerName}/`);
if (!isAlreadyLayerSpecific) {
let tailWithoutWorkspace = rawTail;

// when /geoserver/{workspace}/... -> strip leading `{workspace}/` so we can
// add `{workspace}/{layerName}` to the url
if (urlTail === workspace || urlTail.startsWith(`${workspace}/`)) {
const [, ...restSegments] = urlTail.split('/');
const prefix = rawTail.startsWith('/') ? '/' : '';
tailWithoutWorkspace = prefix + restSegments.join('/');
}

const normalizedTail = tailWithoutWorkspace.replace(/^\/+/, '');
reqUrl = `${urlParts[0]}${matchedGeoServerName}${workspace}/${layerName}/${normalizedTail}`;
}
}
}
}
Expand Down
Loading
Loading