-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Drilldowns in examples #75640
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
Merged
Merged
Drilldowns in examples #75640
Changes from all commits
Commits
Show all changes
75 commits
Select commit
Hold shift + click to select a range
ae8da5a
feat: 🎸 add telemetry for in-chart "Explore underlying data"
streamich 23f7154
feat: 🎸 add telemetry for in-chart "Explore underlying data"
streamich 8e81488
Merge remote-tracking branch 'origin/master'
streamich 838425a
refactor: 💡 move all drilldowns into a sub-folder
streamich 8291550
feat: 🎸 setup example app section for ui_actions_enhanced
streamich bea92df
feat: 🎸 set up Drilldown Manager section
streamich c3933c0
feat: 🎸 open drilldown manager from example plugin
streamich d1dd1a2
refactor: 💡 rename supportedTriggers -> triggers prop
streamich 1e81346
feat: 🎸 show dev warning if triggers prop is empty
streamich d80cce4
refactor: 💡 rename "supportedTriggers" -> "triggers" props
streamich 7933266
feat: 🎸 open and close drilldown manager from example plugin
streamich ca46f4c
Merge remote-tracking branch 'upstream/master' into drilldowns-in-exa…
streamich a80b461
Merge remote-tracking branch 'upstream/master' into drilldowns-in-exa…
streamich 705008d
Merge remote-tracking branch 'upstream/master' into drilldowns-in-exa…
streamich 0a0438c
feat: 🎸 add sample ML job trigger
streamich 49153c5
feat: 🎸 add sample ML URL drilldown
streamich 2c9ddae
refactor: 💡 move KibanaURL to share plugin
streamich 2ce9d09
refactor: 💡 add index file to ml drilldown
streamich 664cec2
feat: 🎸 add AbstractDashboardDrilldown
streamich 3da8c9b
refactor: 💡 make dashboard drilldown use abstract drilldown
streamich 2505558
refactor: 💡 rename dashboard drilldown to embeddable drilldown
streamich 0e0b469
feat: 🎸 add Dashboard drilldown to sample plugin
streamich f54260b
Merge remote-tracking branch 'upstream/master' into drilldowns-in-exa…
streamich a64e714
feat: 🎸 open dashboard drilldown in list view
streamich 2d03893
feat: 🎸 add drilldown execute button
streamich abf6700
refactor: 💡 move drilldown React hooks into /hooks folder
streamich ee9c77a
test: 💍 fix tests after renaming triggers
streamich 3399275
Merge remote-tracking branch 'upstream/master' into drilldowns-in-exa…
streamich 0c6ebb4
chore: 🤖 populate "requireBundles"
streamich 334e26e
Merge remote-tracking branch 'upstream/master' into drilldowns-in-exa…
streamich e1f9095
Merge remote-tracking branch 'upstream/master' into drilldowns-in-exa…
streamich a935a2f
chore: 🤖 catch up with master
streamich 70960f0
fix: 🐛 fix TypeScript errors
streamich 8cc1723
fix: 🐛 fix Kibana plugin dependency
streamich cf02239
Merge remote-tracking branch 'upstream/master' into drilldowns-in-exa…
streamich 5b9dfa2
Merge remote-tracking branch 'upstream/master' into drilldowns-in-exa…
streamich 8569cbf
chore: 🤖 remoe unused import
streamich 9a40779
Merge remote-tracking branch 'upstream/master' into drilldowns-in-exa…
streamich bfa7306
feat: 🎸 persist drilldown manager state across app navigations
streamich f870258
refactor: 💡 move no-embeddable example into a seprate file
streamich af3664f
feat: 🎸 set up example with embeddable
streamich a718494
feat: 🎸 improve embeddable example
streamich fabcab6
refactor: 💡 rename without embeddable example
streamich 07cb5dc
feat: 🎸 set up no-embeddable single click example
streamich 9175ab9
feat: 🎸 add dashboard drilldown to single button example
streamich f19591f
Merge remote-tracking branch 'upstream/master' into drilldowns-in-exa…
streamich f5c550b
Merge remote-tracking branch 'upstream/master' into drilldowns-in-exa…
streamich 05e0929
chore: 🤖 catch up with master
streamich e86a36a
fix: 🐛 remove unused margin
streamich 5f0246f
fix: 🐛 make "Get more actions" translation static
streamich d8958b5
chore: 🤖 remove old dashboard drilldown definition
streamich 595990c
refactor: 💡 rename samples to generic names
streamich 1c5be9f
refactor: 💡 make app 1 example drilldown "hello world"
streamich 1b8492c
chore: 🤖 remove unused required bundle
streamich ab5cc96
chore: 🤖 add dashboardEnhanced back
streamich cdf48c7
[kbn/optimizer] only build xpack examples when building xpack plugins
spalger d6b6f74
move alerting_example into x-pack/examples
spalger ead9885
remove filter for alertingExample plugin in oss plugins CI step
spalger ce654ee
revert unrelated change
spalger dd2ce1d
Merge remote-tracking branch 'spalger/fix/optimizer/no-xpack-examples…
streamich 08dd6db
Merge branch 'master' into drilldowns-in-examples
elasticmachine 7f4b8bc
Merge remote-tracking branch 'upstream/master' into drilldowns-in-exa…
streamich be41664
fix: 🐛 use correct prop name
streamich d848d29
test: 💍 fix embeddable-to-dashboard drilldown mock
streamich 83701c0
test: 💍 fix a test after refactor
streamich 092496b
chore: 🤖 catch up with master
streamich d04d7fc
chore: 🤖 remove unused import
streamich 9497d25
chore: 🤖 catch up with master
streamich 8140373
chore: 🤖 add dashboard_enahcned to example plugin
streamich a2751ef
Merge remote-tracking branch 'upstream/master' into drilldowns-in-exa…
streamich 0343d0e
chore: 🤖 address review comments
streamich 3de04fe
feat: 🎸 add description to UI Actions Enhanced examples
streamich ee6769d
docs: ✏️ improve docs of example plugin
streamich 0c5ac3b
chore: 🤖 catch up with master
streamich 3eb5e27
Merge branch 'master' into drilldowns-in-examples
kibanamachine 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,44 @@ | ||
| /* | ||
| * Licensed to Elasticsearch B.V. under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch B.V. licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| // TODO: Replace this logic with KibanaURL once it is available. | ||
| // https://github.com/elastic/kibana/issues/64497 | ||
| export class KibanaURL { | ||
| public readonly path: string; | ||
| public readonly appName: string; | ||
| public readonly appPath: string; | ||
|
|
||
| constructor(path: string) { | ||
| const match = path.match(/^.*\/app\/([^\/#]+)(.+)$/); | ||
|
|
||
| if (!match) { | ||
| throw new Error('Unexpected URL path.'); | ||
| } | ||
|
|
||
| const [, appName, appPath] = match; | ||
|
|
||
| if (!appName || !appPath) { | ||
| throw new Error('Could not parse URL path.'); | ||
| } | ||
|
|
||
| this.path = path; | ||
| this.appName = appName; | ||
| this.appPath = appPath; | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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
38 changes: 38 additions & 0 deletions
38
x-pack/examples/ui_actions_enhanced_examples/public/components/page/index.tsx
This file contains hidden or 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,38 @@ | ||
| /* | ||
| * 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 * as React from 'react'; | ||
| import { | ||
| EuiPageBody, | ||
| EuiPageContent, | ||
| EuiPageContentBody, | ||
| EuiPageHeader, | ||
| EuiPageHeaderSection, | ||
| EuiTitle, | ||
| } from '@elastic/eui'; | ||
|
|
||
| export interface PageProps { | ||
| title?: React.ReactNode; | ||
| } | ||
|
|
||
| export const Page: React.FC<PageProps> = ({ title = 'Untitled', children }) => { | ||
| return ( | ||
| <EuiPageBody style={{ maxWidth: 1200, margin: '0 auto' }}> | ||
| <EuiPageHeader> | ||
| <EuiPageHeaderSection> | ||
| <EuiTitle size="l"> | ||
| <h1>{title}</h1> | ||
| </EuiTitle> | ||
| </EuiPageHeaderSection> | ||
| </EuiPageHeader> | ||
| <EuiPageContent> | ||
| <EuiPageContentBody style={{ maxWidth: 800, margin: '0 auto' }}> | ||
| {children} | ||
| </EuiPageContentBody> | ||
| </EuiPageContent> | ||
| </EuiPageBody> | ||
| ); | ||
| }; |
7 changes: 7 additions & 0 deletions
7
x-pack/examples/ui_actions_enhanced_examples/public/components/section/index.tsx
This file contains hidden or 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,7 @@ | ||
| /* | ||
| * 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. | ||
| */ | ||
|
|
||
| export * from './section'; |
24 changes: 24 additions & 0 deletions
24
x-pack/examples/ui_actions_enhanced_examples/public/components/section/section.tsx
This file contains hidden or 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,24 @@ | ||
| /* | ||
| * 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 { EuiTitle, EuiSpacer } from '@elastic/eui'; | ||
|
|
||
| export interface Props { | ||
| title: React.ReactNode; | ||
| } | ||
|
|
||
| export const Section: React.FC<Props> = ({ title, children }) => { | ||
| return ( | ||
| <section> | ||
| <EuiTitle size="m"> | ||
| <h2>{title}</h2> | ||
| </EuiTitle> | ||
| <EuiSpacer /> | ||
| {children} | ||
| </section> | ||
| ); | ||
| }; |
20 changes: 20 additions & 0 deletions
20
x-pack/examples/ui_actions_enhanced_examples/public/containers/app/app.tsx
This file contains hidden or 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,20 @@ | ||
| /* | ||
| * 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 { EuiPage } from '@elastic/eui'; | ||
| import { Page } from '../../components/page'; | ||
| import { DrilldownsManager } from '../drilldowns_manager'; | ||
|
|
||
| export const App: React.FC = () => { | ||
| return ( | ||
| <EuiPage> | ||
| <Page title={'UI Actions Enhanced'}> | ||
| <DrilldownsManager /> | ||
| </Page> | ||
| </EuiPage> | ||
| ); | ||
| }; |
7 changes: 7 additions & 0 deletions
7
x-pack/examples/ui_actions_enhanced_examples/public/containers/app/index.tsx
This file contains hidden or 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,7 @@ | ||
| /* | ||
| * 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. | ||
| */ | ||
|
|
||
| export * from './app'; |
39 changes: 39 additions & 0 deletions
39
.../ui_actions_enhanced_examples/public/containers/drilldowns_manager/drilldowns_manager.tsx
This file contains hidden or 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,39 @@ | ||
| /* | ||
| * 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 { EuiHorizontalRule } from '@elastic/eui'; | ||
| import React from 'react'; | ||
| import { Section } from '../../components/section/section'; | ||
| import { SampleMlJob, SampleApp1ClickContext } from '../../triggers'; | ||
| import { DrilldownsWithoutEmbeddableExample } from '../drilldowns_without_embeddable_example'; | ||
| import { DrilldownsWithoutEmbeddableSingleButtonExample } from '../drilldowns_without_embeddable_single_button_example/drilldowns_without_embeddable_single_button_example'; | ||
| import { DrilldownsWithEmbeddableExample } from '../drilldowns_with_embeddable_example'; | ||
|
|
||
| export const job: SampleMlJob = { | ||
| job_id: '123', | ||
| job_type: 'anomaly_detector', | ||
| description: 'This is some ML job.', | ||
| }; | ||
|
|
||
| export const context: SampleApp1ClickContext = { job }; | ||
|
|
||
| export const DrilldownsManager: React.FC = () => { | ||
| return ( | ||
| <div> | ||
| <Section title={'Drilldowns Manager'}> | ||
| <DrilldownsWithoutEmbeddableExample /> | ||
|
|
||
| <EuiHorizontalRule margin="xxl" /> | ||
|
|
||
| <DrilldownsWithoutEmbeddableSingleButtonExample /> | ||
|
|
||
| <EuiHorizontalRule margin="xxl" /> | ||
|
|
||
| <DrilldownsWithEmbeddableExample /> | ||
| </Section> | ||
| </div> | ||
| ); | ||
| }; |
7 changes: 7 additions & 0 deletions
7
x-pack/examples/ui_actions_enhanced_examples/public/containers/drilldowns_manager/index.tsx
This file contains hidden or 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,7 @@ | ||
| /* | ||
| * 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. | ||
| */ | ||
|
|
||
| export * from './drilldowns_manager'; |
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.
Uh oh!
There was an error while loading. Please reload this page.