Skip to content

Commit

Permalink
[Console] rename docked console to persistent (elastic#177376)
Browse files Browse the repository at this point in the history
## Summary

Renamed the UI setting for the embedded console from Docked to
Persistent per Product's request.
  • Loading branch information
TattdCodeMonkey authored and fkanout committed Mar 4, 2024
1 parent f634f86 commit c7eab2c
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/plugins/console/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
import { i18n } from '@kbn/i18n';
import { Plugin, CoreSetup, CoreStart, PluginInitializerContext } from '@kbn/core/public';
import { ENABLE_DOCKED_CONSOLE_UI_SETTING_ID } from '@kbn/dev-tools-plugin/public';
import { ENABLE_PERSISTENT_CONSOLE_UI_SETTING_ID } from '@kbn/dev-tools-plugin/public';

import { renderEmbeddableConsole } from './application/containers/embeddable';
import {
Expand Down Expand Up @@ -113,7 +113,7 @@ export class ConsoleUIPlugin implements Plugin<void, void, AppSetupUIPluginDepen

const consoleStart: ConsolePluginStart = {};
const embeddedConsoleUiSetting = core.uiSettings.get<boolean>(
ENABLE_DOCKED_CONSOLE_UI_SETTING_ID
ENABLE_PERSISTENT_CONSOLE_UI_SETTING_ID
);
const embeddedConsoleAvailable =
isConsoleUiEnabled &&
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/dev_tools/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
*/
export const DEV_TOOLS_FEATURE_ID = 'devTools';
/**
* UI Setting ID for enabling / disabling the docked console in Kibana
* UI Setting ID for enabling / disabling the persistent console in Kibana
*/
export const ENABLE_DOCKED_CONSOLE_UI_SETTING_ID = 'devTools:enableDockedConsole';
export const ENABLE_PERSISTENT_CONSOLE_UI_SETTING_ID = 'devTools:enablePersistentConsole';
5 changes: 4 additions & 1 deletion src/plugins/dev_tools/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@
* Side Public License, v 1.
*/

export { DEV_TOOLS_FEATURE_ID, ENABLE_DOCKED_CONSOLE_UI_SETTING_ID } from './constants';
export {
DEV_TOOLS_FEATURE_ID,
ENABLE_PERSISTENT_CONSOLE_UI_SETTING_ID as ENABLE_DOCKED_CONSOLE_UI_SETTING_ID,
} from './constants';
12 changes: 6 additions & 6 deletions src/plugins/dev_tools/server/ui_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ import { schema } from '@kbn/config-schema';
import { UiSettingsParams } from '@kbn/core/types';
import { i18n } from '@kbn/i18n';

import { DEV_TOOLS_FEATURE_ID, ENABLE_DOCKED_CONSOLE_UI_SETTING_ID } from '../common/constants';
import { DEV_TOOLS_FEATURE_ID, ENABLE_PERSISTENT_CONSOLE_UI_SETTING_ID } from '../common/constants';

/**
* uiSettings definitions for Dev Tools
*/
export const uiSettings: Record<string, UiSettingsParams<boolean>> = {
[ENABLE_DOCKED_CONSOLE_UI_SETTING_ID]: {
[ENABLE_PERSISTENT_CONSOLE_UI_SETTING_ID]: {
category: [DEV_TOOLS_FEATURE_ID],
description: i18n.translate('devTools.uiSettings.dockedConsole.description', {
description: i18n.translate('devTools.uiSettings.persistentConsole.description', {
defaultMessage:
'Docks the Console in the Kibana UI. This setting does not affect the standard Console in Dev Tools.',
'Enables a persistent console in the Kibana UI. This setting does not affect the standard Console in Dev Tools.',
}),
name: i18n.translate('devTools.uiSettings.dockedConsole.name', {
defaultMessage: 'Docked Console',
name: i18n.translate('devTools.uiSettings.persistentConsole.name', {
defaultMessage: 'Persistent Console',
}),
requiresPageReload: true,
schema: schema.boolean(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ export const stackManagementSchema: MakeSchemaFrom<UsageStats> = {
type: 'keyword',
_meta: { description: 'Non-default value of setting.' },
},
'devTools:enableDockedConsole': {
'devTools:enablePersistentConsole': {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,5 @@ export interface UsageStats {
'observability:profilingAzureCostDiscountRate': number;
'data_views:fields_excluded_data_tiers': string;
'observability:apmEnableTransactionProfiling': boolean;
'devTools:enableDockedConsole': boolean;
'devTools:enablePersistentConsole': boolean;
}
2 changes: 1 addition & 1 deletion src/plugins/telemetry/schema/oss_plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -10282,7 +10282,7 @@
"description": "Non-default value of setting."
}
},
"devTools:enableDockedConsole": {
"devTools:enablePersistentConsole": {
"type": "boolean",
"_meta": {
"description": "Non-default value of setting."
Expand Down

0 comments on commit c7eab2c

Please sign in to comment.