Skip to content

Commit

Permalink
Merge branch 'master' into alerting/tls-warning
Browse files Browse the repository at this point in the history
* master: (34 commits)
  [APM] add service map config options to legacy plugin (elastic#61002)
  [App Arch] migrate legacy CSS to new platform (core_plugins/kibana_react) (elastic#59882)
  Migrated styles for "share" plugin to new platform (elastic#59981)
  [ML] Module setup with dynamic model memory estimation (elastic#60656)
  Drilldowns (elastic#59632)
  Upgrade mocha dev-dependency from 6.2.2 to 7.1.1 (elastic#60779)
  [SIEM] Overview: Recent cases widget (elastic#60993)
  [ML] Functional tests - stabilize df analytics clone tests (elastic#60497)
  [SIEM] Updates process and TLS tables to use ECS 1.5 fields (elastic#60854)
  Migrate doc view part of discover (elastic#58094)
  Revert "[APM] Collect telemetry about data/API performance (elastic#51612)"
  fix(NA): log rotation watchers usage (elastic#60956)
  [SIEM] [CASES] Build lego blocks case details view (elastic#60864)
  Create Painless Lab app (elastic#57538)
  [SIEM] Move Timeline Template field to first step of rule creation (elastic#60840)
  [Reporting/New Platform Migration] Use a new config service on server-side (elastic#55882)
  [Alerting] allow email action to not require auth (elastic#60839)
  [Maps] Default ES document layer scaling type to clusters and show scaling UI in the create wizard (elastic#60668)
  [APM] Collect telemetry about data/API performance (elastic#51612)
  Implement Kibana Login Selector (elastic#53010)
  ...
  • Loading branch information
gmmorris committed Mar 24, 2020
2 parents 2ecf4a9 + 8ef35c8 commit 1b3d0b4
Show file tree
Hide file tree
Showing 808 changed files with 35,983 additions and 9,357 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# For more info, see https://help.github.com/articles/about-codeowners/

# App
/x-pack/legacy/plugins/dashboard_enhanced/ @elastic/kibana-app
/x-pack/legacy/plugins/lens/ @elastic/kibana-app
/x-pack/legacy/plugins/graph/ @elastic/kibana-app
/src/legacy/server/url_shortening/ @elastic/kibana-app
Expand Down Expand Up @@ -181,6 +182,7 @@
/x-pack/plugins/remote_clusters/ @elastic/es-ui
/x-pack/legacy/plugins/rollup/ @elastic/es-ui
/x-pack/plugins/searchprofiler/ @elastic/es-ui
/x-pack/plugins/painless_lab/ @elastic/es-ui
/x-pack/legacy/plugins/snapshot_restore/ @elastic/es-ui
/x-pack/legacy/plugins/upgrade_assistant/ @elastic/es-ui
/x-pack/plugins/upgrade_assistant/ @elastic/es-ui
Expand Down
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"common.ui": "src/legacy/ui",
"console": "src/plugins/console",
"core": "src/core",
"discover": "src/plugins/discover",
"dashboard": "src/plugins/dashboard",
"data": "src/plugins/data",
"embeddableApi": "src/plugins/embeddable",
Expand Down
4 changes: 2 additions & 2 deletions docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ that feature would not take any effect.

`logging.rotate.everyBytes:`:: [experimental] *Default: 10485760* The maximum size of a log file (that is `not an exact` limit). After the
limit is reached, a new log file is generated. The default size limit is 10485760 (10 MB) and
this option should be in the range of 102400 (100KB) to 1073741824 (1GB).
this option should be in the range of 1048576 (1 MB) to 1073741824 (1 GB).

`logging.rotate.keepFiles:`:: [experimental] *Default: 7* The number of most recent rotated log files to keep
on disk. Older files are deleted during log rotation. The default value is 7. The `logging.rotate.keepFiles`
Expand All @@ -203,7 +203,7 @@ option has to be in the range of 2 to 1024 files.
the `logging.rotate.usePolling` is enabled. That option has to be in the range of 5000 to 3600000 milliseconds.

`logging.rotate.usePolling:`:: [experimental] *Default: false* By default we try to understand the best way to monitoring
the log file. However, there is some systems where it could not be always accurate. In those cases, if needed,
the log file and warning about it. Please be aware there are some systems where watch api is not accurate. In those cases, in order to get the feature working,
the `polling` method could be used enabling that option.

`logging.silent:`:: *Default: false* Set the value of this setting to `true` to
Expand Down
2 changes: 1 addition & 1 deletion examples/ui_action_examples/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class UiActionExamplesPlugin
}));

uiActions.registerAction(helloWorldAction);
uiActions.attachAction(helloWorldTrigger.id, helloWorldAction);
uiActions.addTriggerAction(helloWorldTrigger.id, helloWorldAction);
}

public start() {}
Expand Down
3 changes: 1 addition & 2 deletions examples/ui_actions_explorer/public/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ const ActionsExplorer = ({ uiActionsApi, openModal }: Props) => {
);
},
});
uiActionsApi.registerAction(dynamicAction);
uiActionsApi.attachAction(HELLO_WORLD_TRIGGER_ID, dynamicAction);
uiActionsApi.addTriggerAction(HELLO_WORLD_TRIGGER_ID, dynamicAction);
setConfirmationText(
`You've successfully added a new action: ${dynamicAction.getDisplayName(
{}
Expand Down
16 changes: 8 additions & 8 deletions examples/ui_actions_explorer/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,21 @@ export class UiActionsExplorerPlugin implements Plugin<void, void, {}, StartDeps

const startServices = core.getStartServices();

deps.uiActions.attachAction(
deps.uiActions.addTriggerAction(
USER_TRIGGER,
createPhoneUserAction(async () => (await startServices)[1].uiActions)
);
deps.uiActions.attachAction(
deps.uiActions.addTriggerAction(
USER_TRIGGER,
createEditUserAction(async () => (await startServices)[0].overlays.openModal)
);

deps.uiActions.attachAction(COUNTRY_TRIGGER, viewInMapsAction);
deps.uiActions.attachAction(COUNTRY_TRIGGER, lookUpWeatherAction);
deps.uiActions.attachAction(COUNTRY_TRIGGER, showcasePluggability);
deps.uiActions.attachAction(PHONE_TRIGGER, makePhoneCallAction);
deps.uiActions.attachAction(PHONE_TRIGGER, showcasePluggability);
deps.uiActions.attachAction(USER_TRIGGER, showcasePluggability);
deps.uiActions.addTriggerAction(COUNTRY_TRIGGER, viewInMapsAction);
deps.uiActions.addTriggerAction(COUNTRY_TRIGGER, lookUpWeatherAction);
deps.uiActions.addTriggerAction(COUNTRY_TRIGGER, showcasePluggability);
deps.uiActions.addTriggerAction(PHONE_TRIGGER, makePhoneCallAction);
deps.uiActions.addTriggerAction(PHONE_TRIGGER, showcasePluggability);
deps.uiActions.addTriggerAction(USER_TRIGGER, showcasePluggability);

core.application.register({
id: 'uiActionsExplorer',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
"@types/lru-cache": "^5.1.0",
"@types/markdown-it": "^0.0.7",
"@types/minimatch": "^2.0.29",
"@types/mocha": "^5.2.7",
"@types/mocha": "^7.0.2",
"@types/moment-timezone": "^0.5.12",
"@types/mustache": "^0.8.31",
"@types/node": ">=10.17.17 <10.20.0",
Expand Down Expand Up @@ -456,7 +456,7 @@
"license-checker": "^16.0.0",
"listr": "^0.14.1",
"load-grunt-config": "^3.0.1",
"mocha": "^6.2.2",
"mocha": "^7.1.1",
"mock-http-server": "1.3.0",
"multistream": "^2.1.1",
"murmurhash3js": "3.0.1",
Expand Down
2 changes: 2 additions & 0 deletions packages/kbn-ui-shared-deps/monaco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import 'monaco-editor/esm/vs/base/worker/defaultWorkerFactory';
import 'monaco-editor/esm/vs/editor/browser/controller/coreCommands.js';
import 'monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js';

import 'monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js'; // Needed for word-wise char navigation

import 'monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js'; // Needed for suggestions
import 'monaco-editor/esm/vs/editor/contrib/hover/hover.js'; // Needed for hover
import 'monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js'; // Needed for signature
Expand Down
6 changes: 3 additions & 3 deletions src/core/MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -1233,11 +1233,11 @@ This table shows where these uiExports have moved to in the New Platform. In mos
| `chromeNavControls` | [`core.chrome.navControls.register{Left,Right}`](/docs/development/core/public/kibana-plugin-public.chromenavcontrols.md) | |
| `contextMenuActions` | | Should be an API on the devTools plugin. |
| `devTools` | | |
| `docViews` | | |
| `docViews` | [`plugins.discover.docViews.addDocView`](./src/plugins/discover/public/doc_views) | Should be an API on the discover plugin. |
| `embeddableActions` | | Should be an API on the embeddables plugin. |
| `embeddableFactories` | | Should be an API on the embeddables plugin. |
| `fieldFormatEditors` | | |
| `fieldFormats` | [`plugins.data.fieldFormats`](./src/plugins/data/public/field_formats) | |
| `fieldFormatEditors` | | |
| `fieldFormats` | [`plugins.data.fieldFormats`](./src/plugins/data/public/field_formats) | |
| `hacks` | n/a | Just run the code in your plugin's `start` method. |
| `home` | [`plugins.home.featureCatalogue.register`](./src/plugins/home/public/feature_catalogue) | Must add `home` as a dependency in your kibana.json. |
| `indexManagement` | | Should be an API on the indexManagement plugin. |
Expand Down
1 change: 1 addition & 0 deletions src/core/public/overlays/flyout/flyout_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export interface OverlayFlyoutStart {
export interface OverlayFlyoutOpenOptions {
className?: string;
closeButtonAriaLabel?: string;
ownFocus?: boolean;
'data-test-subj'?: string;
}

Expand Down
4 changes: 3 additions & 1 deletion src/dev/storybook/aliases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
*/

export const storybookAliases = {
advanced_ui_actions: 'x-pack/plugins/advanced_ui_actions/scripts/storybook.js',
apm: 'x-pack/legacy/plugins/apm/scripts/storybook.js',
canvas: 'x-pack/legacy/plugins/canvas/scripts/storybook_new.js',
codeeditor: 'src/plugins/kibana_react/public/code_editor/scripts/storybook.ts',
dashboard_enhanced: 'x-pack/plugins/dashboard_enhanced/scripts/storybook.js',
drilldowns: 'x-pack/plugins/drilldowns/scripts/storybook.js',
embeddable: 'src/plugins/embeddable/scripts/storybook.js',
infra: 'x-pack/legacy/plugins/infra/scripts/storybook.js',
siem: 'x-pack/legacy/plugins/siem/scripts/storybook.js',
ui_actions: 'x-pack/plugins/advanced_ui_actions/scripts/storybook.js',
ui_actions: 'src/plugins/ui_actions/scripts/storybook.js',
};
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ export class DashboardAppController {
* When de-angularizing this code, please call the underlaying action function
* directly and not via the top nav object.
**/
navActions[TopNavIds.ADD]();
navActions[TopNavIds.ADD_EXISTING]();
};
$scope.enterEditMode = () => {
dashboardStateManager.setFullScreenMode(false);
Expand Down Expand Up @@ -847,7 +847,8 @@ export class DashboardAppController {

showCloneModal(onClone, currentTitle);
};
navActions[TopNavIds.ADD] = () => {

navActions[TopNavIds.ADD_EXISTING] = () => {
if (dashboardContainer && !isErrorEmbeddable(dashboardContainer)) {
openAddPanelFlyout({
embeddable: dashboardContainer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ export function getTopNavConfig(
];
case ViewMode.EDIT:
return [
getCreateNewConfig(actions[TopNavIds.VISUALIZE]),
getSaveConfig(actions[TopNavIds.SAVE]),
getViewConfig(actions[TopNavIds.EXIT_EDIT_MODE]),
getAddConfig(actions[TopNavIds.ADD]),
getAddConfig(actions[TopNavIds.ADD_EXISTING]),
getOptionsConfig(actions[TopNavIds.OPTIONS]),
getShareConfig(actions[TopNavIds.SHARE]),
];
Expand Down Expand Up @@ -161,6 +162,25 @@ function getAddConfig(action: NavAction) {
};
}

/**
* @returns {kbnTopNavConfig}
*/
function getCreateNewConfig(action: NavAction) {
return {
emphasize: true,
iconType: 'plusInCircle',
id: 'addNew',
label: i18n.translate('kbn.dashboard.topNave.addNewButtonAriaLabel', {
defaultMessage: 'Create new',
}),
description: i18n.translate('kbn.dashboard.topNave.addNewConfigDescription', {
defaultMessage: 'Create a new panel on this dashboard',
}),
testId: 'dashboardAddNewPanelButton',
run: action,
};
}

/**
* @returns {kbnTopNavConfig}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/

export const TopNavIds = {
ADD: 'add',
SHARE: 'share',
OPTIONS: 'options',
SAVE: 'save',
Expand All @@ -27,4 +26,5 @@ export const TopNavIds = {
CLONE: 'clone',
FULL_SCREEN: 'fullScreenMode',
VISUALIZE: 'visualize',
ADD_EXISTING: 'addExisting',
};
14 changes: 8 additions & 6 deletions src/legacy/core_plugins/kibana/public/discover/build_services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ import {

import { DiscoverStartPlugins } from './plugin';
import { SharePluginStart } from '../../../../../plugins/share/public';
import { DocViewsRegistry } from './np_ready/doc_views/doc_views_registry';
import { ChartsPluginStart } from '../../../../../plugins/charts/public';
import { VisualizationsStart } from '../../../visualizations/public';
import { createSavedSearchesLoader, SavedSearch } from '../../../../../plugins/discover/public';
import {
createSavedSearchesLoader,
DocViewerComponent,
SavedSearch,
} from '../../../../../plugins/discover/public';

export interface DiscoverServices {
addBasePath: (path: string) => string;
Expand All @@ -47,7 +50,7 @@ export interface DiscoverServices {
core: CoreStart;
data: DataPublicPluginStart;
docLinks: DocLinksStart;
docViewsRegistry: DocViewsRegistry;
DocViewer: DocViewerComponent;
history: History;
theme: ChartsPluginStart['theme'];
filterManager: FilterManager;
Expand All @@ -64,8 +67,7 @@ export interface DiscoverServices {
}
export async function buildServices(
core: CoreStart,
plugins: DiscoverStartPlugins,
docViewsRegistry: DocViewsRegistry
plugins: DiscoverStartPlugins
): Promise<DiscoverServices> {
const services = {
savedObjectsClient: core.savedObjects.client,
Expand All @@ -81,7 +83,7 @@ export async function buildServices(
core,
data: plugins.data,
docLinks: core.docLinks,
docViewsRegistry,
DocViewer: plugins.discover.docViews.DocViewer,
history: createHashHistory(),
theme: plugins.charts.theme,
filterManager: plugins.data.query.filterManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ export {
EsQuerySortValue,
SortDirection,
} from '../../../../../plugins/data/public';
export { ElasticSearchHit } from './np_ready/doc_views/doc_views_types';
export { getFormat } from 'ui/visualize/loader/pipeline_helpers/utilities';
// @ts-ignore
export { buildPointSeriesData } from 'ui/agg_response/point_series/point_series';
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { fetchAnchorProvider } from '../api/anchor';
import { fetchContextProvider } from '../api/context';
import { getQueryParameterActions } from '../query_parameters';
import { FAILURE_REASONS, LOADING_STATUS } from './constants';
import { MarkdownSimple } from '../../../../../../../kibana_react/public';
import { MarkdownSimple } from '../../../../../../../../../plugins/kibana_react/public';

export function QueryActionsProvider(Promise) {
const { filterManager, indexPatterns } = getServices();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { FieldName } from './field_name/field_name';
import { FieldName } from '../../../../../../../../plugins/discover/public';
import { getServices, wrapInI18nContext } from '../../../kibana_services';

export function FieldNameDirectiveProvider(reactDirective) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@
* under the License.
*/

import { DocViewer } from '../components/doc_viewer/doc_viewer';
import React from 'react';
import { getServices } from '../../kibana_services';

export function createDocViewerDirective(reactDirective: any) {
return reactDirective(
DocViewer,
(props: any) => {
const { DocViewer } = getServices();
return <DocViewer {...props} />;
},
[
'hit',
['indexPattern', { watchDepth: 'reference' }],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
@import 'fetch_error/index';
@import 'field_chooser/index';
@import 'doc_viewer/index';
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,13 @@ import { ReactWrapper } from 'enzyme';
import { findTestSubject } from '@elastic/eui/lib/test';
import { Doc, DocProps } from './doc';

jest.mock('../doc_viewer/doc_viewer', () => ({
DocViewer: () => null,
}));

jest.mock('../../../kibana_services', () => {
return {
getServices: () => ({
metadata: {
branch: 'test',
},
getDocViewsSorted: () => {
return [];
},
DocViewer: () => null,
}),
};
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import React from 'react';
import { FormattedMessage } from '@kbn/i18n/react';
import { EuiCallOut, EuiLink, EuiLoadingSpinner, EuiPageContent } from '@elastic/eui';
import { IndexPatternsContract } from 'src/plugins/data/public';
import { DocViewer } from '../doc_viewer/doc_viewer';
import { ElasticRequestState, useEsDocSearch } from './use_es_doc_search';
import { ElasticSearchHit, getServices } from '../../../kibana_services';
import { getServices } from '../../../kibana_services';
import { ElasticSearchHit } from '../../../../../../../../plugins/discover/public';

export interface ElasticSearchResult {
hits: {
Expand Down Expand Up @@ -61,6 +61,7 @@ export interface DocProps {
}

export function Doc(props: DocProps) {
const { DocViewer } = getServices();
const [reqState, hit, indexPattern] = useEsDocSearch(props);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
* under the License.
*/
import { useEffect, useState } from 'react';
import { ElasticSearchHit, IndexPattern } from '../../../kibana_services';
import { IndexPattern } from '../../../kibana_services';
import { DocProps } from './doc';
import { ElasticSearchHit } from '../../../../../../../../plugins/discover/public';

export enum ElasticRequestState {
Loading,
Expand Down
Loading

0 comments on commit 1b3d0b4

Please sign in to comment.