Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
178934c
chore(logs-shared): init plugin
Jun 7, 2023
8bac14f
feat(logs-shared): move log view saved object
Jun 7, 2023
755807f
feat(logs-shared): wip on server
Jun 8, 2023
235efe9
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Jun 8, 2023
603b5e7
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jun 8, 2023
c73f6d1
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine Jun 8, 2023
19c35bd
[CI] Auto-commit changed files from 'node scripts/build_plugin_list_d…
kibanamachine Jun 8, 2023
2973153
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 8, 2023
6d84e2f
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 8, 2023
4a47f46
fix(logs-shared): move common and server files
Jun 9, 2023
4cf1040
feat(logs-shared): add missing dependencies
Jun 9, 2023
3d1f4b9
feat(logs-shared): replace endpoint init
Jun 9, 2023
0f935f1
feat(logs-shared): set logViews config
Jun 9, 2023
e78897c
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Jun 9, 2023
631c690
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jun 9, 2023
6fcb488
refactor(logs-shared): replace log views external usages
Jun 12, 2023
c4c72e8
Merge branch '159128-split-log-stream-into-plugin' of github.com:tony…
Jun 12, 2023
873c804
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jun 12, 2023
3d09970
refactor(logs-shared): copy required dependencies
Jun 12, 2023
52bd2a7
refactor(logs-shared): remove unused file
Jun 12, 2023
9398090
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jun 12, 2023
7862ccc
refactor(enterprise-search): switch to logsShared plugin usage
Jun 13, 2023
0b4a586
refactor(fleet): switch to logsShared plugin usage
Jun 13, 2023
2856b18
refactor(fleet): switch imports to logsShared plugin
Jun 13, 2023
d11f2f4
Merge branch '159128-split-log-stream-into-plugin' of github.com:tony…
Jun 13, 2023
6a29a60
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jun 13, 2023
6b90e44
refactor(fleet): switch imports for log text stream
Jun 13, 2023
7b0b854
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jun 13, 2023
9cc1908
refactor(fleet): switch imports
Jun 13, 2023
ce06f35
Merge branch '159128-split-log-stream-into-plugin' of github.com:tony…
Jun 13, 2023
54fc08d
refactor(fleet): switch imports useLogPosition
Jun 13, 2023
6cba8d4
refactor(fleet): make observability dependency optional
Jun 13, 2023
aca0d74
refactor(fleet): make observability required bundle
Jun 13, 2023
d1cea36
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 14, 2023
ad7f5dd
refactor(optimizer): update limits
Jun 14, 2023
7f25d7d
refactor(optimizer): remove unused machines
Jun 14, 2023
c8c7b8e
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jun 14, 2023
a554d1a
refactor(logs_shared): move containers
Jun 14, 2023
281bfd9
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Jun 14, 2023
c43d032
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jun 14, 2023
156826b
fix(logs_shared): import issues
Jun 14, 2023
0f58869
Merge branch '159128-split-log-stream-into-plugin' of github.com:tony…
Jun 14, 2023
20d1064
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jun 14, 2023
889540f
fix(logs_shared): update translation keys
Jun 14, 2023
25d799f
Merge branch '159128-split-log-stream-into-plugin' of github.com:tony…
Jun 14, 2023
0d68472
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 14, 2023
47342b0
fix(logs_shared): state machine type
Jun 14, 2023
673da2e
fix(infra): failing test
Jun 14, 2023
ac6299d
fix(logs-shared): remove bundle
Jun 14, 2023
ffaf045
fix(build): restore commented line
Jun 14, 2023
da49df1
fix(logs-shared): restore required bundle
Jun 14, 2023
b8e0bb6
fix(logs-shared): fix types
Jun 14, 2023
a5b5107
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 14, 2023
6c29dd5
fix(logs-shared): fix config
Jun 15, 2023
9559a5d
refactor(logs-shared): clean unused files
Jun 15, 2023
0e5bb09
refactor(logs-shared): fix tests imports
Jun 15, 2023
93754ef
refactor(logs-shared): remove duplicate code
Jun 15, 2023
191edc6
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 15, 2023
afcc37a
refactor(logs-shared): fix api permissions
Jun 15, 2023
c709752
refactor(logs-shared): remove unused exports
Jun 15, 2023
cc18fa5
refactor(logs-shared): register usage collector actions
Jun 19, 2023
aabcc80
refactor(logs-shared): merge usage collector aciotns
Jun 19, 2023
d174cfe
refactor(logs-shared): add missing mock
Jun 19, 2023
52db4f4
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 19, 2023
cf26ac3
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 19, 2023
2cdbc96
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 19, 2023
22dbf67
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 19, 2023
86e135e
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 19, 2023
69eb7d0
refactor(discover-log-explorer): lazy load components
Jun 20, 2023
9bde31e
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 20, 2023
d975b73
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 21, 2023
87b4997
refactor(discover-log-explorer): fix broken imports
Jun 21, 2023
1cf6228
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 22, 2023
2a5ab2e
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 22, 2023
ae2d389
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 22, 2023
34c6d80
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 22, 2023
f0d69cb
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 23, 2023
2dfb7dd
Merge branch 'main' into 159128-split-log-stream-into-plugin
tonyghiani Jun 26, 2023
28905b0
Merge branch '159128-split-log-stream-into-plugin' of github.com:tony…
Jul 4, 2023
5c22389
refactor(logs-shared): fix conflicts
Jul 4, 2023
ccff1da
Merge branch 'main' into tonyghiani-159128-split-log-stream-into-plugin
tonyghiani Jul 4, 2023
eb096a9
fix(logs-ui): remove unused translations
Jul 4, 2023
4d142d1
Merge branch 'tonyghiani-159128-split-log-stream-into-plugin' of gith…
Jul 4, 2023
2f5b7c6
Merge branch 'main' into tonyghiani-159128-split-log-stream-into-plugin
tonyghiani Jul 4, 2023
e3a14f0
Merge branch 'main' into tonyghiani-159128-split-log-stream-into-plugin
tonyghiani Jul 4, 2023
d7172a2
Merge branch 'main' into tonyghiani-159128-split-log-stream-into-plugin
tonyghiani Jul 4, 2023
65cd965
Merge branch 'main' into tonyghiani-159128-split-log-stream-into-plugin
tonyghiani Jul 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ examples/locator_examples @elastic/kibana-app-services
examples/locator_explorer @elastic/kibana-app-services
packages/kbn-logging @elastic/kibana-core
packages/kbn-logging-mocks @elastic/kibana-core
x-pack/plugins/logs_shared @elastic/infra-monitoring-ui
x-pack/plugins/logstash @elastic/logstash
packages/kbn-managed-vscode-config @elastic/kibana-operations
packages/kbn-managed-vscode-config-cli @elastic/kibana-operations
Expand Down
4 changes: 4 additions & 0 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,10 @@ the infrastructure monitoring use-case within Kibana.
using the CURL scripts in the scripts folder.


