-
Notifications
You must be signed in to change notification settings - Fork 416
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Align master to c125_annotations (#2706)
* Fix documentation issue (#2606) * Fixes #2608: custom mapOptions are not saved with maps (#2609) * Fix #2592 reorganized text widget into 1 page (#2614) * Fixed sidegrid css for different screen resolutions (#2616) Fix #2593 * Fixes #2542 Custom template for GetFeatureInfo (#2591) * (Partial) Chinese language translation (#2643) * add the Chinese langu * Fixed chinese language implementation * Added onlink handler to openlayers overlay layer (#2644) * Fix #2623. Implemented table widget (#2635) - Externalized VirtualScroll functionalities to be reused - implemented wfsTable enhancer to support auto-data fetch/update with virtual scroll - Added to RequestBuilder sortBy and propertyName support - Add wfs to observable to reuse streams - Provided a getLayerJSONFeature (to extend) for a more rational usage of parameters ( old requests had to manage filterObj was containing sort and pagination options) - Set widgetContainer to be traggable only by header ( the cursor now changes where the widget is draggable) - Add sortable and defaultWidth options to FeatureGrid editor enhancer - Add support for columns resize, memorization and reset - tabular view of attribute selection * Closes geosolutions-it/austrocontrol-C125#26 (#2632) * Closes geosolutions-it/austrocontrol-C125#26 * Fixes on Mauro's comment * Fixed split search pattern * Counter widget (#2645) * Fixes #2547: upgraded openlayers to 4.6.4 (#2646) * Fixes #2547: upgraded openlayers to 4.6.4 * Fix for tests * MousePosition degrees template via plugin props (#2648) * MousePosition degrees template via plugin props * Removed unused import * Fix #2615. Avoid widgets clear while saving (#2649) * Fixes #2665 Add an action to force resize of Map component (#2666) * Austro#31# (#2683) * Fixes #2638 * Fixes #2639 * Fixes #2640 * Fixes #2569: upgrade of leaflet version to 1.3.1 (and related dependencies) (#2671) * Fixing leaflet randomly failing test (#2697) * Closes #2637 (#2698) * Fixes #2703: openalayers WMTS layers ignore initial visibility (#2704) * 2626 updates measure tool (#2701) * Fix #2626 Updated measure tool * revert on test file * Made some changes, added arcs on leaflet * made length formula and showlabel configurable * fixed default config, added documentation * fixed reducer default
- Loading branch information
Showing
229 changed files
with
9,767 additions
and
1,136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* Copyright 2018, GeoSolutions Sas. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
const React = require('react'); | ||
const Message = require('../../I18N/Message'); | ||
const loadingState = require('../../misc/enhancers/loadingState'); | ||
const FeatureGrid = loadingState(({ describeFeatureType }) => !describeFeatureType)(require('../../data/featuregrid/FeatureGrid')); | ||
const InfoPopover = require('./InfoPopover'); | ||
|
||
const WidgetContainer = require('./WidgetContainer'); | ||
const { | ||
Glyphicon, | ||
ButtonToolbar, | ||
DropdownButton, | ||
MenuItem | ||
} = require('react-bootstrap'); | ||
|
||
const renderHeaderLeftTopItem = ({ title, description }) => { | ||
return title || description ? <InfoPopover placement="top" title={title} text={description} /> : null; | ||
}; | ||
|
||
|
||
module.exports = ({ | ||
id, | ||
title, | ||
description, | ||
loading, | ||
confirmDelete = false, | ||
toggleTableView = () => { }, | ||
toggleDeleteConfirm = () => { }, | ||
exportCSV = () => { }, | ||
onEdit = () => { }, | ||
onDelete = () => { }, | ||
pageEvents = { | ||
moreFeatures: () => {} | ||
}, | ||
describeFeatureType, | ||
features, | ||
size, | ||
pages, | ||
pagination = {}, | ||
virtualScroll = true | ||
}) => | ||
(<WidgetContainer | ||
id={`widget-chart-${id}`} | ||
title={title} | ||
topLeftItems={renderHeaderLeftTopItem({ loading, title, description, toggleTableView })} | ||
confirmDelete={confirmDelete} | ||
onDelete={onDelete} | ||
toggleDeleteConfirm={toggleDeleteConfirm} | ||
topRightItems={<ButtonToolbar> | ||
<DropdownButton pullRight bsStyle="default" className="widget-menu" title={<Glyphicon glyph="option-vertical" />} noCaret id="dropdown-no-caret"> | ||
<MenuItem onClick={() => toggleTableView()} eventKey="1"><Glyphicon glyph="features-grid" /> <Message msgId="widgets.widget.menu.showChartData" /></MenuItem> | ||
<MenuItem onClick={() => onEdit()} eventKey="3"><Glyphicon glyph="pencil" /> <Message msgId="widgets.widget.menu.edit" /></MenuItem> | ||
<MenuItem onClick={() => toggleDeleteConfirm(true)} eventKey="2"><Glyphicon glyph="trash" /> <Message msgId="widgets.widget.menu.delete" /></MenuItem> | ||
<MenuItem onClick={() => exportCSV({ title })} eventKey="4"><Glyphicon className="exportCSV" glyph="download" /> <Message msgId="widgets.widget.menu.downloadData" /></MenuItem> | ||
</DropdownButton> | ||
</ButtonToolbar>}> | ||
<FeatureGrid | ||
pageEvents={pageEvents} | ||
virtualScroll={virtualScroll} | ||
features={features} | ||
pages={pages} | ||
size={size} | ||
rowKey="id" | ||
describeFeatureType={describeFeatureType} | ||
pagination={pagination} /> | ||
</WidgetContainer> | ||
|
||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Copyright 2018, GeoSolutions Sas. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
const expect = require('expect'); | ||
const { | ||
toggleMeasurement, CHANGE_MEASUREMENT_TOOL, | ||
changeMeasurementState, CHANGE_MEASUREMENT_STATE, | ||
changeUom, CHANGE_UOM, | ||
changeGeometry, CHANGED_GEOMETRY | ||
} = require('../measurement'); | ||
const feature = {type: "Feature", geometry: { | ||
coordinates: [], | ||
type: "LineString" | ||
}}; | ||
const measureState = { | ||
len: 84321231.123, | ||
lengthFormula: "vincenty", | ||
feature | ||
}; | ||
describe('Test correctness of measurement actions', () => { | ||
|
||
it('Test toggleMeasurement action creator', () => { | ||
const retval = toggleMeasurement(measureState); | ||
expect(retval).toExist(); | ||
expect(retval.type).toBe(CHANGE_MEASUREMENT_TOOL); | ||
expect(retval.lengthFormula).toBe("vincenty"); | ||
}); | ||
|
||
|
||
it('Test changeMousePositionState action creator', () => { | ||
const [uom, value, previousUom] = ["m", 42, { | ||
length: {unit: 'km', label: 'km'}, | ||
area: {unit: 'sqm', label: 'm²'} | ||
}]; | ||
const retval = changeUom(uom, value, previousUom); | ||
expect(retval).toExist(); | ||
expect(retval.type).toBe(CHANGE_UOM); | ||
expect(retval.uom).toBe("m"); | ||
expect(retval.value).toBe(42); | ||
expect(retval.previousUom.length.label).toBe("km"); | ||
}); | ||
|
||
it('Test changeGeometry action creator', () => { | ||
|
||
const retval = changeGeometry(feature); | ||
expect(retval).toExist(); | ||
expect(retval.type).toBe(CHANGED_GEOMETRY); | ||
expect(retval.feature.geometry.type).toBe("LineString"); | ||
}); | ||
it('Test changeMeasurementState action creator', () => { | ||
const retval = changeMeasurementState(measureState); | ||
expect(retval).toExist(); | ||
expect(retval.type).toBe(CHANGE_MEASUREMENT_STATE); | ||
expect(retval.feature.geometry.type).toBe("LineString"); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.