You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -124,8 +124,9 @@ import { LogStream } from '../../../../../../infra/public';
124
124
125
125
To use the component your plugin needs to follow certain criteria:
126
126
127
-
- Ensure `"infra"` is specified as a `requiredPlugins` in your plugin's `kibana.json`.
128
-
- Ensure the `<LogStream />` component is mounted inside the hiearchy of a [`kibana-react` provider](https://github.com/elastic/kibana/blob/b2d0aa7b7fae1c89c8f9e8854ae73e71be64e765/src/plugins/kibana_react/README.md#L45).
127
+
- Ensure `"infra"` and `"data"` are specified as a `requiredPlugins` in your plugin's `kibana.json`.
128
+
- Ensure the `<LogStream />` component is mounted inside the hierachy of a [`kibana-react` provider](https://github.com/elastic/kibana/blob/b2d0aa7b7fae1c89c8f9e8854ae73e71be64e765/src/plugins/kibana_react/README.md#L45). At a minimum, the kibana-react provider must pass `http` (from core start services) and `data` (from core plugin start dependencies).
129
+
- Ensure the `<LogStream />` component is mounted inside the hierachy of a [`EuiThemeProvider`](https://github.com/elastic/kibana/blob/master/src/plugins/kibana_react/common/eui_styled_components.tsx).
129
130
130
131
## Usage
131
132
@@ -354,25 +355,30 @@ The infra plugin has the concept of a "source configuration", a collection of se
354
355
The `<LogStream />` component will use the `"default"` source configuration. If you want to use your own configuration, you need to first create it when you initialize your plugin, and then specify it in the `<LogStream />` component with the `sourceId` prop.
355
356
356
357
```tsx
357
-
// Your `plugin/init.ts`
358
+
// Your `server/plugin.ts`
358
359
classMyPlugin {
359
360
// ...
360
361
setup(core, plugins) {
361
362
plugins.infra.defineInternalSourceConfiguration(
362
363
'my_source', // ID for your source configuration
363
364
{
364
-
logAlias: 'some-index-*', // Optional. what ES index to query.
365
+
name: 'some-name',
366
+
description: 'some description',
367
+
logIndices: { // Also accepts an `index_pattern` type with `indexPatternId`
368
+
type: 'index_name',
369
+
indexName: 'some-index',
370
+
},
365
371
logColumns: [
366
-
{ timestampColumn: { id: '...uuid4' }, // The `@timestamp` column.
367
-
{ fieldColumn: { id: '...uuid4', field: 'some_field' }}, // Any column(s) you want.
368
-
{ messageColumn: { id: '...uuid' }} // The `message` column.
372
+
{ timestampColumn: { id: '...uuid4' }, // The `@timestamp` column. `id` is an arbitrary string identifier.
373
+
{ fieldColumn: { id: '...uuid4', field: 'some_field' }}, // Any column(s) you want. `id` is an arbitrary string identifier.
374
+
{ messageColumn: { id: '...uuid' }} // The `message` column. `id` is an arbitrary string identifier.
0 commit comments