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

Implement Sea Storm Atlas, Forecast and Floodmaps #36

Merged
merged 64 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
73f2037
add frontend implementation
nicokant Nov 18, 2022
1b95259
implement sea storm models
nicokant Nov 22, 2022
3970af0
add serializers and viewsets
nicokant Nov 23, 2022
b1bd849
initial setup of frontend
nicokant Nov 23, 2022
d86873a
implements segments page
nicokant Nov 24, 2022
5c6af33
add events list
nicokant Nov 24, 2022
8490c7d
add migration command for old events
nicokant Nov 24, 2022
3534bfa
show events
nicokant Nov 24, 2022
435dfc3
implement event detail and effects list
nicokant Nov 24, 2022
51e0429
manage auth
nicokant Nov 24, 2022
38486e7
create event
nicokant Nov 25, 2022
104cbc5
add detail map
nicokant Nov 25, 2022
9687528
add create effects
nicokant Nov 25, 2022
c2c508a
add search location
nicokant Nov 25, 2022
5489c52
add edit effects and detail
nicokant Nov 25, 2022
dd16689
add db view for aggregating effect data for map display
nicokant Nov 28, 2022
f63e7c8
configurable base maps
nicokant Nov 28, 2022
1106b89
fix missing react and minor style issues
nicokant Nov 28, 2022
f0bb270
fix missing reference
nicokant Nov 28, 2022
3302eb0
add clone and delete
nicokant Nov 28, 2022
93147f2
render events as table
nicokant Nov 28, 2022
09e9c1c
add dates format
nicokant Nov 28, 2022
2f7458c
allow delete events
nicokant Nov 28, 2022
7ab7189
add documents link
nicokant Nov 28, 2022
fdb8fb5
add filter for years
nicokant Nov 28, 2022
3711b4e
add command to populate infopopup
nicokant Nov 29, 2022
36978c2
fix render null instead of 0 when totat is 0
nicokant Nov 29, 2022
5736c05
add redirect to map, add atlas config
nicokant Nov 29, 2022
9a4fde0
export as xlsx
nicokant Nov 29, 2022
b3c3019
build frontend app in docker
nicokant Nov 30, 2022
219c0cc
minor changes to ux
nicokant Dec 5, 2022
59a724f
add description in select, add admin for models
nicokant Dec 5, 2022
bed9422
list years
nicokant Dec 5, 2022
7392f30
add command for populate infopopup, protect routes to unauthenticated
nicokant Dec 5, 2022
613d802
add view for coastal segments
nicokant Dec 13, 2022
40d5505
fix missing isAuthenticated
nicokant Dec 13, 2022
d37b368
change dataset names
nicokant Dec 13, 2022
cd57d2d
fix
nicokant Dec 13, 2022
5dfb101
render only after loading profile
nicokant Dec 13, 2022
738ffcd
dataset name dynamical in populate infopopup
nicokant Dec 13, 2022
80f8aa3
add mapstore extension
nicokant Jan 16, 2023
78a0f8b
disable client version to avoid caching
nicokant Jan 17, 2023
4c63ae7
fix dockerfile
nicokant Jan 17, 2023
f906639
add ol dependency
nicokant Jan 17, 2023
b35f032
fix copy
nicokant Jan 17, 2023
1d40264
disable catalogue in home page, change menu
nicokant Jan 19, 2023
7d03dbc
rename effect to impact
nicokant Jan 19, 2023
90ae13e
export all events in a segment
nicokant Jan 19, 2023
2bcb368
add icons
nicokant Jan 19, 2023
1b69e90
show only clicked group
nicokant Jan 20, 2023
d301533
add note for development
nicokant Jan 20, 2023
95449e3
add example for development
nicokant Jan 20, 2023
5c8ac0e
add description inside widget
nicokant Jan 20, 2023
1dfef0c
add django app to manage extensions
nicokant Jan 20, 2023
62dd398
add legend to extension
nicokant Feb 10, 2023
59a6ab9
add proxy service for thredds
nicokant Feb 6, 2023
e17505d
add prod command
nicokant Feb 6, 2023
da19b58
build settings
nicokant Feb 6, 2023
8276289
fix build
nicokant Feb 6, 2023
b7fbbed
add all styles
nicokant Feb 6, 2023
9f83fd5
add legend
nicokant Feb 6, 2023
422704b
implement date selector for full dataset
nicokant Feb 13, 2023
0864144
add multiple logos
nicokant Feb 22, 2023
571f85e
disable default markers
nicokant Mar 1, 2023
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
Prev Previous commit
Next Next commit
show only clicked group
  • Loading branch information
nicokant committed Jan 20, 2023
commit 1b69e90aab2ed80f4507bf556ef2b08a2ff01b7b
35 changes: 24 additions & 11 deletions src/iws/flooding_maps_ext/js/extension/plugins/Extension.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import PropTypes from 'prop-types';
import { Button, Card, Glyphicon } from 'react-bootstrap';
import { createSelector } from 'reselect';
import Rx from "rxjs";
import {Glyphicon} from 'react-bootstrap';

import { connect } from 'react-redux';

Expand All @@ -21,6 +20,7 @@ import { connect } from 'react-redux';
// mapstore
import { zoomToExtent } from "@mapstore/framework/actions/map";
import { setControlProperty, toggleControl } from "@mapstore/framework/actions/controls";
import { updateNode } from "@mapstore/framework/actions/layers";

/* COMPONENTS */
// mapstore
Expand All @@ -32,7 +32,7 @@ import Message from "@mapstore/framework/components/I18N/Message";
import { mapSelector } from '@mapstore/framework/selectors/map';
import { layersSelector, groupsSelector, rawGroupsSelector } from '@mapstore/framework/selectors/layers';
// custom
import { geotourEnabledSelector } from '../selectors/geotour';
import { geotourEnabledSelector, wholeSelector } from '../selectors/geotour';

/* CUSTOM LOCAL STYLE */
import '@js/extension/assets/style.css';
Expand All @@ -50,6 +50,7 @@ function Extension({
showCloseButton = true,
// use tmap from connect if we need (eg for get center)
groups,
updateNode,
// coming from connect function mapDispatch
onClose = () => {},
flyTo = () => {}
Expand All @@ -58,26 +59,38 @@ function Extension({
// Add code to do something to change what we have in what we Render with return

const [flyToEnabled, setFlyToEnabled] = useState(true);

const showOnlyGroup = (groupIndex) => {
console.log(groups, groupIndex);
groups.forEach((g, i) => {
g.nodes.forEach(n => {
updateNode(n.id ,'wms', { visibility: groupIndex === i })
})
})
}

return enabled ? (<DockablePanel
open={enabled}
// dock // If dock -> the panel is placed in the following position
// position="right"
dock
bsStyle="primary"
draggable={false}
size={200}
title={<Message msgId="Places"/>}
title={<Message msgId="geotour.title"/>}
onClose={showCloseButton ? onClose : null}
// glyph="globe"
style={dockStyle}
>
{ groups.map((group) => {
{ groups.map((group, index) => {
// console.log(group.title)
return (
<div className="gd-center">
<Button variant="primary" style={{ width: "80%" }} disabled={!flyToEnabled} onClick={() => {
// console.log(group.nodes[0].bbox.bounds)
// console.log(group.nodes[0].bbox.crs)
flyTo(group.nodes[0].bbox.bounds, group.nodes[0].bbox.crs, 20, {duration: 1000});
<Button variant="secondary" style={{ width: "80%" }} disabled={!flyToEnabled} onClick={() => {
showOnlyGroup(index)
if (group.nodes.length > 0) {
flyTo(group.nodes[0].bbox.bounds, group.nodes[0].bbox.crs, 20, {duration: 1000});
}
}}> {group.title} </Button>
</div>
);
Expand All @@ -98,13 +111,14 @@ const ConnectedExtension = connect(
groupsSelector,
], (enabled, groups) => ({
enabled,
groups
groups,
})),
{
/** ACTIONS */
// Custom
// mapstore
flyTo: zoomToExtent,
updateNode,
onClose: setControlProperty.bind(null, "geotour", "enabled", false, false)
})(Extension);

Expand All @@ -119,8 +133,7 @@ export default {
Toolbar: {
name: "GeoTour",
position: 10,
text: <Message msgId="geotour.description" />,
tooltip: "geotour.title",
tooltip: <Message msgId="geotour.title" />,
icon: <Glyphicon glyph="bookmark" />,
doNotHide: true,
action: toggleControl.bind(null, 'geotour', null),
Expand Down
Loading