|{kib-repo}blob/{branch}/x-pack/plugins/logs_shared/README.md[logsShared]
|Exposes the shared components and APIs to access and visualize logs.


|{kib-repo}blob/{branch}/x-pack/plugins/logstash[logstash]
|WARNING: Missing README.

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@
"@kbn/locator-explorer-plugin": "link:examples/locator_explorer",
"@kbn/logging": "link:packages/kbn-logging",
"@kbn/logging-mocks": "link:packages/kbn-logging-mocks",
"@kbn/logs-shared-plugin": "link:x-pack/plugins/logs_shared",
"@kbn/logstash-plugin": "link:x-pack/plugins/logstash",
"@kbn/management-cards-navigation": "link:packages/kbn-management/cards_navigation",
"@kbn/management-plugin": "link:src/plugins/management",
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ pageLoadAssetSize:
licenseManagement: 41817
licensing: 29004
lists: 22900
logsShared: 281060
logstash: 53548
management: 46112
maps: 90000
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,8 @@
"@kbn/logging/*": ["packages/kbn-logging/*"],
"@kbn/logging-mocks": ["packages/kbn-logging-mocks"],
"@kbn/logging-mocks/*": ["packages/kbn-logging-mocks/*"],
"@kbn/logs-shared-plugin": ["x-pack/plugins/logs_shared"],
"@kbn/logs-shared-plugin/*": ["x-pack/plugins/logs_shared/*"],
"@kbn/logstash-plugin": ["x-pack/plugins/logstash"],
"@kbn/logstash-plugin/*": ["x-pack/plugins/logstash/*"],
"@kbn/managed-vscode-config": ["packages/kbn-managed-vscode-config"],
Expand Down
1 change: 1 addition & 0 deletions x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"xpack.idxMgmt": "plugins/index_management",
"xpack.indexLifecycleMgmt": "plugins/index_lifecycle_management",
"xpack.infra": "plugins/infra",
"xpack.logsShared": "plugins/logs_shared",
"xpack.fleet": "plugins/fleet",
"xpack.ingestPipelines": "plugins/ingest_pipelines",
"xpack.kubernetesSecurity": "plugins/kubernetes_security",
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/apm/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"embeddable",
"features",
"infra",
"logsShared",
"inspector",
"licensing",
"observability",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import React from 'react';
import moment from 'moment';
import { LogStream } from '@kbn/infra-plugin/public';
import { LogStream } from '@kbn/logs-shared-plugin/public';
import { ENVIRONMENT_ALL } from '../../../../common/environment_filter_values';
import { useFetcher } from '../../../hooks/use_fetcher';
import { useApmServiceContext } from '../../../context/apm_service/use_apm_service_context';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { EuiSpacer, EuiTab, EuiTabs, EuiSkeletonText } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { LogStream } from '@kbn/infra-plugin/public';
import { LogStream } from '@kbn/logs-shared-plugin/public';
import React, { useMemo } from 'react';
import { Transaction } from '../../../../../typings/es_schemas/ui/transaction';
import { TransactionMetadata } from '../../../shared/metadata_table/transaction_metadata';
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/apm/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"@kbn/dashboard-plugin",
"@kbn/controls-plugin",
"@kbn/core-http-server",
"@kbn/logs-shared-plugin",
"@kbn/unified-field-list",
"@kbn/slo-schema",
"@kbn/discover-plugin"
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/enterprise_search/common/types/kibana_deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import type { DataPublicPluginStart } from '@kbn/data-plugin/public';
import type { DiscoverStart } from '@kbn/discover-plugin/public';
import type { FeaturesPluginStart } from '@kbn/features-plugin/public';
import type { GuidedOnboardingPluginStart } from '@kbn/guided-onboarding-plugin/public';
import type { InfraClientStartExports } from '@kbn/infra-plugin/public';
import type { LicensingPluginStart } from '@kbn/licensing-plugin/public';
import type { SecurityPluginStart } from '@kbn/security-plugin/public';
import type { SharePluginStart } from '@kbn/share-plugin/public';
Expand All @@ -24,7 +23,6 @@ export interface KibanaDeps {
discover: DiscoverStart;
features: FeaturesPluginStart;
guidedOnboarding: GuidedOnboardingPluginStart;
infra: InfraClientStartExports;
licensing: LicensingPluginStart;
security: SecurityPluginStart;
share: SharePluginStart;
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/enterprise_search/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"data",
"discover",
"charts",
"infra",
"logsShared",
"cloud",
"esUiShared",
"guidedOnboarding",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@

import React from 'react';

import { LogStream, LogStreamProps } from '@kbn/infra-plugin/public';
import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common';
import { LogStream, LogStreamProps } from '@kbn/logs-shared-plugin/public';

/*
* EnterpriseSearchLogStream is a light wrapper on top of infra's embeddable LogStream component.
* EnterpriseSearchLogStream is a light wrapper on top of logsShared's embeddable LogStream component.
* It prepopulates our log source ID (set in server/plugin.ts) and sets a basic 24-hours-ago
* default for timestamps. All other props get passed as-is to the underlying LogStream.
*
* Documentation links for reference:
* - https://github.com/elastic/kibana/blob/main/x-pack/plugins/infra/public/components/log_stream/log_stream.stories.mdx
* - Run `yarn storybook infra` for live docs
* - https://github.com/elastic/kibana/blob/main/x-pack/plugins/logs_shared/public/components/log_stream/log_stream.stories.mdx
* - Run `yarn storybook logsShared` for live docs
*/

interface Props extends Omit<LogStreamProps, 'startTimestamp' | 'endTimestamp'> {
Expand Down
14 changes: 7 additions & 7 deletions x-pack/plugins/enterprise_search/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { DataPluginStart } from '@kbn/data-plugin/server/plugin';
import { PluginSetupContract as FeaturesPluginSetup } from '@kbn/features-plugin/server';
import { GlobalSearchPluginSetup } from '@kbn/global-search-plugin/server';
import type { GuidedOnboardingPluginSetup } from '@kbn/guided-onboarding-plugin/server';
import { InfraPluginSetup } from '@kbn/infra-plugin/server';
import { LogsSharedPluginSetup } from '@kbn/logs-shared-plugin/server';
import type { MlPluginSetup } from '@kbn/ml-plugin/server';
import { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/server';
import { SpacesPluginStart } from '@kbn/spaces-plugin/server';
Expand Down Expand Up @@ -88,7 +88,7 @@ interface PluginsSetup {
features: FeaturesPluginSetup;
globalSearch: GlobalSearchPluginSetup;
guidedOnboarding: GuidedOnboardingPluginSetup;
infra: InfraPluginSetup;
logsShared: LogsSharedPluginSetup;
ml?: MlPluginSetup;
security: SecurityPluginSetup;
usageCollection?: UsageCollectionSetup;
Expand Down Expand Up @@ -125,7 +125,7 @@ export class EnterpriseSearchPlugin implements Plugin {
security,
features,
globalSearch,
infra,
logsShared,
customIntegrations,
ml,
guidedOnboarding,
Expand Down Expand Up @@ -261,25 +261,25 @@ export class EnterpriseSearchPlugin implements Plugin {

/*
* Register logs source configuration, used by LogStream components
* @see https://github.com/elastic/kibana/blob/main/x-pack/plugins/infra/public/components/log_stream/log_stream.stories.mdx#with-a-source-configuration
* @see https://github.com/elastic/kibana/blob/main/x-pack/plugins/logs_shared/public/components/log_stream/log_stream.stories.mdx#with-a-source-configuration
*/
infra.logViews.defineInternalLogView(ENTERPRISE_SEARCH_RELEVANCE_LOGS_SOURCE_ID, {
logsShared.logViews.defineInternalLogView(ENTERPRISE_SEARCH_RELEVANCE_LOGS_SOURCE_ID, {
logIndices: {
indexName: 'logs-app_search.search_relevance_suggestions-*',
type: 'index_name',
},
name: 'Enterprise Search Search Relevance Logs',
});

infra.logViews.defineInternalLogView(ENTERPRISE_SEARCH_AUDIT_LOGS_SOURCE_ID, {
logsShared.logViews.defineInternalLogView(ENTERPRISE_SEARCH_AUDIT_LOGS_SOURCE_ID, {
logIndices: {
indexName: 'logs-enterprise_search*',
type: 'index_name',
},
name: 'Enterprise Search Audit Logs',
});

infra.logViews.defineInternalLogView(ENTERPRISE_SEARCH_ANALYTICS_LOGS_SOURCE_ID, {
logsShared.logViews.defineInternalLogView(ENTERPRISE_SEARCH_ANALYTICS_LOGS_SOURCE_ID, {
logIndices: {
indexName: 'behavioral_analytics-events-*',
type: 'index_name',
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/enterprise_search/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"@kbn/usage-collection-plugin",
"@kbn/cloud-plugin",
"@kbn/cloud-chat-plugin",
"@kbn/infra-plugin",
"@kbn/features-plugin",
"@kbn/lens-plugin",
"@kbn/licensing-plugin",
Expand Down Expand Up @@ -60,6 +59,7 @@
"@kbn/core-elasticsearch-server-mocks",
"@kbn/shared-ux-link-redirect-app",
"@kbn/global-search-plugin",
"@kbn/logs-shared-plugin",
"@kbn/share-plugin",
"@kbn/core-saved-objects-migration-server-internal",
]
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"kibanaReact",
"cloudChat",
"esUiShared",
"infra",
"logsShared",
"kibanaUtils",
"usageCollection",
"unifiedSearch"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import semverCoerce from 'semver/functions/coerce';
import { createStateContainerReactHelpers } from '@kbn/kibana-utils-plugin/public';
import { RedirectAppLinks } from '@kbn/kibana-react-plugin/public';
import type { TimeRange } from '@kbn/es-query';
import { LogStream, type LogStreamProps } from '@kbn/infra-plugin/public';
import { LogStream, type LogStreamProps } from '@kbn/logs-shared-plugin/public';

import type { Agent, AgentPolicy } from '../../../../../types';
import { useLink, useStartServices } from '../../../../../hooks';
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@kbn/cloud-chat-plugin",
"@kbn/kibana-react-plugin",
"@kbn/es-ui-shared-plugin",
"@kbn/infra-plugin",
"@kbn/logs-shared-plugin",
"@kbn/kibana-utils-plugin",
"@kbn/unified-search-plugin",
"@kbn/storybook",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { i18n } from '@kbn/i18n';
import * as rt from 'io-ts';
import { persistedLogViewReferenceRT } from '../../../log_views';
import { persistedLogViewReferenceRT } from '@kbn/logs-shared-plugin/common';
import { commonSearchSuccessResponseFieldsRT } from '../../../utils/elasticsearch_runtime_types';

export const LOG_DOCUMENT_COUNT_RULE_TYPE_ID = 'logs.alert.document.count';
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/infra/common/http_api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,4 @@ export * as inventoryViewsV1 from './inventory_views/v1';
export * as logAlertsV1 from './log_alerts/v1';
export * as logAnalysisResultsV1 from './log_analysis/results/v1';
export * as logAnalysisValidationV1 from './log_analysis/validation/v1';
export * as logEntriesV1 from './log_entries/v1';
export * as logViewsV1 from './log_views/v1';
export * as metricsExplorerViewsV1 from './metrics_explorer_views/v1';
2 changes: 0 additions & 2 deletions x-pack/plugins/infra/common/http_api/latest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ export * from './inventory_views/v1';
export * from './log_alerts/v1';
export * from './log_analysis/results/v1';
export * from './log_analysis/validation/v1';
export * from './log_entries/v1';
export * from './log_views/v1';
export * from './metrics_explorer_views/v1';
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
*/

import * as rt from 'io-ts';
import { persistedLogViewReferenceRT } from '@kbn/logs-shared-plugin/common';
import {
ThresholdRT,
countCriteriaRT,
timeUnitRT,
timeSizeRT,
groupByRT,
} from '../../../alerting/logs/log_threshold/types';
import { persistedLogViewReferenceRT } from '../../../log_views';

export const LOG_ALERTS_CHART_PREVIEW_DATA_PATH = '/api/infra/log_alerts/chart_preview_data';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import * as rt from 'io-ts';

import { persistedLogViewReferenceRT } from '../../../../log_views';
import { persistedLogViewReferenceRT } from '@kbn/logs-shared-plugin/common';
import { timeRangeRT, routeTimingMetadataRT } from '../../../shared';
import {
logEntryAnomalyRT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import * as rt from 'io-ts';
import { persistedLogViewReferenceRT } from '../../../../log_views';
import { persistedLogViewReferenceRT } from '@kbn/logs-shared-plugin/common';

import {
badRequestErrorRT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import * as rt from 'io-ts';

import { persistedLogViewReferenceRT } from '../../../../log_views';
import { persistedLogViewReferenceRT } from '@kbn/logs-shared-plugin/common';
import {
badRequestErrorRT,
forbiddenErrorRT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

import * as rt from 'io-ts';

import { persistedLogViewReferenceRT } from '@kbn/logs-shared-plugin/common';
import {
badRequestErrorRT,
forbiddenErrorRT,
timeRangeRT,
routeTimingMetadataRT,
} from '../../../shared';
import { persistedLogViewReferenceRT } from '../../../../log_views';
export const LOG_ANALYSIS_GET_LOG_ENTRY_CATEGORY_DATASETS_PATH =
'/api/infra/log_analysis/results/log_entry_category_datasets';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
* 2.0.
*/

import { logEntryContextRT, persistedLogViewReferenceRT } from '@kbn/logs-shared-plugin/common';
import * as rt from 'io-ts';

import { persistedLogViewReferenceRT } from '../../../../log_views';
import {
badRequestErrorRT,
forbiddenErrorRT,
timeRangeRT,
routeTimingMetadataRT,
timeRangeRT,
} from '../../../shared';
import { logEntryContextRT } from '../../../../log_entry';

export const LOG_ANALYSIS_GET_LOG_ENTRY_CATEGORY_EXAMPLES_PATH =
'/api/infra/log_analysis/results/log_entry_category_examples';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import * as rt from 'io-ts';
import { persistedLogViewReferenceRT } from '../../../../log_views';
import { persistedLogViewReferenceRT } from '@kbn/logs-shared-plugin/common';
import { logEntryExampleRT } from '../../../../log_analysis';
import {
badRequestErrorRT,
Expand Down
24 changes: 13 additions & 11 deletions x-pack/plugins/infra/common/locators/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,25 @@
* 2.0.
*/

import { flowRight } from 'lodash';
import type { DiscoverAppLocatorParams } from '@kbn/discover-plugin/common';
import type { DiscoverStart } from '@kbn/discover-plugin/public';
import { findInventoryFields } from '../inventory_models';
import { MESSAGE_FIELD, TIMESTAMP_FIELD } from '../constants';
import type { TimeRange } from '../time';
import type { LogsLocatorParams } from './logs_locator';
import type { InfraClientCoreSetup } from '../../public/types';
import {
DEFAULT_LOG_VIEW,
LogViewColumnConfiguration,
LogViewReference,
ResolvedLogView,
} from '@kbn/logs-shared-plugin/common';
import { flowRight } from 'lodash';
import type { InfraClientCoreSetup } from '../../public/types';
import { MESSAGE_FIELD, TIMESTAMP_FIELD } from '../constants';
import { findInventoryFields } from '../inventory_models';
import type { TimeRange } from '../time';
import {
replaceLogFilterInQueryString,
replaceLogPositionInQueryString,
replaceLogViewInQueryString,
ResolvedLogView,
} from '../log_views';
} from '../url_state_storage_service';
import type { LogsLocatorParams } from './logs_locator';
import type { NodeLogsLocatorParams } from './node_logs_locator';

interface LocationToDiscoverParams {
Expand Down Expand Up @@ -59,9 +61,9 @@ export const getLocationToDiscover = async ({
filter,
logView = DEFAULT_LOG_VIEW,
}: LocationToDiscoverParams) => {
const [, plugins, pluginStart] = await core.getStartServices();
const { discover } = plugins;
const { logViews } = pluginStart;
const [, plugins] = await core.getStartServices();
const { discover, logsShared } = plugins;
const { logViews } = logsShared;
const resolvedLogView = await logViews.client.getResolvedLogView(logView);

const discoverParams: DiscoverAppLocatorParams = {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/infra/common/locators/locators.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type { NodeLogsLocatorParams } from './node_logs_locator';
import { coreMock } from '@kbn/core/public/mocks';
import { findInventoryFields } from '../inventory_models';
import moment from 'moment';
import { DEFAULT_LOG_VIEW, LogViewReference } from '../log_views';
import { DEFAULT_LOG_VIEW, LogViewReference } from '@kbn/logs-shared-plugin/common';

const setupLogsLocator = async () => {
const deps: LogsLocatorDependencies = {
Expand Down
Loading