-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[RUM Dashboard] Chart breakdowns #69420
Merged
Merged
Changes from all commits
Commits
Show all changes
93 commits
Select commit
Hold shift + click to select a range
f9c20a1
added rum filters and tab
shahzad31 1f75371
update
shahzad31 f1c9bcf
move range filter into common
shahzad31 9f615df
Merge branch 'master' into rum-filters
shahzad31 2214001
fix issue in tab condition
shahzad31 eaf461c
Merge branch 'master' into rum-filters
shahzad31 95b510b
add clinet
shahzad31 b818fbd
update
shahzad31 ac24241
Merge branch 'master' into rum-filters
shahzad31 3cd29fb
added transactiont type filter
shahzad31 bae67c2
Merge branch 'rum-filters' into client-metrics
shahzad31 5a6c41a
update
shahzad31 a3c83cc
Merge branch 'master' into client-metrics
shahzad31 60ac2eb
update
shahzad31 a587d82
Merge branch 'master' into client-metrics
shahzad31 6496237
Merge branch 'master' into client-metrics
shahzad31 fd6d22a
update
shahzad31 89a93ed
update
shahzad31 c1a9ef2
added filter
shahzad31 e062152
Merge branch 'master' into client-metrics
shahzad31 d77652c
update
shahzad31 1d0afcc
update
shahzad31 f1259a7
fixed
shahzad31 fb0782b
Merge branch 'master' into client-metrics
shahzad31 638920d
added rum tests
shahzad31 b0b11e5
Merge branch 'master' into client-metrics
shahzad31 9dc10c5
update and added reset zoom button
shahzad31 b2b444a
snapshot
shahzad31 6a9749e
Merge branch 'master' into client-metrics
shahzad31 8702dc9
Merge branch 'client-metrics' into chart-breakdowns
shahzad31 3c8f802
added breakdown filter button
shahzad31 ebf9761
Merge branch 'master' into client-metrics
shahzad31 e72de7b
update
shahzad31 746ef6f
Merge branch 'client-metrics' into chart-breakdowns
shahzad31 a0176da
improve responsiveness
shahzad31 3c769a7
update
shahzad31 9e0b508
rename impression treds
shahzad31 c7d1521
update tooltip
shahzad31 1d94b3f
update
shahzad31 483d8fd
Merge branch 'master' into client-metrics
shahzad31 9ffcabb
Merge branch 'master' into client-metrics
shahzad31 ee3616e
update test
shahzad31 7e18010
Merge branch 'client-metrics' into chart-breakdowns
shahzad31 20c779e
Suggested design improvements
formgeist bcb8ff8
update
shahzad31 1b8ef95
Merge branch 'master' into client-metrics
shahzad31 a05e6d6
Merge branch 'master' into chart-breakdowns
shahzad31 352621a
fix types
shahzad31 a0a7a44
Merge branch 'master' into client-metrics
shahzad31 7056e40
fix e2e
shahzad31 92098c0
Merge branch 'client-metrics' into chart-breakdowns
shahzad31 fc33078
fix issue with rum timing
shahzad31 9529d76
update snapshot
shahzad31 0733c7c
Merge pull request #2 from formgeist/client-metrics-ui-fixes
shahzad31 d3149ea
update snapshot
shahzad31 14e8851
fix types
shahzad31 9d143a5
Merge branch 'client-metrics' into chart-breakdowns
shahzad31 b232189
update
shahzad31 627e217
Merge branch 'master' into client-metrics
shahzad31 bff7fe9
Merge branch 'master' into client-metrics
elasticmachine 7206ffc
Merge branch 'client-metrics' of https://github.com/shahzad31/kibana …
shahzad31 4ba1889
fix issue came out of bad merge
shahzad31 bb2ae2e
Merge branch 'master' into chart-breakdowns
shahzad31 a15b3f5
Merge branch 'client-metrics' into chart-breakdowns
shahzad31 291c30c
update
shahzad31 9ab0659
Merge branch 'master' into chart-breakdowns
shahzad31 aaf36d7
commit
shahzad31 b5746f3
test
shahzad31 f9fe8e3
up
shahzad31 640695f
Merge branch 'master' into chart-breakdowns
shahzad31 5892c9d
fix theme
shahzad31 ba2823d
Merge branch 'master' into chart-breakdowns
shahzad31 5d267fe
update
shahzad31 986e9a5
upate
shahzad31 3797388
update
shahzad31 1690d15
update
shahzad31 c5b71a6
Merge branch 'master' into chart-breakdowns
shahzad31 a11f183
update
shahzad31 9df90e9
added types
shahzad31 1b5af10
Merge branch 'master' into chart-breakdowns
shahzad31 4b90edb
Merge branch 'master' into chart-breakdowns
shahzad31 059ac73
Fix PR feedback
shahzad31 2d686b0
PR feedbck
shahzad31 e45f12f
update i18c
shahzad31 f12173b
update scenerios
shahzad31 b1573bd
remove unnecessary changes
shahzad31 e5f6628
Merge branch 'master' into chart-breakdowns
shahzad31 041d90c
Merge branch 'master' into chart-breakdowns
elasticmachine a5ca6e2
Merge branch 'master' into chart-breakdowns
elasticmachine 12937e1
update bdd spec
shahzad31 623a800
Merge branch 'chart-breakdowns' of https://github.com/shahzad31/kiban…
shahzad31 9d6ecd9
Merge branch 'master' into chart-breakdowns
shahzad31 fe89c69
update scenerios
shahzad31 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,35 @@ Feature: RUM Dashboard | |
When the user inspects the real user monitoring tab | ||
Then should redirect to rum dashboard | ||
And should have correct client metrics | ||
|
||
Scenario Outline: Rum page filters | ||
When the user filters by "<filterName>" | ||
Then it filters the client metrics | ||
Examples: | ||
| filterName | | ||
| os | | ||
| location | | ||
|
||
Scenario: Page load distribution percentiles | ||
Given a user browses the APM UI application for RUM Data | ||
When the user inspects the real user monitoring tab | ||
Then should redirect to rum dashboard | ||
And should display percentile for page load chart | ||
|
||
Scenario: Page load distribution chart tooltip | ||
Given a user browses the APM UI application for RUM Data | ||
When the user inspects the real user monitoring tab | ||
Then should redirect to rum dashboard | ||
And should display tooltip on hover | ||
|
||
Scenario: Page load distribution chart legends | ||
Given a user browses the APM UI application for RUM Data | ||
When the user inspects the real user monitoring tab | ||
Then should redirect to rum dashboard | ||
And should display chart legend | ||
|
||
Scenario: Breakdown filter | ||
Given a user click page load breakdown filter | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is another scenario There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In a BDD sequence, there is a Given/When/Then pattern that should be repeated across different scenarios. |
||
When the user selected the breakdown | ||
Then breakdown series should appear in chart | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
x-pack/plugins/apm/e2e/cypress/support/step_definitions/rum/page_load_dist.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'; | ||
|
||
/** The default time in ms to wait for a Cypress command to complete */ | ||
export const DEFAULT_TIMEOUT = 60 * 1000; | ||
|
||
Given(`a user click page load breakdown filter`, () => { | ||
// wait for all loading to finish | ||
cy.get('kbnLoadingIndicator').should('not.be.visible'); | ||
cy.get('.euiStat__title-isLoading').should('not.be.visible'); | ||
const breakDownBtn = cy.get('[data-cy=breakdown-popover_pageLoad]'); | ||
breakDownBtn.click(); | ||
}); | ||
|
||
When(`the user selected the breakdown`, () => { | ||
cy.get('[data-cy=filter-breakdown-item_Browser]').click(); | ||
// click outside popover to close it | ||
cy.get('[data-cy=pageLoadDist]').click(); | ||
}); | ||
|
||
Then(`breakdown series should appear in chart`, () => { | ||
cy.get('.euiLoadingChart').should('not.be.visible'); | ||
cy.get('div.echLegendItem__label[title=Chrome] ') | ||
.invoke('text') | ||
.should('eq', 'Chrome'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
x-pack/plugins/apm/e2e/cypress/support/step_definitions/rum/rum_filters.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { When, Then } from 'cypress-cucumber-preprocessor/steps'; | ||
|
||
When(/^the user filters by "([^"]*)"$/, (filterName) => { | ||
// wait for all loading to finish | ||
cy.get('kbnLoadingIndicator').should('not.be.visible'); | ||
cy.get('.euiStat__title-isLoading').should('not.be.visible'); | ||
cy.get(`#local-filter-${filterName}`).click(); | ||
|
||
if (filterName === 'os') { | ||
cy.get('button.euiSelectableListItem[title="Mac OS X"]').click(); | ||
} else { | ||
cy.get('button.euiSelectableListItem[title="DE"]').click(); | ||
} | ||
cy.get('[data-cy=applyFilter]').click(); | ||
}); | ||
|
||
Then(`it filters the client metrics`, () => { | ||
const clientMetrics = '[data-cy=client-metrics] .euiStat__title'; | ||
|
||
// wait for all loading to finish | ||
cy.get('kbnLoadingIndicator').should('not.be.visible'); | ||
cy.get('.euiStat__title-isLoading').should('not.be.visible'); | ||
|
||
cy.get(clientMetrics).eq(2).invoke('text').snapshot(); | ||
|
||
cy.get(clientMetrics).eq(1).invoke('text').snapshot(); | ||
|
||
cy.get(clientMetrics).eq(0).invoke('text').snapshot(); | ||
|
||
cy.get('[data-cy=clearFilters]').click(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
const IPS = [ | ||
'89.191.86.214', // check24.de | ||
'167.40.79.24', // canada.ca | ||
'151.101.130.217', // elastic.co | ||
'185.143.68.17', | ||
'151.101.130.217', | ||
'185.143.68.17', | ||
'185.143.68.17', | ||
'151.101.130.217', | ||
'185.143.68.17', | ||
]; | ||
|
||
module.exports = IPS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
/* eslint-disable no-console */ | ||
|
||
/* eslint-disable import/no-extraneous-dependencies */ | ||
|
||
const UserAgents = [ | ||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36', | ||
'Mozilla/5.0 (Linux; Android 8.0.0; SM-G960F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36', | ||
'Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/69.0.3497.105 Mobile/15E148 Safari/605.1', | ||
'Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1', | ||
'Mozilla/5.0 (Linux; Android 7.0; Pixel C Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/52.0.2743.98 Safari/537.36', | ||
'Mozilla/5.0 (X11; CrOS x86_64 8172.45.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.64 Safari/537.36', | ||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9', | ||
'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1', | ||
'Mozilla/5.0 (CrKey armv7l 1.5.16041) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.0 Safari/537.36', | ||
]; | ||
|
||
module.exports = UserAgents; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
x-pack/plugins/apm/public/components/app/RumDashboard/Breakdowns/BreakdownFilter.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { BreakdownGroup } from './BreakdownGroup'; | ||
import { BreakdownItem } from '../../../../../typings/ui_filters'; | ||
import { | ||
CLIENT_GEO_COUNTRY_ISO_CODE, | ||
USER_AGENT_DEVICE, | ||
USER_AGENT_NAME, | ||
USER_AGENT_OS, | ||
} from '../../../../../common/elasticsearch_fieldnames'; | ||
|
||
interface Props { | ||
id: string; | ||
selectedBreakdowns: BreakdownItem[]; | ||
onBreakdownChange: (values: BreakdownItem[]) => void; | ||
} | ||
|
||
export const BreakdownFilter = ({ | ||
id, | ||
selectedBreakdowns, | ||
onBreakdownChange, | ||
}: Props) => { | ||
const categories: BreakdownItem[] = [ | ||
{ | ||
name: 'Browser', | ||
type: 'category', | ||
count: 0, | ||
selected: selectedBreakdowns.some(({ name }) => name === 'Browser'), | ||
fieldName: USER_AGENT_NAME, | ||
}, | ||
{ | ||
name: 'OS', | ||
type: 'category', | ||
count: 0, | ||
selected: selectedBreakdowns.some(({ name }) => name === 'OS'), | ||
fieldName: USER_AGENT_OS, | ||
}, | ||
{ | ||
name: 'Device', | ||
type: 'category', | ||
count: 0, | ||
selected: selectedBreakdowns.some(({ name }) => name === 'Device'), | ||
fieldName: USER_AGENT_DEVICE, | ||
}, | ||
{ | ||
name: 'Location', | ||
type: 'category', | ||
count: 0, | ||
selected: selectedBreakdowns.some(({ name }) => name === 'Location'), | ||
fieldName: CLIENT_GEO_COUNTRY_ISO_CODE, | ||
}, | ||
]; | ||
|
||
return ( | ||
<BreakdownGroup | ||
id={id} | ||
items={categories} | ||
onChange={(selValues: BreakdownItem[]) => { | ||
onBreakdownChange(selValues); | ||
}} | ||
/> | ||
); | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you take a look, these 3 steps all-together have been tested in the above scenario. What do you think about this scenario, rephrased:
Using quotes in a step generates a generic method in the implementation code, where the quoted string is replaced by a variable: