Skip to content

Commit

Permalink
Merge branch 'master' into alerting/instance-pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine committed Feb 14, 2020
2 parents 6dd70ef + 356e3a4 commit 41dc30b
Show file tree
Hide file tree
Showing 51 changed files with 1,206 additions and 532 deletions.
29 changes: 15 additions & 14 deletions docs/management/advanced-options.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ for displayed decimal values.
. Go to *Management > {kib} > Advanced Settings*.
. Scroll or search for the setting you want to modify.
. Enter a new value for the setting.
. Click *Save changes*.


[float]
Expand All @@ -34,7 +35,7 @@ removes it from {kib} permanently.

[float]
[[kibana-general-settings]]
=== General settings
==== General

[horizontal]
`csv:quoteValues`:: Set this property to `true` to quote exported values.
Expand Down Expand Up @@ -109,22 +110,22 @@ cluster alert notifications from Monitoring.

[float]
[[kibana-accessibility-settings]]
=== Accessibility settings
==== Accessibility

[horizontal]
`accessibility:disableAnimations`:: Turns off all unnecessary animations in the
{kib} UI. Refresh the page to apply the changes.

[float]
[[kibana-dashboard-settings]]
=== Dashboard settings
==== Dashboard

[horizontal]
`xpackDashboardMode:roles`:: The roles that belong to <<xpack-dashboard-only-mode, dashboard only mode>>.

[float]
[[kibana-discover-settings]]
=== Discover settings
==== Discover

[horizontal]
`context:defaultSize`:: The number of surrounding entries to display in the context view. The default value is 5.
Expand All @@ -150,7 +151,7 @@ working on big documents.

[float]
[[kibana-notification-settings]]
=== Notifications settings
==== Notifications

[horizontal]
`notifications:banner`:: A custom banner intended for temporary notices to all users.
Expand All @@ -169,15 +170,15 @@ displays. The default value is 10000. Set this field to `Infinity` to disable wa

[float]
[[kibana-reporting-settings]]
=== Reporting settings
==== Reporting

[horizontal]
`xpackReporting:customPdfLogo`:: A custom image to use in the footer of the PDF.


[float]
[[kibana-rollups-settings]]
=== Rollup settings
==== Rollup

[horizontal]
`rollups:enableIndexPatterns`:: Enables the creation of index patterns that
Expand All @@ -187,7 +188,7 @@ Refresh the page to apply the changes.

[float]
[[kibana-search-settings]]
=== Search settings
==== Search

[horizontal]
`courier:batchSearches`:: **Deprecated in 7.6. Starting in 8.0, this setting will be optimized internally.**
Expand Down Expand Up @@ -215,21 +216,21 @@ might increase the search time. This setting is off by default. Users must opt-i

[float]
[[kibana-siem-settings]]
=== SIEM settings
==== SIEM

[horizontal]
`siem:defaultAnomalyScore`:: The threshold above which Machine Learning job anomalies are displayed in the SIEM app.
`siem:defaultIndex`:: A comma-delimited list of Elasticsearch indices from which the SIEM app collects events.
`siem:enableNewsFeed`:: Enables the security news feed on the SIEM *Overview*
`siem:enableNewsFeed`:: Enables the security news feed on the SIEM *Overview*
page.
`siem:newsFeedUrl`:: The URL from which the security news feed content is
`siem:newsFeedUrl`:: The URL from which the security news feed content is
retrieved.
`siem:refreshIntervalDefaults`:: The default refresh interval for the SIEM time filter, in milliseconds.
`siem:timeDefaults`:: The default period of time in the SIEM time filter.

[float]
[[kibana-timelion-settings]]
=== Timelion settings
==== Timelion

[horizontal]
`timelion:default_columns`:: The default number of columns to use on a Timelion sheet.
Expand All @@ -252,7 +253,7 @@ this is the number of buckets to try to represent.

[float]
[[kibana-visualization-settings]]
=== Visualization settings
==== Visualization

[horizontal]
`visualization:colorMapping`:: Maps values to specified colors in visualizations.
Expand All @@ -273,7 +274,7 @@ If disabled, only visualizations that are considered production-ready are availa

[float]
[[kibana-telemetry-settings]]
=== Usage data settings
==== Usage data

Helps improve the Elastic Stack by providing usage statistics for
basic features. This data will not be shared outside of Elastic.
2 changes: 0 additions & 2 deletions x-pack/legacy/plugins/canvas/public/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { CanvasStartDeps } from './plugin'; // eslint-disable-line import/order
// @ts-ignore Untyped Kibana Lib
import chrome, { loadingCount } from 'ui/chrome'; // eslint-disable-line import/order
import { absoluteToParsedUrl } from 'ui/url/absolute_to_parsed_url'; // eslint-disable-line import/order
import { Storage } from '../../../../../src/plugins/kibana_utils/public'; // eslint-disable-line import/order
// @ts-ignore Untyped Kibana Lib
import { formatMsg } from '../../../../../src/plugins/kibana_legacy/public'; // eslint-disable-line import/order

