From b599cbdc0d29309d40c4baa16d1f118ce9a521bf Mon Sep 17 00:00:00 2001 From: Maryia Lapata Date: Fri, 15 May 2020 15:44:18 +0300 Subject: [PATCH] [NP] Migrate uiSettings owned by Kibana app (#64321) * Move META_FIELDS_SETTING, DOC_HIGHLIGHT_SETTING to data plugin.ts * Refactor table_list_view.tsx to no longer get PER_PAGE_SETTING by uiSettings * Migrate graph, visualize, dashboard usage of saved_objects module constants to accessor functions * Remove redundant logging in plugins start and setup methods Co-authored-by: Matthias Wilhelm # Conflicts: # src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts --- .../edit_index_pattern/tabs/tabs.tsx | 3 +- .../kibana/server/ui_setting_defaults.js | 220 ------------------ .../public/directives/saved_object_finder.js | 3 +- src/plugins/charts/common/index.ts | 20 ++ src/plugins/charts/kibana.json | 2 +- .../public/services/colors/colors.test.ts | 7 +- .../services/colors/mapped_colors.test.ts | 13 +- .../public/services/colors/mapped_colors.ts | 3 +- src/plugins/charts/server/index.ts | 22 ++ src/plugins/charts/server/plugin.ts | 52 +++++ .../public/application/application.ts | 8 +- .../public/application/legacy_app.js | 4 +- .../application/listing/dashboard_listing.js | 2 + .../listing/dashboard_listing_ng_wrapper.html | 1 + src/plugins/dashboard/public/plugin.tsx | 41 ++-- src/plugins/data/common/constants.ts | 2 + .../index_patterns/index_pattern.tsx | 15 +- .../search/search_source/search_source.ts | 8 +- src/plugins/data/server/plugin.ts | 2 + src/plugins/data/server/server.api.md | 2 +- src/plugins/data/server/ui_settings.ts | 51 ++++ src/plugins/discover/common/index.ts | 29 +++ .../public/application/angular/context.js | 3 +- .../public/application/angular/context_app.js | 5 +- .../public/application/angular/discover.js | 21 +- .../doc_table/components/table_header.ts | 5 +- .../angular/doc_table/components/table_row.ts | 3 +- .../angular/doc_table/doc_table.ts | 3 +- .../components/sidebar/discover_sidebar.tsx | 3 +- .../sidebar/lib/visualize_url_utils.ts | 3 +- .../embeddable/search_embeddable.ts | 5 +- src/plugins/discover/server/index.ts | 4 +- src/plugins/discover/server/plugin.ts | 13 +- src/plugins/discover/server/ui_settings.ts | 166 +++++++++++++ .../table_list_view/table_list_view.tsx | 11 +- src/plugins/saved_objects/common/index.ts | 21 ++ src/plugins/saved_objects/kibana.json | 2 +- .../public/finder/saved_object_finder.tsx | 4 +- src/plugins/saved_objects/public/index.ts | 1 + src/plugins/saved_objects/public/plugin.ts | 9 + src/plugins/saved_objects/server/index.ts | 22 ++ src/plugins/saved_objects/server/plugin.ts | 34 +++ .../saved_objects/server/ui_settings.ts | 49 ++++ .../vis_type_timeseries/common/constants.ts | 20 ++ .../public/request_handler.js | 3 +- .../vis_type_timeseries/server/plugin.ts | 2 + .../vis_type_timeseries/server/ui_settings.ts | 38 +++ src/plugins/vis_type_vislib/common/index.ts | 21 ++ .../public/vislib/lib/dispatch.js | 3 +- .../vis_type_vislib/public/vislib/vis.js | 5 +- src/plugins/vis_type_vislib/server/index.ts | 8 +- src/plugins/vis_type_vislib/server/plugin.ts | 34 +++ .../vis_type_vislib/server/ui_settings.ts | 59 +++++ .../listing/visualize_listing.html | 1 + .../application/listing/visualize_listing.js | 6 +- .../listing/visualize_listing_table.js | 1 + .../visualize/public/kibana_services.ts | 2 + src/plugins/visualize/public/plugin.ts | 3 + x-pack/legacy/plugins/maps/public/routes.js | 3 +- x-pack/plugins/graph/kibana.json | 2 +- .../angular/templates/listing_ng_wrapper.html | 1 + x-pack/plugins/graph/public/app.js | 6 +- x-pack/plugins/graph/public/application.ts | 4 +- .../graph/public/components/listing.tsx | 3 +- x-pack/plugins/graph/public/plugin.ts | 4 +- .../translations/translations/ja-JP.json | 78 +++---- .../translations/translations/zh-CN.json | 78 +++---- 67 files changed, 874 insertions(+), 408 deletions(-) create mode 100644 src/plugins/charts/common/index.ts create mode 100644 src/plugins/charts/server/index.ts create mode 100644 src/plugins/charts/server/plugin.ts create mode 100644 src/plugins/data/server/ui_settings.ts create mode 100644 src/plugins/discover/common/index.ts create mode 100644 src/plugins/discover/server/ui_settings.ts create mode 100644 src/plugins/saved_objects/common/index.ts create mode 100644 src/plugins/saved_objects/server/index.ts create mode 100644 src/plugins/saved_objects/server/plugin.ts create mode 100644 src/plugins/saved_objects/server/ui_settings.ts create mode 100644 src/plugins/vis_type_timeseries/common/constants.ts create mode 100644 src/plugins/vis_type_timeseries/server/ui_settings.ts create mode 100644 src/plugins/vis_type_vislib/common/index.ts create mode 100644 src/plugins/vis_type_vislib/server/plugin.ts create mode 100644 src/plugins/vis_type_vislib/server/ui_settings.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/tabs/tabs.tsx b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/tabs/tabs.tsx index 247af7e20d581..c727dcd3e3c65 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/tabs/tabs.tsx +++ b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/tabs/tabs.tsx @@ -33,6 +33,7 @@ import { i18n } from '@kbn/i18n'; import { fieldWildcardMatcher } from '../../../../../../../../../plugins/kibana_utils/public'; import { IndexPatternManagementStart } from '../../../../../../../../../plugins/index_pattern_management/public'; import { IndexPattern, IndexPatternField } from '../../../../../../../../../plugins/data/public'; +import { META_FIELDS_SETTING } from '../../../../../../../../../plugins/data/common'; import { createEditIndexPatternPageStateContainer } from '../edit_index_pattern_state_container'; import { TAB_INDEXED_FIELDS, TAB_SCRIPTED_FIELDS, TAB_SOURCE_FILTERS } from '../constants'; import { SourceFiltersTable } from '../source_filters_table'; @@ -98,7 +99,7 @@ export function Tabs({ config, indexPattern, fields, services, history, location }, [indexPattern, indexPattern.fields, refreshFilters]); const fieldWildcardMatcherDecorated = useCallback( - (filters: string[]) => fieldWildcardMatcher(filters, config.get('metaFields')), + (filters: string[]) => fieldWildcardMatcher(filters, config.get(META_FIELDS_SETTING)), [config] ); diff --git a/src/legacy/core_plugins/kibana/server/ui_setting_defaults.js b/src/legacy/core_plugins/kibana/server/ui_setting_defaults.js index 87cfefa8af6b1..c02eb46b25db3 100644 --- a/src/legacy/core_plugins/kibana/server/ui_setting_defaults.js +++ b/src/legacy/core_plugins/kibana/server/ui_setting_defaults.js @@ -271,106 +271,6 @@ export function getUiSettingDefaults() { defaultMessage: 'The index to access if no index is set', }), }, - defaultColumns: { - name: i18n.translate('kbn.advancedSettings.defaultColumnsTitle', { - defaultMessage: 'Default columns', - }), - value: ['_source'], - description: i18n.translate('kbn.advancedSettings.defaultColumnsText', { - defaultMessage: 'Columns displayed by default in the Discovery tab', - }), - category: ['discover'], - }, - metaFields: { - name: i18n.translate('kbn.advancedSettings.metaFieldsTitle', { - defaultMessage: 'Meta fields', - }), - value: ['_source', '_id', '_type', '_index', '_score'], - description: i18n.translate('kbn.advancedSettings.metaFieldsText', { - defaultMessage: - 'Fields that exist outside of _source to merge into our document when displaying it', - }), - }, - 'discover:sampleSize': { - name: i18n.translate('kbn.advancedSettings.discover.sampleSizeTitle', { - defaultMessage: 'Number of rows', - }), - value: 500, - description: i18n.translate('kbn.advancedSettings.discover.sampleSizeText', { - defaultMessage: 'The number of rows to show in the table', - }), - category: ['discover'], - }, - 'discover:aggs:terms:size': { - name: i18n.translate('kbn.advancedSettings.discover.aggsTermsSizeTitle', { - defaultMessage: 'Number of terms', - }), - value: 20, - type: 'number', - description: i18n.translate('kbn.advancedSettings.discover.aggsTermsSizeText', { - defaultMessage: - 'Determines how many terms will be visualized when clicking the "visualize" ' + - 'button, in the field drop downs, in the discover sidebar.', - }), - category: ['discover'], - }, - 'discover:sort:defaultOrder': { - name: i18n.translate('kbn.advancedSettings.discover.sortDefaultOrderTitle', { - defaultMessage: 'Default sort direction', - }), - value: 'desc', - options: ['desc', 'asc'], - optionLabels: { - desc: i18n.translate('kbn.advancedSettings.discover.sortOrderDesc', { - defaultMessage: 'Descending', - }), - asc: i18n.translate('kbn.advancedSettings.discover.sortOrderAsc', { - defaultMessage: 'Ascending', - }), - }, - type: 'select', - description: i18n.translate('kbn.advancedSettings.discover.sortDefaultOrderText', { - defaultMessage: - 'Controls the default sort direction for time based index patterns in the Discover app.', - }), - category: ['discover'], - }, - 'discover:searchOnPageLoad': { - name: i18n.translate('kbn.advancedSettings.discover.searchOnPageLoadTitle', { - defaultMessage: 'Search on page load', - }), - value: true, - type: 'boolean', - description: i18n.translate('kbn.advancedSettings.discover.searchOnPageLoadText', { - defaultMessage: - 'Controls whether a search is executed when Discover first loads. This setting does not ' + - 'have an effect when loading a saved search.', - }), - category: ['discover'], - }, - 'doc_table:highlight': { - name: i18n.translate('kbn.advancedSettings.docTableHighlightTitle', { - defaultMessage: 'Highlight results', - }), - value: true, - description: i18n.translate('kbn.advancedSettings.docTableHighlightText', { - defaultMessage: - 'Highlight results in Discover and Saved Searches Dashboard. ' + - 'Highlighting makes requests slow when working on big documents.', - }), - category: ['discover'], - }, - 'doc_table:hideTimeColumn': { - name: i18n.translate('kbn.advancedSettings.docTableHideTimeColumnTitle', { - defaultMessage: "Hide 'Time' column", - }), - value: false, - description: i18n.translate('kbn.advancedSettings.docTableHideTimeColumnText', { - defaultMessage: - "Hide the 'Time' column in Discover and in all Saved Searches on Dashboards.", - }), - category: ['discover'], - }, 'courier:ignoreFilterIfFieldNotInIndex': { name: i18n.translate('kbn.advancedSettings.courier.ignoreFilterTitle', { defaultMessage: 'Ignore filter(s)', @@ -484,15 +384,6 @@ export function getUiSettingDefaults() { value: false, category: ['search'], }, - 'fields:popularLimit': { - name: i18n.translate('kbn.advancedSettings.fieldsPopularLimitTitle', { - defaultMessage: 'Popular fields limit', - }), - value: 10, - description: i18n.translate('kbn.advancedSettings.fieldsPopularLimitText', { - defaultMessage: 'The top N most popular fields to show', - }), - }, 'histogram:barTarget': { name: i18n.translate('kbn.advancedSettings.histogram.barTargetTitle', { defaultMessage: 'Target bars', @@ -602,56 +493,6 @@ export function getUiSettingDefaults() { }), category: ['visualization'], }, - 'visualization:colorMapping': { - name: i18n.translate('kbn.advancedSettings.visualization.colorMappingTitle', { - defaultMessage: 'Color mapping', - }), - value: JSON.stringify({ - Count: '#00A69B', - }), - type: 'json', - description: i18n.translate('kbn.advancedSettings.visualization.colorMappingText', { - defaultMessage: 'Maps values to specified colors within visualizations', - }), - category: ['visualization'], - }, - 'visualization:loadingDelay': { - name: i18n.translate('kbn.advancedSettings.visualization.loadingDelayTitle', { - defaultMessage: 'Loading delay', - }), - value: '2s', - description: i18n.translate('kbn.advancedSettings.visualization.loadingDelayText', { - defaultMessage: 'Time to wait before dimming visualizations during query', - }), - category: ['visualization'], - }, - 'visualization:dimmingOpacity': { - name: i18n.translate('kbn.advancedSettings.visualization.dimmingOpacityTitle', { - defaultMessage: 'Dimming opacity', - }), - value: 0.5, - type: 'number', - description: i18n.translate('kbn.advancedSettings.visualization.dimmingOpacityText', { - defaultMessage: - 'The opacity of the chart items that are dimmed when highlighting another element of the chart. ' + - 'The lower this number, the more the highlighted element will stand out. ' + - 'This must be a number between 0 and 1.', - }), - category: ['visualization'], - }, - 'visualization:heatmap:maxBuckets': { - name: i18n.translate('kbn.advancedSettings.visualization.heatmap.maxBucketsTitle', { - defaultMessage: 'Heatmap maximum buckets', - }), - value: 50, - type: 'number', - description: i18n.translate('kbn.advancedSettings.visualization.heatmap.maxBucketsText', { - defaultMessage: - 'The maximum number of buckets a single datasource can return. ' + - 'A higher number might have negative impact on browser rendering performance', - }), - category: ['visualization'], - }, 'csv:separator': { name: i18n.translate('kbn.advancedSettings.csv.separatorTitle', { defaultMessage: 'CSV separator', @@ -831,26 +672,6 @@ export function getUiSettingDefaults() { }, }), }, - 'savedObjects:perPage': { - name: i18n.translate('kbn.advancedSettings.savedObjects.perPageTitle', { - defaultMessage: 'Objects per page', - }), - value: 20, - type: 'number', - description: i18n.translate('kbn.advancedSettings.savedObjects.perPageText', { - defaultMessage: 'Number of objects to show per page in the load dialog', - }), - }, - 'savedObjects:listingLimit': { - name: i18n.translate('kbn.advancedSettings.savedObjects.listingLimitTitle', { - defaultMessage: 'Objects listing limit', - }), - type: 'number', - value: 1000, - description: i18n.translate('kbn.advancedSettings.savedObjects.listingLimitText', { - defaultMessage: 'Number of objects to fetch for the listing pages', - }), - }, 'timepicker:timeDefaults': { name: i18n.translate('kbn.advancedSettings.timepicker.timeDefaultsTitle', { defaultMessage: 'Time filter defaults', @@ -1097,15 +918,6 @@ export function getUiSettingDefaults() { type: 'number', category: ['notifications'], }, - 'metrics:max_buckets': { - name: i18n.translate('kbn.advancedSettings.maxBucketsTitle', { - defaultMessage: 'Maximum buckets', - }), - value: 2000, - description: i18n.translate('kbn.advancedSettings.maxBucketsText', { - defaultMessage: 'The maximum number of buckets a single datasource can return', - }), - }, 'state:storeInSessionStorage': { name: i18n.translate('kbn.advancedSettings.storeUrlTitle', { defaultMessage: 'Store URLs in session storage', @@ -1128,38 +940,6 @@ export function getUiSettingDefaults() { 'The placeholder for the "Index pattern name" field in "Management > Index Patterns > Create Index Pattern".', }), }, - 'context:defaultSize': { - name: i18n.translate('kbn.advancedSettings.context.defaultSizeTitle', { - defaultMessage: 'Context size', - }), - value: 5, - description: i18n.translate('kbn.advancedSettings.context.defaultSizeText', { - defaultMessage: 'The number of surrounding entries to show in the context view', - }), - category: ['discover'], - }, - 'context:step': { - name: i18n.translate('kbn.advancedSettings.context.sizeStepTitle', { - defaultMessage: 'Context size step', - }), - value: 5, - description: i18n.translate('kbn.advancedSettings.context.sizeStepText', { - defaultMessage: 'The step size to increment or decrement the context size by', - }), - category: ['discover'], - }, - 'context:tieBreakerFields': { - name: i18n.translate('kbn.advancedSettings.context.tieBreakerFieldsTitle', { - defaultMessage: 'Tie breaker fields', - }), - value: ['_doc'], - description: i18n.translate('kbn.advancedSettings.context.tieBreakerFieldsText', { - defaultMessage: - 'A comma-separated list of fields to use for tie-breaking between documents that have the same timestamp value. ' + - 'From this list the first field that is present and sortable in the current index pattern is used.', - }), - category: ['discover'], - }, 'accessibility:disableAnimations': { name: i18n.translate('kbn.advancedSettings.disableAnimationsTitle', { defaultMessage: 'Disable Animations', diff --git a/src/legacy/core_plugins/timelion/public/directives/saved_object_finder.js b/src/legacy/core_plugins/timelion/public/directives/saved_object_finder.js index fb54c36df27d7..ee729d2b427ad 100644 --- a/src/legacy/core_plugins/timelion/public/directives/saved_object_finder.js +++ b/src/legacy/core_plugins/timelion/public/directives/saved_object_finder.js @@ -28,6 +28,7 @@ import { PaginateControlsDirectiveProvider, PaginateDirectiveProvider, } from '../../../../../plugins/kibana_legacy/public'; +import { PER_PAGE_SETTING } from '../../../../../plugins/saved_objects/common'; const module = uiModules.get('kibana'); @@ -65,7 +66,7 @@ module const $input = $element.find('input[ng-model=filter]'); // The number of items to show in the list - $scope.perPage = config.get('savedObjects:perPage'); + $scope.perPage = config.get(PER_PAGE_SETTING); // the list that will hold the suggestions const $list = $element.find('ul'); diff --git a/src/plugins/charts/common/index.ts b/src/plugins/charts/common/index.ts new file mode 100644 index 0000000000000..1ebf3bcb8f4b6 --- /dev/null +++ b/src/plugins/charts/common/index.ts @@ -0,0 +1,20 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export const COLOR_MAPPING_SETTING = 'visualization:colorMapping'; diff --git a/src/plugins/charts/kibana.json b/src/plugins/charts/kibana.json index 43c41fe64306a..9f4433e7099d8 100644 --- a/src/plugins/charts/kibana.json +++ b/src/plugins/charts/kibana.json @@ -1,6 +1,6 @@ { "id": "charts", "version": "kibana", - "server": false, + "server": true, "ui": true } diff --git a/src/plugins/charts/public/services/colors/colors.test.ts b/src/plugins/charts/public/services/colors/colors.test.ts index 3e9012cd71dc5..e3f99f2407f75 100644 --- a/src/plugins/charts/public/services/colors/colors.test.ts +++ b/src/plugins/charts/public/services/colors/colors.test.ts @@ -18,6 +18,7 @@ */ import { coreMock } from '../../../../../core/public/mocks'; +import { COLOR_MAPPING_SETTING } from '../../../common'; import { seedColors } from './seed_colors'; import { ColorsService } from './colors'; @@ -44,13 +45,13 @@ describe('Vislib Color Service', () => { const nullValue = null; beforeEach(() => { - previousConfig = config.get('visualization:colorMapping'); - config.set('visualization:colorMapping', {}); + previousConfig = config.get(COLOR_MAPPING_SETTING); + config.set(COLOR_MAPPING_SETTING, {}); color = colors.createColorLookupFunction(arr, {}); }); afterEach(() => { - config.set('visualization:colorMapping', previousConfig); + config.set(COLOR_MAPPING_SETTING, previousConfig); }); it('should throw error if not initialized', () => { diff --git a/src/plugins/charts/public/services/colors/mapped_colors.test.ts b/src/plugins/charts/public/services/colors/mapped_colors.test.ts index 77f1faf468b46..c3b9b0909051c 100644 --- a/src/plugins/charts/public/services/colors/mapped_colors.test.ts +++ b/src/plugins/charts/public/services/colors/mapped_colors.test.ts @@ -21,6 +21,7 @@ import _ from 'lodash'; import d3 from 'd3'; import { coreMock } from '../../../../../core/public/mocks'; +import { COLOR_MAPPING_SETTING } from '../../../common'; import { seedColors } from './seed_colors'; import { MappedColors } from './mapped_colors'; @@ -36,16 +37,16 @@ describe('Mapped Colors', () => { let previousConfig: any; beforeEach(() => { - previousConfig = config.get('visualization:colorMapping'); + previousConfig = config.get(COLOR_MAPPING_SETTING); mappedColors.purge(); }); afterEach(() => { - config.set('visualization:colorMapping', previousConfig); + config.set(COLOR_MAPPING_SETTING, previousConfig); }); it('should properly map keys to unique colors', () => { - config.set('visualization:colorMapping', {}); + config.set(COLOR_MAPPING_SETTING, {}); const arr = [1, 2, 3, 4, 5]; mappedColors.mapKeys(arr); @@ -59,7 +60,7 @@ describe('Mapped Colors', () => { it('should not include colors used by the config', () => { const newConfig = { bar: seedColors[0] }; - config.set('visualization:colorMapping', newConfig); + config.set(COLOR_MAPPING_SETTING, newConfig); const arr = ['foo', 'baz', 'qux']; mappedColors.mapKeys(arr); @@ -71,7 +72,7 @@ describe('Mapped Colors', () => { it('should create a unique array of colors even when config is set', () => { const newConfig = { bar: seedColors[0] }; - config.set('visualization:colorMapping', newConfig); + config.set(COLOR_MAPPING_SETTING, newConfig); const arr = ['foo', 'bar', 'baz', 'qux']; mappedColors.mapKeys(arr); @@ -92,7 +93,7 @@ describe('Mapped Colors', () => { const color = d3.rgb(seedColors[0]); const rgb = `rgb(${color.r}, ${color.g}, ${color.b})`; const newConfig = { bar: rgb }; - config.set('visualization:colorMapping', newConfig); + config.set(COLOR_MAPPING_SETTING, newConfig); const arr = ['foo', 'bar', 'baz', 'qux']; mappedColors.mapKeys(arr); diff --git a/src/plugins/charts/public/services/colors/mapped_colors.ts b/src/plugins/charts/public/services/colors/mapped_colors.ts index 1c6ed690df632..1469d357e7e79 100644 --- a/src/plugins/charts/public/services/colors/mapped_colors.ts +++ b/src/plugins/charts/public/services/colors/mapped_colors.ts @@ -22,6 +22,7 @@ import d3 from 'd3'; import { CoreSetup } from 'kibana/public'; +import { COLOR_MAPPING_SETTING } from '../../../common'; import { createColorPalette } from './color_palette'; const standardizeColor = (color: string) => d3.rgb(color).toString(); @@ -41,7 +42,7 @@ export class MappedColors { } private getConfigColorMapping() { - return _.mapValues(this.uiSettings.get('visualization:colorMapping'), standardizeColor); + return _.mapValues(this.uiSettings.get(COLOR_MAPPING_SETTING), standardizeColor); } public get oldMap(): any { diff --git a/src/plugins/charts/server/index.ts b/src/plugins/charts/server/index.ts new file mode 100644 index 0000000000000..75a57ab6b405c --- /dev/null +++ b/src/plugins/charts/server/index.ts @@ -0,0 +1,22 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { ChartsServerPlugin } from './plugin'; + +export const plugin = () => new ChartsServerPlugin(); diff --git a/src/plugins/charts/server/plugin.ts b/src/plugins/charts/server/plugin.ts new file mode 100644 index 0000000000000..6bf45fb804469 --- /dev/null +++ b/src/plugins/charts/server/plugin.ts @@ -0,0 +1,52 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { i18n } from '@kbn/i18n'; +import { schema } from '@kbn/config-schema'; +import { CoreSetup, Plugin } from 'kibana/server'; +import { COLOR_MAPPING_SETTING } from '../common'; + +export class ChartsServerPlugin implements Plugin { + public setup(core: CoreSetup) { + core.uiSettings.register({ + [COLOR_MAPPING_SETTING]: { + name: i18n.translate('charts.advancedSettings.visualization.colorMappingTitle', { + defaultMessage: 'Color mapping', + }), + value: JSON.stringify({ + Count: '#00A69B', + }), + type: 'json', + description: i18n.translate('charts.advancedSettings.visualization.colorMappingText', { + defaultMessage: 'Maps values to specified colors within visualizations', + }), + category: ['visualization'], + schema: schema.string(), + }, + }); + + return {}; + } + + public start() { + return {}; + } + + public stop() {} +} diff --git a/src/plugins/dashboard/public/application/application.ts b/src/plugins/dashboard/public/application/application.ts index 46df7036c09cd..8e29d2734065e 100644 --- a/src/plugins/dashboard/public/application/application.ts +++ b/src/plugins/dashboard/public/application/application.ts @@ -25,7 +25,6 @@ import angular, { IModule } from 'angular'; import 'angular-sanitize'; import { i18nDirective, i18nFilter, I18nProvider } from '@kbn/i18n/angular'; import { - AppMountContext, ChromeStart, IUiSettingsClient, CoreStart, @@ -42,7 +41,7 @@ import { NavigationPublicPluginStart as NavigationStart } from '../../../navigat import { DataPublicPluginStart } from '../../../data/public'; import { SharePluginStart } from '../../../share/public'; import { KibanaLegacyStart, configureAppAngularModule } from '../../../kibana_legacy/public'; -import { SavedObjectLoader } from '../../../saved_objects/public'; +import { SavedObjectLoader, SavedObjectsStart } from '../../../saved_objects/public'; // required for i18nIdDirective import 'angular-sanitize'; @@ -73,13 +72,14 @@ export interface RenderDeps { usageCollection?: UsageCollectionSetup; navigateToDefaultApp: KibanaLegacyStart['navigateToDefaultApp']; scopedHistory: () => ScopedHistory; + savedObjects: SavedObjectsStart; } let angularModuleInstance: IModule | null = null; export const renderApp = (element: HTMLElement, appBasePath: string, deps: RenderDeps) => { if (!angularModuleInstance) { - angularModuleInstance = createLocalAngularModule(deps.core, deps.navigation); + angularModuleInstance = createLocalAngularModule(); // global routing stuff configureAppAngularModule( angularModuleInstance, @@ -119,7 +119,7 @@ function mountDashboardApp(appBasePath: string, element: HTMLElement) { return $injector; } -function createLocalAngularModule(core: AppMountContext['core'], navigation: NavigationStart) { +function createLocalAngularModule() { createLocalI18nModule(); createLocalIconModule(); diff --git a/src/plugins/dashboard/public/application/legacy_app.js b/src/plugins/dashboard/public/application/legacy_app.js index d12d9de8c7dd4..f2f8a69aea66a 100644 --- a/src/plugins/dashboard/public/application/legacy_app.js +++ b/src/plugins/dashboard/public/application/legacy_app.js @@ -50,6 +50,7 @@ export function initDashboardApp(app, deps) { ['listingLimit', { watchDepth: 'reference' }], ['hideWriteControls', { watchDepth: 'reference' }], ['initialFilter', { watchDepth: 'reference' }], + ['initialPageSize', { watchDepth: 'reference' }], ]); }); @@ -109,7 +110,8 @@ export function initDashboardApp(app, deps) { kbnUrlStateStorage ); - $scope.listingLimit = deps.uiSettings.get('savedObjects:listingLimit'); + $scope.listingLimit = deps.savedObjects.settings.getListingLimit(); + $scope.initialPageSize = deps.savedObjects.settings.getPerPage(); $scope.create = () => { history.push(DashboardConstants.CREATE_NEW_DASHBOARD_URL); }; diff --git a/src/plugins/dashboard/public/application/listing/dashboard_listing.js b/src/plugins/dashboard/public/application/listing/dashboard_listing.js index c24e7e4617806..c8cb551fbe561 100644 --- a/src/plugins/dashboard/public/application/listing/dashboard_listing.js +++ b/src/plugins/dashboard/public/application/listing/dashboard_listing.js @@ -50,6 +50,7 @@ export class DashboardListing extends React.Component { tableColumns={this.getTableColumns()} listingLimit={this.props.listingLimit} initialFilter={this.props.initialFilter} + initialPageSize={this.props.initialPageSize} noItemsFragment={this.getNoItemsMessage()} entityName={i18n.translate('dashboard.listing.table.entityName', { defaultMessage: 'dashboard', @@ -187,6 +188,7 @@ DashboardListing.propTypes = { listingLimit: PropTypes.number.isRequired, hideWriteControls: PropTypes.bool.isRequired, initialFilter: PropTypes.string, + initialPageSize: PropTypes.number.isRequired, }; DashboardListing.defaultProps = { diff --git a/src/plugins/dashboard/public/application/listing/dashboard_listing_ng_wrapper.html b/src/plugins/dashboard/public/application/listing/dashboard_listing_ng_wrapper.html index f57c10d1a48dd..ba05c138a0cba 100644 --- a/src/plugins/dashboard/public/application/listing/dashboard_listing_ng_wrapper.html +++ b/src/plugins/dashboard/public/application/listing/dashboard_listing_ng_wrapper.html @@ -8,4 +8,5 @@ listing-limit="listingLimit" hide-write-controls="hideWriteControls" initial-filter="initialFilter" + initial-page-size="initialPageSize" > diff --git a/src/plugins/dashboard/public/plugin.tsx b/src/plugins/dashboard/public/plugin.tsx index 07c9feefa0c02..b4419adfe58da 100644 --- a/src/plugins/dashboard/public/plugin.tsx +++ b/src/plugins/dashboard/public/plugin.tsx @@ -33,37 +33,29 @@ import { AppUpdater, ScopedHistory, } from 'src/core/public'; -import { UsageCollectionSetup } from 'src/plugins/usage_collection/public'; +import { UsageCollectionSetup } from '../../usage_collection/public'; +import { CONTEXT_MENU_TRIGGER, EmbeddableSetup, EmbeddableStart } from '../../embeddable/public'; +import { DataPublicPluginStart, DataPublicPluginSetup, esFilters } from '../../data/public'; +import { SharePluginSetup, SharePluginStart, UrlGeneratorContract } from '../../share/public'; +import { UiActionsSetup, UiActionsStart } from '../../ui_actions/public'; + +import { Start as InspectorStartContract } from '../../inspector/public'; +import { NavigationPublicPluginStart as NavigationStart } from '../../navigation/public'; import { - CONTEXT_MENU_TRIGGER, - EmbeddableSetup, - EmbeddableStart, -} from '../../../plugins/embeddable/public'; -import { - DataPublicPluginStart, - DataPublicPluginSetup, - esFilters, -} from '../../../plugins/data/public'; -import { - SharePluginSetup, - SharePluginStart, - UrlGeneratorContract, -} from '../../../plugins/share/public'; -import { UiActionsSetup, UiActionsStart } from '../../../plugins/ui_actions/public'; - -import { Start as InspectorStartContract } from '../../../plugins/inspector/public'; -import { NavigationPublicPluginStart as NavigationStart } from '../../../plugins/navigation/public'; -import { getSavedObjectFinder, SavedObjectLoader } from '../../../plugins/saved_objects/public'; + getSavedObjectFinder, + SavedObjectLoader, + SavedObjectsStart, +} from '../../saved_objects/public'; import { ExitFullScreenButton as ExitFullScreenButtonUi, ExitFullScreenButtonProps, -} from '../../../plugins/kibana_react/public'; -import { createKbnUrlTracker, Storage } from '../../../plugins/kibana_utils/public'; +} from '../../kibana_react/public'; +import { createKbnUrlTracker, Storage } from '../../kibana_utils/public'; import { KibanaLegacySetup, KibanaLegacyStart, initAngularBootstrap, -} from '../../../plugins/kibana_legacy/public'; +} from '../../kibana_legacy/public'; import { FeatureCatalogueCategory, HomePublicPluginSetup } from '../../../plugins/home/public'; import { DEFAULT_APP_CATEGORIES } from '../../../core/public'; @@ -117,6 +109,7 @@ interface StartDependencies { savedObjectsClient: SavedObjectsClientContract; share?: SharePluginStart; uiActions: UiActionsStart; + savedObjects: SavedObjectsStart; } export type Setup = void; @@ -250,6 +243,7 @@ export class DashboardPlugin share: shareStart, data: dataStart, kibanaLegacy: { dashboardConfig, navigateToDefaultApp }, + savedObjects, } = pluginsStart; const deps: RenderDeps = { @@ -276,6 +270,7 @@ export class DashboardPlugin localStorage: new Storage(localStorage), usageCollection, scopedHistory: () => this.currentHistory!, + savedObjects, }; // make sure the index pattern list is up to date await dataStart.indexPatterns.clearCache(); diff --git a/src/plugins/data/common/constants.ts b/src/plugins/data/common/constants.ts index 00786a0c72cf1..66a96e3e6e129 100644 --- a/src/plugins/data/common/constants.ts +++ b/src/plugins/data/common/constants.ts @@ -18,3 +18,5 @@ */ export const DEFAULT_QUERY_LANGUAGE = 'kuery'; +export const META_FIELDS_SETTING = 'metaFields'; +export const DOC_HIGHLIGHT_SETTING = 'doc_table:highlight'; diff --git a/src/plugins/data/public/index_patterns/index_patterns/index_pattern.tsx b/src/plugins/data/public/index_patterns/index_patterns/index_pattern.tsx index a370718aae3fa..d4090f1cd341e 100644 --- a/src/plugins/data/public/index_patterns/index_patterns/index_pattern.tsx +++ b/src/plugins/data/public/index_patterns/index_patterns/index_pattern.tsx @@ -33,8 +33,13 @@ import { } from '../../../../kibana_utils/public'; import { toMountPoint } from '../../../../kibana_react/public'; -import { ES_FIELD_TYPES, KBN_FIELD_TYPES, IIndexPattern, IFieldType } from '../../../common'; - +import { + ES_FIELD_TYPES, + KBN_FIELD_TYPES, + IIndexPattern, + IFieldType, + META_FIELDS_SETTING, +} from '../../../common'; import { findByTitle } from '../utils'; import { IndexPatternMissingIndices } from '../lib'; import { Field, IIndexPatternFieldList, getIndexPatternFieldListCreator } from '../fields'; @@ -110,7 +115,7 @@ export class IndexPattern implements IIndexPattern { this.getConfig = getConfig; this.shortDotsEnable = this.getConfig('shortDots:enable'); - this.metaFields = this.getConfig('metaFields'); + this.metaFields = this.getConfig(META_FIELDS_SETTING); this.createFieldList = getIndexPatternFieldListCreator({ fieldFormats: getFieldFormats(), @@ -118,8 +123,8 @@ export class IndexPattern implements IIndexPattern { }); this.fields = this.createFieldList(this, [], this.shortDotsEnable); - this.fieldsFetcher = createFieldsFetcher(this, apiClient, this.getConfig('metaFields')); - this.flattenHit = flattenHitWrapper(this, this.getConfig('metaFields')); + this.fieldsFetcher = createFieldsFetcher(this, apiClient, this.getConfig(META_FIELDS_SETTING)); + this.flattenHit = flattenHitWrapper(this, this.getConfig(META_FIELDS_SETTING)); this.formatHit = formatHitProvider( this, getFieldFormats().getDefaultInstance(KBN_FIELD_TYPES.STRING) diff --git a/src/plugins/data/public/search/search_source/search_source.ts b/src/plugins/data/public/search/search_source/search_source.ts index acbb193807623..9fdef5e1f3eb0 100644 --- a/src/plugins/data/public/search/search_source/search_source.ts +++ b/src/plugins/data/public/search/search_source/search_source.ts @@ -75,6 +75,7 @@ import { CoreStart } from 'kibana/public'; import { normalizeSortRequest } from './normalize_sort_request'; import { filterDocvalueFields } from './filter_docvalue_fields'; import { fieldWildcardFilter } from '../../../../kibana_utils/public'; +import { META_FIELDS_SETTING, DOC_HIGHLIGHT_SETTING } from '../../../common'; import { IIndexPattern, ISearchGeneric, SearchRequest } from '../..'; import { SearchSourceOptions, SearchSourceFields } from './types'; import { FetchOptions, RequestFailure, getSearchParams, handleResponse } from '../fetch'; @@ -422,7 +423,10 @@ export class SearchSource { if (body._source) { // exclude source fields for this index pattern specified by the user - const filter = fieldWildcardFilter(body._source.excludes, uiSettings.get('metaFields')); + const filter = fieldWildcardFilter( + body._source.excludes, + uiSettings.get(META_FIELDS_SETTING) + ); body.docvalue_fields = body.docvalue_fields.filter((docvalueField: any) => filter(docvalueField.field) ); @@ -444,7 +448,7 @@ export class SearchSource { body.query = buildEsQuery(index, query, filters, esQueryConfigs); if (highlightAll && body.query) { - body.highlight = getHighlightRequest(body.query, uiSettings.get('doc_table:highlight')); + body.highlight = getHighlightRequest(body.query, uiSettings.get(DOC_HIGHLIGHT_SETTING)); delete searchRequest.highlightAll; } diff --git a/src/plugins/data/server/plugin.ts b/src/plugins/data/server/plugin.ts index efb8759e7bead..83a5358642ce4 100644 --- a/src/plugins/data/server/plugin.ts +++ b/src/plugins/data/server/plugin.ts @@ -27,6 +27,7 @@ import { KqlTelemetryService } from './kql_telemetry'; import { UsageCollectionSetup } from '../../usage_collection/server'; import { AutocompleteService } from './autocomplete'; import { FieldFormatsService, FieldFormatsSetup, FieldFormatsStart } from './field_formats'; +import { uiSettings } from './ui_settings'; export interface DataPluginSetup { search: ISearchSetup; @@ -63,6 +64,7 @@ export class DataServerPlugin implements Plugin = (context: ISearc // src/plugins/data/server/index.ts:185:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts // src/plugins/data/server/index.ts:186:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts // src/plugins/data/server/index.ts:189:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/plugin.ts:64:14 - (ae-forgotten-export) The symbol "ISearchSetup" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/plugin.ts:65:14 - (ae-forgotten-export) The symbol "ISearchSetup" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/src/plugins/data/server/ui_settings.ts b/src/plugins/data/server/ui_settings.ts new file mode 100644 index 0000000000000..5af62be295201 --- /dev/null +++ b/src/plugins/data/server/ui_settings.ts @@ -0,0 +1,51 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { i18n } from '@kbn/i18n'; +import { schema } from '@kbn/config-schema'; + +import { UiSettingsParams } from 'kibana/server'; +import { META_FIELDS_SETTING, DOC_HIGHLIGHT_SETTING } from '../common'; + +export const uiSettings: Record = { + [META_FIELDS_SETTING]: { + name: i18n.translate('data.advancedSettings.metaFieldsTitle', { + defaultMessage: 'Meta fields', + }), + value: ['_source', '_id', '_type', '_index', '_score'], + description: i18n.translate('data.advancedSettings.metaFieldsText', { + defaultMessage: + 'Fields that exist outside of _source to merge into our document when displaying it', + }), + schema: schema.arrayOf(schema.string()), + }, + [DOC_HIGHLIGHT_SETTING]: { + name: i18n.translate('data.advancedSettings.docTableHighlightTitle', { + defaultMessage: 'Highlight results', + }), + value: true, + description: i18n.translate('data.advancedSettings.docTableHighlightText', { + defaultMessage: + 'Highlight results in Discover and Saved Searches Dashboard. ' + + 'Highlighting makes requests slow when working on big documents.', + }), + category: ['discover'], + schema: schema.boolean(), + }, +}; diff --git a/src/plugins/discover/common/index.ts b/src/plugins/discover/common/index.ts new file mode 100644 index 0000000000000..72030d91220b5 --- /dev/null +++ b/src/plugins/discover/common/index.ts @@ -0,0 +1,29 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export const DEFAULT_COLUMNS_SETTING = 'defaultColumns'; +export const SAMPLE_SIZE_SETTING = 'discover:sampleSize'; +export const AGGS_TERMS_SIZE_SETTING = 'discover:aggs:terms:size'; +export const SORT_DEFAULT_ORDER_SETTING = 'discover:sort:defaultOrder'; +export const SEARCH_ON_PAGE_LOAD_SETTING = 'discover:searchOnPageLoad'; +export const DOC_HIDE_TIME_COLUMN_SETTING = 'doc_table:hideTimeColumn'; +export const FIELDS_LIMIT_SETTING = 'fields:popularLimit'; +export const CONTEXT_DEFAULT_SIZE_SETTING = 'context:defaultSize'; +export const CONTEXT_STEP_SETTING = 'context:step'; +export const CONTEXT_TIE_BREAKER_FIELDS_SETTING = 'context:tieBreakerFields'; diff --git a/src/plugins/discover/public/application/angular/context.js b/src/plugins/discover/public/application/angular/context.js index 6889eceb9ac17..f395f28a428fc 100644 --- a/src/plugins/discover/public/application/angular/context.js +++ b/src/plugins/discover/public/application/angular/context.js @@ -19,6 +19,7 @@ import _ from 'lodash'; import { i18n } from '@kbn/i18n'; +import { CONTEXT_DEFAULT_SIZE_SETTING } from '../../../common'; import { getAngularModule, getServices } from '../../kibana_services'; import './context_app'; import { getState } from './context_state'; @@ -78,7 +79,7 @@ function ContextAppRouteController($routeParams, $scope, $route) { setAppState, flushToUrl, } = getState({ - defaultStepSize: getServices().uiSettings.get('context:defaultSize'), + defaultStepSize: getServices().uiSettings.get(CONTEXT_DEFAULT_SIZE_SETTING), timeFieldName: indexPattern.timeFieldName, storeInSessionStorage: getServices().uiSettings.get('state:storeInSessionStorage'), history: getServices().history(), diff --git a/src/plugins/discover/public/application/angular/context_app.js b/src/plugins/discover/public/application/angular/context_app.js index c4a42642f7fd5..e79689d3e26e3 100644 --- a/src/plugins/discover/public/application/angular/context_app.js +++ b/src/plugins/discover/public/application/angular/context_app.js @@ -18,6 +18,7 @@ */ import _ from 'lodash'; +import { CONTEXT_STEP_SETTING, CONTEXT_TIE_BREAKER_FIELDS_SETTING } from '../../../common'; import { getAngularModule, getServices } from '../../kibana_services'; import contextAppTemplate from './context_app.html'; import './context/components/action_bar'; @@ -61,8 +62,8 @@ function ContextAppController($scope, Private) { const queryParameterActions = getQueryParameterActions(filterManager, indexpatterns); const queryActions = Private(QueryActionsProvider); this.state = createInitialState( - parseInt(uiSettings.get('context:step'), 10), - getFirstSortableField(this.indexPattern, uiSettings.get('context:tieBreakerFields')) + parseInt(uiSettings.get(CONTEXT_STEP_SETTING), 10), + getFirstSortableField(this.indexPattern, uiSettings.get(CONTEXT_TIE_BREAKER_FIELDS_SETTING)) ); this.actions = _.mapValues( diff --git a/src/plugins/discover/public/application/angular/discover.js b/src/plugins/discover/public/application/angular/discover.js index 69dec63ae57ba..e2d434074afdb 100644 --- a/src/plugins/discover/public/application/angular/discover.js +++ b/src/plugins/discover/public/application/angular/discover.js @@ -75,6 +75,13 @@ import { } from '../../../../data/public'; import { getIndexPatternId } from '../helpers/get_index_pattern_id'; import { addFatalError } from '../../../../kibana_legacy/public'; +import { + DEFAULT_COLUMNS_SETTING, + SAMPLE_SIZE_SETTING, + SORT_DEFAULT_ORDER_SETTING, + SEARCH_ON_PAGE_LOAD_SETTING, + DOC_HIDE_TIME_COLUMN_SETTING, +} from '../../../common'; const fetchStatuses = { UNINITIALIZED: 'uninitialized', @@ -554,7 +561,7 @@ function discoverController( const { searchFields, selectFields } = await getSharingDataFields( $scope.state.columns, $scope.indexPattern.timeFieldName, - config.get('doc_table:hideTimeColumn') + config.get(DOC_HIDE_TIME_COLUMN_SETTING) ); searchSource.setField('fields', searchFields); searchSource.setField( @@ -562,7 +569,7 @@ function discoverController( getSortForSearchSource( $scope.state.sort, $scope.indexPattern, - config.get('discover:sort:defaultOrder') + config.get(SORT_DEFAULT_ORDER_SETTING) ) ); searchSource.setField('highlight', null); @@ -595,7 +602,9 @@ function discoverController( query, sort: getSortArray(savedSearch.sort, $scope.indexPattern), columns: - savedSearch.columns.length > 0 ? savedSearch.columns : config.get('defaultColumns').slice(), + savedSearch.columns.length > 0 + ? savedSearch.columns + : config.get(DEFAULT_COLUMNS_SETTING).slice(), index: $scope.indexPattern.id, interval: 'auto', filters: _.cloneDeep($scope.searchSource.getOwnField('filter')), @@ -625,7 +634,7 @@ function discoverController( $scope.opts = { // number of records to fetch, then paginate through - sampleSize: config.get('discover:sampleSize'), + sampleSize: config.get(SAMPLE_SIZE_SETTING), timefield: getTimeField(), savedSearch: savedSearch, indexPatternList: $route.current.locals.savedObjects.ip.list, @@ -635,7 +644,7 @@ function discoverController( // A saved search is created on every page load, so we check the ID to see if we're loading a // previously saved search or if it is just transient return ( - config.get('discover:searchOnPageLoad') || + config.get(SEARCH_ON_PAGE_LOAD_SETTING) || savedSearch.id !== undefined || timefilter.getRefreshInterval().pause === false ); @@ -946,7 +955,7 @@ function discoverController( getSortForSearchSource( $scope.state.sort, indexPattern, - config.get('discover:sort:defaultOrder') + config.get(SORT_DEFAULT_ORDER_SETTING) ) ) .setField('query', $scope.state.query || null) diff --git a/src/plugins/discover/public/application/angular/doc_table/components/table_header.ts b/src/plugins/discover/public/application/angular/doc_table/components/table_header.ts index 5e7ad6a1d1ea0..60dfb69e85e74 100644 --- a/src/plugins/discover/public/application/angular/doc_table/components/table_header.ts +++ b/src/plugins/discover/public/application/angular/doc_table/components/table_header.ts @@ -18,6 +18,7 @@ */ import { TableHeader } from './table_header/table_header'; import { getServices } from '../../../../kibana_services'; +import { SORT_DEFAULT_ORDER_SETTING, DOC_HIDE_TIME_COLUMN_SETTING } from '../../../../../common'; export function createTableHeaderDirective(reactDirective: any) { const { uiSettings: config } = getServices(); @@ -36,9 +37,9 @@ export function createTableHeaderDirective(reactDirective: any) { ], { restrict: 'A' }, { - hideTimeColumn: config.get('doc_table:hideTimeColumn'), + hideTimeColumn: config.get(DOC_HIDE_TIME_COLUMN_SETTING, false), isShortDots: config.get('shortDots:enable'), - defaultSortOrder: config.get('discover:sort:defaultOrder'), + defaultSortOrder: config.get(SORT_DEFAULT_ORDER_SETTING, 'desc'), } ); } diff --git a/src/plugins/discover/public/application/angular/doc_table/components/table_row.ts b/src/plugins/discover/public/application/angular/doc_table/components/table_row.ts index 5fa37a5ac28eb..fbbbabdbe7bc2 100644 --- a/src/plugins/discover/public/application/angular/doc_table/components/table_row.ts +++ b/src/plugins/discover/public/application/angular/doc_table/components/table_row.ts @@ -29,6 +29,7 @@ import openRowHtml from './table_row/open.html'; import detailsHtml from './table_row/details.html'; import { dispatchRenderComplete } from '../../../../../../kibana_utils/public'; +import { DOC_HIDE_TIME_COLUMN_SETTING } from '../../../../../common'; import cellTemplateHtml from '../components/table_row/cell.html'; import truncateByHeightTemplateHtml from '../components/table_row/truncate_by_height.html'; import { esFilters } from '../../../../../../data/public'; @@ -137,7 +138,7 @@ export function createTableRowDirective($compile: ng.ICompileService, $httpParam const newHtmls = [openRowHtml]; const mapping = indexPattern.fields.getByName; - const hideTimeColumn = getServices().uiSettings.get('doc_table:hideTimeColumn'); + const hideTimeColumn = getServices().uiSettings.get(DOC_HIDE_TIME_COLUMN_SETTING, false); if (indexPattern.timeFieldName && !hideTimeColumn) { newHtmls.push( cellTemplate({ diff --git a/src/plugins/discover/public/application/angular/doc_table/doc_table.ts b/src/plugins/discover/public/application/angular/doc_table/doc_table.ts index 8af7380afcdc9..70f277543a52a 100644 --- a/src/plugins/discover/public/application/angular/doc_table/doc_table.ts +++ b/src/plugins/discover/public/application/angular/doc_table/doc_table.ts @@ -19,6 +19,7 @@ import html from './doc_table.html'; import { dispatchRenderComplete } from '../../../../../kibana_utils/public'; +import { SAMPLE_SIZE_SETTING } from '../../../../common'; // @ts-ignore import { getLimitedSearchResultsMessage } from './doc_table_strings'; import { getServices } from '../../../kibana_services'; @@ -65,7 +66,7 @@ export function createDocTableDirective(pagerFactory: any, $filter: any) { }; $scope.limitedResultsWarning = getLimitedSearchResultsMessage( - getServices().uiSettings.get('discover:sampleSize') + getServices().uiSettings.get(SAMPLE_SIZE_SETTING, 500) ); $scope.addRows = function() { diff --git a/src/plugins/discover/public/application/components/sidebar/discover_sidebar.tsx b/src/plugins/discover/public/application/components/sidebar/discover_sidebar.tsx index 56597dd31e572..0d9aebe11ece6 100644 --- a/src/plugins/discover/public/application/components/sidebar/discover_sidebar.tsx +++ b/src/plugins/discover/public/application/components/sidebar/discover_sidebar.tsx @@ -27,6 +27,7 @@ import { DiscoverIndexPattern } from './discover_index_pattern'; import { DiscoverFieldSearch } from './discover_field_search'; import { IndexPatternAttributes } from '../../../../../data/common'; import { SavedObject } from '../../../../../../core/types'; +import { FIELDS_LIMIT_SETTING } from '../../../../common'; import { groupFields } from './lib/group_fields'; import { IIndexPatternFieldList, @@ -131,7 +132,7 @@ export function DiscoverSidebar({ [selectedIndexPattern, state, columns, hits, services] ); - const popularLimit = services.uiSettings.get('fields:popularLimit'); + const popularLimit = services.uiSettings.get(FIELDS_LIMIT_SETTING); const useShortDots = services.uiSettings.get('shortDots:enable'); const { diff --git a/src/plugins/discover/public/application/components/sidebar/lib/visualize_url_utils.ts b/src/plugins/discover/public/application/components/sidebar/lib/visualize_url_utils.ts index 6b2d20ae8c910..d585c5d6f2638 100644 --- a/src/plugins/discover/public/application/components/sidebar/lib/visualize_url_utils.ts +++ b/src/plugins/discover/public/application/components/sidebar/lib/visualize_url_utils.ts @@ -28,6 +28,7 @@ import { import { AppState } from '../../../angular/discover_state'; import { DiscoverServices } from '../../../../build_services'; import { VisualizationsStart, VisTypeAlias } from '../../../../../../visualizations/public'; +import { AGGS_TERMS_SIZE_SETTING } from '../../../../../common'; export function isMapsAppRegistered(visualizations: VisualizationsStart) { return visualizations.getAliases().some(({ name }: VisTypeAlias) => { @@ -114,7 +115,7 @@ export function getVisualizeUrl( columns: string[], services: DiscoverServices ) { - const aggsTermSize = services.uiSettings.get('discover:aggs:terms:size'); + const aggsTermSize = services.uiSettings.get(AGGS_TERMS_SIZE_SETTING); const urlParams = parse(services.history().location.search) as Record; if ( diff --git a/src/plugins/discover/public/application/embeddable/search_embeddable.ts b/src/plugins/discover/public/application/embeddable/search_embeddable.ts index f1bda5fcae10b..ed70c90eb64e6 100644 --- a/src/plugins/discover/public/application/embeddable/search_embeddable.ts +++ b/src/plugins/discover/public/application/embeddable/search_embeddable.ts @@ -48,6 +48,7 @@ import { } from '../../kibana_services'; import { SEARCH_EMBEDDABLE_TYPE } from './constants'; import { SavedSearch } from '../..'; +import { SAMPLE_SIZE_SETTING, SORT_DEFAULT_ORDER_SETTING } from '../../../common'; interface SearchScope extends ng.IScope { columns?: string[]; @@ -273,13 +274,13 @@ export class SearchEmbeddable extends Embeddable if (this.abortController) this.abortController.abort(); this.abortController = new AbortController(); - searchSource.setField('size', getServices().uiSettings.get('discover:sampleSize')); + searchSource.setField('size', getServices().uiSettings.get(SAMPLE_SIZE_SETTING)); searchSource.setField( 'sort', getSortForSearchSource( this.searchScope.sort, this.searchScope.indexPattern, - getServices().uiSettings.get('discover:sort:defaultOrder') + getServices().uiSettings.get(SORT_DEFAULT_ORDER_SETTING) ) ); diff --git a/src/plugins/discover/server/index.ts b/src/plugins/discover/server/index.ts index 15a948c56148e..20ccc8b182078 100644 --- a/src/plugins/discover/server/index.ts +++ b/src/plugins/discover/server/index.ts @@ -17,8 +17,6 @@ * under the License. */ -import { PluginInitializerContext } from 'kibana/server'; import { DiscoverServerPlugin } from './plugin'; -export const plugin = (initContext: PluginInitializerContext) => - new DiscoverServerPlugin(initContext); +export const plugin = () => new DiscoverServerPlugin(); diff --git a/src/plugins/discover/server/plugin.ts b/src/plugins/discover/server/plugin.ts index 04502f5fc14e6..a7445a5189163 100644 --- a/src/plugins/discover/server/plugin.ts +++ b/src/plugins/discover/server/plugin.ts @@ -17,26 +17,19 @@ * under the License. */ -import { PluginInitializerContext, CoreSetup, CoreStart, Plugin, Logger } from 'kibana/server'; +import { CoreSetup, CoreStart, Plugin } from 'kibana/server'; +import { uiSettings } from './ui_settings'; import { capabilitiesProvider } from './capabilities_provider'; export class DiscoverServerPlugin implements Plugin { - private readonly logger: Logger; - - constructor(initializerContext: PluginInitializerContext) { - this.logger = initializerContext.logger.get(); - } - public setup(core: CoreSetup) { - this.logger.debug('discover: Setup'); - core.capabilities.registerProvider(capabilitiesProvider); + core.uiSettings.register(uiSettings); return {}; } public start(core: CoreStart) { - this.logger.debug('discover: Started'); return {}; } diff --git a/src/plugins/discover/server/ui_settings.ts b/src/plugins/discover/server/ui_settings.ts new file mode 100644 index 0000000000000..3eca11cc584a9 --- /dev/null +++ b/src/plugins/discover/server/ui_settings.ts @@ -0,0 +1,166 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { i18n } from '@kbn/i18n'; +import { schema } from '@kbn/config-schema'; + +import { UiSettingsParams } from 'kibana/server'; +import { + DEFAULT_COLUMNS_SETTING, + SAMPLE_SIZE_SETTING, + AGGS_TERMS_SIZE_SETTING, + SORT_DEFAULT_ORDER_SETTING, + SEARCH_ON_PAGE_LOAD_SETTING, + DOC_HIDE_TIME_COLUMN_SETTING, + FIELDS_LIMIT_SETTING, + CONTEXT_DEFAULT_SIZE_SETTING, + CONTEXT_STEP_SETTING, + CONTEXT_TIE_BREAKER_FIELDS_SETTING, +} from '../common'; + +export const uiSettings: Record = { + [DEFAULT_COLUMNS_SETTING]: { + name: i18n.translate('discover.advancedSettings.defaultColumnsTitle', { + defaultMessage: 'Default columns', + }), + value: ['_source'], + description: i18n.translate('discover.advancedSettings.defaultColumnsText', { + defaultMessage: 'Columns displayed by default in the Discovery tab', + }), + category: ['discover'], + schema: schema.arrayOf(schema.string()), + }, + [SAMPLE_SIZE_SETTING]: { + name: i18n.translate('discover.advancedSettings.sampleSizeTitle', { + defaultMessage: 'Number of rows', + }), + value: 500, + description: i18n.translate('discover.advancedSettings.sampleSizeText', { + defaultMessage: 'The number of rows to show in the table', + }), + category: ['discover'], + schema: schema.number(), + }, + [AGGS_TERMS_SIZE_SETTING]: { + name: i18n.translate('discover.advancedSettings.aggsTermsSizeTitle', { + defaultMessage: 'Number of terms', + }), + value: 20, + type: 'number', + description: i18n.translate('discover.advancedSettings.aggsTermsSizeText', { + defaultMessage: + 'Determines how many terms will be visualized when clicking the "visualize" ' + + 'button, in the field drop downs, in the discover sidebar.', + }), + category: ['discover'], + schema: schema.number(), + }, + [SORT_DEFAULT_ORDER_SETTING]: { + name: i18n.translate('discover.advancedSettings.sortDefaultOrderTitle', { + defaultMessage: 'Default sort direction', + }), + value: 'desc', + options: ['desc', 'asc'], + optionLabels: { + desc: i18n.translate('discover.advancedSettings.sortOrderDesc', { + defaultMessage: 'Descending', + }), + asc: i18n.translate('discover.advancedSettings.sortOrderAsc', { + defaultMessage: 'Ascending', + }), + }, + type: 'select', + description: i18n.translate('discover.advancedSettings.sortDefaultOrderText', { + defaultMessage: + 'Controls the default sort direction for time based index patterns in the Discover app.', + }), + category: ['discover'], + schema: schema.oneOf([schema.literal('desc'), schema.literal('asc')]), + }, + [SEARCH_ON_PAGE_LOAD_SETTING]: { + name: i18n.translate('discover.advancedSettings.searchOnPageLoadTitle', { + defaultMessage: 'Search on page load', + }), + value: true, + type: 'boolean', + description: i18n.translate('discover.advancedSettings.searchOnPageLoadText', { + defaultMessage: + 'Controls whether a search is executed when Discover first loads. This setting does not ' + + 'have an effect when loading a saved search.', + }), + category: ['discover'], + schema: schema.boolean(), + }, + [DOC_HIDE_TIME_COLUMN_SETTING]: { + name: i18n.translate('discover.advancedSettings.docTableHideTimeColumnTitle', { + defaultMessage: "Hide 'Time' column", + }), + value: false, + description: i18n.translate('discover.advancedSettings.docTableHideTimeColumnText', { + defaultMessage: "Hide the 'Time' column in Discover and in all Saved Searches on Dashboards.", + }), + category: ['discover'], + schema: schema.boolean(), + }, + [FIELDS_LIMIT_SETTING]: { + name: i18n.translate('discover.advancedSettings.fieldsPopularLimitTitle', { + defaultMessage: 'Popular fields limit', + }), + value: 10, + description: i18n.translate('discover.advancedSettings.fieldsPopularLimitText', { + defaultMessage: 'The top N most popular fields to show', + }), + schema: schema.number(), + }, + [CONTEXT_DEFAULT_SIZE_SETTING]: { + name: i18n.translate('discover.advancedSettings.context.defaultSizeTitle', { + defaultMessage: 'Context size', + }), + value: 5, + description: i18n.translate('discover.advancedSettings.context.defaultSizeText', { + defaultMessage: 'The number of surrounding entries to show in the context view', + }), + category: ['discover'], + schema: schema.number(), + }, + [CONTEXT_STEP_SETTING]: { + name: i18n.translate('discover.advancedSettings.context.sizeStepTitle', { + defaultMessage: 'Context size step', + }), + value: 5, + description: i18n.translate('discover.advancedSettings.context.sizeStepText', { + defaultMessage: 'The step size to increment or decrement the context size by', + }), + category: ['discover'], + schema: schema.number(), + }, + [CONTEXT_TIE_BREAKER_FIELDS_SETTING]: { + name: i18n.translate('discover.advancedSettings.context.tieBreakerFieldsTitle', { + defaultMessage: 'Tie breaker fields', + }), + value: ['_doc'], + description: i18n.translate('discover.advancedSettings.context.tieBreakerFieldsText', { + defaultMessage: + 'A comma-separated list of fields to use for tie-breaking between documents that have the same timestamp value. ' + + 'From this list the first field that is present and sortable in the current index pattern is used.', + }), + category: ['discover'], + schema: schema.arrayOf(schema.string()), + }, +}; diff --git a/src/plugins/kibana_react/public/table_list_view/table_list_view.tsx b/src/plugins/kibana_react/public/table_list_view/table_list_view.tsx index 4c2dac4f39134..58003a7e9e841 100644 --- a/src/plugins/kibana_react/public/table_list_view/table_list_view.tsx +++ b/src/plugins/kibana_react/public/table_list_view/table_list_view.tsx @@ -37,11 +37,9 @@ import { EuiCallOut, EuiBasicTableColumn, } from '@elastic/eui'; -import { ToastsStart, IUiSettingsClient } from 'kibana/public'; +import { ToastsStart } from 'kibana/public'; import { toMountPoint } from '../util'; -export const EMPTY_FILTER = ''; - interface Column { name: string; width?: string; @@ -61,12 +59,12 @@ export interface TableListViewProps { findItems(query: string): Promise<{ total: number; hits: object[] }>; listingLimit: number; initialFilter: string; + initialPageSize: number; noItemsFragment: JSX.Element; // update possible column types to something like (FieldDataColumn | ComputedColumn | ActionsColumn)[] when they have been added to EUI tableColumns: Column[]; tableListTitle: string; toastNotifications: ToastsStart; - uiSettings: IUiSettingsClient; /** * Id of the heading element describing the table. This id will be used as `aria-labelledby` of the wrapper element. * If the table is not empty, this component renders its own h1 element using the same id. @@ -98,11 +96,10 @@ class TableListView extends React.Component { type: string; name: string; @@ -131,7 +133,7 @@ class SavedObjectFinderUi extends React.Component< .map(metaData => metaData.includeFields || []) .reduce((allFields, currentFields) => allFields.concat(currentFields), ['title']); - const perPage = this.props.uiSettings.get('savedObjects:listingLimit'); + const perPage = this.props.uiSettings.get(LISTING_LIMIT_SETTING); const resp = await this.props.savedObjects.client.find({ type: Object.keys(metaDataMap), fields: [...new Set(fields)], diff --git a/src/plugins/saved_objects/public/index.ts b/src/plugins/saved_objects/public/index.ts index e38a0ef9830ea..4f7a4ff7f196f 100644 --- a/src/plugins/saved_objects/public/index.ts +++ b/src/plugins/saved_objects/public/index.ts @@ -36,5 +36,6 @@ export { isErrorNonFatal, } from './saved_object'; export { SavedObjectSaveOpts, SavedObjectKibanaServices, SavedObject } from './types'; +export { SavedObjectsStart } from './plugin'; export const plugin = () => new SavedObjectsPublicPlugin(); diff --git a/src/plugins/saved_objects/public/plugin.ts b/src/plugins/saved_objects/public/plugin.ts index 7927238e12066..d430c8896484d 100644 --- a/src/plugins/saved_objects/public/plugin.ts +++ b/src/plugins/saved_objects/public/plugin.ts @@ -22,9 +22,14 @@ import { CoreStart, Plugin } from 'src/core/public'; import './index.scss'; import { createSavedObjectClass } from './saved_object'; import { DataPublicPluginStart } from '../../data/public'; +import { PER_PAGE_SETTING, LISTING_LIMIT_SETTING } from '../common'; export interface SavedObjectsStart { SavedObjectClass: any; + settings: { + getPerPage: () => number; + getListingLimit: () => number; + }; } export interface SavedObjectsStartDeps { @@ -43,6 +48,10 @@ export class SavedObjectsPublicPlugin chrome: core.chrome, overlays: core.overlays, }), + settings: { + getPerPage: () => core.uiSettings.get(PER_PAGE_SETTING), + getListingLimit: () => core.uiSettings.get(LISTING_LIMIT_SETTING), + }, }; } } diff --git a/src/plugins/saved_objects/server/index.ts b/src/plugins/saved_objects/server/index.ts new file mode 100644 index 0000000000000..4e72bfef0637e --- /dev/null +++ b/src/plugins/saved_objects/server/index.ts @@ -0,0 +1,22 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { SavedObjectsServerPlugin } from './plugin'; + +export const plugin = () => new SavedObjectsServerPlugin(); diff --git a/src/plugins/saved_objects/server/plugin.ts b/src/plugins/saved_objects/server/plugin.ts new file mode 100644 index 0000000000000..9a656fcb510ac --- /dev/null +++ b/src/plugins/saved_objects/server/plugin.ts @@ -0,0 +1,34 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { CoreSetup, Plugin } from 'kibana/server'; +import { uiSettings } from './ui_settings'; + +export class SavedObjectsServerPlugin implements Plugin { + public setup(core: CoreSetup) { + core.uiSettings.register(uiSettings); + return {}; + } + + public start() { + return {}; + } + + public stop() {} +} diff --git a/src/plugins/saved_objects/server/ui_settings.ts b/src/plugins/saved_objects/server/ui_settings.ts new file mode 100644 index 0000000000000..2e2e00b2c3ca7 --- /dev/null +++ b/src/plugins/saved_objects/server/ui_settings.ts @@ -0,0 +1,49 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { i18n } from '@kbn/i18n'; +import { schema } from '@kbn/config-schema'; + +import { UiSettingsParams } from 'kibana/server'; +import { PER_PAGE_SETTING, LISTING_LIMIT_SETTING } from '../common'; + +export const uiSettings: Record = { + [PER_PAGE_SETTING]: { + name: i18n.translate('savedObjects.advancedSettings.perPageTitle', { + defaultMessage: 'Objects per page', + }), + value: 20, + type: 'number', + description: i18n.translate('savedObjects.advancedSettings.perPageText', { + defaultMessage: 'Number of objects to show per page in the load dialog', + }), + schema: schema.number(), + }, + [LISTING_LIMIT_SETTING]: { + name: i18n.translate('savedObjects.advancedSettings.listingLimitTitle', { + defaultMessage: 'Objects listing limit', + }), + type: 'number', + value: 1000, + description: i18n.translate('savedObjects.advancedSettings.listingLimitText', { + defaultMessage: 'Number of objects to fetch for the listing pages', + }), + schema: schema.number(), + }, +}; diff --git a/src/plugins/vis_type_timeseries/common/constants.ts b/src/plugins/vis_type_timeseries/common/constants.ts new file mode 100644 index 0000000000000..fc402d6ab7db5 --- /dev/null +++ b/src/plugins/vis_type_timeseries/common/constants.ts @@ -0,0 +1,20 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export const MAX_BUCKETS_SETTING = 'metrics:max_buckets'; diff --git a/src/plugins/vis_type_timeseries/public/request_handler.js b/src/plugins/vis_type_timeseries/public/request_handler.js index bd6c6d9553930..e33d0e254f609 100644 --- a/src/plugins/vis_type_timeseries/public/request_handler.js +++ b/src/plugins/vis_type_timeseries/public/request_handler.js @@ -19,6 +19,7 @@ import { getTimezone, validateInterval } from './application'; import { getUISettings, getDataStart, getCoreStart } from './services'; +import { MAX_BUCKETS_SETTING } from '../common/constants'; export const metricsRequestHandler = async ({ uiState, @@ -37,7 +38,7 @@ export const metricsRequestHandler = async ({ if (visParams && visParams.id && !visParams.isModelInvalid) { try { - const maxBuckets = config.get('metrics:max_buckets'); + const maxBuckets = config.get(MAX_BUCKETS_SETTING); validateInterval(parsedTimeRange, visParams, maxBuckets); diff --git a/src/plugins/vis_type_timeseries/server/plugin.ts b/src/plugins/vis_type_timeseries/server/plugin.ts index 05257cb79a75c..d863937a4e3dc 100644 --- a/src/plugins/vis_type_timeseries/server/plugin.ts +++ b/src/plugins/vis_type_timeseries/server/plugin.ts @@ -37,6 +37,7 @@ import { visDataRoutes } from './routes/vis'; // @ts-ignore import { fieldsRoutes } from './routes/fields'; import { SearchStrategyRegistry } from './lib/search_strategies'; +import { uiSettings } from './ui_settings'; export interface LegacySetup { server: Server; @@ -75,6 +76,7 @@ export class VisTypeTimeseriesPlugin implements Plugin { public setup(core: CoreSetup, plugins: VisTypeTimeseriesPluginSetupDependencies) { const logger = this.initializerContext.logger.get('visTypeTimeseries'); + core.uiSettings.register(uiSettings); const config$ = this.initializerContext.config.create(); // Global config contains things like the ES shard timeout const globalConfig$ = this.initializerContext.config.legacy.globalConfig$; diff --git a/src/plugins/vis_type_timeseries/server/ui_settings.ts b/src/plugins/vis_type_timeseries/server/ui_settings.ts new file mode 100644 index 0000000000000..65bc166a47104 --- /dev/null +++ b/src/plugins/vis_type_timeseries/server/ui_settings.ts @@ -0,0 +1,38 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { i18n } from '@kbn/i18n'; +import { schema } from '@kbn/config-schema'; + +import { UiSettingsParams } from 'kibana/server'; + +import { MAX_BUCKETS_SETTING } from '../common/constants'; + +export const uiSettings: Record = { + [MAX_BUCKETS_SETTING]: { + name: i18n.translate('visTypeTimeseries.advancedSettings.maxBucketsTitle', { + defaultMessage: 'Maximum buckets', + }), + value: 2000, + description: i18n.translate('visTypeTimeseries.advancedSettings.maxBucketsText', { + defaultMessage: 'The maximum number of buckets a single datasource can return', + }), + schema: schema.number(), + }, +}; diff --git a/src/plugins/vis_type_vislib/common/index.ts b/src/plugins/vis_type_vislib/common/index.ts new file mode 100644 index 0000000000000..e497253761a71 --- /dev/null +++ b/src/plugins/vis_type_vislib/common/index.ts @@ -0,0 +1,21 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export const DIMMING_OPACITY_SETTING = 'visualization:dimmingOpacity'; +export const HEATMAP_MAX_BUCKETS_SETTING = 'visualization:heatmap:maxBuckets'; diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/dispatch.js b/src/plugins/vis_type_vislib/public/vislib/lib/dispatch.js index b36ba336dbfe5..09256232860bc 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/dispatch.js +++ b/src/plugins/vis_type_vislib/public/vislib/lib/dispatch.js @@ -20,6 +20,7 @@ import d3 from 'd3'; import { get, pull, restParam, size, reduce } from 'lodash'; import $ from 'jquery'; +import { DIMMING_OPACITY_SETTING } from '../../../common'; /** * Handles event responses @@ -393,7 +394,7 @@ export class Dispatch { return function highlight(element) { const label = this.getAttribute('data-label'); if (!label) return; - const dimming = uiSettings.get('visualization:dimmingOpacity'); + const dimming = uiSettings.get(DIMMING_OPACITY_SETTING); $(element) .parent() .find('[data-label]') diff --git a/src/plugins/vis_type_vislib/public/vislib/vis.js b/src/plugins/vis_type_vislib/public/vislib/vis.js index ca4f36f0ab0f7..f258cb55ba281 100644 --- a/src/plugins/vis_type_vislib/public/vislib/vis.js +++ b/src/plugins/vis_type_vislib/public/vislib/vis.js @@ -24,6 +24,7 @@ import { EventEmitter } from 'events'; import { VislibError } from './errors'; import { VisConfig } from './lib/vis_config'; import { Handler } from './lib/handler'; +import { DIMMING_OPACITY_SETTING, HEATMAP_MAX_BUCKETS_SETTING } from '../../common'; /** * Creates the visualizations. @@ -38,8 +39,8 @@ export class Vis extends EventEmitter { super(); this.element = element.get ? element.get(0) : element; this.visConfigArgs = _.cloneDeep(visConfigArgs); - this.visConfigArgs.dimmingOpacity = deps.uiSettings.get('visualization:dimmingOpacity'); - this.visConfigArgs.heatmapMaxBuckets = deps.uiSettings.get('visualization:heatmap:maxBuckets'); + this.visConfigArgs.dimmingOpacity = deps.uiSettings.get(DIMMING_OPACITY_SETTING); + this.visConfigArgs.heatmapMaxBuckets = deps.uiSettings.get(HEATMAP_MAX_BUCKETS_SETTING); this.deps = deps; } diff --git a/src/plugins/vis_type_vislib/server/index.ts b/src/plugins/vis_type_vislib/server/index.ts index 355c01d255ce7..c201dd3ddc49a 100644 --- a/src/plugins/vis_type_vislib/server/index.ts +++ b/src/plugins/vis_type_vislib/server/index.ts @@ -16,14 +16,10 @@ * specific language governing permissions and limitations * under the License. */ - import { schema } from '@kbn/config-schema'; - +import { VisTypeVislibServerPlugin } from './plugin'; export const config = { schema: schema.object({ enabled: schema.boolean({ defaultValue: true }) }), }; -export const plugin = () => ({ - setup() {}, - start() {}, -}); +export const plugin = () => new VisTypeVislibServerPlugin(); diff --git a/src/plugins/vis_type_vislib/server/plugin.ts b/src/plugins/vis_type_vislib/server/plugin.ts new file mode 100644 index 0000000000000..7ff81e070f7a5 --- /dev/null +++ b/src/plugins/vis_type_vislib/server/plugin.ts @@ -0,0 +1,34 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { CoreSetup, CoreStart, Plugin } from 'kibana/server'; +import { uiSettings } from './ui_settings'; + +export class VisTypeVislibServerPlugin implements Plugin { + public setup(core: CoreSetup) { + core.uiSettings.register(uiSettings); + return {}; + } + + public start(core: CoreStart) { + return {}; + } + + public stop() {} +} diff --git a/src/plugins/vis_type_vislib/server/ui_settings.ts b/src/plugins/vis_type_vislib/server/ui_settings.ts new file mode 100644 index 0000000000000..a48cbbae3d0ca --- /dev/null +++ b/src/plugins/vis_type_vislib/server/ui_settings.ts @@ -0,0 +1,59 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { i18n } from '@kbn/i18n'; +import { schema } from '@kbn/config-schema'; + +import { UiSettingsParams } from 'kibana/server'; +import { DIMMING_OPACITY_SETTING, HEATMAP_MAX_BUCKETS_SETTING } from '../common'; + +export const uiSettings: Record = { + [DIMMING_OPACITY_SETTING]: { + name: i18n.translate('visTypeVislib.advancedSettings.visualization.dimmingOpacityTitle', { + defaultMessage: 'Dimming opacity', + }), + value: 0.5, + type: 'number', + description: i18n.translate('visTypeVislib.advancedSettings.visualization.dimmingOpacityText', { + defaultMessage: + 'The opacity of the chart items that are dimmed when highlighting another element of the chart. ' + + 'The lower this number, the more the highlighted element will stand out. ' + + 'This must be a number between 0 and 1.', + }), + category: ['visualization'], + schema: schema.number(), + }, + [HEATMAP_MAX_BUCKETS_SETTING]: { + name: i18n.translate('visTypeVislib.advancedSettings.visualization.heatmap.maxBucketsTitle', { + defaultMessage: 'Heatmap maximum buckets', + }), + value: 50, + type: 'number', + description: i18n.translate( + 'visTypeVislib.advancedSettings.visualization.heatmap.maxBucketsText', + { + defaultMessage: + 'The maximum number of buckets a single datasource can return. ' + + 'A higher number might have negative impact on browser rendering performance', + } + ), + category: ['visualization'], + schema: schema.number(), + }, +}; diff --git a/src/plugins/visualize/public/application/listing/visualize_listing.html b/src/plugins/visualize/public/application/listing/visualize_listing.html index 5cae187a393b2..8838348e0b679 100644 --- a/src/plugins/visualize/public/application/listing/visualize_listing.html +++ b/src/plugins/visualize/public/application/listing/visualize_listing.html @@ -8,5 +8,6 @@ get-view-element="listingController.getViewElement" edit-item="listingController.editItem" listing-limit="listingController.listingLimit" + initial-page-size="listingController.initialPageSize" > diff --git a/src/plugins/visualize/public/application/listing/visualize_listing.js b/src/plugins/visualize/public/application/listing/visualize_listing.js index 2a8c80f9352a5..7c95fd6a7f4b0 100644 --- a/src/plugins/visualize/public/application/listing/visualize_listing.js +++ b/src/plugins/visualize/public/application/listing/visualize_listing.js @@ -44,6 +44,7 @@ export function VisualizeListingController($scope, createNewVis, kbnUrlStateStor toastNotifications, visualizations, core: { docLinks, savedObjects, uiSettings, application }, + savedObjects: savedObjectsPublic, } = getServices(); chrome.docTitle.change( @@ -121,7 +122,7 @@ export function VisualizeListingController($scope, createNewVis, kbnUrlStateStor this.fetchItems = filter => { const isLabsEnabled = uiSettings.get('visualize:enableLabs'); return savedVisualizations - .findListItems(filter, uiSettings.get('savedObjects:listingLimit')) + .findListItems(filter, savedObjectsPublic.settings.getListingLimit()) .then(result => { this.totalItems = result.total; @@ -154,7 +155,8 @@ export function VisualizeListingController($scope, createNewVis, kbnUrlStateStor }, ]); - this.listingLimit = uiSettings.get('savedObjects:listingLimit'); + this.listingLimit = savedObjectsPublic.settings.getListingLimit(); + this.initialPageSize = savedObjectsPublic.settings.getPerPage(); addHelpMenuToAppChrome(chrome, docLinks); diff --git a/src/plugins/visualize/public/application/listing/visualize_listing_table.js b/src/plugins/visualize/public/application/listing/visualize_listing_table.js index 3d49194c6778f..a1cc11c93cafc 100644 --- a/src/plugins/visualize/public/application/listing/visualize_listing_table.js +++ b/src/plugins/visualize/public/application/listing/visualize_listing_table.js @@ -45,6 +45,7 @@ class VisualizeListingTable extends Component { editItem={visualizeCapabilities.save ? this.props.editItem : null} tableColumns={this.getTableColumns()} listingLimit={this.props.listingLimit} + initialPageSize={this.props.initialPageSize} selectable={item => item.canDelete} initialFilter={''} noItemsFragment={this.getNoItemsMessage()} diff --git a/src/plugins/visualize/public/kibana_services.ts b/src/plugins/visualize/public/kibana_services.ts index 7642c6575f211..ace9e50d400c5 100644 --- a/src/plugins/visualize/public/kibana_services.ts +++ b/src/plugins/visualize/public/kibana_services.ts @@ -36,6 +36,7 @@ import { SavedVisualizations } from './application/types'; import { KibanaLegacyStart } from '../../kibana_legacy/public'; import { DefaultEditorController } from '../../vis_default_editor/public'; import { DashboardStart } from '../../dashboard/public'; +import { SavedObjectsStart } from '../../saved_objects/public'; export interface VisualizeKibanaServices { pluginInitializerContext: PluginInitializerContext; @@ -58,6 +59,7 @@ export interface VisualizeKibanaServices { DefaultVisualizationEditor: typeof DefaultEditorController; createVisEmbeddableFromObject: VisualizationsStart['__LEGACY']['createVisEmbeddableFromObject']; scopedHistory: () => ScopedHistory; + savedObjects: SavedObjectsStart; } let services: VisualizeKibanaServices | null = null; diff --git a/src/plugins/visualize/public/plugin.ts b/src/plugins/visualize/public/plugin.ts index 45316fd6fad62..9d1e89a024b61 100644 --- a/src/plugins/visualize/public/plugin.ts +++ b/src/plugins/visualize/public/plugin.ts @@ -43,6 +43,7 @@ import { FeatureCatalogueCategory, HomePublicPluginSetup } from '../../home/publ import { DefaultEditorController } from '../../vis_default_editor/public'; import { DashboardStart } from '../../dashboard/public'; import { DEFAULT_APP_CATEGORIES } from '../../../core/public'; +import { SavedObjectsStart } from '../../saved_objects/public'; export interface VisualizePluginStartDependencies { data: DataPublicPluginStart; @@ -51,6 +52,7 @@ export interface VisualizePluginStartDependencies { visualizations: VisualizationsStart; dashboard: DashboardStart; kibanaLegacy: KibanaLegacyStart; + savedObjects: SavedObjectsStart; } export interface VisualizePluginSetupDependencies { @@ -135,6 +137,7 @@ export class VisualizePlugin pluginsStart.visualizations.__LEGACY.createVisEmbeddableFromObject, dashboard: pluginsStart.dashboard, scopedHistory: () => this.currentHistory!, + savedObjects: pluginsStart.savedObjects, }; setServices(deps); diff --git a/x-pack/legacy/plugins/maps/public/routes.js b/x-pack/legacy/plugins/maps/public/routes.js index 70c1c4a50efd4..721b30a208ebc 100644 --- a/x-pack/legacy/plugins/maps/public/routes.js +++ b/x-pack/legacy/plugins/maps/public/routes.js @@ -18,6 +18,7 @@ import { } from '../../../../plugins/maps/public/kibana_services'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { getMapsSavedObjectLoader } from '../../../../plugins/maps/public/angular/services/gis_map_saved_object_loader'; +import { LISTING_LIMIT_SETTING } from '../../../../../src/plugins/saved_objects/common'; routes.enable(); @@ -43,7 +44,7 @@ routes template: listingTemplate, controller($scope, config) { const gisMapSavedObjectLoader = getMapsSavedObjectLoader(); - $scope.listingLimit = config.get('savedObjects:listingLimit'); + $scope.listingLimit = config.get(LISTING_LIMIT_SETTING); $scope.find = search => { return gisMapSavedObjectLoader.find(search, $scope.listingLimit); }; diff --git a/x-pack/plugins/graph/kibana.json b/x-pack/plugins/graph/kibana.json index 96e7ea3ff2232..4cae14f8939b2 100644 --- a/x-pack/plugins/graph/kibana.json +++ b/x-pack/plugins/graph/kibana.json @@ -4,7 +4,7 @@ "kibanaVersion": "kibana", "server": true, "ui": true, - "requiredPlugins": ["licensing", "data", "navigation"], + "requiredPlugins": ["licensing", "data", "navigation", "savedObjects"], "optionalPlugins": ["home", "features"], "configPath": ["xpack", "graph"] } diff --git a/x-pack/plugins/graph/public/angular/templates/listing_ng_wrapper.html b/x-pack/plugins/graph/public/angular/templates/listing_ng_wrapper.html index 2f75d663126b2..4e0c13442d267 100644 --- a/x-pack/plugins/graph/public/angular/templates/listing_ng_wrapper.html +++ b/x-pack/plugins/graph/public/angular/templates/listing_ng_wrapper.html @@ -7,5 +7,6 @@ listing-limit="listingLimit" capabilities="capabilities" initial-filter="initialFilter" + initialPageSize="initialPageSize" core-start="coreStart" > diff --git a/x-pack/plugins/graph/public/app.js b/x-pack/plugins/graph/public/app.js index 7effe44375b1f..d4199fbd092b4 100644 --- a/x-pack/plugins/graph/public/app.js +++ b/x-pack/plugins/graph/public/app.js @@ -46,13 +46,13 @@ export function initGraphApp(angularModule, deps) { addBasePath, getBasePath, data, - config, capabilities, coreStart, storage, canEditDrillDownUrls, graphSavePolicy, overlays, + savedObjects, } = deps; const app = angularModule; @@ -77,6 +77,7 @@ export function initGraphApp(angularModule, deps) { ['hideWriteControls', { watchDepth: 'reference' }], ['capabilities', { watchDepth: 'reference' }], ['initialFilter', { watchDepth: 'reference' }], + ['initialPageSize', { watchDepth: 'reference' }], ]); }); @@ -111,7 +112,8 @@ export function initGraphApp(angularModule, deps) { template: listingTemplate, badge: getReadonlyBadge, controller: function($location, $scope) { - $scope.listingLimit = config.get('savedObjects:listingLimit'); + $scope.listingLimit = savedObjects.settings.getListingLimit(); + $scope.initialPageSize = savedObjects.settings.getPerPage(); $scope.create = () => { $location.url(getNewPath()); }; diff --git a/x-pack/plugins/graph/public/application.ts b/x-pack/plugins/graph/public/application.ts index 4aff9d28f3771..7c0fb867b9ada 100644 --- a/x-pack/plugins/graph/public/application.ts +++ b/x-pack/plugins/graph/public/application.ts @@ -22,7 +22,6 @@ import { PluginInitializerContext, SavedObjectsClientContract, ToastsStart, - IUiSettingsClient, OverlayStart, } from 'kibana/public'; // @ts-ignore @@ -39,6 +38,7 @@ import { } from '../../../../src/plugins/kibana_legacy/public'; import './index.scss'; +import { SavedObjectsStart } from '../../../../src/plugins/saved_objects/public'; /** * These are dependencies of the Graph app besides the base dependencies @@ -56,7 +56,6 @@ export interface GraphDependencies { navigation: NavigationStart; licensing: LicensingPluginSetup; chrome: ChromeStart; - config: IUiSettingsClient; toastNotifications: ToastsStart; indexPatterns: IndexPatternsContract; data: ReturnType; @@ -67,6 +66,7 @@ export interface GraphDependencies { canEditDrillDownUrls: boolean; graphSavePolicy: string; overlays: OverlayStart; + savedObjects: SavedObjectsStart; } export const renderApp = ({ appBasePath, element, ...deps }: GraphDependencies) => { diff --git a/x-pack/plugins/graph/public/components/listing.tsx b/x-pack/plugins/graph/public/components/listing.tsx index 37f27523cbad2..b89ee2489d7f3 100644 --- a/x-pack/plugins/graph/public/components/listing.tsx +++ b/x-pack/plugins/graph/public/components/listing.tsx @@ -24,6 +24,7 @@ export interface ListingProps { hideWriteControls: boolean; capabilities: { save: boolean; delete: boolean }; initialFilter: string; + initialPageSize: number; } export function Listing(props: ListingProps) { @@ -38,6 +39,7 @@ export function Listing(props: ListingProps) { tableColumns={getTableColumns(props.getViewUrl)} listingLimit={props.listingLimit} initialFilter={props.initialFilter} + initialPageSize={props.initialPageSize} noItemsFragment={getNoItemsMessage( props.capabilities.save === false, props.createItem, @@ -53,7 +55,6 @@ export function Listing(props: ListingProps) { tableListTitle={i18n.translate('xpack.graph.listing.graphsTitle', { defaultMessage: 'Graphs', })} - uiSettings={props.coreStart.uiSettings} /> ); diff --git a/x-pack/plugins/graph/public/plugin.ts b/x-pack/plugins/graph/public/plugin.ts index b869119062538..9d6d083b3e4b9 100644 --- a/x-pack/plugins/graph/public/plugin.ts +++ b/x-pack/plugins/graph/public/plugin.ts @@ -23,6 +23,7 @@ import { } from '../../../../src/plugins/home/public'; import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/public'; import { ConfigSchema } from '../config'; +import { SavedObjectsStart } from '../../../../src/plugins/saved_objects/public'; export interface GraphPluginSetupDependencies { licensing: LicensingPluginSetup; @@ -32,6 +33,7 @@ export interface GraphPluginSetupDependencies { export interface GraphPluginStartDependencies { navigation: NavigationStart; data: DataPublicPluginStart; + savedObjects: SavedObjectsStart; } export class GraphPlugin @@ -92,10 +94,10 @@ export class GraphPlugin capabilities: coreStart.application.capabilities.graph, coreStart, chrome: coreStart.chrome, - config: coreStart.uiSettings, toastNotifications: coreStart.notifications.toasts, indexPatterns: pluginsStart.data!.indexPatterns, overlays: coreStart.overlays, + savedObjects: pluginsStart.savedObjects, }); }, }); diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index bea35c69e539a..3186738ef3638 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -124,6 +124,8 @@ "advancedSettings.searchBar.unableToParseQueryErrorMessage": "クエリをパースできません", "advancedSettings.searchBarAriaLabel": "高度な設定を検索", "advancedSettings.voiceAnnouncement.searchResultScreenReaderMessage": "{query} を検索しました。{sectionLenght, plural, one {# セクション} other {# セクション}}に{optionLenght, plural, one {# オプション} other {# オプション}}があります。", + "charts.advancedSettings.visualization.colorMappingText": "ビジュアライゼーション内の特定の色のマップ値です", + "charts.advancedSettings.visualization.colorMappingTitle": "カラーマッピング", "charts.colormaps.bluesText": "青", "charts.colormaps.greensText": "緑", "charts.colormaps.greenToRedText": "緑から赤", @@ -538,6 +540,10 @@ "dashboard.panel.unableToMigratePanelDataForSixOneZeroErrorMessage": "「6.1.0」のダッシュボードの互換性のため、パネルデータを移行できませんでした。パネルには想定された列または行フィールドがありません", "dashboard.panel.unableToMigratePanelDataForSixThreeZeroErrorMessage": "「6.3.0」のダッシュボードの互換性のため、パネルデータを移行できませんでした。パネルに必要なフィールドがありません: {key}", "data.aggTypes.buckets.ranges.rangesFormatMessage": "{gte} {from} と {lt} {to}", + "data.advancedSettings.docTableHighlightText": "ディスカバリと保存された検索ダッシュボードの結果をハイライトします。ハイライトすることで、大きなドキュメントを扱う際にリクエストが遅くなります。", + "data.advancedSettings.docTableHighlightTitle": "結果をハイライト", + "data.advancedSettings.metaFieldsText": "_source の外にあり、ドキュメントが表示される時に融合されるフィールドです", + "data.advancedSettings.metaFieldsTitle": "メタフィールド", "data.common.kql.errors.endOfInputText": "インプットの終わり", "data.common.kql.errors.fieldNameText": "フィールド名", "data.common.kql.errors.literalText": "文字通り", @@ -850,6 +856,28 @@ "devTools.badge.readOnly.text": "読み込み専用", "devTools.badge.readOnly.tooltip": "を保存できませんでした", "devTools.k7BreadcrumbsDevToolsLabel": "開発ツール", + "discover.advancedSettings.aggsTermsSizeText": "「可視化」ボタンをクリックした際に、フィールドドロップダウンやディスカバリサイドバーに可視化される用語の数を設定します。", + "discover.advancedSettings.aggsTermsSizeTitle": "用語数", + "discover.advancedSettings.context.defaultSizeText": "コンテキストビューに表示される周りのエントリーの数", + "discover.advancedSettings.context.defaultSizeTitle": "コンテキストサイズ", + "discover.advancedSettings.context.sizeStepText": "コンテキストサイズを増減させる際の最低単位です", + "discover.advancedSettings.context.sizeStepTitle": "コンテキストサイズのステップ", + "discover.advancedSettings.context.tieBreakerFieldsText": "同じタイムスタンプ値のドキュメントを区別するためのコンマ区切りのフィールドのリストです。このリストから、現在のインデックスパターンに含まれ並べ替え可能な初めのフィールドが使用されます。", + "discover.advancedSettings.context.tieBreakerFieldsTitle": "タイブレーカーフィールド", + "discover.advancedSettings.defaultColumnsText": "デフォルトでディスカバリタブに表示される列です", + "discover.advancedSettings.defaultColumnsTitle": "デフォルトの列", + "discover.advancedSettings.docTableHideTimeColumnText": "ディスカバリと、ダッシュボードのすべての保存された検索で、「時刻」列を非表示にします。", + "discover.advancedSettings.docTableHideTimeColumnTitle": "「時刻」列を非表示", + "discover.advancedSettings.fieldsPopularLimitText": "最も頻繁に使用されるフィールドのトップ N を表示します", + "discover.advancedSettings.fieldsPopularLimitTitle": "頻繁に使用されるフィールドの制限", + "discover.advancedSettings.sampleSizeText": "表に表示する行数です", + "discover.advancedSettings.sampleSizeTitle": "行数", + "discover.advancedSettings.searchOnPageLoadText": "ディスカバリの最初の読み込み時に検索を実行するかを制御します。この設定は、保存された検索の読み込み時には影響しません。", + "discover.advancedSettings.searchOnPageLoadTitle": "ページの読み込み時の検索", + "discover.advancedSettings.sortDefaultOrderText": "ディスカバリアプリのインデックスパターンに基づく時刻のデフォルトの並べ替え方向をコントロールします。", + "discover.advancedSettings.sortDefaultOrderTitle": "デフォルトの並べ替え方向", + "discover.advancedSettings.sortOrderAsc": "昇順", + "discover.advancedSettings.sortOrderDesc": "降順", "discover.docViews.json.codeEditorAriaLabel": "Elasticsearch ドキュメントの JSON ビューのみを読み込む", "discover.docViews.json.jsonTitle": "JSON", "discover.docViews.table.fieldNamesBeginningWithUnderscoreUnsupportedAriaLabel": "警告", @@ -1948,12 +1976,6 @@ "inspector.requests.statisticsTabLabel": "統計", "inspector.title": "インスペクター", "inspector.view": "{viewName} を表示", - "kbn.advancedSettings.context.defaultSizeText": "コンテキストビューに表示される周りのエントリーの数", - "kbn.advancedSettings.context.defaultSizeTitle": "コンテキストサイズ", - "kbn.advancedSettings.context.sizeStepText": "コンテキストサイズを増減させる際の最低単位です", - "kbn.advancedSettings.context.sizeStepTitle": "コンテキストサイズのステップ", - "kbn.advancedSettings.context.tieBreakerFieldsText": "同じタイムスタンプ値のドキュメントを区別するためのコンマ区切りのフィールドのリストです。このリストから、現在のインデックスパターンに含まれ並べ替え可能な初めのフィールドが使用されます。", - "kbn.advancedSettings.context.tieBreakerFieldsTitle": "タイブレーカーフィールド", "kbn.advancedSettings.courier.batchSearchesText": "無効の場合、ダッシュボードパネルは個々に読み込まれ、検索リクエストはユーザーが移動するか\n クエリを更新すると停止します。有効の場合、ダッシュボードパネルはすべてのデータが読み込まれると同時に読み込まれ、\n 検索は停止しません。", "kbn.advancedSettings.courier.batchSearchesTextDeprecation": "この設定はサポートが終了し、Kibana 8.0 では削除されます。", "kbn.advancedSettings.courier.batchSearchesTitle": "同時検索のバッチ処理", @@ -1988,8 +2010,6 @@ "kbn.advancedSettings.dateNanosFormatText": "Elasticsearch の {dateNanosLink} データタイプに使用されます", "kbn.advancedSettings.dateNanosFormatTitle": "ナノ秒フォーマットでの日付", "kbn.advancedSettings.dateNanosLinkTitle": "date_nanos", - "kbn.advancedSettings.defaultColumnsText": "デフォルトでディスカバリタブに表示される列です", - "kbn.advancedSettings.defaultColumnsTitle": "デフォルトの列", "kbn.advancedSettings.defaultIndexText": "インデックスが設定されていない時にアクセスするインデックスです", "kbn.advancedSettings.defaultIndexTitle": "デフォルトのインデックス", "kbn.advancedSettings.defaultRoute.defaultRouteIsRelativeValidationMessage": "相対 URL でなければなりません。", @@ -1997,22 +2017,6 @@ "kbn.advancedSettings.defaultRoute.defaultRouteTitle": "デフォルトのルート", "kbn.advancedSettings.disableAnimationsText": "Kibana UI の不要なアニメーションをオフにします。変更を適用するにはページを更新してください。", "kbn.advancedSettings.disableAnimationsTitle": "アニメーションを無効にする", - "kbn.advancedSettings.discover.aggsTermsSizeText": "「可視化」ボタンをクリックした際に、フィールドドロップダウンやディスカバリサイドバーに可視化される用語の数を設定します。", - "kbn.advancedSettings.discover.aggsTermsSizeTitle": "用語数", - "kbn.advancedSettings.discover.sampleSizeText": "表に表示する行数です", - "kbn.advancedSettings.discover.sampleSizeTitle": "行数", - "kbn.advancedSettings.discover.searchOnPageLoadText": "ディスカバリの最初の読み込み時に検索を実行するかを制御します。この設定は、保存された検索の読み込み時には影響しません。", - "kbn.advancedSettings.discover.searchOnPageLoadTitle": "ページの読み込み時の検索", - "kbn.advancedSettings.discover.sortDefaultOrderText": "ディスカバリアプリのインデックスパターンに基づく時刻のデフォルトの並べ替え方向をコントロールします。", - "kbn.advancedSettings.discover.sortDefaultOrderTitle": "デフォルトの並べ替え方向", - "kbn.advancedSettings.discover.sortOrderAsc": "昇順", - "kbn.advancedSettings.discover.sortOrderDesc": "降順", - "kbn.advancedSettings.docTableHideTimeColumnText": "ディスカバリと、ダッシュボードのすべての保存された検索で、「時刻」列を非表示にします。", - "kbn.advancedSettings.docTableHideTimeColumnTitle": "「時刻」列を非表示", - "kbn.advancedSettings.docTableHighlightText": "ディスカバリと保存された検索ダッシュボードの結果をハイライトします。ハイライトすることで、大きなドキュメントを扱う際にリクエストが遅くなります。", - "kbn.advancedSettings.docTableHighlightTitle": "結果をハイライト", - "kbn.advancedSettings.fieldsPopularLimitText": "最も頻繁に使用されるフィールドのトップ N を表示します", - "kbn.advancedSettings.fieldsPopularLimitTitle": "頻繁に使用されるフィールドの制限", "kbn.advancedSettings.format.bytesFormat.numeralFormatLinkText": "数字フォーマット", "kbn.advancedSettings.format.bytesFormatText": "「バイト」フォーマットのデフォルト {numeralFormatLink} です", "kbn.advancedSettings.format.bytesFormatTitle": "バイトフォーマット", @@ -2038,12 +2042,8 @@ "kbn.advancedSettings.historyLimitTitle": "履歴制限数", "kbn.advancedSettings.indexPatternPlaceholderText": "「管理 > インデックスパターン > インデックスパターンを作成」で使用される「インデックスパターン名」フィールドのプレースホルダーです。", "kbn.advancedSettings.indexPatternPlaceholderTitle": "インデックスパターンのプレースホルダー", - "kbn.advancedSettings.maxBucketsText": "1 つのデータソースが返せるバケットの最大数です", - "kbn.advancedSettings.maxBucketsTitle": "バケットの最大数", "kbn.advancedSettings.maxCellHeightText": "表のセルが使用する高さの上限です。この切り捨てを無効にするには 0 に設定します", "kbn.advancedSettings.maxCellHeightTitle": "表のセルの高さの上限", - "kbn.advancedSettings.metaFieldsText": "_source の外にあり、ドキュメントが表示される時に融合されるフィールドです", - "kbn.advancedSettings.metaFieldsTitle": "メタフィールド", "kbn.advancedSettings.notifications.banner.markdownLinkText": "マークダウン対応", "kbn.advancedSettings.notifications.bannerLifetimeText": "バナー通知が画面に表示されるミリ秒単位での時間です。{infinityValue} に設定するとカウントダウンが無効になります。", "kbn.advancedSettings.notifications.bannerLifetimeTitle": "バナー通知時間", @@ -2062,10 +2062,6 @@ "kbn.advancedSettings.query.queryStringOptions.optionsLinkText": "オプション", "kbn.advancedSettings.query.queryStringOptionsText": "Lucene クエリ文字列パーサーの {optionsLink}「{queryLanguage}」が {luceneLanguage} に設定されている時にのみ使用されます。", "kbn.advancedSettings.query.queryStringOptionsTitle": "クエリ文字列のオプション", - "kbn.advancedSettings.savedObjects.listingLimitText": "一覧ページ用に取得するオブジェクトの数です", - "kbn.advancedSettings.savedObjects.listingLimitTitle": "オブジェクト取得制限", - "kbn.advancedSettings.savedObjects.perPageText": "読み込みダイアログで表示されるページごとのオブジェクトの数です", - "kbn.advancedSettings.savedObjects.perPageTitle": "ページごとのオブジェクト数", "kbn.advancedSettings.searchQueryLanguageKql": "KQL", "kbn.advancedSettings.searchQueryLanguageLucene": "Lucene", "kbn.advancedSettings.searchQueryLanguageText": "クエリバーで使用されるクエリ言語です。KQL は Kibana 用に特別に開発された新しい言語です。", @@ -2096,14 +2092,6 @@ "kbn.advancedSettings.timepicker.timeDefaultsText": "時間フィルターが選択されずに Kibana が起動した際に使用される時間フィルターです", "kbn.advancedSettings.timepicker.timeDefaultsTitle": "デフォルトのタイムピッカー", "kbn.advancedSettings.timepicker.today": "今日", - "kbn.advancedSettings.visualization.colorMappingText": "ビジュアライゼーション内の特定の色のマップ値です", - "kbn.advancedSettings.visualization.colorMappingTitle": "カラーマッピング", - "kbn.advancedSettings.visualization.dimmingOpacityText": "チャートの別のエレメントが選択された時に暗くなるチャート項目の透明度です。この数字が小さければ小さいほど、ハイライトされたエレメントが目立ちます。0 と 1 の間の数字で設定します。", - "kbn.advancedSettings.visualization.dimmingOpacityTitle": "減光透明度", - "kbn.advancedSettings.visualization.heatmap.maxBucketsText": "1 つのデータソースが返せるバケットの最大数です。値が大きいとブラウザのレンダリング速度が下がる可能性があります。", - "kbn.advancedSettings.visualization.heatmap.maxBucketsTitle": "ヒートマップの最大バケット数", - "kbn.advancedSettings.visualization.loadingDelayText": "クエリの際にビジュアライゼーションを暗くするまでの時間です", - "kbn.advancedSettings.visualization.loadingDelayTitle": "読み込み遅延", "kbn.advancedSettings.visualization.showRegionMapWarningsText": "用語がマップの形に合わない場合に地域マップに警告を表示するかどうかです。", "kbn.advancedSettings.visualization.showRegionMapWarningsTitle": "地域マップに警告を表示", "kbn.advancedSettings.visualization.tileMap.maxPrecision.cellDimensionsLinkText": "ディメンションの説明", @@ -2468,6 +2456,10 @@ "regionMap.visParams.vectorMapLabel": "ベクトルマップ", "regionMap.visualization.unableToShowMismatchesWarningText": "次の各用語がシェイプの結合フィールドのシェイプと一致することを確認してください: {mismatches}", "regionMap.visualization.unableToShowMismatchesWarningTitle": "{mismatchesLength} {oneMismatch, plural, one { 件の結果} other { 件の結果}}をマップに表示できません", + "savedObjects.advancedSettings.listingLimitText": "一覧ページ用に取得するオブジェクトの数です", + "savedObjects.advancedSettings.listingLimitTitle": "オブジェクト取得制限", + "savedObjects.advancedSettings.perPageText": "読み込みダイアログで表示されるページごとのオブジェクトの数です", + "savedObjects.advancedSettings.perPageTitle": "ページごとのオブジェクト数", "savedObjects.confirmModal.cancelButtonLabel": "キャンセル", "savedObjects.confirmModal.overwriteButtonLabel": "上書き", "savedObjects.confirmModal.overwriteConfirmationMessage": "{title} を上書きしてよろしいですか?", @@ -3159,6 +3151,8 @@ "visTypeTimeseries.addDeleteButtons.deleteButtonDefaultTooltip": "削除", "visTypeTimeseries.addDeleteButtons.reEnableTooltip": "再度有効にする", "visTypeTimeseries.addDeleteButtons.temporarilyDisableTooltip": "一時的に無効にする", + "visTypeTimeseries.advancedSettings.maxBucketsText": "1 つのデータソースが返せるバケットの最大数です", + "visTypeTimeseries.advancedSettings.maxBucketsTitle": "バケットの最大数", "visTypeTimeseries.aggLookup.averageLabel": "平均", "visTypeTimeseries.aggLookup.calculationLabel": "計算", "visTypeTimeseries.aggLookup.cardinalityLabel": "基数", @@ -3717,6 +3711,10 @@ "visTypeVega.visualization.renderErrorTitle": "Vega エラー", "visTypeVega.visualization.unableToFindDefaultIndexErrorMessage": "デフォルトのインデックスが見つかりません", "visTypeVega.visualization.unableToRenderWithoutDataWarningMessage": "データなしにはレンダリングできません", + "visTypeVislib.advancedSettings.visualization.dimmingOpacityText": "チャートの別のエレメントが選択された時に暗くなるチャート項目の透明度です。この数字が小さければ小さいほど、ハイライトされたエレメントが目立ちます。0 と 1 の間の数字で設定します。", + "visTypeVislib.advancedSettings.visualization.dimmingOpacityTitle": "減光透明度", + "visTypeVislib.advancedSettings.visualization.heatmap.maxBucketsText": "1 つのデータソースが返せるバケットの最大数です。値が大きいとブラウザのレンダリング速度が下がる可能性があります。", + "visTypeVislib.advancedSettings.visualization.heatmap.maxBucketsTitle": "ヒートマップの最大バケット数", "visTypeVislib.aggResponse.allDocsTitle": "すべてのドキュメント", "visTypeVislib.area.areaDescription": "折れ線グラフの下の数量を強調します。", "visTypeVislib.area.areaTitle": "エリア", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 2ee4381562644..fef5dd3a2701b 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -124,6 +124,8 @@ "advancedSettings.searchBar.unableToParseQueryErrorMessage": "无法解析查询", "advancedSettings.searchBarAriaLabel": "搜索高级设置", "advancedSettings.voiceAnnouncement.searchResultScreenReaderMessage": "您搜索了“{query}”。{sectionLenght, plural, one {# 个部分} other {# 个部分}}中有 {optionLenght, plural, one {# 个选项} other {# 个选项}}", + "charts.advancedSettings.visualization.colorMappingText": "将值映射到可视化内的指定颜色", + "charts.advancedSettings.visualization.colorMappingTitle": "颜色映射", "charts.colormaps.bluesText": "蓝色", "charts.colormaps.greensText": "绿色", "charts.colormaps.greenToRedText": "绿到红", @@ -537,6 +539,10 @@ "dashboard.panel.removePanel.replacePanel": "替换面板", "dashboard.panel.unableToMigratePanelDataForSixOneZeroErrorMessage": "无法迁移用于“6.1.0”向后兼容的面板数据,面板不包含所需的列和/或行字段", "dashboard.panel.unableToMigratePanelDataForSixThreeZeroErrorMessage": "无法迁移用于“6.3.0”向后兼容的面板数据,面板不包含预期字段:{key}", + "data.advancedSettings.metaFieldsText": "_source 之外存在的、在显示我们的文档时将合并进其中的字段", + "data.advancedSettings.metaFieldsTitle": "元字段", + "data.advancedSettings.docTableHighlightText": "突出显示 Discover 和已保存搜索仪表板中的结果。处理大文档时,突出显示会使请求变慢。", + "data.advancedSettings.docTableHighlightTitle": "突出显示结果", "data.aggTypes.buckets.ranges.rangesFormatMessage": "{gte} {from} 和 {lt} {to}", "data.common.kql.errors.endOfInputText": "输入结束", "data.common.kql.errors.fieldNameText": "字段名称", @@ -851,6 +857,28 @@ "devTools.badge.readOnly.text": "只读", "devTools.badge.readOnly.tooltip": "无法保存", "devTools.k7BreadcrumbsDevToolsLabel": "开发工具", + "discover.advancedSettings.aggsTermsSizeText": "确定在单击“可视化”按钮时将在发现侧边栏的字段下拉列表中可视化多少个词。", + "discover.advancedSettings.aggsTermsSizeTitle": "词数目", + "discover.advancedSettings.context.defaultSizeText": "要在上下文视图中显示的周围条目数目", + "discover.advancedSettings.context.defaultSizeTitle": "上下文大小", + "discover.advancedSettings.context.sizeStepText": "递增或递减上下文大小的步进大小", + "discover.advancedSettings.context.sizeStepTitle": "上下文大小步进", + "discover.advancedSettings.context.tieBreakerFieldsText": "要在具有相同时间戳值的文档之间用于平分决胜的字段逗号分隔列表。将使用此列表上存在且在当前索引模式下可排序的第一个字段。", + "discover.advancedSettings.context.tieBreakerFieldsTitle": "平分决胜字段", + "discover.advancedSettings.docTableHideTimeColumnText": "在 Discover 中和仪表板上的所有已保存搜索中隐藏“时间”列。", + "discover.advancedSettings.docTableHideTimeColumnTitle": "隐藏“时间”列", + "discover.advancedSettings.fieldsPopularLimitText": "要显示的排名前 N 最常见字段", + "discover.advancedSettings.fieldsPopularLimitTitle": "常见字段限制", + "discover.advancedSettings.defaultColumnsText": "“发现”选项卡中默认显示的列", + "discover.advancedSettings.defaultColumnsTitle": "默认列", + "discover.advancedSettings.sampleSizeText": "要在表中显示的行数目", + "discover.advancedSettings.sampleSizeTitle": "行数目", + "discover.advancedSettings.searchOnPageLoadText": "控制在 Discover 首次加载时是否执行搜索。加载已保存搜索时,此设置无效。", + "discover.advancedSettings.searchOnPageLoadTitle": "在页面加载时搜索", + "discover.advancedSettings.sortDefaultOrderText": "在 Discover 应用中控制基于时间的索引模式的默认排序方向。", + "discover.advancedSettings.sortDefaultOrderTitle": "默认排序方向", + "discover.advancedSettings.sortOrderAsc": "升序", + "discover.advancedSettings.sortOrderDesc": "降序", "discover.docViews.json.codeEditorAriaLabel": "Elasticsearch 文档的只读 JSON 视图", "discover.docViews.json.jsonTitle": "JSON", "discover.docViews.table.fieldNamesBeginningWithUnderscoreUnsupportedAriaLabel": "警告", @@ -1949,12 +1977,6 @@ "inspector.requests.statisticsTabLabel": "统计信息", "inspector.title": "检查器", "inspector.view": "视图:{viewName}", - "kbn.advancedSettings.context.defaultSizeText": "要在上下文视图中显示的周围条目数目", - "kbn.advancedSettings.context.defaultSizeTitle": "上下文大小", - "kbn.advancedSettings.context.sizeStepText": "递增或递减上下文大小的步进大小", - "kbn.advancedSettings.context.sizeStepTitle": "上下文大小步进", - "kbn.advancedSettings.context.tieBreakerFieldsText": "要在具有相同时间戳值的文档之间用于平分决胜的字段逗号分隔列表。将使用此列表上存在且在当前索引模式下可排序的第一个字段。", - "kbn.advancedSettings.context.tieBreakerFieldsTitle": "平分决胜字段", "kbn.advancedSettings.courier.batchSearchesText": "禁用时,仪表板面板将分别加载,用户离开时或更新查询时,\n 搜索请求将终止。启用时,仪表板面板将一起加载并加载所有数据,\n 搜索将不会终止。", "kbn.advancedSettings.courier.batchSearchesTextDeprecation": "此设置已过时,将在 Kibana 8.0 中移除。", "kbn.advancedSettings.courier.batchSearchesTitle": "批处理并发搜索", @@ -1989,8 +2011,6 @@ "kbn.advancedSettings.dateNanosFormatText": "用于 Elasticsearch 的 {dateNanosLink} 数据类型", "kbn.advancedSettings.dateNanosFormatTitle": "纳秒格式的日期", "kbn.advancedSettings.dateNanosLinkTitle": "date_nanos", - "kbn.advancedSettings.defaultColumnsText": "“发现”选项卡中默认显示的列", - "kbn.advancedSettings.defaultColumnsTitle": "默认列", "kbn.advancedSettings.defaultIndexText": "未设置索引时要访问的索引", "kbn.advancedSettings.defaultIndexTitle": "默认索引", "kbn.advancedSettings.defaultRoute.defaultRouteIsRelativeValidationMessage": "必须是相对 URL。", @@ -1998,22 +2018,6 @@ "kbn.advancedSettings.defaultRoute.defaultRouteTitle": "默认路由", "kbn.advancedSettings.disableAnimationsText": "在 Kibana UI 中关闭所有没有必要的动画。刷新页面以应用更改。", "kbn.advancedSettings.disableAnimationsTitle": "禁用动画", - "kbn.advancedSettings.discover.aggsTermsSizeText": "确定在单击“可视化”按钮时将在发现侧边栏的字段下拉列表中可视化多少个词。", - "kbn.advancedSettings.discover.aggsTermsSizeTitle": "词数目", - "kbn.advancedSettings.discover.sampleSizeText": "要在表中显示的行数目", - "kbn.advancedSettings.discover.sampleSizeTitle": "行数目", - "kbn.advancedSettings.discover.searchOnPageLoadText": "控制在 Discover 首次加载时是否执行搜索。加载已保存搜索时,此设置无效。", - "kbn.advancedSettings.discover.searchOnPageLoadTitle": "在页面加载时搜索", - "kbn.advancedSettings.discover.sortDefaultOrderText": "在 Discover 应用中控制基于时间的索引模式的默认排序方向。", - "kbn.advancedSettings.discover.sortDefaultOrderTitle": "默认排序方向", - "kbn.advancedSettings.discover.sortOrderAsc": "升序", - "kbn.advancedSettings.discover.sortOrderDesc": "降序", - "kbn.advancedSettings.docTableHideTimeColumnText": "在 Discover 中和仪表板上的所有已保存搜索中隐藏“时间”列。", - "kbn.advancedSettings.docTableHideTimeColumnTitle": "隐藏“时间”列", - "kbn.advancedSettings.docTableHighlightText": "突出显示 Discover 和已保存搜索仪表板中的结果。处理大文档时,突出显示会使请求变慢。", - "kbn.advancedSettings.docTableHighlightTitle": "突出显示结果", - "kbn.advancedSettings.fieldsPopularLimitText": "要显示的排名前 N 最常见字段", - "kbn.advancedSettings.fieldsPopularLimitTitle": "常见字段限制", "kbn.advancedSettings.format.bytesFormat.numeralFormatLinkText": "数值格式", "kbn.advancedSettings.format.bytesFormatText": "“字节”格式的默认{numeralFormatLink}", "kbn.advancedSettings.format.bytesFormatTitle": "字节格式", @@ -2039,12 +2043,8 @@ "kbn.advancedSettings.historyLimitTitle": "历史记录限制", "kbn.advancedSettings.indexPatternPlaceholderText": "在“管理 > 索引模式 > 创建索引模式”中“索引模式名称”的占位符。", "kbn.advancedSettings.indexPatternPlaceholderTitle": "索引模式占位符", - "kbn.advancedSettings.maxBucketsText": "单个数据源可以返回的最大存储桶数目", - "kbn.advancedSettings.maxBucketsTitle": "最大存储桶数", "kbn.advancedSettings.maxCellHeightText": "表中单元格应占用的最大高度。设置为 0 可禁用截短", "kbn.advancedSettings.maxCellHeightTitle": "最大表单元格高度", - "kbn.advancedSettings.metaFieldsText": "_source 之外存在的、在显示我们的文档时将合并进其中的字段", - "kbn.advancedSettings.metaFieldsTitle": "元字段", "kbn.advancedSettings.notifications.banner.markdownLinkText": "Markdown 受支持", "kbn.advancedSettings.notifications.bannerLifetimeText": "在屏幕上显示横幅通知的时间(毫秒)。设置为 {infinityValue} 将禁用倒计时。", "kbn.advancedSettings.notifications.bannerLifetimeTitle": "横幅通知生存时间", @@ -2063,10 +2063,6 @@ "kbn.advancedSettings.query.queryStringOptions.optionsLinkText": "选项", "kbn.advancedSettings.query.queryStringOptionsText": "lucene 查询字符串解析器的{optionsLink}。只有将“{queryLanguage}”设置为 {luceneLanguage} 时才会使用。", "kbn.advancedSettings.query.queryStringOptionsTitle": "查询字符串选项", - "kbn.advancedSettings.savedObjects.listingLimitText": "为列表页面提取的对象数目", - "kbn.advancedSettings.savedObjects.listingLimitTitle": "对象列表限制", - "kbn.advancedSettings.savedObjects.perPageText": "在加载对话框中每页要显示的对象数目", - "kbn.advancedSettings.savedObjects.perPageTitle": "每页对象数", "kbn.advancedSettings.searchQueryLanguageKql": "KQL", "kbn.advancedSettings.searchQueryLanguageLucene": "Lucene", "kbn.advancedSettings.searchQueryLanguageText": "查询栏使用的查询语言。KQL 是专门为 Kibana 打造的新型语言。", @@ -2097,14 +2093,6 @@ "kbn.advancedSettings.timepicker.timeDefaultsText": "未使用时间筛选启动 Kibana 时要使用的时间筛选选择", "kbn.advancedSettings.timepicker.timeDefaultsTitle": "时间筛选默认值", "kbn.advancedSettings.timepicker.today": "今日", - "kbn.advancedSettings.visualization.colorMappingText": "将值映射到可视化内的指定颜色", - "kbn.advancedSettings.visualization.colorMappingTitle": "颜色映射", - "kbn.advancedSettings.visualization.dimmingOpacityText": "突出显示图表的其他元素时变暗图表项的透明度。此数字越低,突出显示的元素越突出。必须是介于 0 和 1 之间的数字。", - "kbn.advancedSettings.visualization.dimmingOpacityTitle": "变暗透明度", - "kbn.advancedSettings.visualization.heatmap.maxBucketsText": "单个数据源可以返回的最大存储桶数目。较高的数目可能对浏览器呈现性能有负面影响", - "kbn.advancedSettings.visualization.heatmap.maxBucketsTitle": "热图最大存储桶数", - "kbn.advancedSettings.visualization.loadingDelayText": "在查询期间在将可视化变暗之前要等待的时间", - "kbn.advancedSettings.visualization.loadingDelayTitle": "加载延迟", "kbn.advancedSettings.visualization.showRegionMapWarningsText": "词无法联接到地图上的形状时,区域地图是否显示警告。", "kbn.advancedSettings.visualization.showRegionMapWarningsTitle": "显示区域地图警告", "kbn.advancedSettings.visualization.tileMap.maxPrecision.cellDimensionsLinkText": "单元格维度的解释", @@ -2469,6 +2457,10 @@ "regionMap.visParams.vectorMapLabel": "矢量地图", "regionMap.visualization.unableToShowMismatchesWarningText": "确保每个字词与该形状的联接字段匹配:{mismatches}", "regionMap.visualization.unableToShowMismatchesWarningTitle": "无法在地图上显示 {mismatchesLength} {oneMismatch, plural, one { 个结果} other { 个结果}}", + "savedObjects.advancedSettings.listingLimitText": "为列表页面提取的对象数目", + "savedObjects.advancedSettings.listingLimitTitle": "对象列表限制", + "savedObjects.advancedSettings.perPageText": "在加载对话框中每页要显示的对象数目", + "savedObjects.advancedSettings.perPageTitle": "每页对象数", "savedObjects.confirmModal.cancelButtonLabel": "取消", "savedObjects.confirmModal.overwriteButtonLabel": "覆盖", "savedObjects.confirmModal.overwriteConfirmationMessage": "确定要覆盖“{title}”?", @@ -3160,6 +3152,8 @@ "visTypeTimeseries.addDeleteButtons.deleteButtonDefaultTooltip": "删除", "visTypeTimeseries.addDeleteButtons.reEnableTooltip": "重新启用", "visTypeTimeseries.addDeleteButtons.temporarilyDisableTooltip": "暂时禁用", + "visTypeTimeseries.advancedSettings.maxBucketsText": "单个数据源可以返回的最大存储桶数目", + "visTypeTimeseries.advancedSettings.maxBucketsTitle": "最大存储桶数", "visTypeTimeseries.aggLookup.averageLabel": "平均值", "visTypeTimeseries.aggLookup.calculationLabel": "计算", "visTypeTimeseries.aggLookup.cardinalityLabel": "基数", @@ -3718,6 +3712,10 @@ "visTypeVega.visualization.renderErrorTitle": "Vega 错误", "visTypeVega.visualization.unableToFindDefaultIndexErrorMessage": "找不到默认索引", "visTypeVega.visualization.unableToRenderWithoutDataWarningMessage": "没有数据时无法渲染", + "visTypeVislib.advancedSettings.visualization.dimmingOpacityText": "突出显示图表的其他元素时变暗图表项的透明度。此数字越低,突出显示的元素越突出。必须是介于 0 和 1 之间的数字。", + "visTypeVislib.advancedSettings.visualization.dimmingOpacityTitle": "变暗透明度", + "visTypeVislib.advancedSettings.visualization.heatmap.maxBucketsText": "单个数据源可以返回的最大存储桶数目。较高的数目可能对浏览器呈现性能有负面影响", + "visTypeVislib.advancedSettings.visualization.heatmap.maxBucketsTitle": "热图最大存储桶数", "visTypeVislib.aggResponse.allDocsTitle": "所有文档", "visTypeVislib.area.areaDescription": "突出折线图下方的数量", "visTypeVislib.area.areaTitle": "面积图",