-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 🎸 add telemetry for in-chart "Explore underlying data" * feat: 🎸 add telemetry for in-chart "Explore underlying data" * refactor: 💡 move all drilldowns into a sub-folder * feat: 🎸 setup example app section for ui_actions_enhanced * feat: 🎸 set up Drilldown Manager section * feat: 🎸 open drilldown manager from example plugin * refactor: 💡 rename supportedTriggers -> triggers prop * feat: 🎸 show dev warning if triggers prop is empty * refactor: 💡 rename "supportedTriggers" -> "triggers" props * feat: 🎸 open and close drilldown manager from example plugin * feat: 🎸 add sample ML job trigger * feat: 🎸 add sample ML URL drilldown * refactor: 💡 move KibanaURL to share plugin * refactor: 💡 add index file to ml drilldown * feat: 🎸 add AbstractDashboardDrilldown * refactor: 💡 make dashboard drilldown use abstract drilldown * refactor: 💡 rename dashboard drilldown to embeddable drilldown * feat: 🎸 add Dashboard drilldown to sample plugin * feat: 🎸 open dashboard drilldown in list view * feat: 🎸 add drilldown execute button * refactor: 💡 move drilldown React hooks into /hooks folder * test: 💍 fix tests after renaming triggers * chore: 🤖 populate "requireBundles" * fix: 🐛 fix TypeScript errors * fix: 🐛 fix Kibana plugin dependency * chore: 🤖 remoe unused import * feat: 🎸 persist drilldown manager state across app navigations * refactor: 💡 move no-embeddable example into a seprate file * feat: 🎸 set up example with embeddable * feat: 🎸 improve embeddable example * refactor: 💡 rename without embeddable example * feat: 🎸 set up no-embeddable single click example * feat: 🎸 add dashboard drilldown to single button example * fix: 🐛 remove unused margin * fix: 🐛 make "Get more actions" translation static * chore: 🤖 remove old dashboard drilldown definition * refactor: 💡 rename samples to generic names * refactor: 💡 make app 1 example drilldown "hello world" * chore: 🤖 remove unused required bundle * chore: 🤖 add dashboardEnhanced back * [kbn/optimizer] only build xpack examples when building xpack plugins * move alerting_example into x-pack/examples * remove filter for alertingExample plugin in oss plugins CI step * revert unrelated change * fix: 🐛 use correct prop name * test: 💍 fix embeddable-to-dashboard drilldown mock * test: 💍 fix a test after refactor * chore: 🤖 remove unused import * chore: 🤖 add dashboard_enahcned to example plugin * chore: 🤖 address review comments * feat: 🎸 add description to UI Actions Enhanced examples * docs: ✏️ improve docs of example plugin Co-authored-by: spalger <spalger@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
- Loading branch information
1 parent
13a737e
commit 59e4e06
Showing
92 changed files
with
1,687 additions
and
493 deletions.
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
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
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,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 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
38 changes: 38 additions & 0 deletions
38
x-pack/examples/ui_actions_enhanced_examples/public/components/page/index.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,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 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 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 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 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 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 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.