diff --git a/changelogs/fragments/7291.yml b/changelogs/fragments/7291.yml new file mode 100644 index 00000000000..8d1d6b4f8a6 --- /dev/null +++ b/changelogs/fragments/7291.yml @@ -0,0 +1,2 @@ +deprecate: +- Remove data enhancements config and readonly flag. Removes dead url link, ([#7291](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7291)) \ No newline at end of file diff --git a/config/opensearch_dashboards.yml b/config/opensearch_dashboards.yml index d79c0986de0..7eaae83a136 100644 --- a/config/opensearch_dashboards.yml +++ b/config/opensearch_dashboards.yml @@ -359,9 +359,6 @@ # This publishes the Application Usage and UI Metrics into the saved object, which can be accessed by /api/stats?extended=true&legacy=true&exclude_usage=false # usageCollection.uiMetric.enabled: false -# Set the value to true to enable enhancements for the data plugin -# data.enhancements.enabled: false - # Set the backend roles in groups or users, whoever has the backend roles or exactly match the user ids defined in this config will be regard as dashboard admin. # Dashboard admin will have the access to all the workspaces(workspace.enabled: true) and objects inside OpenSearch Dashboards. # opensearchDashboards.dashboardAdmin.groups: ["dashboard_admin"] diff --git a/package.json b/package.json index 5ae716531b8..b7de9f2f50b 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "start": "scripts/use_node scripts/opensearch_dashboards --dev", "start:docker": "scripts/use_node scripts/opensearch_dashboards --dev --opensearch.hosts=$OPENSEARCH_HOSTS --opensearch.ignoreVersionMismatch=true --server.host=$SERVER_HOST", "start:security": "scripts/use_node scripts/opensearch_dashboards --dev --security", - "start:enhancements": "scripts/use_node scripts/opensearch_dashboards --dev --data.enhancements.enabled=true --data_source.enabled=true --uiSettings.overrides['query:enhancements:enabled']=true --uiSettings.overrides['query:dataSource:readOnly']=false", + "start:enhancements": "scripts/use_node scripts/opensearch_dashboards --dev --data_source.enabled=true --uiSettings.overrides['query:enhancements:enabled']=true", "debug": "scripts/use_node --nolazy --inspect scripts/opensearch_dashboards --dev", "debug-break": "scripts/use_node --nolazy --inspect-brk scripts/opensearch_dashboards --dev", "lint": "yarn run lint:es && yarn run lint:style", diff --git a/src/core/server/rendering/views/template.tsx b/src/core/server/rendering/views/template.tsx index 6106f3ef305..992cd117be6 100644 --- a/src/core/server/rendering/views/template.tsx +++ b/src/core/server/rendering/views/template.tsx @@ -79,8 +79,6 @@ export const Template: FunctionComponent = ({ * ToDo: Custom branded favicons will not work correctly across all browsers with * these `link` elements and single type. Try to guess the image and use only one. * - * Favicons (generated from https://realfavicongenerator.net/) - * * For user customized favicon using yml file: * If user inputs a valid URL, we guarantee basic favicon customization, such as * browser favicon(Chrome, Firefox, Safari, and Edge), apple touch icon, safari diff --git a/src/plugins/data/common/constants.ts b/src/plugins/data/common/constants.ts index a00adb0b629..863877322ad 100644 --- a/src/plugins/data/common/constants.ts +++ b/src/plugins/data/common/constants.ts @@ -62,6 +62,5 @@ export const UI_SETTINGS = { FILTERS_EDITOR_SUGGEST_VALUES: 'filterEditor:suggestValues', QUERY_ENHANCEMENTS_ENABLED: 'query:enhancements:enabled', QUERY_DATAFRAME_HYDRATION_STRATEGY: 'query:dataframe:hydrationStrategy', - QUERY_DATA_SOURCE_READONLY: 'query:dataSource:readOnly', SEARCH_QUERY_LANGUAGE_BLOCKLIST: 'search:queryLanguageBlocklist', } as const; diff --git a/src/plugins/data/config.ts b/src/plugins/data/config.ts index 53252fb74b4..186691f3c91 100644 --- a/src/plugins/data/config.ts +++ b/src/plugins/data/config.ts @@ -32,7 +32,6 @@ import { schema, TypeOf } from '@osd/config-schema'; export const configSchema = schema.object({ enhancements: schema.object({ - enabled: schema.boolean({ defaultValue: false }), supportedAppNames: schema.arrayOf(schema.string(), { defaultValue: ['discover'], }), diff --git a/src/plugins/data/public/ui/query_editor/query_editor_top_row.tsx b/src/plugins/data/public/ui/query_editor/query_editor_top_row.tsx index 3ea715418ab..2f6f47659cd 100644 --- a/src/plugins/data/public/ui/query_editor/query_editor_top_row.tsx +++ b/src/plugins/data/public/ui/query_editor/query_editor_top_row.tsx @@ -75,8 +75,6 @@ export default function QueryEditorTopRow(props: QueryEditorTopRowProps) { const opensearchDashboards = useOpenSearchDashboards(); const { uiSettings, storage, appName } = opensearchDashboards.services; - const isDataSourceReadOnly = uiSettings.get(UI_SETTINGS.QUERY_DATA_SOURCE_READONLY); - const queryLanguage = props.query && props.query.language; const queryUiEnhancement = (queryLanguage && @@ -197,7 +195,6 @@ export default function QueryEditorTopRow(props: QueryEditorTopRowProps) { return ( !Array.isArray(props.indexPatterns!) || compact(props.indexPatterns!).length === 0 || - !isDataSourceReadOnly || fromUser(query!.query).includes( typeof props.indexPatterns[0] === 'string' ? props.indexPatterns[0] diff --git a/src/plugins/data/public/ui/settings/settings.ts b/src/plugins/data/public/ui/settings/settings.ts index 10a72d66cda..f90bee5cf47 100644 --- a/src/plugins/data/public/ui/settings/settings.ts +++ b/src/plugins/data/public/ui/settings/settings.ts @@ -35,7 +35,7 @@ export class Settings { private readonly queryEnhancements: Map, private readonly queryEditorExtensionMap: Record ) { - this.isEnabled = this.config.enabled; + this.isEnabled = false; this.setUserQueryEnhancementsEnabled(this.isEnabled); this.enhancedAppNames = this.isEnabled ? this.config.supportedAppNames : []; } diff --git a/src/plugins/data/server/ui_settings.ts b/src/plugins/data/server/ui_settings.ts index ca24151e681..dfe27d16c25 100644 --- a/src/plugins/data/server/ui_settings.ts +++ b/src/plugins/data/server/ui_settings.ts @@ -750,19 +750,6 @@ export function getUiSettings(): Record> { category: ['search'], schema: schema.string(), }, - [UI_SETTINGS.QUERY_DATA_SOURCE_READONLY]: { - name: i18n.translate('data.advancedSettings.query.dataSource.readOnlyTitle', { - defaultMessage: 'Read-only data source in query editor', - }), - value: true, - description: i18n.translate('data.advancedSettings.query.dataSource.readOnlyText', { - defaultMessage: - 'When enabled, the search bar prevents modifying the data source in the query input. ' + - 'Experimental: Requires query enhancements enabled.', - }), - category: ['search'], - schema: schema.boolean(), - }, [UI_SETTINGS.SEARCH_QUERY_LANGUAGE_BLOCKLIST]: { name: i18n.translate('data.advancedSettings.searchQueryLanguageBlocklistTitle', { defaultMessage: 'Additional query languages blocklist',