-
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
[SIEM] Implement NP Plugin Setup #54030
Changes from 9 commits
eabb52d
d715578
f9e0c53
ad71223
25c379c
03cd2c1
6c74a91
b4b4635
896d7e0
256479f
afd5f17
215f59c
e071875
7f971f7
0d923e8
ae70785
1a8a8eb
69dbfae
75ffe9b
06d5807
c01e51d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 { render, unmountComponentAtNode } from 'react-dom'; | ||
|
||
import { CoreStart, StartPlugins, AppMountParameters } from '../plugin'; | ||
import { SiemApp } from './app'; | ||
|
||
export const renderApp = ( | ||
core: CoreStart, | ||
plugins: StartPlugins, | ||
{ element }: AppMountParameters | ||
) => { | ||
render(<SiemApp core={core} plugins={plugins} />, element); | ||
return () => unmountComponentAtNode(element); | ||
}; |
This file was deleted.
This file was deleted.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,9 +12,7 @@ import { useUiSetting$ } from '../../lib/kibana'; | |
|
||
export const PreferenceFormattedBytesComponent = ({ value }: { value: string | number }) => { | ||
const [bytesFormat] = useUiSetting$<string>(DEFAULT_BYTES_FORMAT); | ||
return ( | ||
<>{bytesFormat ? numeral(value).format(bytesFormat) : numeral(value).format('0,0.[0]b')}</> | ||
); | ||
return <>{numeral(value).format(bytesFormat || '0,0.[0]b')}</>; | ||
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 would remove the double pipe or check 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. Looks like we don't ever check for null/undefined in other places: So I am assuming it is safe to remove. 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. There is an edge case where the user has explicitly unset that setting: they would get raw values with no (manual) formatting. In practice this doesn't look great, but it's not terrible either: I can totally get behind the 'do what I specify in the settings' behavior and remove that guard, but I wanted to mention this just in case. 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. 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. nit, can we create a 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. @XavierM I think we're actually going to remove this particular usage. I just noticed we're using it here as well, which I'm going to inline to pull from UI settings as well. (cc @angorayc) That just leaves references in the tests. I'm happy to declare a 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. |
||
}; | ||
|
||
PreferenceFormattedBytesComponent.displayName = 'PreferenceFormattedBytesComponent'; | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
FWIW, this was mimicked from:
https://github.com/elastic/kibana/blob/master/x-pack/legacy/plugins/infra/index.ts#L36
Looking at others though they have
legacy
in their name now such as:https://github.com/elastic/kibana/blob/master/x-pack/legacy/plugins/maps/index.js
So this looks 👍 to me.