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 webhooks feature #146

Merged
merged 7 commits into from
Feb 10, 2022
Merged

Implement webhooks feature #146

merged 7 commits into from
Feb 10, 2022

Conversation

ac-61
Copy link
Contributor

@ac-61 ac-61 commented Feb 8, 2022

This adds a webhook feature for pushing updates to a remote endpoint when draw layers are updated.

Webhook endpoints can be added via the configuration page by clicking on the "MANAGE WEBHOOKS" button.

Screen Shot 2022-02-08 at 11 30 52 AM

This feature supports the following actions:

  • DrawFileAdd (when a draw layer is updated)
  • DrawFileCreate (when a draw layer is created)
  • DrawFileDelete (when a draw layer is deleted)

3 injectable variables are allowed for the URL and body fields:

  • file_id (unique MMGIS ID of the draw layer)
  • file_name (name of the draw layer)
  • geojson (geojson object representing an entire draw layer)

If running in development mode, the following endpoints can be used to test the webhook feature:

Copy link
Member

@tariqksoliman tariqksoliman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The webhook delete buttons aren't working.

@ac-61
Copy link
Contributor Author

ac-61 commented Feb 9, 2022

@tariqksoliman Fixed with 22e78df!

Copy link
Member

@tariqksoliman tariqksoliman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and awesome work!

@ac-61 ac-61 merged commit 2d2f03b into development Feb 10, 2022
@ac-61 ac-61 deleted the ac-webhooks branch February 10, 2022 00:23
tariqksoliman added a commit that referenced this pull request Mar 16, 2022
* Added function to set initial layer times based on current time

