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

Web Actions Tab: More Accurate Coalescing #831

Merged
merged 1 commit into from Mar 8, 2019

Conversation

Projects
None yet
3 participants
@adrw
Copy link
Member

adrw commented Mar 8, 2019

  • groupBy that allowed for coalescing of web actions with the same pathPattern is improved to group on all uniquely identifying metadata so that bound web actions with the same pathPattern and unique other metadata are shown as separate entries
  • Add uniq filter on dispatchMechanism so that web actions installed in duplicate do not have multiple same HTTP Method tags displayed on the webAction
Web Actions Tab: More Accurate Coalescing
* `groupBy` that allowed for coalescing of web actions with the same `pathPattern` is improved to group on all uniquely identifying metadata so that bound web actions with the same `pathPattern` and unique other metadata are shown as separate entries
* Add `uniq` filter on `dispatchMechanism` so that web actions installed in duplicate do not have multiple same HTTP Method tags displayed on the `webAction`

@adrw adrw merged commit e78a5bb into square:master Mar 8, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
action => action.dispatchMechanism
)
const dispatchMechanism = chain(actions)
.flatMap(action => action.dispatchMechanism)

This comment has been minimized.

@wesleyk

wesleyk Mar 11, 2019

Collaborator

this should be handled server side, we should leave a TODO here to remove this duplicate processing

@wesleyk

This comment has been minimized.

Copy link
Collaborator

wesleyk commented Mar 11, 2019

bound web actions with the same pathPattern and unique other metadata are shown as separate entries

Why do we want this? Can you share some examples?

@adrw

This comment has been minimized.

Copy link
Member Author

adrw commented Mar 11, 2019

@wesleyk Example would be Static Resource Action which has a binding for each dashboard tab and has both Get and Post methods on them. Realistically, we could probably remove the Post annotation.

@Singleton
class StaticResourceAction @Inject constructor(
@JvmSuppressWildcards private val clientRequest: ActionScoped<Request>,
private val resourceLoader: ResourceLoader,
private val resourceEntryFinder: ResourceEntryFinder
) : WebAction {
@Get("/{path:.*}")
@Post("/{path:.*}")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.