diff --git a/web/client/actions/catalog.js b/web/client/actions/catalog.js
index fd41eeab71..41147acc91 100644
--- a/web/client/actions/catalog.js
+++ b/web/client/actions/catalog.js
@@ -45,6 +45,7 @@ export const SAVING_SERVICE = 'CATALOG:SAVING_SERVICE';
export const CATALOG_INITED = 'CATALOG:INIT';
export const GET_METADATA_RECORD_BY_ID = 'CATALOG:GET_METADATA_RECORD_BY_ID';
export const SET_LOADING = 'CATALOG:SET_LOADING';
+export const SHOW_FORMAT_ERROR = 'CATALOG:SHOW_FORMAT_ERROR';
export const TOGGLE_TEMPLATE = 'CATALOG:TOGGLE_TEMPLATE';
export const TOGGLE_THUMBNAIL = 'CATALOG:TOGGLE_THUMBNAIL';
export const TOGGLE_ADVANCED_SETTINGS = 'CATALOG:TOGGLE_ADVANCED_SETTINGS';
@@ -285,6 +286,7 @@ export const toggleThumbnail = () => ({type: TOGGLE_THUMBNAIL});
export const formatOptionsFetch = (url, force) => ({type: FORMAT_OPTIONS_FETCH, url, force});
export const formatsLoading = (loading) => ({type: FORMAT_OPTIONS_LOADING, loading});
export const setSupportedFormats = (formats, url) => ({type: SET_FORMAT_OPTIONS, formats, url});
+export const showFormatError = (status) => ({type: SHOW_FORMAT_ERROR, status});
import {error} from './notifications';
diff --git a/web/client/components/catalog/CatalogServiceEditor.jsx b/web/client/components/catalog/CatalogServiceEditor.jsx
index 5eb06219a5..351000fd6d 100644
--- a/web/client/components/catalog/CatalogServiceEditor.jsx
+++ b/web/client/components/catalog/CatalogServiceEditor.jsx
@@ -46,6 +46,7 @@ const CatalogServiceEditor = ({
formatOptions,
buttonStyle,
saving,
+ showFormatError,
onChangeServiceFormat = () => {},
onChangeMetadataTemplate = () => {},
onToggleAdvancedSettings = () => { },
@@ -100,6 +101,7 @@ const CatalogServiceEditor = ({
currentWMSCatalogLayerSize={layerOptions.tileSize ? layerOptions.tileSize : 256}
selectedService={selectedService}
onFormatOptionsFetch={onFormatOptionsFetch}
+ showFormatError={showFormatError}
formatsLoading={formatsLoading}
infoFormatOptions={infoFormatOptions}
autoSetVisibilityLimits={autoSetVisibilityLimits}
diff --git a/web/client/components/catalog/__tests__/CatalogServiceEditor-test.jsx b/web/client/components/catalog/__tests__/CatalogServiceEditor-test.jsx
index f2f16f1bee..90865ca442 100644
--- a/web/client/components/catalog/__tests__/CatalogServiceEditor-test.jsx
+++ b/web/client/components/catalog/__tests__/CatalogServiceEditor-test.jsx
@@ -58,12 +58,9 @@ describe('Test CatalogServiceEditor', () => {
layerOptions={{tileSize: 256}}
/>, document.getElementById("container"));
- const formatFormGroups = [...document.querySelectorAll('.form-group')].filter(fg => {
- const labels = [...fg.querySelectorAll('label')];
- return labels.length === 1 && labels[0].textContent === 'layerProperties.format.title';
- });
- expect(formatFormGroups.length).toBe(1);
- const formatSelect = formatFormGroups[0].querySelector('.Select-value-label');
+ const formatFormGroups = [...document.querySelectorAll('.form-group-flex')];
+ expect(formatFormGroups.length).toBe(5);
+ const formatSelect = formatFormGroups[2].querySelector('.Select-value-label');
expect(formatSelect).toExist();
expect(formatSelect.textContent).toBe('image/png8');
// expect(formatSelect.props.options).toEqual(formatOptions); TODO: test properties are passed to select
diff --git a/web/client/components/catalog/editor/AdvancedSettings/CSWFilters.jsx b/web/client/components/catalog/editor/AdvancedSettings/CSWFilters.jsx
index 96bf34715b..29e440f891 100644
--- a/web/client/components/catalog/editor/AdvancedSettings/CSWFilters.jsx
+++ b/web/client/components/catalog/editor/AdvancedSettings/CSWFilters.jsx
@@ -1,6 +1,5 @@
import React, { useState, useEffect } from "react";
import {
- Col,
ControlLabel,
FormGroup,
Glyphicon,
@@ -59,14 +58,14 @@ const FilterCode = ({ type, code, setCode, error }) => {
const filterProp = `${type}Filter`;
return (
-
+
{error[type] && renderError}
-
-
+
+
{
}}
/>
{type === 'dynamic' && renderHelpText}
-
+
);
};
diff --git a/web/client/components/catalog/editor/AdvancedSettings/CommonAdvancedSettings.jsx b/web/client/components/catalog/editor/AdvancedSettings/CommonAdvancedSettings.jsx
index 45900f3d36..5368fe49b9 100644
--- a/web/client/components/catalog/editor/AdvancedSettings/CommonAdvancedSettings.jsx
+++ b/web/client/components/catalog/editor/AdvancedSettings/CommonAdvancedSettings.jsx
@@ -7,7 +7,7 @@
*/
import React from 'react';
import { isNil } from 'lodash';
-import { FormGroup, Checkbox, Col } from "react-bootstrap";
+import { FormGroup, Checkbox } from "react-bootstrap";
import Message from "../../../I18N/Message";
import InfoPopover from '../../../widgets/widget/InfoPopover';
@@ -25,44 +25,36 @@ export default ({
onChangeServiceProperty = () => { },
onToggleThumbnail = () => { }
}) => (
-
+ <>
-
- {service.autoload !== undefined && onChangeServiceProperty("autoload", e.target.checked)}
- checked={!isNil(service.autoload) ? service.autoload : false}>
-
- }
-
+ {service.autoload !== undefined && onChangeServiceProperty("autoload", e.target.checked)}
+ checked={!isNil(service.autoload) ? service.autoload : false}>
+
+ }
-
- onToggleThumbnail()}
- checked={!isNil(service.hideThumbnail) ? !service.hideThumbnail : true}>
-
-
-
+ onToggleThumbnail()}
+ checked={!isNil(service.hideThumbnail) ? !service.hideThumbnail : true}>
+
+
{!isNil(service.type) && service.type === "wfs" &&
-
- onChangeServiceProperty("allowUnsecureLayers", e.target.checked)}
- checked={!isNil(service.allowUnsecureLayers) ? service.allowUnsecureLayers : false}>
- } />
-
-
+ onChangeServiceProperty("allowUnsecureLayers", e.target.checked)}
+ checked={!isNil(service.allowUnsecureLayers) ? service.allowUnsecureLayers : false}>
+ } />
+
}
{!isNil(service.type) && service.type === "cog" &&
-
- onChangeServiceProperty("fetchMetadata", e.target.checked)}
- checked={!isNil(service.fetchMetadata) ? service.fetchMetadata : true}>
- } />
-
-
+ onChangeServiceProperty("fetchMetadata", e.target.checked)}
+ checked={!isNil(service.fetchMetadata) ? service.fetchMetadata : true}>
+ } />
+
}
{children}
-
+ >
);
diff --git a/web/client/components/catalog/editor/AdvancedSettings/RasterAdvancedSettings.js b/web/client/components/catalog/editor/AdvancedSettings/RasterAdvancedSettings.js
index b5abdf7f04..42a7909dac 100644
--- a/web/client/components/catalog/editor/AdvancedSettings/RasterAdvancedSettings.js
+++ b/web/client/components/catalog/editor/AdvancedSettings/RasterAdvancedSettings.js
@@ -6,22 +6,22 @@
* LICENSE file in the root directory of this source tree.
*/
import React, {useEffect} from 'react';
-import {FormGroup, Col, ControlLabel, Checkbox, Button as ButtonRB, Glyphicon } from "react-bootstrap";
+import {FormGroup, ControlLabel, Checkbox, Button as ButtonRB, Glyphicon, InputGroup } from "react-bootstrap";
import RS from 'react-select';
-import localizedProps from '../../../misc/enhancers/localizedProps';
-const Select = localizedProps('noResultsText')(RS);
+import {isNil, camelCase} from "lodash";
+import localizedProps from '../../../misc/enhancers/localizedProps';
import CommonAdvancedSettings from './CommonAdvancedSettings';
-import {isNil, camelCase} from "lodash";
import ReactQuill from '../../../../libs/quill/react-quill-suspense';
import { ServerTypes } from '../../../../utils/LayersUtils';
-
import InfoPopover from '../../../widgets/widget/InfoPopover';
import CSWFilters from "./CSWFilters";
import Message from "../../../I18N/Message";
import WMSDomainAliases from "./WMSDomainAliases";
import tooltip from '../../../misc/enhancers/buttonTooltip';
+
const Button = tooltip(ButtonRB);
+const Select = localizedProps('noResultsText')(RS);
/**
* Generates an array of options in the form e.g. [{value: "256", label: "256x256"}]
@@ -58,6 +58,7 @@ const getServerTypeOptions = () => {
*
*/
export default ({
+ showFormatError,
service,
formatOptions = [],
infoFormatOptions = [],
@@ -82,52 +83,42 @@ export default ({
const serverTypeOptions = getServerTypeOptions();
return (
{(isLocalizedLayerStylesEnabled && !isNil(service.type) ? service.type === "wms" : false) && (
-
- onChangeServiceProperty("localizedLayerStyles", e.target.checked)}
- checked={!isNil(service.localizedLayerStyles) ? service.localizedLayerStyles : false}>
- } />
-
-
+ onChangeServiceProperty("localizedLayerStyles", e.target.checked)}
+ checked={!isNil(service.localizedLayerStyles) ? service.localizedLayerStyles : false}>
+ } />
+
)}
-
- onChangeServiceProperty("autoSetVisibilityLimits", e.target.checked)}
- checked={!isNil(service.autoSetVisibilityLimits) ? service.autoSetVisibilityLimits : false}>
- } />
-
-
+ onChangeServiceProperty("autoSetVisibilityLimits", e.target.checked)}
+ checked={!isNil(service.autoSetVisibilityLimits) ? service.autoSetVisibilityLimits : false}>
+ } />
+
{!isNil(service.type) && service.type === "wms" &&
-
- onChangeServiceProperty("layerOptions", { ...service.layerOptions, singleTile: e.target.checked })}
- checked={!isNil(service?.layerOptions?.singleTile) ? service.layerOptions.singleTile : false}>
- } />
-
-
+ onChangeServiceProperty("layerOptions", { ...service.layerOptions, singleTile: e.target.checked })}
+ checked={!isNil(service?.layerOptions?.singleTile) ? service.layerOptions.singleTile : false}>
+ } />
+
}
{!isNil(service.type) && service.type === "wms" &&
-
- onChangeServiceProperty("allowUnsecureLayers", e.target.checked)}
- checked={!isNil(service.allowUnsecureLayers) ? service.allowUnsecureLayers : false}>
- } />
-
-
+ onChangeServiceProperty("allowUnsecureLayers", e.target.checked)}
+ checked={!isNil(service.allowUnsecureLayers) ? service.allowUnsecureLayers : false}>
+ } />
+
}
{(!isNil(service.type) ? (service.type === "csw" && !service.excludeShowTemplate) : false) && (
-
- onToggleTemplate()}
- checked={service && service.showTemplate}>
-
-
-
-
+ onToggleTemplate()}
+ checked={service && service.showTemplate}>
+
+
+
{service && service.showTemplate &&
- (
+ (
@@ -138,8 +129,8 @@ export default ({
{" ${ description }"}
- )}
-
+
)}
+
{service && service.showTemplate &&
}
-
+
)}
-
-
-
-
-
-
- onFormatOptionsFetch(service.url)}
- value={service && service.format}
- clearable
- noResultsText={props.formatsLoading
- ? "catalog.format.loading" : "catalog.format.noOption"}
- options={props.formatsLoading ? [] : formatOptions.map((format) => format?.value ? format : ({ value: format, label: format }))}
- onChange={event => onChangeServiceFormat(event && event.value)} />
-
- onFormatOptionsFetch(service.url, true)}
- key="format-refresh">
-
-
-
+
+
+
+ onChangeServiceProperty("layerOptions", { ...service.layerOptions, serverType: event?.value })} />
+
-
-
-
-
-
-
- onFormatOptionsFetch(service.url)}
- value={service && service.infoFormat}
- clearable
- options={props.formatsLoading ? [] : infoFormatOptions.map((format) => ({ value: format, label: format }))}
- onChange={event => onChangeServiceProperty("infoFormat", event && event.value)} />
-
+
+
+
+
+ {showFormatError ? }
+ text={ } /> : null}
onFormatOptionsFetch(service.url, true)}
key="format-refresh">
-
+
+
+
+
+
+ onFormatOptionsFetch(service.url)}
+ value={service && service.format}
+ clearable
+ noResultsText={props.formatsLoading
+ ? "catalog.format.loading" : "catalog.format.noOption"}
+ options={props.formatsLoading ? [] : formatOptions.map((format) => format?.value ? format : ({ value: format, label: format }))}
+ onChange={event => onChangeServiceFormat(event && event.value)} />
+
-
-
-
-
-
+
+
+
+ onFormatOptionsFetch(service.url)}
+ value={service && service.infoFormat}
+ clearable
+ options={props.formatsLoading ? [] : infoFormatOptions.map((format) => ({ value: format, label: format }))}
+ onChange={event => onChangeServiceProperty("infoFormat", event && event.value)} />
+
+
+
+
+
+
onChangeServiceProperty("layerOptions", { ...service.layerOptions, tileSize: event && event.value })} />
-
-
-
-
-
-
-
- onChangeServiceProperty("layerOptions", { ...service.layerOptions, serverType: event?.value })} />
-
+
{!isNil(service.type) && service.type === "csw" &&
diff --git a/web/client/components/catalog/editor/AdvancedSettings/TMSAdvancedEditor.jsx b/web/client/components/catalog/editor/AdvancedSettings/TMSAdvancedEditor.jsx
index 5cd8e2d625..f92fae0169 100644
--- a/web/client/components/catalog/editor/AdvancedSettings/TMSAdvancedEditor.jsx
+++ b/web/client/components/catalog/editor/AdvancedSettings/TMSAdvancedEditor.jsx
@@ -14,7 +14,7 @@ import JSONEditor from '../../../misc/codeEditors/JSONEditor';
import Message from "../../../I18N/Message";
import HTML from "../../../I18N/HTML";
-import { FormGroup, Checkbox, Col, ControlLabel } from "react-bootstrap";
+import { FormGroup, Checkbox, ControlLabel } from "react-bootstrap";
import InfoPopover from '../../../widgets/widget/InfoPopover';
// TODO: add variants
@@ -64,29 +64,27 @@ export default ({
};
return (
-
- {service.autoload !== undefined && onChangeServiceProperty("autoload", e.target.checked)}
- checked={!isNil(service.autoload) ? service.autoload : false}>
-
- }
- onToggleThumbnail()}
- checked={!isNil(service.hideThumbnail) ? !service.hideThumbnail : true}>
-
+ {service.autoload !== undefined && onChangeServiceProperty("autoload", e.target.checked)}
+ checked={!isNil(service.autoload) ? service.autoload : false}>
+
+ }
+ onToggleThumbnail()}
+ checked={!isNil(service.hideThumbnail) ? !service.hideThumbnail : true}>
+
+
+ {service.provider === "tms"
+ ? onChangeServiceProperty("forceDefaultTileGrid", e.target.checked)}
+ checked={!isNil(service.forceDefaultTileGrid) ? service.forceDefaultTileGrid : false}>
+ } />
- {service.provider === "tms"
- ? onChangeServiceProperty("forceDefaultTileGrid", e.target.checked)}
- checked={!isNil(service.forceDefaultTileGrid) ? service.forceDefaultTileGrid : false}>
- } />
-
- : null}
-
+ : null}
{!service.provider || service.provider === "custom"
- ?
+ ?
} />
-
+
: null}
);
diff --git a/web/client/components/catalog/editor/AdvancedSettings/WMSDomainAliases.js b/web/client/components/catalog/editor/AdvancedSettings/WMSDomainAliases.js
index 9e6bf23620..1122d63df1 100644
--- a/web/client/components/catalog/editor/AdvancedSettings/WMSDomainAliases.js
+++ b/web/client/components/catalog/editor/AdvancedSettings/WMSDomainAliases.js
@@ -5,7 +5,7 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-import {FormControl, FormGroup, Col, ControlLabel, Glyphicon, Button} from "react-bootstrap";
+import {FormControl, FormGroup, ControlLabel, Glyphicon, Button} from "react-bootstrap";
import {debounce, size, map, omit, toInteger} from "lodash";
import Message from "../../../I18N/Message";
import InfoPopover from "../../../widgets/widget/InfoPopover";
@@ -45,7 +45,7 @@ export default ({
};
const elements = map(aliases, (el, k) => (
-
+
{toInteger(k) !== 0 &&
}
-
+
));
return (
-
-
+
- } />
-
+ } />
{elements}
-
- }
- tooltipid="add-alias-button"
- tooltipPosition="right"
- onClick={onCreateAlias}>
-
-
-
+ }
+ tooltipid="add-alias-button"
+ tooltipPosition="right"
+ onClick={onCreateAlias}>
+
+
);
};
diff --git a/web/client/components/catalog/editor/AdvancedSettings/__tests__/RasterAdvancedSettings-test.js b/web/client/components/catalog/editor/AdvancedSettings/__tests__/RasterAdvancedSettings-test.js
index 36ac6af914..066792f28e 100644
--- a/web/client/components/catalog/editor/AdvancedSettings/__tests__/RasterAdvancedSettings-test.js
+++ b/web/client/components/catalog/editor/AdvancedSettings/__tests__/RasterAdvancedSettings-test.js
@@ -33,7 +33,7 @@ describe('Test Raster advanced settings', () => {
const advancedSettingPanel = document.getElementsByClassName("mapstore-switch-panel");
expect(advancedSettingPanel).toBeTruthy();
const fields = document.querySelectorAll(".form-group");
- expect(fields.length).toBe(12);
+ expect(fields.length).toBe(13);
});
it('test csw advanced options', () => {
ReactDOM.render( , document.getElementById("container"));
@@ -41,7 +41,7 @@ describe('Test Raster advanced settings', () => {
expect(advancedSettingPanel).toBeTruthy();
const fields = document.querySelectorAll(".form-group");
const cswFilters = document.getElementsByClassName("catalog-csw-filters");
- expect(fields.length).toBe(10);
+ expect(fields.length).toBe(11);
expect(cswFilters).toBeTruthy();
});
it('test component onChangeServiceProperty autoload', () => {
@@ -159,7 +159,7 @@ describe('Test Raster advanced settings', () => {
service={{type: "wms"}}/>, document.getElementById("container"));
const advancedSettingsPanel = document.getElementsByClassName("mapstore-switch-panel");
expect(advancedSettingsPanel).toBeTruthy();
- const format = document.querySelectorAll('input[role="combobox"]')[0];
+ const format = document.querySelectorAll('input[role="combobox"]')[1];
expect(format).toBeTruthy();
TestUtils.Simulate.change(format, { target: { value: 'image/png' } });
TestUtils.Simulate.keyDown(format, { keyCode: 9, key: 'Tab' });
@@ -176,7 +176,7 @@ describe('Test Raster advanced settings', () => {
service={{type: "wms", layerOptions: {tileSize: 256}}}/>, document.getElementById("container"));
const advancedSettingsPanel = document.getElementsByClassName("mapstore-switch-panel");
expect(advancedSettingsPanel).toBeTruthy();
- const layerOption = document.querySelectorAll('input[role="combobox"]')[2];
+ const layerOption = document.querySelectorAll('input[role="combobox"]')[3];
expect(layerOption).toBeTruthy();
TestUtils.Simulate.change(layerOption, { target: { value: "512" }});
TestUtils.Simulate.keyDown(layerOption, { keyCode: 9, key: 'Tab' });
@@ -237,7 +237,7 @@ describe('Test Raster advanced settings', () => {
/>, document.getElementById("container"));
const advancedSettingsPanel = document.getElementsByClassName("mapstore-switch-panel");
expect(advancedSettingsPanel).toBeTruthy();
- const serverTypeOption = document.querySelectorAll('input[role="combobox"]')[3];
+ const serverTypeOption = document.querySelectorAll('input[role="combobox"]')[0];
expect(serverTypeOption).toBeTruthy();
TestUtils.Simulate.change(serverTypeOption, { target: { value: "geoserver" }});
TestUtils.Simulate.keyDown(serverTypeOption, { keyCode: 9, key: 'Tab' });
@@ -255,7 +255,7 @@ describe('Test Raster advanced settings', () => {
service={{ type: "wms" }}/>, document.getElementById("container"));
const advancedSettingsPanel = document.getElementsByClassName("mapstore-switch-panel");
expect(advancedSettingsPanel).toBeTruthy();
- const infoFormatOption = document.querySelectorAll('input[role="combobox"]')[1];
+ const infoFormatOption = document.querySelectorAll('input[role="combobox"]')[2];
expect(infoFormatOption).toBeTruthy();
TestUtils.Simulate.change(infoFormatOption, { target: { value: "application/json" }});
TestUtils.Simulate.keyDown(infoFormatOption, { keyCode: 9, key: 'Tab' });
diff --git a/web/client/components/misc/popover/DisposablePopover.jsx b/web/client/components/misc/popover/DisposablePopover.jsx
index 37c453cf1c..d57936a507 100644
--- a/web/client/components/misc/popover/DisposablePopover.jsx
+++ b/web/client/components/misc/popover/DisposablePopover.jsx
@@ -40,7 +40,7 @@ export default function DisposablePopover({
glyph = "question-sign",
popoverClassName
}) {
- const [show, setShow] = useState(showOnRender);
+ const [show, setShow] = useState(() => showOnRender);
let target = useRef(null);
return (
<>
diff --git a/web/client/epics/__tests__/catalog-test.js b/web/client/epics/__tests__/catalog-test.js
index 85d730c2ee..2975226655 100644
--- a/web/client/epics/__tests__/catalog-test.js
+++ b/web/client/epics/__tests__/catalog-test.js
@@ -39,6 +39,7 @@ import {
SET_FORMAT_OPTIONS,
ADD_LAYER_AND_DESCRIBE,
addLayerAndDescribe,
+ SHOW_FORMAT_ERROR,
DESCRIBE_ERROR,
SAVING_SERVICE,
NEW_SERVICE_STATUS,
@@ -748,7 +749,7 @@ describe('catalog Epics', () => {
});
});
it('getSupportedFormatsEpic wms', (done) => {
- const NUM_ACTIONS = 3;
+ const NUM_ACTIONS = 4;
const url = "base/web/client/test-resources/wms/GetCapabilities-1.1.1.xml";
testEpic(addTimeoutEpic(getSupportedFormatsEpic, 0), NUM_ACTIONS, formatOptionsFetch(url), (actions) => {
expect(actions.length).toBe(NUM_ACTIONS);
@@ -760,6 +761,9 @@ describe('catalog Epics', () => {
expect(action.formats.imageFormats).toEqual(['image/png', 'image/gif', 'image/jpeg', 'image/png8', 'image/png; mode=8bit', 'image/vnd.jpeg-png']);
expect(action.formats.infoFormats).toEqual(['text/plain', 'text/html', 'application/json']);
break;
+ case SHOW_FORMAT_ERROR:
+ expect(action.status).toBeFalsy();
+ break;
case FORMAT_OPTIONS_LOADING:
break;
case TEST_TIMEOUT:
diff --git a/web/client/epics/catalog.js b/web/client/epics/catalog.js
index 294b54b8a1..88531aca21 100644
--- a/web/client/epics/catalog.js
+++ b/web/client/epics/catalog.js
@@ -11,6 +11,7 @@ import axios from 'axios';
import xpathlib from 'xpath';
import { DOMParser } from 'xmldom';
import {head, get, find, isArray, isString, isObject, keys, toPairs, merge, castArray} from 'lodash';
+
import {
ADD_SERVICE,
ADD_LAYERS_FROM_CATALOGS,
@@ -32,6 +33,7 @@ import {
textSearch,
changeSelectedService,
formatsLoading,
+ showFormatError,
setSupportedFormats,
ADD_LAYER_AND_DESCRIBE,
describeError,
@@ -513,14 +515,22 @@ export default (API) => ({
.filter((action)=> action.force || getFormatUrlUsedSelector(getState()) !== action?.url)
.switchMap(({url = ''} = {})=> {
return Rx.Observable.defer(() => getSupportedFormat(url, true))
- .switchMap((supportedFormats) => Rx.Observable.of(setSupportedFormats(supportedFormats, url)))
+ .switchMap((supportedFormats) => {
+ return Rx.Observable.of(
+ setSupportedFormats(supportedFormats, url),
+ showFormatError(supportedFormats.imageFormats.length === 0 && supportedFormats.infoFormats.length === 0)
+ );
+ })
.let(
wrapStartStop(
formatsLoading(true),
formatsLoading(false),
() => {
return Rx.Observable.of(
- error({ title: "layerProperties.format.error.title", message: 'layerProperties.format.error.message' }),
+ error({
+ title: "layerProperties.format.error.title",
+ message: 'layerProperties.format.error.message'
+ }),
formatsLoading(false)
);
}
@@ -530,7 +540,7 @@ export default (API) => ({
/**
* Sets control property to currently selected group when catalogue is open
- * Sets the currently selected group as the detination of new layers in catalogue
+ * Sets the currently selected group as the destination of new layers in catalogue
* if a layer instead of a group is selected it resets the groupId to Default
* Action performed: setControlProperty (only if catalogue is open)
* @memberof epics.layers
diff --git a/web/client/plugins/MetadataExplorer.jsx b/web/client/plugins/MetadataExplorer.jsx
index b296c0070d..84194d13af 100644
--- a/web/client/plugins/MetadataExplorer.jsx
+++ b/web/client/plugins/MetadataExplorer.jsx
@@ -73,7 +73,8 @@ import {
formatsLoadingSelector,
getSupportedFormatsSelector,
getSupportedGFIFormatsSelector,
- getNewServiceStatusSelector
+ getNewServiceStatusSelector,
+ showFormatErrorSelector
} from '../selectors/catalog';
import { layersSelector } from '../selectors/layers';
import { currentLocaleSelector, currentMessagesSelector } from '../selectors/locale';
@@ -87,6 +88,7 @@ export const DEFAULT_ALLOWED_PROVIDERS = ["OpenStreetMap", "OpenSeaMap", "Stamen
const metadataExplorerSelector = createStructuredSelector({
searchOptions: searchOptionsSelector,
+ showFormatError: showFormatErrorSelector,
result: resultSelector,
loadingError: loadingErrorSelector,
selectedService: selectedServiceSelector,
diff --git a/web/client/reducers/catalog.js b/web/client/reducers/catalog.js
index bc6b2c4129..ccb842e725 100644
--- a/web/client/reducers/catalog.js
+++ b/web/client/reducers/catalog.js
@@ -30,6 +30,7 @@ import {
TOGGLE_TEMPLATE,
TOGGLE_ADVANCED_SETTINGS,
FORMAT_OPTIONS_LOADING,
+ SHOW_FORMAT_ERROR,
SET_FORMAT_OPTIONS,
NEW_SERVICE_STATUS
} from '../actions/catalog';
@@ -60,6 +61,7 @@ function catalog(state = {
},
delayAutoSearch: 1000,
loading: false,
+ showFormatError: false,
pageSize: 4,
services: {},
selectedService: "",
@@ -112,6 +114,7 @@ function catalog(state = {
newService: action.isNew ? emptyService : assign({}, state.services && state.services[state.selectedService || ""] || {}, {oldService: state.selectedService || ""}),
mode: action.mode,
result: null,
+ showFormatError: false,
loadingError: null,
layerError: null});
case MAP_CONFIG_LOADED: {
@@ -133,7 +136,7 @@ function catalog(state = {
case CHANGE_TITLE:
return set("newService.title", action.title, state);
case CHANGE_URL:
- return set("newService.url", action.url, state);
+ return set("newService.url", action.url, set("showFormatError", false, state));
case CHANGE_SERVICE_FORMAT:
return set("newService.format", action.format, state);
case CHANGE_TYPE: {
@@ -211,6 +214,9 @@ function catalog(state = {
case FORMAT_OPTIONS_LOADING: {
return set("formatsLoading", action.loading, state);
}
+ case SHOW_FORMAT_ERROR: {
+ return set("showFormatError", action.status, state);
+ }
case SET_FORMAT_OPTIONS: {
return set("newService.supportedFormats", action.formats, set("newService.formatUrlUsed", action.url, state));
}
diff --git a/web/client/selectors/catalog.js b/web/client/selectors/catalog.js
index 09d3f954b9..b23ba9b113 100644
--- a/web/client/selectors/catalog.js
+++ b/web/client/selectors/catalog.js
@@ -62,3 +62,4 @@ export const getSupportedFormatsSelector = (state) => modeSelector(state) === 'e
export const getSupportedGFIFormatsSelector = (state) => get(state, "catalog.newService.supportedFormats.infoFormats", getDefaultSupportedGetFeatureInfoFormats());
export const getFormatUrlUsedSelector = (state) => get(state, "catalog.newService.formatUrlUsed", '');
export const getNewServiceStatusSelector = (state) => get(state, "catalog.isNewServiceAdded", false);
+export const showFormatErrorSelector = (state) => get(state, "catalog.showFormatError", false);
diff --git a/web/client/themes/default/less/catalog.less b/web/client/themes/default/less/catalog.less
index 44975d0b4c..06c4a539c8 100644
--- a/web/client/themes/default/less/catalog.less
+++ b/web/client/themes/default/less/catalog.less
@@ -15,10 +15,18 @@
// **************
// Layout
// **************
+.ms2-border-layout-body.catalog {
+ .form-group-flex {
+ padding: 0;
+ }
+}
.catalog-panel {
position: relative;
width: 100%;
height: 100%;
+ .form-group-flex {
+ padding: 0;
+ }
.panel-body {
padding: 0;
position: absolute;
diff --git a/web/client/themes/default/less/common.less b/web/client/themes/default/less/common.less
index 8fff71902c..064d7efb3f 100644
--- a/web/client/themes/default/less/common.less
+++ b/web/client/themes/default/less/common.less
@@ -93,7 +93,7 @@
}
}
}
-
+
}
// **************
@@ -433,6 +433,9 @@ div#sync-popover.popover {
.control-label {
flex: 1;
font-weight: normal;
+ &.strong{
+ font-weight: bold;
+ }
}
.input-group {
flex: 1;
@@ -441,4 +444,4 @@ div#sync-popover.popover {
z-index: 0;
}
margin-bottom: 8px;
-}
\ No newline at end of file
+}
diff --git a/web/client/translations/data.de-DE.json b/web/client/translations/data.de-DE.json
index 3790d2c5b1..b486601a93 100644
--- a/web/client/translations/data.de-DE.json
+++ b/web/client/translations/data.de-DE.json
@@ -117,6 +117,7 @@
"heightOffset": "Höhenversatz (m)",
"wmsLayerTileSize": "Kachelgröße (WMS)",
"serverType": "Servertyp",
+ "formatError": "Es war nicht möglich, Format und Informationsblattformat vom konfigurierten Dienst abzurufen. Wahrscheinlich verwenden Sie einen No-Vendor-Dienst und dieser wird nicht unterstützt (z. B. GeoNetwork).",
"serverTypeOption": {
"noVendor": "No Vendor",
"geoserver": "GeoServer"
@@ -198,6 +199,8 @@
},
"format": {
"title": "Format",
+ "tile": "Fliese",
+ "information": "Infoblatt",
"refresh": "Unterstützte Formate abrufen",
"loading": "Wird geladen...",
"noOption": "Keine Option",
@@ -1591,7 +1594,8 @@
"urlTemplate": "URL-Vorlage",
"urlTemplateHint": " Vorlagen-URL für Ihren benutzerdefinierten TMS-Dienst mit der Möglichkeit, Variablen einzufügen (ausgedrückt in geschweiften Klammern, z. B. {var_name} code>), die von der Anwendung ersetzt werden. . Die Variablen {x} code>, {y} code> und {z} code> sind für Kachelgitterkoordinatenwerte reserviert. Sie können auch Variablen verwenden {s} code> für Subdomains. Jede andere in der URL angegebene Variable muss auch in den Optionen unter \"Benutzerdefinierte TMS-Konfiguration\" (Erweiterte Einstellungen) angegeben werden.
",
"customTMSConfiguration": "Benutzerdefinierte TMS-Konfiguration",
- "customTMSConfigurationHint": " Optionen können Folgendes enthalten: