-
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.
- Loading branch information
1 parent
b178de1
commit 62cb62f
Showing
33 changed files
with
1,305 additions
and
18 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
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
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
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,16 @@ | ||
/* | ||
* 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 { resolve } from 'path'; | ||
|
||
export const advancedUiActions = (kibana: any) => | ||
new kibana.Plugin({ | ||
id: 'advanced_ui_actions', | ||
publicDir: resolve(__dirname, 'public'), | ||
uiExports: { | ||
hacks: 'plugins/advanced_ui_actions/np_ready/public/legacy', | ||
}, | ||
}); |
9 changes: 9 additions & 0 deletions
9
x-pack/legacy/plugins/advanced_ui_actions/public/np_ready/kibana.json
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,9 @@ | ||
{ | ||
"id": "advanced_ui_actions", | ||
"version": "kibana", | ||
"requiredPlugins": [ | ||
"embeddable" | ||
], | ||
"server": false, | ||
"ui": true | ||
} |
42 changes: 42 additions & 0 deletions
42
.../legacy/plugins/advanced_ui_actions/public/np_ready/public/can_inherit_time_range.test.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,42 @@ | ||
/* | ||
* 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 { canInheritTimeRange } from './can_inherit_time_range'; | ||
import { | ||
HelloWorldEmbeddable, | ||
HelloWorldContainer, | ||
} from '../../../../../../../src/legacy/core_plugins/embeddable_api/public/np_ready/public/lib/test_samples'; | ||
import { TimeRangeEmbeddable, TimeRangeContainer } from './test_helpers'; | ||
|
||
jest.mock('ui/new_platform'); | ||
|
||
test('canInheritTimeRange returns false if embeddable is inside container without a time range', () => { | ||
const embeddable = new TimeRangeEmbeddable( | ||
{ id: '1234', timeRange: { from: 'noxw-15m', to: 'now' } }, | ||
new HelloWorldContainer({ id: '123', panels: {} }, (() => null) as any) | ||
); | ||
|
||
expect(canInheritTimeRange(embeddable)).toBe(false); | ||
}); | ||
|
||
test('canInheritTimeRange returns false if embeddable is without a time range', () => { | ||
const embeddable = new HelloWorldEmbeddable( | ||
{ id: '1234' }, | ||
new HelloWorldContainer({ id: '123', panels: {} }, (() => null) as any) | ||
); | ||
// @ts-ignore | ||
expect(canInheritTimeRange(embeddable)).toBe(false); | ||
}); | ||
|
||
test('canInheritTimeRange returns true if embeddable is inside a container with a time range', () => { | ||
const embeddable = new TimeRangeEmbeddable( | ||
{ id: '1234', timeRange: { from: 'noxw-15m', to: 'now' } }, | ||
new TimeRangeContainer( | ||
{ id: '123', panels: {}, timeRange: { from: 'noxw-15m', to: 'now' } }, | ||
(() => null) as any | ||
) | ||
); | ||
expect(canInheritTimeRange(embeddable)).toBe(true); | ||
}); |
Oops, something went wrong.