Skip to content

[APM] Get rid of pre middleware#26256

Merged
sorenlouv merged 1 commit intoelastic:masterfrom
sorenlouv:remove-pre-from-routes
Nov 28, 2018
Merged

[APM] Get rid of pre middleware#26256
sorenlouv merged 1 commit intoelastic:masterfrom
sorenlouv:remove-pre-from-routes

Conversation

@sorenlouv
Copy link
Member

Instead of using indirection to get setup we now simply call the method directly. Feels simpler and less code. And Typescript works out of the box :)

Rename apmIndexPattern to apmIndexPatternTitle and narrow down search query

Fix tests

Remove unused aggregation

Revert "Rename apmIndexPattern to apmIndexPatternTitle and narrow down search query"

This reverts commit 5aa86744a0b360ceb75a59ebc8a0a084b24fbe50.
}
}
}
sort: [{ [SPAN_START]: { order: 'asc' } }]
Copy link
Member Author

Choose a reason for hiding this comment

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

Unrelated change: I stumbled upon this aggregation which is never used. I could make a new PR but it felt small enough to go into this one.

} should fail with a Boom error`, async () => {
await expect(route[0].handler(mockReq)).rejects.toMatchObject({
test(`${route.method} ${route.path}"`, async () => {
await expect(route.handler(mockReq)).rejects.toMatchObject({
Copy link
Member Author

Choose a reason for hiding this comment

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

@jasonrhodes I made a minor change to the test output:

screenshot 2018-11-27 at 13 37 33

ok?

Copy link
Member

Choose a reason for hiding this comment

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

Nice!

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Member

@jasonrhodes jasonrhodes left a comment

Choose a reason for hiding this comment

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

LGTM

} should fail with a Boom error`, async () => {
await expect(route[0].handler(mockReq)).rejects.toMatchObject({
test(`${route.method} ${route.path}"`, async () => {
await expect(route.handler(mockReq)).rejects.toMatchObject({
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

@sorenlouv sorenlouv merged commit 7612266 into elastic:master Nov 28, 2018
@sorenlouv sorenlouv deleted the remove-pre-from-routes branch November 28, 2018 09:10
sorenlouv added a commit that referenced this pull request Nov 28, 2018
…[APM] Get rid of `pre` middleware (#26256) (#26328)

* [APM] Move chartsSelector transformation to backend (#26117)

* [APM] Move ML anomaly transformation to backend

Move apmTimeseries to backend

Fix tests

* Update default values

* Fix bug

* [APM] Get rid of `pre` middleware (#26256)

Rename apmIndexPattern to apmIndexPatternTitle and narrow down search query

Fix tests

Remove unused aggregation

Revert "Rename apmIndexPattern to apmIndexPatternTitle and narrow down search query"

This reverts commit 5aa86744a0b360ceb75a59ebc8a0a084b24fbe50.
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.

3 participants