-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
311517d
commit 09ed682
Showing
7 changed files
with
95 additions
and
32 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
x-pack/plugins/infra/public/locators/discover_logs_locator.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,23 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { LocatorDefinition } from '@kbn/share-plugin/public'; | ||
import type { LogsLocatorDependencies, LogsLocatorParams } from './logs_locator'; | ||
|
||
const DISCOVER_LOGS_LOCATOR_ID = 'DISCOVER_LOGS_LOCATOR'; | ||
|
||
export class DiscoverLogsLocatorDefinition implements LocatorDefinition<LogsLocatorParams> { | ||
public readonly id = DISCOVER_LOGS_LOCATOR_ID; | ||
|
||
constructor(protected readonly deps: LogsLocatorDependencies) {} | ||
|
||
public readonly getLocation = async (params: LogsLocatorParams) => { | ||
const { getLocationToDiscover } = await import('./helpers'); | ||
|
||
return getLocationToDiscover({ core: this.deps.core, ...params }); | ||
}; | ||
} |
31 changes: 31 additions & 0 deletions
31
x-pack/plugins/infra/public/locators/discover_node_logs_locator.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,31 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { LocatorDefinition } from '@kbn/share-plugin/public'; | ||
import type { NodeLogsLocatorDependencies, NodeLogsLocatorParams } from './node_logs_locator'; | ||
|
||
const DISCOVER_NODE_LOGS_LOCATOR_ID = 'DISCOVER_NODE_LOGS_LOCATOR'; | ||
|
||
export class DiscoverNodeLogsLocatorDefinition implements LocatorDefinition<NodeLogsLocatorParams> { | ||
public readonly id = DISCOVER_NODE_LOGS_LOCATOR_ID; | ||
|
||
constructor(protected readonly deps: NodeLogsLocatorDependencies) {} | ||
|
||
public readonly getLocation = async (params: NodeLogsLocatorParams) => { | ||
const { createNodeLogsQuery, getLocationToDiscover } = await import('./helpers'); | ||
|
||
const { timeRange, logView } = params; | ||
const query = createNodeLogsQuery(params); | ||
|
||
return getLocationToDiscover({ | ||
core: this.deps.core, | ||
timeRange, | ||
filter: query, | ||
logView, | ||
}); | ||
}; | ||
} |
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