Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport - 2024.01. xx - Fix #10429 error message when using vector data with no wpsUrl defined (#10432) #10441

Merged
merged 1 commit into from
Jun 24, 2024
Merged
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
29 changes: 24 additions & 5 deletions web/client/epics/geoProcessing.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ export const runBufferProcessGPTEpic = (action$, store) => action$
const counter = getCounter(layers, GPT_BUFFER_GROUP_ID);
let misconfiguredLayers = [];
if (!layerUrl) {
misconfiguredLayers.push(layer.name + " - " + layer.title);
misconfiguredLayers.push(layer.name === layer.title ? layer.name : layer.name + " - " + layer.title);
}
if (misconfiguredLayers.length) {
return Rx.Observable.of(showErrorNotification({
Expand Down Expand Up @@ -678,12 +678,33 @@ export const runIntersectProcessGPTEpic = (action$, store) => action$
const layer = getLayerFromIdSelector(state, layerId);
const layers = availableLayersSelector(state);
const layerUrl = wpsUrlSelector(state) || head(castArray(layer.url));

const intersectionLayerId = intersectionLayerIdSelector(state);
const intersectionLayer = getLayerFromIdSelector(state, intersectionLayerId);
const intersectionLayerUrl = wpsUrlSelector(state) || head(castArray(intersectionLayer.url));

const sourceFeature = sourceFeatureSelector(state);
const executeOptions = {};
const intersectionFeature = intersectionFeatureSelector(state);
const counter = getCounter(layers, GPT_INTERSECTION_GROUP_ID);
let sourceFC$;
let intersectionFC$;
let misconfiguredLayers = [];
if (!layerUrl) {
misconfiguredLayers.push(layer.name === layer.title ? layer.name : layer.name + " - " + layer.title);
}
if (!intersectionLayerUrl) {
misconfiguredLayers.push(intersectionLayer.name === intersectionLayer.title ? intersectionLayer.name : intersectionLayer.name + " - " + intersectionLayer.title);
}
if (misconfiguredLayers.length) {
return Rx.Observable.of(showErrorNotification({
title: "errorTitleDefault",
message: "GeoProcessing.notifications.errorMissingUrl",
autoDismiss: 6,
position: "tc",
values: {layerName: misconfiguredLayers.join(", ")}
}));
}
if (isEmpty(sourceFeature)) {
sourceFC$ = executeProcess(
layerUrl,
Expand All @@ -699,9 +720,7 @@ export const runIntersectProcessGPTEpic = (action$, store) => action$
} else {
sourceFC$ = Rx.Observable.of(sourceFeature.geometry);
}
const intersectionLayerId = intersectionLayerIdSelector(state);
const intersectionLayer = getLayerFromIdSelector(state, intersectionLayerId);
const intersectionLayerUrl = wpsUrlSelector(state) || head(castArray(intersectionLayer.url));

if (isEmpty(intersectionFeature)) {
intersectionFC$ = executeProcess(
intersectionLayerUrl,
Expand Down Expand Up @@ -849,7 +868,7 @@ export const runIntersectProcessGPTEpic = (action$, store) => action$
})
.catch((e) => {
logError(e);
let misconfiguredLayers = [];
misconfiguredLayers = [];
if (!layerUrl) {
misconfiguredLayers.push(layer.name + " - " + layer.title);
}
Expand Down
Loading