datatools-ui icon indicating copy to clipboard operation
datatools-ui copied to clipboard

Restrict 'Deploy feed' button to NYSDOT extension only

Open landonreed opened this issue 4 years ago • 0 comments

The 'Deploy feed' button allows a Data Tools user to create a feed source-specific OTP deployment with a custom router ID. This is really only intended for use with OTP servers that are long-lived (not ELB-based) where multiple graphs can be built/run on the same OTP instance (using build graph over wire). Currently, the only use case for this that IBI Group has is with New York State, so this button should probably only be rendered if the NYSDOT extension is enabled, like so:

https://github.com/ibi-group/datatools-ui/blob/d78bc110f8a38b0efc4a0c07a658184820ac3ca9/lib/editor/components/map/EditorMapLayersControl.js#L74

More discussion is needed on this, however, especially since OTP 2 has removed the build graph over wire functionality entirely.

As an alternative, it might be better to re-commission the deploy feed button to simply create a new deployment for the default router with the feed source added to the deployment. This is a more intuitive way to get users to the deployments tab rather than having them go back to the project, switch to deployments, and click new deployment.

This approach might be best applied on the server side by adding a new arg to the feedsource-specific Deployment constructor that indicates whether the default router should be used (and determining that in the DeploymentController#createDeploymentFromFeedSource method: https://github.com/ibi-group/datatools-server/blob/8e8276386f41bed1e3a090a4e36785cb8e58ec3d/src/main/java/com/conveyal/datatools/manager/models/Deployment.java#L229

image

landonreed avatar Feb 18 '21 15:02 landonreed