* Remove debug print out (#126)

* #127 DrawTool - enable panning around without dropping points while d… (#128)

* #127 DrawTool - enable panning around without dropping points while drawing

* DrawTool - make active layer deselectable

* DrawTool - Fix uploaded file edit panel

* #129 BottomBar UI Visibility Modal (#130)

* Fix PUBLIC_URL configure urls (#131)

* env comment on DB_HOST in docker

* Fix controlled layer returning null

* Sublayers on Controlled Layers

* #134 - Any Projection Image Marker Attachments (#137)

* #139 Control Raster Filters in LithoSphere (#140)

* Update litho to css friendly filter effects

* #138 Projection agnostic Uncertain Ellipses, touch ups (#141)

* Minor colorramp dropdown fix

* leaflet-imagetransfrom map check

* Dockerfile node:16 (#145)

* Update README.md

Node 10.10 -> Node 14.9.0

* Implement webhooks feature (#146)

* First implementation of webhooks

* Remove webhooktoken field

* Reorganize files and functions

* Clean up webhook cards

* Add routes for testing webhooks when using development environment

* Fix Config subpage scrollbar issue

* Fix delete button

Co-authored-by: Tariq Soliman <Tariq.K.Soliman@jpl.nasa.gov>

* Added docs for how to use remote virtual layers via GDAL

- Also updated Measure Tool to support remote DEMs

* A bit more info on gdalwmscache directory in docs

* Remote_Virtual_Layer typo fixes

* Curtain Support (#152)

* Curtain part 2

* rgrams styles

* Touch ups

* Use litho 1.3.0

* #151 Support 3D Uncertainty Ellipses on Point Features (#153)

* 3D Uncertainty ellipses

* #151 Upgrade lithosphere, more uncertainty ellipse options, docs

* Fix minor bugs (#155)

* Upgrade litho

* Litho 1.3.2

* Litho 1.3.3

* Add LineString functions (#156)

* Add function to trim layers containing LineString features

* Add appendLineString function and clean up trimLineString function

* Remove debug code

* Minor fixes

* Add args to dockerfile so PUBLIC_URL can be specified at image build time (#157)

Co-authored-by: David Lees <david.lees@nasa.gov>

* Update the globe when vector layers are modified (#158)

* Update the globe when vector layers are modified

* Remove extraneous code

* Remove extra variable

* Fixed vector time updates not actually refreshing when told to reload (#159)

* Dropdowns can expand up, draw tests

* Bump to 2.6.0

Co-authored-by: Joe Roberts <joe.t.roberts@jpl.nasa.gov>
Co-authored-by: ac-61 <ac-61@users.noreply.github.com>
Co-authored-by: dsl3000 <dsl3001@gmail.com>
Co-authored-by: David Lees <david.lees@nasa.gov>
tariqksoliman added a commit that referenced this pull request Oct 23, 2023
* MMGIS 2.6.0 (#160)

* Added function to set initial layer times based on current time

* Remove debug print out (#126)

* #127 DrawTool - enable panning around without dropping points while d… (#128)

* #127 DrawTool - enable panning around without dropping points while drawing

* DrawTool - make active layer deselectable

* DrawTool - Fix uploaded file edit panel

* #129 BottomBar UI Visibility Modal (#130)

* Fix PUBLIC_URL configure urls (#131)

* env comment on DB_HOST in docker

* Fix controlled layer returning null

* Sublayers on Controlled Layers

* #134 - Any Projection Image Marker Attachments (#137)

* #139 Control Raster Filters in LithoSphere (#140)

* Update litho to css friendly filter effects

* #138 Projection agnostic Uncertain Ellipses, touch ups (#141)

* Minor colorramp dropdown fix

* leaflet-imagetransfrom map check

* Dockerfile node:16 (#145)

* Update README.md

Node 10.10 -> Node 14.9.0

* Implement webhooks feature (#146)

* First implementation of webhooks

* Remove webhooktoken field

* Reorganize files and functions

* Clean up webhook cards

* Add routes for testing webhooks when using development environment

* Fix Config subpage scrollbar issue

* Fix delete button

Co-authored-by: Tariq Soliman <Tariq.K.Soliman@jpl.nasa.gov>

* Added docs for how to use remote virtual layers via GDAL

- Also updated Measure Tool to support remote DEMs

* A bit more info on gdalwmscache directory in docs

* Remote_Virtual_Layer typo fixes

* Curtain Support (#152)

* Curtain part 2

* rgrams styles

* Touch ups

* Use litho 1.3.0

* #151 Support 3D Uncertainty Ellipses on Point Features (#153)

* 3D Uncertainty ellipses

* #151 Upgrade lithosphere, more uncertainty ellipse options, docs

* Fix minor bugs (#155)

* Upgrade litho

* Litho 1.3.2

* Litho 1.3.3

* Add LineString functions (#156)

* Add function to trim layers containing LineString features

* Add appendLineString function and clean up trimLineString function

* Remove debug code

* Minor fixes

* Add args to dockerfile so PUBLIC_URL can be specified at image build time (#157)

Co-authored-by: David Lees <david.lees@nasa.gov>

* Update the globe when vector layers are modified (#158)

* Update the globe when vector layers are modified

* Remove extraneous code

* Remove extra variable

* Fixed vector time updates not actually refreshing when told to reload (#159)

* Dropdowns can expand up, draw tests

* Bump to 2.6.0

Co-authored-by: Joe Roberts <joe.t.roberts@jpl.nasa.gov>
Co-authored-by: ac-61 <ac-61@users.noreply.github.com>
Co-authored-by: dsl3000 <dsl3001@gmail.com>
Co-authored-by: David Lees <david.lees@nasa.gov>

* Description should be updated to match example code (#189)

* ci: build docker image and push to GitHub Container Registry (#316)

* Update docker-build workflow to trigger on deve branch and releases

* #336 Add GitHub Templates (#338)

* #399 Crashes if Layers are valid JSON but not valid GeoJSON (#400)

* #399 Add geojson validater to map

* #399 allow overloaded coordinates in geojson for extended geojson

* #401 Extend CSSO timeout check to main client (#402)

* #401 Main site timeout notification part 1

* #401 Main site timeout notification part 2

* #401 Main site timeout notification - warn at 20 min

* #403 rightClickMenuActions - Polygons and WKT (#404)

* #403 - Bugfixes and rightclick finds features

* #403 ContextMenu, Actions on features, WKT link populate

* #405 DrawTool - Template - Incrementer - Move to backend (#406)

* Mini fix to allow [] as empty geojson layer data

* Fix DrawTool Incrementer self collision bug

* Convert layer data [<FeatureCollection>] to geojson

* #407 Click intersects on Query and Draw layers (#408)

* #407 Include Query layers in click intersections

* #407 Support intersects on DrawTool layers too

* Allow the legend tool to be right justified on the screen

* #409 Added example config in description for LegendTool

* #410 Draw Tool - Time Integration (#411)

* ts-410 DrawTool - Temporal part 1

* #410 DrawlTool - Temporal Integration

* #410 Clearer DrawTool Template Date Start/End Icons

* #412 Add Configuration Option to set TimeUI Extent (#413)

* #414 IdentifierTool works again with human layer names (#415)

* #422 Removed event blocking popup functions (#423)

* Bump to 2.9.0

* #425 Description Item fixes (#426)

* #425 Description Item fixes

* Remove outdated comment

* Remove odd duplicate triggerWebhookds

* Fix draw upload webhook not populating geojson field

* Remove extra log

* Fix DrawTool deleting tag closing modal bug

* DrawTool - Remove timetoggle when tool closes

* DrawTool - Deselect file when turning off

* #427 Expandable Tools (#428)

* #427 Allow DrawTool names to expand too

* #429 Hotkeys (#430)

* #239 Hotkeys 1

* #429 DrawTool toggle last file hotkey

* shortcutSuffix and raw variables for tile layers

* Update Dependencies (#431)

* #365 Separate out dev deps in package.json

* Closer but webapck is broken

* Dev server works - build still broken

* Fix build

* Update Expressjs

* docker build workflow - add no-cache param

* Update ModuleScopePlugin

* #432 Image Overlay Fixes (#433)

* #435 DrawTool - Reorder Template fields (#436)

* #437 Add CONTRIBUTING.md (#438)

* Update README.md

* #439 DrawTool - Add Advanced Search and Filter UI to Shapes Tab (#440)

* #439 DrawTool Shape Tab Filter

* #439 DrawTool - Features Tab filter 2

* Support booleans in LocalFilterer

---------

Co-authored-by: fcalef <49040273+fcalef@users.noreply.github.com>
Co-authored-by: Joe Roberts <joe.t.roberts@jpl.nasa.gov>
Co-authored-by: ac-61 <ac-61@users.noreply.github.com>
Co-authored-by: dsl3000 <dsl3001@gmail.com>
Co-authored-by: David Lees <david.lees@nasa.gov>
Co-authored-by: David Tsay <3614296+davetsay@users.noreply.github.com>
Co-authored-by: James Montalvo <jamesmontalvo3@gmail.com>
tariqksoliman added a commit that referenced this pull request Nov 8, 2023
* #398 ShadeTool part 1

* #398 Spice, somewhat working shade tool, needs touchups and verification

* #398 Update python-requirement.txt

* #398 Improve shade tool 1

* #398 Auto fill dynamic template

* #398 Chronos part 1

* #398 Add getKernel helpers

* #398 Shade - Chronos integration, test with 2 orbiters, cleanup UI, sources and observers from config

* #398 Final touchups, docs, includeSunEarth, bug fixes, utc instead of tdb

* #398 configurable height, remove altitude, timeUI start in point mode

* #398 Fix bad target lnglat issue and fix altitude units

* touchups

* Update python-requirements.txt

* Update Dockerfile

* Update python-requirements.txt

* Merge Dev into Feature Branch (#441)

* MMGIS 2.6.0 (#160)

* Added function to set initial layer times based on current time

* Remove debug print out (#126)

* #127 DrawTool - enable panning around without dropping points while d… (#128)

* #127 DrawTool - enable panning around without dropping points while drawing

* DrawTool - make active layer deselectable

* DrawTool - Fix uploaded file edit panel

* #129 BottomBar UI Visibility Modal (#130)

* Fix PUBLIC_URL configure urls (#131)

* env comment on DB_HOST in docker

* Fix controlled layer returning null

* Sublayers on Controlled Layers

* #134 - Any Projection Image Marker Attachments (#137)

* #139 Control Raster Filters in LithoSphere (#140)

* Update litho to css friendly filter effects

* #138 Projection agnostic Uncertain Ellipses, touch ups (#141)

* Minor colorramp dropdown fix

* leaflet-imagetransfrom map check

* Dockerfile node:16 (#145)

* Update README.md

Node 10.10 -> Node 14.9.0

* Implement webhooks feature (#146)

* First implementation of webhooks

* Remove webhooktoken field

* Reorganize files and functions

* Clean up webhook cards

* Add routes for testing webhooks when using development environment

* Fix Config subpage scrollbar issue

* Fix delete button

Co-authored-by: Tariq Soliman <Tariq.K.Soliman@jpl.nasa.gov>

* Added docs for how to use remote virtual layers via GDAL

- Also updated Measure Tool to support remote DEMs

* A bit more info on gdalwmscache directory in docs

* Remote_Virtual_Layer typo fixes

* Curtain Support (#152)

* Curtain part 2

* rgrams styles

* Touch ups

* Use litho 1.3.0

* #151 Support 3D Uncertainty Ellipses on Point Features (#153)

* 3D Uncertainty ellipses

* #151 Upgrade lithosphere, more uncertainty ellipse options, docs

* Fix minor bugs (#155)

* Upgrade litho

* Litho 1.3.2

* Litho 1.3.3

* Add LineString functions (#156)

* Add function to trim layers containing LineString features

* Add appendLineString function and clean up trimLineString function

* Remove debug code

* Minor fixes

* Add args to dockerfile so PUBLIC_URL can be specified at image build time (#157)

Co-authored-by: David Lees <david.lees@nasa.gov>

* Update the globe when vector layers are modified (#158)

* Update the globe when vector layers are modified

* Remove extraneous code

* Remove extra variable

* Fixed vector time updates not actually refreshing when told to reload (#159)

* Dropdowns can expand up, draw tests

* Bump to 2.6.0

Co-authored-by: Joe Roberts <joe.t.roberts@jpl.nasa.gov>
Co-authored-by: ac-61 <ac-61@users.noreply.github.com>
Co-authored-by: dsl3000 <dsl3001@gmail.com>
Co-authored-by: David Lees <david.lees@nasa.gov>

* Description should be updated to match example code (#189)

* ci: build docker image and push to GitHub Container Registry (#316)

* Update docker-build workflow to trigger on deve branch and releases

* #336 Add GitHub Templates (#338)

* #399 Crashes if Layers are valid JSON but not valid GeoJSON (#400)

* #399 Add geojson validater to map

* #399 allow overloaded coordinates in geojson for extended geojson

* #401 Extend CSSO timeout check to main client (#402)

* #401 Main site timeout notification part 1

* #401 Main site timeout notification part 2

* #401 Main site timeout notification - warn at 20 min

* #403 rightClickMenuActions - Polygons and WKT (#404)

* #403 - Bugfixes and rightclick finds features

* #403 ContextMenu, Actions on features, WKT link populate

* #405 DrawTool - Template - Incrementer - Move to backend (#406)

* Mini fix to allow [] as empty geojson layer data

* Fix DrawTool Incrementer self collision bug

* Convert layer data [<FeatureCollection>] to geojson

* #407 Click intersects on Query and Draw layers (#408)

* #407 Include Query layers in click intersections

* #407 Support intersects on DrawTool layers too

* Allow the legend tool to be right justified on the screen

* #409 Added example config in description for LegendTool

* #410 Draw Tool - Time Integration (#411)

* ts-410 DrawTool - Temporal part 1

* #410 DrawlTool - Temporal Integration

* #410 Clearer DrawTool Template Date Start/End Icons

* #412 Add Configuration Option to set TimeUI Extent (#413)

* #414 IdentifierTool works again with human layer names (#415)

* #422 Removed event blocking popup functions (#423)

* Bump to 2.9.0

* #425 Description Item fixes (#426)

* #425 Description Item fixes

* Remove outdated comment

* Remove odd duplicate triggerWebhookds

* Fix draw upload webhook not populating geojson field

* Remove extra log

* Fix DrawTool deleting tag closing modal bug

* DrawTool - Remove timetoggle when tool closes

* DrawTool - Deselect file when turning off

* #427 Expandable Tools (#428)

* #427 Allow DrawTool names to expand too

* #429 Hotkeys (#430)

* #239 Hotkeys 1

* #429 DrawTool toggle last file hotkey

* shortcutSuffix and raw variables for tile layers

* Update Dependencies (#431)

* #365 Separate out dev deps in package.json

* Closer but webapck is broken

* Dev server works - build still broken

* Fix build

* Update Expressjs

* docker build workflow - add no-cache param

* Update ModuleScopePlugin

* #432 Image Overlay Fixes (#433)

* #435 DrawTool - Reorder Template fields (#436)

* #437 Add CONTRIBUTING.md (#438)

* Update README.md

* #439 DrawTool - Add Advanced Search and Filter UI to Shapes Tab (#440)

* #439 DrawTool Shape Tab Filter

* #439 DrawTool - Features Tab filter 2

* Support booleans in LocalFilterer

---------

Co-authored-by: fcalef <49040273+fcalef@users.noreply.github.com>
Co-authored-by: Joe Roberts <joe.t.roberts@jpl.nasa.gov>
Co-authored-by: ac-61 <ac-61@users.noreply.github.com>
Co-authored-by: dsl3000 <dsl3001@gmail.com>
Co-authored-by: David Lees <david.lees@nasa.gov>
Co-authored-by: David Tsay <3614296+davetsay@users.noreply.github.com>
Co-authored-by: James Montalvo <jamesmontalvo3@gmail.com>

---------

Co-authored-by: fcalef <49040273+fcalef@users.noreply.github.com>
Co-authored-by: Joe Roberts <joe.t.roberts@jpl.nasa.gov>
Co-authored-by: ac-61 <ac-61@users.noreply.github.com>
Co-authored-by: dsl3000 <dsl3001@gmail.com>
Co-authored-by: David Lees <david.lees@nasa.gov>
Co-authored-by: David Tsay <3614296+davetsay@users.noreply.github.com>
Co-authored-by: James Montalvo <jamesmontalvo3@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants