forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[APM] ML integration (elastic#19791) (elastic#20644)
- Loading branch information
Showing
78 changed files
with
7,663 additions
and
2,272 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
function getUiSettingsClient() { | ||
return { | ||
get: key => { | ||
switch (key) { | ||
case 'timepicker:timeDefaults': | ||
return { from: 'now-15m', to: 'now', mode: 'quick' }; | ||
case 'timepicker:refreshIntervalDefaults': | ||
return { display: 'Off', pause: false, value: 0 }; | ||
default: | ||
throw new Error(`Unexpected config key: ${key}`); | ||
} | ||
} | ||
}; | ||
} | ||
|
||
function addBasePath(path) { | ||
return path; | ||
} | ||
|
||
function getInjected(key) { | ||
switch (key) { | ||
case 'apmIndexPattern': | ||
return 'apm*'; | ||
case 'mlEnabled': | ||
return true; | ||
default: | ||
throw new Error(`Unexpected config key: ${key}`); | ||
} | ||
} | ||
|
||
export default { | ||
getInjected, | ||
addBasePath, | ||
getUiSettingsClient | ||
}; |
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,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es6", | ||
"module": "commonjs", | ||
"baseUrl": "../../../.", | ||
"paths": { | ||
"ui/*": ["src/ui/public/*"] | ||
} | ||
}, | ||
"exclude": ["node_modules", "**/node_modules/*", "build"] | ||
} |
87 changes: 0 additions & 87 deletions
87
...k/plugins/apm/public/components/app/ErrorGroupOverview/Watcher/OpenWatcherDialogButton.js
This file was deleted.
Oops, something went wrong.
66 changes: 66 additions & 0 deletions
66
x-pack/plugins/apm/public/components/app/ErrorGroupOverview/Watcher/WatcherButton.js
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,66 @@ | ||
/* | ||
* 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, { Component } from 'react'; | ||
import { EuiButton, EuiContextMenu, EuiIcon, EuiPopover } from '@elastic/eui'; | ||
|
||
export default class WatcherButton extends Component { | ||
state = { | ||
isPopoverOpen: false | ||
}; | ||
|
||
onButtonClick = () => this.setState({ isPopoverOpen: true }); | ||
closePopover = () => this.setState({ isPopoverOpen: false }); | ||
|
||
popOverPanels = [ | ||
{ | ||
id: 0, | ||
title: 'Watcher', | ||
items: [ | ||
{ | ||
name: 'Enable error reports', | ||
icon: <EuiIcon type="plusInCircle" size="m" />, | ||
onClick: () => { | ||
this.closePopover(); | ||
this.props.onOpenFlyout(); | ||
} | ||
}, | ||
{ | ||
name: 'View existing watches', | ||
icon: 'tableOfContents', | ||
href: '/app/kibana#/management/elasticsearch/watcher/', | ||
target: '_blank', | ||
onClick: () => this.closePopover() | ||
} | ||
] | ||
} | ||
]; | ||
|
||
button = ( | ||
<EuiButton | ||
size="s" | ||
iconType="arrowDown" | ||
iconSide="right" | ||
onClick={this.onButtonClick} | ||
> | ||
Integrations | ||
</EuiButton> | ||
); | ||
|
||
render() { | ||
return ( | ||
<EuiPopover | ||
button={this.button} | ||
isOpen={this.state.isPopoverOpen} | ||
closePopover={this.closePopover} | ||
panelPaddingSize="none" | ||
anchorPosition="downRight" | ||
> | ||
<EuiContextMenu initialPanelId={0} panels={this.popOverPanels} /> | ||
</EuiPopover> | ||
); | ||
} | ||
} |
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
Oops, something went wrong.