mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Merge remote-tracking branch 'upstream/6.7' into 6.7
This commit is contained in:
commit
42f97324bb
14 changed files with 55 additions and 42 deletions
|
@ -17,7 +17,7 @@ bug fixes and other changes.
|
|||
For increased stability, you can now define multiple {es} nodes for {kib}. This
|
||||
prevents {kib} from being tied to a single {es} node while allowing for the
|
||||
requests to be distributed over multiple nodes in the cluster. Simply set
|
||||
`elasticsearch.host` in your kibana.yml file to the URLs of the {es} nodes you
|
||||
`elasticsearch.hosts` in your kibana.yml file to the URLs of the {es} nodes you
|
||||
want to use. You can also configure {kib} to automatically discover other nodes
|
||||
in the cluster (`elasticsearch.sniffOnStart`) or on an interval (`elasticsearch.sniffInterval`).
|
||||
For more information, see {kibana-ref}/settings.html[Kibana configuration settings].
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@elastic/datemath": "5.0.2",
|
||||
"@elastic/eui": "6.10.4",
|
||||
"@elastic/eui": "6.10.5",
|
||||
"@elastic/filesaver": "1.1.2",
|
||||
"@elastic/good": "8.1.1-kibana2",
|
||||
"@elastic/numeral": "2.3.2",
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
import expect from 'expect.js';
|
||||
import { KibanaMap } from 'ui/vis/map/kibana_map';
|
||||
import { GeohashLayer } from '../geohash_layer';
|
||||
import heatmapPng from './heatmap.png';
|
||||
// import heatmapPng from './heatmap.png';
|
||||
import scaledCircleMarkersPng from './scaledCircleMarkers.png';
|
||||
// import shadedCircleMarkersPng from './shadedCircleMarkers.png';
|
||||
import { ImageComparator } from 'test_utils/image_comparator';
|
||||
|
@ -86,15 +86,16 @@ describe('geohash_layer', function () {
|
|||
// options: { mapType: 'Shaded Circle Markers', colorRamp: 'Yellow to Red' },
|
||||
// expected: shadedCircleMarkersPng
|
||||
// },
|
||||
{
|
||||
options: {
|
||||
mapType: 'Heatmap',
|
||||
heatmap: {
|
||||
heatClusterSize: '2'
|
||||
}
|
||||
},
|
||||
expected: heatmapPng
|
||||
}
|
||||
// FAILING: https://github.com/elastic/kibana/issues/33323
|
||||
// {
|
||||
// options: {
|
||||
// mapType: 'Heatmap',
|
||||
// heatmap: {
|
||||
// heatClusterSize: '2'
|
||||
// }
|
||||
// },
|
||||
// expected: heatmapPng
|
||||
// }
|
||||
].forEach(function (test) {
|
||||
|
||||
it(test.options.mapType, async function () {
|
||||
|
|
|
@ -32,11 +32,13 @@ function doesMessageMatch(errorMessage, match) {
|
|||
if (isRegExp) return match.test(errorMessage);
|
||||
return errorMessage === match;
|
||||
}
|
||||
// converts the given event into a debug log if it's an error of the given type
|
||||
function downgradeIfErrorType(errorType, event, field = 'errno') {
|
||||
const isClientError = doTagsMatch(event, ['connection', 'client', 'error']);
|
||||
const matchesErrorType = isClientError && get(event, `error.${field}`) === errorType;
|
||||
|
||||
// converts the given event into a debug log if it's an error of the given type
|
||||
function downgradeIfErrorType(errorType, event) {
|
||||
const isClientError = doTagsMatch(event, ['connection', 'client', 'error']);
|
||||
if (!isClientError) return null;
|
||||
|
||||
const matchesErrorType = get(event, 'error.code') === errorType || get(event, 'error.errno') === errorType;
|
||||
if (!matchesErrorType) return null;
|
||||
|
||||
const errorTypeTag = errorType.toLowerCase();
|
||||
|
@ -117,7 +119,7 @@ export class LogInterceptor extends Stream.Transform {
|
|||
}
|
||||
|
||||
downgradeIfHTTPSWhenHTTP(event) {
|
||||
return downgradeIfErrorType('HPE_INVALID_METHOD', event, 'code');
|
||||
return downgradeIfErrorType('HPE_INVALID_METHOD', event);
|
||||
}
|
||||
|
||||
downgradeIfHTTPWhenHTTPS(event) {
|
||||
|
|
|
@ -31,7 +31,7 @@ function stubClientErrorEvent(errorMeta) {
|
|||
};
|
||||
}
|
||||
|
||||
const stubEconnresetEvent = () => stubClientErrorEvent({ errno: 'ECONNRESET' });
|
||||
const stubEconnresetEvent = () => stubClientErrorEvent({ code: 'ECONNRESET' });
|
||||
const stubEpipeEvent = () => stubClientErrorEvent({ errno: 'EPIPE' });
|
||||
const stubEcanceledEvent = () => stubClientErrorEvent({ errno: 'ECANCELED' });
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@elastic/datemath": "5.0.2",
|
||||
"@elastic/eui": "6.10.4",
|
||||
"@elastic/eui": "6.10.5",
|
||||
"@elastic/node-crypto": "0.1.2",
|
||||
"@elastic/node-phantom-simple": "2.2.4",
|
||||
"@elastic/numeral": "2.3.2",
|
||||
|
|
|
@ -9,7 +9,7 @@ import { notify } from '../../lib/notify';
|
|||
import { getDefaultWorkpad } from '../../state/defaults';
|
||||
import { setWorkpad } from '../../state/actions/workpad';
|
||||
import { setAssets, resetAssets } from '../../state/actions/assets';
|
||||
import { gotoPage } from '../../state/actions/pages';
|
||||
import { setPage } from '../../state/actions/pages';
|
||||
import { getWorkpad } from '../../state/selectors/workpad';
|
||||
import { isFirstLoad } from '../../state/selectors/app';
|
||||
import { setCanUserWrite, setFirstLoad } from '../../state/actions/transient';
|
||||
|
@ -88,7 +88,7 @@ export const routes = [
|
|||
// set the active page using the number provided in the url
|
||||
const pageIndex = pageNumber - 1;
|
||||
if (pageIndex !== workpad.page) {
|
||||
dispatch(gotoPage(pageIndex));
|
||||
dispatch(setPage(pageIndex));
|
||||
}
|
||||
},
|
||||
meta: {
|
||||
|
|
|
@ -8,7 +8,6 @@ import { createAction } from 'redux-actions';
|
|||
|
||||
export const addPage = createAction('addPage');
|
||||
export const duplicatePage = createAction('duplicatePage');
|
||||
export const gotoPage = createAction('gotoPage');
|
||||
export const movePage = createAction('movePage', (id, position) => ({ id, position }));
|
||||
export const removePage = createAction('removePage');
|
||||
export const stylePage = createAction('stylePage', (pageId, style) => ({ pageId, style }));
|
||||
|
|
|
@ -18,7 +18,7 @@ import {
|
|||
} from '../actions/elements';
|
||||
import { restoreHistory } from '../actions/history';
|
||||
import { selectElement } from '../actions/transient';
|
||||
import { addPage, removePage, duplicatePage, gotoPage } from '../actions/pages';
|
||||
import { addPage, removePage, duplicatePage, setPage } from '../actions/pages';
|
||||
import { appReady } from '../actions/app';
|
||||
import { setWorkpad } from '../actions/workpad';
|
||||
import { getNodes, getPages, getSelectedPage, getSelectedElement } from '../selectors/workpad';
|
||||
|
@ -59,7 +59,7 @@ const aeroelasticConfiguration = {
|
|||
|
||||
const isGroupId = id => id.startsWith(aeroelasticConfiguration.groupName);
|
||||
|
||||
const pageChangerActions = [gotoPage.toString(), duplicatePage.toString(), addPage.toString()];
|
||||
const pageChangerActions = [duplicatePage.toString(), addPage.toString(), setPage.toString()];
|
||||
|
||||
/**
|
||||
* elementToShape
|
||||
|
|
|
@ -80,16 +80,6 @@ export const pagesReducer = handleActions(
|
|||
return setPageIndex(workpadState, payload);
|
||||
},
|
||||
|
||||
[actions.gotoPage]: (workpadState, { payload }) => {
|
||||
const newState = setPageIndex(workpadState, payload);
|
||||
|
||||
// changes to the page require navigation
|
||||
const router = routerProvider();
|
||||
router.navigateTo('loadWorkpad', { id: newState.id, page: newState.page + 1 });
|
||||
|
||||
return newState;
|
||||
},
|
||||
|
||||
[actions.movePage]: (workpadState, { payload }) => {
|
||||
const { id, position } = payload;
|
||||
const pageIndex = getPageIndexById(workpadState, id);
|
||||
|
|
|
@ -147,13 +147,19 @@ export function jobsProvider(callWithRequest) {
|
|||
const groups = {};
|
||||
const datafeeds = {};
|
||||
const calendarsByJobId = {};
|
||||
const results = await Promise.all([
|
||||
const requests = (jobIds.length > 0) ? [
|
||||
callWithRequest('ml.jobs', { jobId: jobIds }),
|
||||
callWithRequest('ml.jobStats', { jobId: jobIds }),
|
||||
callWithRequest('ml.jobStats', { jobId: jobIds })
|
||||
] : [
|
||||
callWithRequest('ml.jobs'),
|
||||
callWithRequest('ml.jobStats'),
|
||||
];
|
||||
requests.push(
|
||||
callWithRequest('ml.datafeeds'),
|
||||
callWithRequest('ml.datafeedStats'),
|
||||
calMngr.getAllCalendars(),
|
||||
]);
|
||||
calMngr.getAllCalendars());
|
||||
|
||||
const results = await Promise.all(requests);
|
||||
|
||||
if (results[DATAFEEDS] && results[DATAFEEDS].datafeeds) {
|
||||
results[DATAFEEDS].datafeeds.forEach((datafeed) => {
|
||||
|
|
|
@ -115,6 +115,7 @@ exports[`it renders without crashing 1`] = `
|
|||
isClearable={true}
|
||||
isDisabled={false}
|
||||
onChange={[Function]}
|
||||
onCreateOption={[Function]}
|
||||
options={Array []}
|
||||
placeholder="Add a user…"
|
||||
selectedOptions={Array []}
|
||||
|
|
|
@ -133,6 +133,7 @@ export class ElasticsearchPrivileges extends Component<Props, {}> {
|
|||
isGroupLabelOption: false,
|
||||
}))}
|
||||
selectedOptions={this.props.role.elasticsearch.run_as.map(u => ({ label: u }))}
|
||||
onCreateOption={this.onCreateRunAsOption}
|
||||
onChange={this.onRunAsUserChange}
|
||||
isDisabled={!this.props.editable}
|
||||
/>
|
||||
|
@ -231,4 +232,17 @@ export class ElasticsearchPrivileges extends Component<Props, {}> {
|
|||
|
||||
this.props.onChange(role);
|
||||
};
|
||||
|
||||
public onCreateRunAsOption = (option: any) => {
|
||||
const newRunAsUsers = this.props.role.elasticsearch.run_as.concat(option);
|
||||
|
||||
const role = {
|
||||
...this.props.role,
|
||||
elasticsearch: {
|
||||
...this.props.role.elasticsearch,
|
||||
run_as: newRunAsUsers,
|
||||
},
|
||||
};
|
||||
this.props.onChange(role);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1087,10 +1087,10 @@
|
|||
tabbable "^1.1.0"
|
||||
uuid "^3.1.0"
|
||||
|
||||
"@elastic/eui@6.10.4":
|
||||
version "6.10.4"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-6.10.4.tgz#666474e88d00ac9a5a9ab922e181170ce74a09ca"
|
||||
integrity sha512-TFT3TAQgh8d8OkYsS3HI4g6YSOWw/LZBSDxoba494wbchTGtRhvOurgYFDLAnjNOvbkiSj5lH0OzpYRa/K0pEw==
|
||||
"@elastic/eui@6.10.5":
|
||||
version "6.10.5"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-6.10.5.tgz#ab8f4a1aacc842056b322e84b77db645987c98ee"
|
||||
integrity sha512-zxJLvWqYLxykZcBp45fgkIRV67Aon4dXIr7OIFsyY6Ah6Lgm980GTBhsIgicElIwQbccIXyOaldPYfmNMpvQaA==
|
||||
dependencies:
|
||||
"@types/lodash" "^4.14.116"
|
||||
"@types/numeral" "^0.0.25"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue