diff --git a/docs/reference/advanced-settings.md b/docs/reference/advanced-settings.md index 9fc55b53c76cf..7e6887de18110 100644 --- a/docs/reference/advanced-settings.md +++ b/docs/reference/advanced-settings.md @@ -70,7 +70,7 @@ $$$datenanosformat$$$`dateNanosFormat` {applies_to}`stack: ga` {applies_to}`serv $$$theme-darkmode$$$`theme:darkMode` {applies_to}`stack: deprecated 9.0` {applies_to}`serverless: unavailable` : The UI theme that the {{product.kibana}} UI should use. Set to `enabled` or `disabled` to enable or disable the dark theme. Set to `system` to have the {{product.kibana}} UI theme follow the system theme. You must refresh the page to apply the setting. -$$$state-storeinsessionstorage$$$`state:storeInSessionStorage` {applies_to}`stack: preview` {applies_to}`serverless: unavailable` +$$$state-storeinsessionstorage$$$`state:storeInSessionStorage` {applies_to}`stack: preview 9.0-9.3, deprecated 9.4+` {applies_to}`serverless: unavailable` : {{product.kibana}} tracks UI state in the URL, which can lead to problems when there is a lot of state information, and the URL gets long. Enabling this setting stores part of the URL in your browser session to keep the URL short. $$$savedobjects-perpage$$$`savedObjects:perPage` {applies_to}`stack: ga` {applies_to}`serverless: unavailable` diff --git a/src/core/moon.yml b/src/core/moon.yml index 6f4894e3ac5ef..b5f49c5b08ab1 100644 --- a/src/core/moon.yml +++ b/src/core/moon.yml @@ -24,7 +24,6 @@ dependsOn: - '@kbn/core-application-browser' - '@kbn/core-application-browser-internal' - '@kbn/core-saved-objects-common' - - '@kbn/core-apps-browser-internal' - '@kbn/core-root-browser-internal' - '@kbn/core-theme-browser-mocks' - '@kbn/core-base-browser-mocks' diff --git a/src/core/packages/apps/browser-internal/index.ts b/src/core/packages/apps/browser-internal/index.ts index 44af5dd412423..76060730bc9fe 100644 --- a/src/core/packages/apps/browser-internal/index.ts +++ b/src/core/packages/apps/browser-internal/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export { CoreAppsService, URL_MAX_LENGTH } from './src'; +export { CoreAppsService } from './src'; export type { CoreAppsServiceSetupDeps, CoreAppsServiceStartDeps } from './src'; diff --git a/src/core/packages/apps/browser-internal/moon.yml b/src/core/packages/apps/browser-internal/moon.yml index 682705f6d6f90..056f5041cecf7 100644 --- a/src/core/packages/apps/browser-internal/moon.yml +++ b/src/core/packages/apps/browser-internal/moon.yml @@ -32,7 +32,6 @@ dependsOn: - '@kbn/core-http-browser-internal' - '@kbn/core-application-browser-mocks' - '@kbn/core-notifications-browser-mocks' - - '@kbn/core-ui-settings-browser-mocks' - '@kbn/core-http-browser-mocks' - '@kbn/core-metrics-collectors-server-mocks' - '@kbn/core-status-common' diff --git a/src/core/packages/apps/browser-internal/src/core_app.ts b/src/core/packages/apps/browser-internal/src/core_app.ts index 87f921133421b..5e25e5f11e326 100644 --- a/src/core/packages/apps/browser-internal/src/core_app.ts +++ b/src/core/packages/apps/browser-internal/src/core_app.ts @@ -6,8 +6,6 @@ * your election, the "Elastic License 2.0", the "GNU Affero General Public * License v3.0 only", or the "Server Side Public License, v 1". */ - -import type { UnregisterCallback } from 'history'; import type { CoreContext } from '@kbn/core-base-browser-internal'; import type { InternalInjectedMetadataSetup } from '@kbn/core-injected-metadata-browser-internal'; import type { DocLinksStart } from '@kbn/core-doc-links-browser'; @@ -24,11 +22,7 @@ import type { I18nStart } from '@kbn/core-i18n-browser'; import type { ThemeServiceStart } from '@kbn/core-theme-browser'; import type { UserProfileService } from '@kbn/core-user-profile-browser'; import { renderApp as renderStatusApp } from './status'; -import { - renderApp as renderErrorApp, - setupPublicBaseUrlConfigWarning, - setupUrlOverflowDetection, -} from './errors'; +import { renderApp as renderErrorApp, setupPublicBaseUrlConfigWarning } from './errors'; export interface CoreAppsServiceSetupDeps { application: InternalApplicationSetup; @@ -50,8 +44,6 @@ export interface CoreAppsServiceStartDeps { } export class CoreAppsService { - private stopHistoryListening?: UnregisterCallback; - constructor(private readonly coreContext: CoreContext) {} public setup({ application, http, injectedMetadata, notifications }: CoreAppsServiceSetupDeps) { @@ -94,20 +86,8 @@ export class CoreAppsService { return; } - this.stopHistoryListening = setupUrlOverflowDetection({ - basePath: http.basePath, - history: application.history, - toasts: notifications.toasts, - uiSettings, - }); - setupPublicBaseUrlConfigWarning({ docLinks, http, notifications, ...startDeps }); } - public stop() { - if (this.stopHistoryListening) { - this.stopHistoryListening(); - this.stopHistoryListening = undefined; - } - } + public stop() {} } diff --git a/src/core/packages/apps/browser-internal/src/errors/error_application.test.ts b/src/core/packages/apps/browser-internal/src/errors/error_application.test.ts index 953d496e6ad60..14d92aa9f6f2d 100644 --- a/src/core/packages/apps/browser-internal/src/errors/error_application.test.ts +++ b/src/core/packages/apps/browser-internal/src/errors/error_application.test.ts @@ -48,14 +48,4 @@ describe('renderApp', () => { `"Application error"` ); }); - - it('renders urlOverflow errors', () => { - act(() => { - history.push('/app/error?errorType=urlOverflow'); - }); - expect(element.querySelector('.euiTitle')!.innerHTML).toMatchInlineSnapshot( - `"The URL for this object is too long, and we can't display it"` - ); - expect(element.innerHTML).toMatch('Things to try'); - }); }); diff --git a/src/core/packages/apps/browser-internal/src/errors/error_application.tsx b/src/core/packages/apps/browser-internal/src/errors/error_application.tsx index ca1a1d697c583..be4daea1c48a5 100644 --- a/src/core/packages/apps/browser-internal/src/errors/error_application.tsx +++ b/src/core/packages/apps/browser-internal/src/errors/error_application.tsx @@ -18,7 +18,6 @@ import { EuiPageTemplate } from '@elastic/eui'; import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; import type { IBasePath } from '@kbn/core-http-browser'; import type { AppMountParameters } from '@kbn/core-application-browser'; -import { UrlOverflowUi } from './url_overflow_ui'; interface Props { title?: string; @@ -45,26 +44,11 @@ const ErrorPage: React.FC = ({ title, children }) => { }; const ErrorApp: React.FC<{ basePath: IBasePath; history: History }> = ({ basePath, history }) => { - const [currentLocation, setCurrentLocation] = useState(history.location); + const [, setCurrentLocation] = useState(history.location); useLayoutEffect(() => { return history.listen((location) => setCurrentLocation(location)); }, [history]); - const searchParams = new URLSearchParams(currentLocation.search); - const errorType = searchParams.get('errorType'); - - if (errorType === 'urlOverflow') { - return ( - - - - ); - } - return ; }; diff --git a/src/core/packages/apps/browser-internal/src/errors/index.ts b/src/core/packages/apps/browser-internal/src/errors/index.ts index 8a028a680119f..200887af37da6 100644 --- a/src/core/packages/apps/browser-internal/src/errors/index.ts +++ b/src/core/packages/apps/browser-internal/src/errors/index.ts @@ -8,5 +8,4 @@ */ export { renderApp } from './error_application'; -export { setupUrlOverflowDetection, URL_MAX_LENGTH } from './url_overflow'; export { setupPublicBaseUrlConfigWarning } from './public_base_url'; diff --git a/src/core/packages/apps/browser-internal/src/errors/url_overflow.test.ts b/src/core/packages/apps/browser-internal/src/errors/url_overflow.test.ts deleted file mode 100644 index e1170b2ef9a9a..0000000000000 --- a/src/core/packages/apps/browser-internal/src/errors/url_overflow.test.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* - * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import type { History } from 'history'; -import { createMemoryHistory } from 'history'; -import type { IBasePath } from '@kbn/core-http-browser'; - -import { BasePath } from '@kbn/core-http-browser-internal'; -import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; -import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; -import type { IToasts } from '@kbn/core-notifications-browser'; -import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; - -import { setupUrlOverflowDetection, URL_MAX_LENGTH, URL_WARNING_LENGTH } from './url_overflow'; - -const longUrl = '/' + 'a'.repeat(URL_MAX_LENGTH); - -describe('url overflow detection', () => { - let basePath: IBasePath; - let history: History; - let toasts: jest.Mocked; - let uiSettings: jest.Mocked; - let unlisten: any; - - beforeEach(() => { - basePath = new BasePath({ basePath: '/test-123' }); - history = createMemoryHistory(); - toasts = notificationServiceMock.createStartContract().toasts; - uiSettings = uiSettingsServiceMock.createStartContract(); - - Object.defineProperty(window, 'location', { - value: { - assign: jest.fn(), - }, - }); - - unlisten = setupUrlOverflowDetection({ - basePath, - history, - toasts, - uiSettings, - }); - }); - - afterEach(() => { - unlisten(); - jest.clearAllMocks(); - }); - - it('redirects to error page when URL is too long', () => { - history.push(longUrl); - expect(window.location.assign).toHaveBeenCalledWith('/app/error?errorType=urlOverflow'); - }); - - it('displays a toast if URL exceeds warning threshold', () => { - const warningUrl = '/' + 'a'.repeat(URL_WARNING_LENGTH); - history.push(warningUrl); - expect(history.location.pathname).toEqual(warningUrl); - expect(window.location.assign).not.toHaveBeenCalled(); - expect(toasts.addWarning).toHaveBeenCalledWith( - expect.objectContaining({ - title: 'The URL is big and Kibana might stop working', - text: expect.any(Function), - }) - ); - - // Verify toast can be rendered correctly - const { text: mountToast } = toasts.addWarning.mock.calls[0][0] as any; - const element = document.createElement('div'); - const unmount = mountToast(element); - expect(element).toMatchInlineSnapshot(` -
- Either enable the - - state:storeInSessionStorage - - option in - - advanced settings - - or simplify the onscreen visuals. -
- `); - unmount(); - }); - - it('does not redirect or show warning if URL is not too long', () => { - history.push('/regular-length-url'); - expect(history.location.pathname).toEqual('/regular-length-url'); - expect(window.location.assign).not.toHaveBeenCalled(); - expect(toasts.addWarning).not.toHaveBeenCalled(); - }); - - it('does not redirect or show warning if state:storeInSessionStorage is set', () => { - uiSettings.get.mockReturnValue(true); - history.push(longUrl); - expect(history.location.pathname).toEqual(longUrl); - expect(window.location.assign).not.toHaveBeenCalled(); - expect(toasts.addWarning).not.toHaveBeenCalled(); - }); - - it('does not redirect or show warning if already on the error page', () => { - history.push('/app/error'); - const longQueryParam = 'a'.repeat(URL_MAX_LENGTH); - const longErrorUrl = `/app/error?q=${longQueryParam}`; - history.push(longErrorUrl); - expect(history.location.pathname).toEqual('/app/error'); - expect(history.location.search).toEqual(`?q=${longQueryParam}`); - expect(window.location.assign).not.toHaveBeenCalled(); - expect(toasts.addWarning).not.toHaveBeenCalled(); - }); -}); diff --git a/src/core/packages/apps/browser-internal/src/errors/url_overflow.tsx b/src/core/packages/apps/browser-internal/src/errors/url_overflow.tsx deleted file mode 100644 index 4fe423dde4ee2..0000000000000 --- a/src/core/packages/apps/browser-internal/src/errors/url_overflow.tsx +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; -import type { History, Location } from 'history'; - -import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n-react'; -import type { IBasePath } from '@kbn/core-http-browser'; - -import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; -import { mountReactNode } from '@kbn/core-mount-utils-browser-internal'; -import type { IToasts } from '@kbn/core-notifications-browser'; - -const IE_REGEX = /(; ?MSIE |Edge\/\d|Trident\/[\d+\.]+;.*rv:*11\.\d+)/; -export const IS_IE = IE_REGEX.test(window.navigator.userAgent); -/** - * The max URL length allowed by the current browser. Should be used to display warnings to users when query parameters - * cause URL to exceed this limit. - * @public - */ -export const URL_MAX_LENGTH = IS_IE ? 2000 : 25000; -export const URL_WARNING_LENGTH = IS_IE ? 1000 : 24000; -const ERROR_ROUTE = '/app/error'; - -interface Deps { - basePath: IBasePath; - history: History; - toasts: IToasts; - uiSettings: IUiSettingsClient; -} - -export const setupUrlOverflowDetection = ({ basePath, history, toasts, uiSettings }: Deps) => - history.listen((location: Location) => { - // Bail if storeInSessionStorage is set or we're already on the error page - if ( - uiSettings.get('state:storeInSessionStorage') || - history.location.pathname.startsWith(ERROR_ROUTE) - ) { - return; - } - - const absUrl = history.createHref(location); - const absUrlLength = absUrl.length; - - if (absUrlLength > URL_MAX_LENGTH) { - const href = history.createHref({ - pathname: ERROR_ROUTE, - search: `errorType=urlOverflow`, - }); - // Force the browser to reload so that any potentially unstable state is unloaded - window.location.assign(href); - // window.location.href = href; - // window.location.reload(); - } else if (absUrlLength >= URL_WARNING_LENGTH) { - toasts.addWarning({ - title: i18n.translate('core.ui.errorUrlOverflow.bigUrlWarningNotificationTitle', { - defaultMessage: 'The URL is big and Kibana might stop working', - }), - text: mountReactNode( - state:storeInSessionStorage, - advancedSettingsLink: ( - - - - ), - }} - /> - ), - }); - } - }); diff --git a/src/core/packages/apps/browser-internal/src/errors/url_overflow_ui.tsx b/src/core/packages/apps/browser-internal/src/errors/url_overflow_ui.tsx deleted file mode 100644 index 17bf9f3e47325..0000000000000 --- a/src/core/packages/apps/browser-internal/src/errors/url_overflow_ui.tsx +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; - -import { FormattedMessage } from '@kbn/i18n-react'; -import { EuiText } from '@elastic/eui'; -import type { IBasePath } from '@kbn/core-http-browser'; - -import { IS_IE } from './url_overflow'; - -export const UrlOverflowUi: React.FC<{ basePath: IBasePath }> = ({ basePath }) => { - return ( - -

- -

- -
    -
  • - state:storeInSessionStorage, - kibanaSettingsLink: ( - - - - ), - }} - /> -
  • -
  • - -
  • - {IS_IE && ( -
  • - -
  • - )} -
-
- ); -}; diff --git a/src/core/packages/apps/browser-internal/src/index.ts b/src/core/packages/apps/browser-internal/src/index.ts index 8183f9000d08a..c7e15b0cdec9e 100644 --- a/src/core/packages/apps/browser-internal/src/index.ts +++ b/src/core/packages/apps/browser-internal/src/index.ts @@ -8,5 +8,4 @@ */ export { CoreAppsService } from './core_app'; -export { URL_MAX_LENGTH } from './errors'; export type { CoreAppsServiceSetupDeps, CoreAppsServiceStartDeps } from './core_app'; diff --git a/src/core/packages/apps/browser-internal/tsconfig.json b/src/core/packages/apps/browser-internal/tsconfig.json index 6a64e5438ac49..97459c2acb77b 100644 --- a/src/core/packages/apps/browser-internal/tsconfig.json +++ b/src/core/packages/apps/browser-internal/tsconfig.json @@ -27,7 +27,6 @@ "@kbn/core-http-browser-internal", "@kbn/core-application-browser-mocks", "@kbn/core-notifications-browser-mocks", - "@kbn/core-ui-settings-browser-mocks", "@kbn/core-http-browser-mocks", "@kbn/core-metrics-collectors-server-mocks", "@kbn/core-status-common", diff --git a/src/core/packages/ui-settings/server-internal/src/settings/state.ts b/src/core/packages/ui-settings/server-internal/src/settings/state.ts index 3cc4fb2a98f20..e3ccf48a5f2c5 100644 --- a/src/core/packages/ui-settings/server-internal/src/settings/state.ts +++ b/src/core/packages/ui-settings/server-internal/src/settings/state.ts @@ -17,6 +17,13 @@ export const getStateSettings = (): Record => { name: i18n.translate('core.ui_settings.params.storeUrlTitle', { defaultMessage: 'Store URLs in session storage', }), + deprecation: { + message: i18n.translate('core.ui_settings.params.storeUrl.deprecation', { + defaultMessage: + "The 'Store URLs in session storage setting' is deprecated and will be removed in a future version.", + }), + docLinksKey: 'sessionStorageSettings', + }, value: false, description: i18n.translate('core.ui_settings.params.storeUrlText', { defaultMessage: diff --git a/src/core/public/index.ts b/src/core/public/index.ts index 6f4ba4a5ad038..4e854d28bb114 100644 --- a/src/core/public/index.ts +++ b/src/core/public/index.ts @@ -284,8 +284,6 @@ export type { export type { MountPoint, UnmountCallback, OverlayRef } from '@kbn/core-mount-utils-browser'; -export { URL_MAX_LENGTH } from '@kbn/core-apps-browser-internal'; - export type { KibanaExecutionContext } from '@kbn/core-execution-context-common'; export type { diff --git a/src/core/tsconfig.json b/src/core/tsconfig.json index abec6983d5fc2..d607678fba06b 100644 --- a/src/core/tsconfig.json +++ b/src/core/tsconfig.json @@ -19,7 +19,6 @@ "@kbn/core-application-browser", "@kbn/core-application-browser-internal", "@kbn/core-saved-objects-common", - "@kbn/core-apps-browser-internal", "@kbn/core-root-browser-internal", "@kbn/core-theme-browser-mocks", "@kbn/core-base-browser-mocks", diff --git a/src/platform/packages/private/kbn-reporting/public/share/share_context_menu/reporting_panel_content/constants.ts b/src/platform/packages/private/kbn-reporting/public/share/share_context_menu/reporting_panel_content/constants.ts index ccc3ea1611cf3..b618c922f3206 100644 --- a/src/platform/packages/private/kbn-reporting/public/share/share_context_menu/reporting_panel_content/constants.ts +++ b/src/platform/packages/private/kbn-reporting/public/share/share_context_menu/reporting_panel_content/constants.ts @@ -8,8 +8,8 @@ */ /** - * Based on {@link URL_MAX_LENGTH} exported from core/public. + * Based on chromium's displayable URL length guidelines. */ -const CHROMIUM_MAX_URL_LENGTH = 25 * 1000; +const CHROMIUM_MAX_URL_LENGTH = 32 * 1000; export const getMaxUrlLength = () => CHROMIUM_MAX_URL_LENGTH; diff --git a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts index 8d1292c3fcab0..f8db379768efa 100644 --- a/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts +++ b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts @@ -538,6 +538,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D kibanaSearchSettings: `${ELASTIC_DOCS}reference/kibana/advanced-settings#kibana-search-settings`, discoverSettings: `${ELASTIC_DOCS}reference/kibana/advanced-settings#kibana-discover-settings`, rollupSettings: `${ELASTIC_DOCS}reference/kibana/advanced-settings#kibana-rollups-settings`, + sessionStorageSettings: `${ELASTIC_DOCS}reference/kibana/advanced-settings#state-storeinsessionstorage`, visualizationSettings: `${ELASTIC_DOCS}reference/kibana/advanced-settings#kibana-visualization-settings`, timelionSettings: `${ELASTIC_DOCS}reference/kibana/advanced-settings#kibana-timelion-settings`, generalSettings: `${ELASTIC_DOCS}reference/kibana/advanced-settings#kibana-general-settings`, diff --git a/x-pack/platform/plugins/private/translations/translations/de-DE.json b/x-pack/platform/plugins/private/translations/translations/de-DE.json index a997d7dcd634a..7c5e889c38f85 100644 --- a/x-pack/platform/plugins/private/translations/translations/de-DE.json +++ b/x-pack/platform/plugins/private/translations/translations/de-DE.json @@ -1239,15 +1239,6 @@ "core.ui.chrome.sideNavigation.cloudLinks.billingLinkText": "Abrechnung und Abonnements", "core.ui.chrome.sideNavigation.cloudLinks.deploymentLinkText": "Projekt", "core.ui.chrome.sideNavigation.cloudLinks.performanceLinkText": "Performance", - "core.ui.errorUrlOverflow.bigUrlWarningNotificationMessage": "Aktivieren Sie entweder die {storeInSessionStorageParam}-Option in {advancedSettingsLink} oder vereinfachen Sie die Visualisierung auf dem Bildschirm.", - "core.ui.errorUrlOverflow.bigUrlWarningNotificationMessage.advancedSettingsLinkText": "erweiterte Einstellungen", - "core.ui.errorUrlOverflow.bigUrlWarningNotificationTitle": "Die URL ist lang und Kibana könnte aufhören zu funktionieren", - "core.ui.errorUrlOverflow.errorTitle": "Die URL für dieses Objekt ist zu lang, und wir können sie nicht anzeigen", - "core.ui.errorUrlOverflow.optionsToFixError.doNotUseIEText": "Führen Sie ein Upgrade auf einen modernen Browser durch. Jeder andere unterstützte Browser, den wir kennen, hat diese Grenze nicht.", - "core.ui.errorUrlOverflow.optionsToFixError.enableOptionText": "Aktivieren Sie die Option {storeInSessionStorageConfig} in {kibanaSettingsLink}.", - "core.ui.errorUrlOverflow.optionsToFixError.enableOptionText.advancedSettingsLinkText": "Erweiterte Einstellungen", - "core.ui.errorUrlOverflow.optionsToFixError.removeStuffFromDashboardText": "Vereinfachen Sie das Objekt, das Sie bearbeiten, indem Sie Inhalte oder Filter entfernen.", - "core.ui.errorUrlOverflow.optionsToFixErrorDescription": "Dinge, die Sie ausprobieren können:", "core.ui.kibanaNavList.label": "Analytics", "core.ui.legacyBrowserMessage": "Bei dieser Elastic-Installation sind strenge Sicherheitsanforderungen aktiv, die Ihr aktueller Browser nicht erfüllt.", "core.ui.legacyBrowserTitle": "Bitte aktualisieren Sie Ihren Browser", diff --git a/x-pack/platform/plugins/private/translations/translations/fr-FR.json b/x-pack/platform/plugins/private/translations/translations/fr-FR.json index 7ae4cfa64896f..4da1e7d745af3 100644 --- a/x-pack/platform/plugins/private/translations/translations/fr-FR.json +++ b/x-pack/platform/plugins/private/translations/translations/fr-FR.json @@ -1258,15 +1258,6 @@ "core.ui.chrome.sideNavigation.cloudLinks.deploymentLinkText": "Projet", "core.ui.chrome.sideNavigation.cloudLinks.performanceLinkText": "Performances", "core.ui.chrome.sideNavigation.loadingSolutionNavigationLabel": "Chargement de la navigation dans la solution", - "core.ui.errorUrlOverflow.bigUrlWarningNotificationMessage": "Activez l'option {storeInSessionStorageParam} dans les {advancedSettingsLink} ou simplifiez les visuels à l'écran.", - "core.ui.errorUrlOverflow.bigUrlWarningNotificationMessage.advancedSettingsLinkText": "paramètres avancés", - "core.ui.errorUrlOverflow.bigUrlWarningNotificationTitle": "L'URL est longue et Kibana pourrait cesser de fonctionner.", - "core.ui.errorUrlOverflow.errorTitle": "L'URL pour cet objet est trop longue, et nous ne pouvons pas l'afficher.", - "core.ui.errorUrlOverflow.optionsToFixError.doNotUseIEText": "Veuillez utiliser un navigateur moderne. Tous les autres navigateurs pris en charge connus n'ont pas cette limitation.", - "core.ui.errorUrlOverflow.optionsToFixError.enableOptionText": "Activez l'option {storeInSessionStorageConfig} sous {kibanaSettingsLink}.", - "core.ui.errorUrlOverflow.optionsToFixError.enableOptionText.advancedSettingsLinkText": "Paramètres avancés", - "core.ui.errorUrlOverflow.optionsToFixError.removeStuffFromDashboardText": "Simplifiez l'objet en cours de modification en supprimant du contenu ou des filtres.", - "core.ui.errorUrlOverflow.optionsToFixErrorDescription": "À essayer :", "core.ui.kibanaNavList.label": "Analytique", "core.ui.legacyBrowserMessage": "Cette installation Elastic présente des exigences de sécurité strictes auxquelles votre navigateur ne satisfait pas.", "core.ui.legacyBrowserTitle": "Merci de mettre votre navigateur à niveau.", diff --git a/x-pack/platform/plugins/private/translations/translations/ja-JP.json b/x-pack/platform/plugins/private/translations/translations/ja-JP.json index 8e92ff923622a..6c72343416db3 100644 --- a/x-pack/platform/plugins/private/translations/translations/ja-JP.json +++ b/x-pack/platform/plugins/private/translations/translations/ja-JP.json @@ -1259,15 +1259,6 @@ "core.ui.chrome.sideNavigation.cloudLinks.deploymentLinkText": "プロジェクト", "core.ui.chrome.sideNavigation.cloudLinks.performanceLinkText": "パフォーマンス", "core.ui.chrome.sideNavigation.loadingSolutionNavigationLabel": "ソリューションナビゲーションを読み込み中", - "core.ui.errorUrlOverflow.bigUrlWarningNotificationMessage": "{advancedSettingsLink}で{storeInSessionStorageParam}オプションを有効にするか、オンスクリーンビジュアルを簡素化してください。", - "core.ui.errorUrlOverflow.bigUrlWarningNotificationMessage.advancedSettingsLinkText": "高度な設定", - "core.ui.errorUrlOverflow.bigUrlWarningNotificationTitle": "URLが大きく、Kibanaの動作が停止する可能性があります", - "core.ui.errorUrlOverflow.errorTitle": "このオブジェクトのURLは長すぎます。表示できません", - "core.ui.errorUrlOverflow.optionsToFixError.doNotUseIEText": "最新のブラウザーにアップグレードしてください。他の対応ブラウザーでは、いずれもこの制限がありません。", - "core.ui.errorUrlOverflow.optionsToFixError.enableOptionText": "{kibanaSettingsLink}で{storeInSessionStorageConfig}オプションを有効にしてください。", - "core.ui.errorUrlOverflow.optionsToFixError.enableOptionText.advancedSettingsLinkText": "高度な設定", - "core.ui.errorUrlOverflow.optionsToFixError.removeStuffFromDashboardText": "コンテンツまたはフィルターを削除すると、編集しているオブジェクトがシンプルになります。", - "core.ui.errorUrlOverflow.optionsToFixErrorDescription": "次を試してください。", "core.ui.kibanaNavList.label": "分析", "core.ui.legacyBrowserMessage": "この Elastic インストレーションは、現在ご使用のブラウザが満たしていない厳格なセキュリティ要件が有効になっています。", "core.ui.legacyBrowserTitle": "ブラウザをアップグレードしてください", diff --git a/x-pack/platform/plugins/private/translations/translations/zh-CN.json b/x-pack/platform/plugins/private/translations/translations/zh-CN.json index f2dc9f54603a6..58a9f1e267d5a 100644 --- a/x-pack/platform/plugins/private/translations/translations/zh-CN.json +++ b/x-pack/platform/plugins/private/translations/translations/zh-CN.json @@ -1253,15 +1253,6 @@ "core.ui.chrome.sideNavigation.cloudLinks.deploymentLinkText": "项目", "core.ui.chrome.sideNavigation.cloudLinks.performanceLinkText": "性能", "core.ui.chrome.sideNavigation.loadingSolutionNavigationLabel": "正在加载解决方案导航", - "core.ui.errorUrlOverflow.bigUrlWarningNotificationMessage": "在{advancedSettingsLink}中启用“{storeInSessionStorageParam}”选项或简化屏幕视觉效果。", - "core.ui.errorUrlOverflow.bigUrlWarningNotificationMessage.advancedSettingsLinkText": "高级设置", - "core.ui.errorUrlOverflow.bigUrlWarningNotificationTitle": "URL 过长,Kibana 可能无法工作", - "core.ui.errorUrlOverflow.errorTitle": "此对象的 URL 过长,我们无法显示它", - "core.ui.errorUrlOverflow.optionsToFixError.doNotUseIEText": "升级到现代浏览器。我们了解的所有其他受支持浏览器都没有这个限制。", - "core.ui.errorUrlOverflow.optionsToFixError.enableOptionText": "在“{kibanaSettingsLink}”中启用“{storeInSessionStorageConfig}”选项。", - "core.ui.errorUrlOverflow.optionsToFixError.enableOptionText.advancedSettingsLinkText": "高级设置", - "core.ui.errorUrlOverflow.optionsToFixError.removeStuffFromDashboardText": "通过删除内容或筛选来简化正在编辑的对象。", - "core.ui.errorUrlOverflow.optionsToFixErrorDescription": "试用一下:", "core.ui.kibanaNavList.label": "分析", "core.ui.legacyBrowserMessage": "此 Elastic 安装启用了当前浏览器未满足的严格安全要求。", "core.ui.legacyBrowserTitle": "请升级您的浏览器", diff --git a/x-pack/platform/plugins/shared/maps/public/connected_components/mb_map/tooltip_control/features_tooltip/feature_geometry_filter_form.tsx b/x-pack/platform/plugins/shared/maps/public/connected_components/mb_map/tooltip_control/features_tooltip/feature_geometry_filter_form.tsx index 3c59ae8abcb35..fb3b6e19e5a38 100644 --- a/x-pack/platform/plugins/shared/maps/public/connected_components/mb_map/tooltip_control/features_tooltip/feature_geometry_filter_form.tsx +++ b/x-pack/platform/plugins/shared/maps/public/connected_components/mb_map/tooltip_control/features_tooltip/feature_geometry_filter_form.tsx @@ -12,7 +12,6 @@ import type { Filter } from '@kbn/es-query'; import type { ActionExecutionContext, Action } from '@kbn/ui-actions-plugin/public'; import type { MultiPolygon, Polygon } from 'geojson'; import rison from '@kbn/rison'; -import { URL_MAX_LENGTH } from '@kbn/core/public'; import { ACTION_GLOBAL_APPLY_FILTER } from '@kbn/unified-search-plugin/public'; import { buildGeoShapeFilter } from '../../../../../common/elasticsearch_util'; import { GeometryFilterForm } from '../../../../components/draw_forms/geometry_filter_form/geometry_filter_form'; @@ -20,6 +19,11 @@ import { GeometryFilterForm } from '../../../../components/draw_forms/geometry_f // over estimated and imprecise value to ensure filter has additional room for any meta keys added when filter is mapped. const META_OVERHEAD = 100; +/** + * Based on chromium's displayable URL length guidelines. + */ +const CHROMIUM_MAX_URL_LENGTH = 32 * 1000; + interface Props { onClose: () => void; geometry?: MultiPolygon | Polygon; @@ -99,7 +103,7 @@ export class FeatureGeometryFilterForm extends Component { // No elasticsearch support for pre-indexed shapes and geo_point spatial queries. if ( window.location.href.length + rison.encode(filter).length + META_OVERHEAD > - URL_MAX_LENGTH + CHROMIUM_MAX_URL_LENGTH ) { this.setState({ errorMsg: i18n.translate('xpack.maps.tooltip.geometryFilterForm.filterTooLargeMessage', {