Expand All @@ -31,7 +30,6 @@ const shimStartPlugins: CanvasStartDeps = {
absoluteToParsedUrl,
// ToDo: Copy directly into canvas
formatMsg,
storage: Storage,
// ToDo: Won't be a part of New Platform. Will need to handle internally
trackSubUrlForApp: chrome.trackSubUrlForApp,
},
Expand Down
16 changes: 0 additions & 16 deletions x-pack/legacy/plugins/canvas/public/lib/__tests__/clipboard.js

This file was deleted.

17 changes: 0 additions & 17 deletions x-pack/legacy/plugins/canvas/public/lib/clipboard.js

This file was deleted.

36 changes: 36 additions & 0 deletions x-pack/legacy/plugins/canvas/public/lib/clipboard.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
jest.mock('../../../../../../src/plugins/kibana_utils/public');

import { Storage } from '../../../../../../src/plugins/kibana_utils/public';
import { setClipboardData, getClipboardData } from './clipboard';
import { LOCALSTORAGE_CLIPBOARD } from '../../common/lib/constants';
import { elements } from '../../__tests__/fixtures/workpads';

const set = jest.fn();
const get = jest.fn();

describe('clipboard', () => {
beforeAll(() => {
// @ts-ignore
Storage.mockImplementation(() => ({
set,
get,
}));
});

test('stores data to local storage', () => {
setClipboardData(elements);

expect(set).toBeCalledWith(LOCALSTORAGE_CLIPBOARD, JSON.stringify(elements));
});

test('gets data from local storage', () => {
getClipboardData();

expect(get).toBeCalledWith(LOCALSTORAGE_CLIPBOARD);
});
});
25 changes: 25 additions & 0 deletions x-pack/legacy/plugins/canvas/public/lib/clipboard.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { Storage } from '../../../../../../src/plugins/kibana_utils/public';
import { LOCALSTORAGE_CLIPBOARD } from '../../common/lib/constants';
import { getWindow } from './get_window';

let storage: Storage;

const getStorage = (): Storage => {
if (!storage) {
storage = new Storage(getWindow().localStorage);
}

return storage;
};

export const setClipboardData = (data: any) => {
getStorage().set(LOCALSTORAGE_CLIPBOARD, JSON.stringify(data));
};

export const getClipboardData = () => getStorage().get(LOCALSTORAGE_CLIPBOARD);
6 changes: 4 additions & 2 deletions x-pack/legacy/plugins/canvas/public/lib/get_window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
*/

// return window if it exists, otherwise just return an object literal
const windowObj = { location: null };
const windowObj = { location: null, localStorage: {} as Window['localStorage'] };

export const getWindow = (): Window | { location: Location | null } => {
export const getWindow = ():
| Window
| { location: Location | null; localStorage: Window['localStorage'] } => {
return typeof window === 'undefined' ? windowObj : window;
};
3 changes: 0 additions & 3 deletions x-pack/legacy/plugins/canvas/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import React from 'react';
import ReactDOM from 'react-dom';
import { Chrome } from 'ui/chrome';
import { i18n } from '@kbn/i18n';
import { Storage } from '../../../../../src/plugins/kibana_utils/public';
import { CoreSetup, CoreStart, Plugin } from '../../../../../src/core/public';
import { HomePublicPluginSetup } from '../../../../../src/plugins/home/public';
// @ts-ignore: Untyped Local
Expand Down Expand Up @@ -43,7 +42,6 @@ export interface CanvasStartDeps {
__LEGACY: {
absoluteToParsedUrl: (url: string, basePath: string) => any;
formatMsg: any;
storage: typeof Storage;
trackSubUrlForApp: Chrome['trackSubUrlForApp'];
};
}
Expand Down Expand Up @@ -92,7 +90,6 @@ export class CanvasPlugin
loadExpressionTypes();
loadTransitions();

initClipboard(plugins.__LEGACY.storage);
initLoadingIndicator(core.http.addLoadingCountSource);

core.chrome.setBadge(
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import { getSelectedLayer } from '../../selectors/map_selectors';
import { fitToLayerExtent, updateSourceProp } from '../../actions/map_actions';

function mapStateToProps(state = {}) {
const selectedLayer = getSelectedLayer(state);
return {
selectedLayer: getSelectedLayer(state),
key: selectedLayer ? selectedLayer.getId() : '',
selectedLayer,
};
}

Expand Down
Loading

0 comments on commit 41dc30b

Please sign in to comment.