diff --git a/src/platform/packages/shared/kbn-management/settings/setting_ids/index.ts b/src/platform/packages/shared/kbn-management/settings/setting_ids/index.ts index 928ed6d47dc73..48ab2844847a9 100644 --- a/src/platform/packages/shared/kbn-management/settings/setting_ids/index.ts +++ b/src/platform/packages/shared/kbn-management/settings/setting_ids/index.ts @@ -129,7 +129,6 @@ export const GEN_AI_SETTINGS_DEFAULT_AI_CONNECTOR_DEFAULT_ONLY = export const AI_ASSISTANT_PREFERRED_AI_ASSISTANT_TYPE = 'aiAssistant:preferredAIAssistantType'; export const AI_ANONYMIZATION_SETTINGS = 'ai:anonymizationSettings'; export const OBSERVABILITY_SEARCH_EXCLUDED_DATA_TIERS = 'observability:searchExcludedDataTiers'; -export const OBSERVABILITY_ENABLE_STREAMS_UI = 'observability:enableStreamsUI'; export const OBSERVABILITY_STREAMS_ENABLE_SIGNIFICANT_EVENTS = 'observability:streamsEnableSignificantEvents'; export const OBSERVABILITY_STREAMS_ENABLE_GROUP_STREAMS = 'observability:streamsEnableGroupStreams'; diff --git a/src/platform/packages/shared/serverless/settings/observability_project/index.ts b/src/platform/packages/shared/serverless/settings/observability_project/index.ts index c8f40b9f01f74..35438514ad9b2 100644 --- a/src/platform/packages/shared/serverless/settings/observability_project/index.ts +++ b/src/platform/packages/shared/serverless/settings/observability_project/index.ts @@ -24,7 +24,6 @@ export const OBSERVABILITY_PROJECT_SETTINGS = [ settings.OBSERVABILITY_APM_ENABLE_SERVICE_INVENTORY_TABLE_SEARCH_BAR, settings.OBSERVABILITY_LOGS_SHARED_NEW_LOGS_OVERVIEW_ID, settings.OBSERVABILITY_LOGS_DATA_ACCESS_LOG_SOURCES_ID, - settings.OBSERVABILITY_ENABLE_STREAMS_UI, settings.OBSERVABILITY_ENABLE_DIAGNOSTIC_MODE, settings.OBSERVABILITY_STREAMS_ENABLE_GROUP_STREAMS, ]; diff --git a/src/platform/plugins/private/kibana_usage_collection/server/collectors/management/schema.ts b/src/platform/plugins/private/kibana_usage_collection/server/collectors/management/schema.ts index 7d295d3a48681..1cb2c708d8b81 100644 --- a/src/platform/plugins/private/kibana_usage_collection/server/collectors/management/schema.ts +++ b/src/platform/plugins/private/kibana_usage_collection/server/collectors/management/schema.ts @@ -672,12 +672,6 @@ export const stackManagementSchema: MakeSchemaFrom = { description: 'Enable the new logs overview component.', }, }, - 'observability:enableStreamsUI': { - type: 'boolean', - _meta: { - description: 'Enable Streams UI.', - }, - }, 'observability:streamsEnableSignificantEvents': { type: 'boolean', _meta: { diff --git a/src/platform/plugins/private/kibana_usage_collection/server/collectors/management/types.ts b/src/platform/plugins/private/kibana_usage_collection/server/collectors/management/types.ts index 6281b1bc43009..401c51edeed15 100644 --- a/src/platform/plugins/private/kibana_usage_collection/server/collectors/management/types.ts +++ b/src/platform/plugins/private/kibana_usage_collection/server/collectors/management/types.ts @@ -175,7 +175,6 @@ export interface UsageStats { 'securitySolution:excludedDataTiersForRuleExecution': string[]; 'securitySolution:maxUnassociatedNotes': number; 'observability:searchExcludedDataTiers': string[]; - 'observability:enableStreamsUI': boolean; 'observability:enableDiagnosticMode': boolean; 'observability:streamsEnableSignificantEvents': boolean; 'genAiSettings:defaultAIConnector': string; diff --git a/src/platform/plugins/shared/telemetry/schema/oss_platform.json b/src/platform/plugins/shared/telemetry/schema/oss_platform.json index 3a7c999d72a26..a4b164a90f984 100644 --- a/src/platform/plugins/shared/telemetry/schema/oss_platform.json +++ b/src/platform/plugins/shared/telemetry/schema/oss_platform.json @@ -11048,12 +11048,6 @@ "description": "Enable the new logs overview component." } }, - "observability:enableStreamsUI": { - "type": "boolean", - "_meta": { - "description": "Enable Streams UI." - } - }, "observability:streamsEnableSignificantEvents": { "type": "boolean", "_meta": { diff --git a/x-pack/platform/plugins/shared/streams/public/plugin.ts b/x-pack/platform/plugins/shared/streams/public/plugin.ts index e05afc6d0a151..fe1e243db29e4 100644 --- a/x-pack/platform/plugins/shared/streams/public/plugin.ts +++ b/x-pack/platform/plugins/shared/streams/public/plugin.ts @@ -5,12 +5,16 @@ * 2.0. */ -import type { CoreSetup, CoreStart, PluginInitializerContext } from '@kbn/core/public'; +import type { + ApplicationStart, + CoreSetup, + CoreStart, + PluginInitializerContext, +} from '@kbn/core/public'; import type { Logger } from '@kbn/logging'; -import { OBSERVABILITY_ENABLE_STREAMS_UI } from '@kbn/management-settings-ids'; import { createRepositoryClient } from '@kbn/server-route-repository-client'; import type { Observable } from 'rxjs'; -import { of, from, shareReplay, startWith } from 'rxjs'; +import { of } from 'rxjs'; import { once } from 'lodash'; import type { StreamsPublicConfig } from '../common/config'; import type { @@ -42,7 +46,7 @@ export class Plugin implements StreamsPluginClass { start(core: CoreStart, pluginsStart: StreamsPluginStartDependencies): StreamsPluginStart { return { streamsRepositoryClient: this.repositoryClient, - status$: createStreamsStatusObservable(core, this.repositoryClient, this.logger), + status$: createStreamsStatusObservable(pluginsStart, core.application), config$: of(this.config), }; } @@ -52,38 +56,28 @@ export class Plugin implements StreamsPluginClass { const ENABLED_STATUS: StreamsStatus = { status: 'enabled' }; const DISABLED_STATUS: StreamsStatus = { status: 'disabled' }; -const UNKNOWN_STATUS: StreamsStatus = { status: 'unknown' }; const createStreamsStatusObservable = once( ( - core: CoreStart, - repositoryClient: StreamsRepositoryClient, - logger: Logger + deps: StreamsPluginSetupDependencies | StreamsPluginStartDependencies, + application: ApplicationStart ): Observable => { - const { application, uiSettings } = core; const hasCapabilities = application.capabilities?.streams?.show; - const isUIEnabled = uiSettings.get(OBSERVABILITY_ENABLE_STREAMS_UI); + const isServerless = deps.cloud?.isServerlessEnabled; + const isObservability = deps.cloud?.serverless.projectType === 'observability'; if (!hasCapabilities) { return of(DISABLED_STATUS); } - if (isUIEnabled) { + if (!isServerless) { + return of(ENABLED_STATUS); + } + + if (isServerless && isObservability) { return of(ENABLED_STATUS); } - return from( - repositoryClient - .fetch('GET /api/streams/_status', { - signal: new AbortController().signal, - }) - .then( - (response) => (response.enabled ? ENABLED_STATUS : DISABLED_STATUS), - (error) => { - logger.error(error); - return UNKNOWN_STATUS; - } - ) - ).pipe(startWith(UNKNOWN_STATUS), shareReplay(1)); + return of(DISABLED_STATUS); } ); diff --git a/x-pack/platform/plugins/shared/streams/server/feature_flags.ts b/x-pack/platform/plugins/shared/streams/server/feature_flags.ts index 7c9329f583837..ee9ee57568ac9 100644 --- a/x-pack/platform/plugins/shared/streams/server/feature_flags.ts +++ b/x-pack/platform/plugins/shared/streams/server/feature_flags.ts @@ -9,16 +9,14 @@ import { schema } from '@kbn/config-schema'; import type { CoreSetup, Logger } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; import { - OBSERVABILITY_ENABLE_STREAMS_UI, OBSERVABILITY_STREAMS_ENABLE_SIGNIFICANT_EVENTS, OBSERVABILITY_STREAMS_ENABLE_GROUP_STREAMS, } from '@kbn/management-settings-ids'; -import type { StreamsPluginSetupDependencies, StreamsPluginStartDependencies } from './types'; +import type { StreamsPluginStartDependencies } from './types'; import { STREAMS_TIERED_SIGNIFICANT_EVENT_FEATURE } from '../common'; export function registerFeatureFlags( core: CoreSetup, - plugins: StreamsPluginSetupDependencies, logger: Logger ) { core.pricing @@ -48,28 +46,6 @@ export function registerFeatureFlags( logger.error(`Failed to register significant events ui settings: ${error}`); }); - const isObservabilityServerless = - plugins.cloud?.isServerlessEnabled && plugins.cloud?.serverless.projectType === 'observability'; - - core.uiSettings.register({ - [OBSERVABILITY_ENABLE_STREAMS_UI]: { - category: ['observability'], - name: 'Streams UI', - value: isObservabilityServerless, - description: i18n.translate('xpack.streams.enableStreamsUIDescription', { - defaultMessage: 'Enable the {streamsLink}.', - values: { - streamsLink: `Streams UI`, - }, - }), - type: 'boolean', - schema: schema.boolean(), - requiresPageReload: true, - solutionViews: ['classic', 'oblt'], - technicalPreview: true, - }, - }); - core.uiSettings.register({ [OBSERVABILITY_STREAMS_ENABLE_GROUP_STREAMS]: { category: ['observability'], diff --git a/x-pack/platform/plugins/shared/streams/server/plugin.ts b/x-pack/platform/plugins/shared/streams/server/plugin.ts index f07c26811a070..051cc4e33df7a 100644 --- a/x-pack/platform/plugins/shared/streams/server/plugin.ts +++ b/x-pack/platform/plugins/shared/streams/server/plugin.ts @@ -203,7 +203,7 @@ export class StreamsPlugin runDevModeChecks: this.isDev, }); - registerFeatureFlags(core, plugins, this.logger); + registerFeatureFlags(core, this.logger); if (plugins.globalSearch) { plugins.globalSearch.registerResultProvider( diff --git a/x-pack/platform/plugins/shared/streams_app/public/hooks/use_streams_privileges.ts b/x-pack/platform/plugins/shared/streams_app/public/hooks/use_streams_privileges.ts index 0bdbda6b5866c..654345ad594e2 100644 --- a/x-pack/platform/plugins/shared/streams_app/public/hooks/use_streams_privileges.ts +++ b/x-pack/platform/plugins/shared/streams_app/public/hooks/use_streams_privileges.ts @@ -6,7 +6,6 @@ */ import { - OBSERVABILITY_ENABLE_STREAMS_UI, OBSERVABILITY_STREAMS_ENABLE_GROUP_STREAMS, OBSERVABILITY_STREAMS_ENABLE_SIGNIFICANT_EVENTS, } from '@kbn/management-settings-ids'; @@ -52,8 +51,6 @@ export function useStreamsPrivileges(): StreamsPrivileges { const license = useObservable(licensing.license$); - const uiEnabled = uiSettings.get(OBSERVABILITY_ENABLE_STREAMS_UI); - const groupStreamsEnabled = uiSettings.get(OBSERVABILITY_STREAMS_ENABLE_GROUP_STREAMS, false); const significantEventsEnabled = uiSettings.get( @@ -72,7 +69,7 @@ export function useStreamsPrivileges(): StreamsPrivileges { }, features: { ui: { - enabled: uiEnabled, + enabled: true, }, significantEvents: license && { enabled: significantEventsEnabled,