diff --git a/web/client/components/app/StandardApp.jsx b/web/client/components/app/StandardApp.jsx index 6b95580acf..1f973cefad 100644 --- a/web/client/components/app/StandardApp.jsx +++ b/web/client/components/app/StandardApp.jsx @@ -81,7 +81,7 @@ class StandardApp extends React.Component { onPersist: onInit.bind(null, config) }, { initialState: this.parseInitialState(config.initialState, { - mode: this.props.mode || ConfigUtils.getBrowserProperties().mobile ? 'mobile' : 'desktop' + mode: this.props.mode || (ConfigUtils.getBrowserProperties().mobile ? 'mobile' : 'desktop') }) || {defaultState: {}, mobile: {}} }); this.store = this.props.appStore(this.props.pluginsDef.plugins, opts); diff --git a/web/client/observables/wfs.js b/web/client/observables/wfs.js index f1b807f0c9..983d7c2900 100644 --- a/web/client/observables/wfs.js +++ b/web/client/observables/wfs.js @@ -72,17 +72,7 @@ const workaroundGEOS7233 = ({ totalFeatures, features, ...rest } = {}, { startIn }; }; -const getWFSFilterData = (filterObj) => { - let data; - if (typeof filterObj === 'string') { - data = filterObj; - } else { - data = filterObj.filterType === "OGC" - ? FilterUtils.toOGCFilter(filterObj.featureTypeName, filterObj, filterObj.ogcVersion, filterObj.sortOptions, filterObj.hits) - : FilterUtils.toCQLFilter(filterObj); - } - return data; -}; + const getPagination = (filterObj = {}, options = {}) => filterObj.pagination @@ -100,7 +90,7 @@ const getPagination = (filterObj = {}, options = {}) => * @return {Observable} a stream that emits the GeoJSON or an error. */ const getJSONFeature = (searchUrl, filterObj, options = {}) => { - const data = getWFSFilterData(filterObj); + const data = FilterUtils.getWFSFilterData(filterObj); const urlParsedObj = Url.parse(searchUrl, true); let params = isObject(urlParsedObj.query) ? urlParsedObj.query : {}; diff --git a/web/client/product/pages/Dashboard.jsx b/web/client/product/pages/Dashboard.jsx index 31f8aaced9..5c7faa810e 100644 --- a/web/client/product/pages/Dashboard.jsx +++ b/web/client/product/pages/Dashboard.jsx @@ -8,8 +8,6 @@ const PropTypes = require('prop-types'); */ const React = require('react'); -require("../assets/css/maps.css"); - const {connect} = require('react-redux'); const url = require('url'); diff --git a/web/client/utils/FilterUtils.jsx b/web/client/utils/FilterUtils.jsx index 4aadb6d3cc..59bfc065ff 100644 --- a/web/client/utils/FilterUtils.jsx +++ b/web/client/utils/FilterUtils.jsx @@ -893,6 +893,17 @@ const FilterUtils = { ogcListField, ogcBooleanField, ogcStringField, + getWFSFilterData: (filterObj) => { + let data; + if (typeof filterObj === 'string') { + data = filterObj; + } else { + data = filterObj.filterType === "OGC" + ? FilterUtils.toOGCFilter(filterObj.featureTypeName, filterObj, filterObj.ogcVersion, filterObj.sortOptions, filterObj.hits) + : FilterUtils.toCQLFilter(filterObj); + } + return data; + }, isLikeOrIlike: (operator) => operator === "ilike" || operator === "like", isFilterValid: (f = {}) => (f.filterFields && f.filterFields.length > 0)