Skip to content

Commit

Permalink
Merge branch 'master' into reporting/switch-to-tm-pre
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Sep 22, 2020
2 parents 9c13f38 + 7544a33 commit 165734a
Show file tree
Hide file tree
Showing 166 changed files with 4,161 additions and 1,778 deletions.
4 changes: 2 additions & 2 deletions .ci/Jenkinsfile_baseline_capture
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ kibanaPipeline(timeoutMinutes: 120) {
]) {
parallel([
'oss-baseline': {
workers.ci(name: 'oss-baseline', size: 's-highmem', ramDisk: true, runErrorReporter: false) {
workers.ci(name: 'oss-baseline', size: 'l', ramDisk: true, runErrorReporter: false) {
kibanaPipeline.functionalTestProcess('oss-baseline', './test/scripts/jenkins_baseline.sh')()
}
},
'xpack-baseline': {
workers.ci(name: 'xpack-baseline', size: 's-highmem', ramDisk: true, runErrorReporter: false) {
workers.ci(name: 'xpack-baseline', size: 'l', ramDisk: true, runErrorReporter: false) {
kibanaPipeline.functionalTestProcess('xpack-baseline', './test/scripts/jenkins_xpack_baseline.sh')()
}
},
Expand Down
5 changes: 0 additions & 5 deletions docs/apm/service-maps.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
[[service-maps]]
=== Service maps

beta::[]

WARNING: Service map support for Internet Explorer 11 is extremely limited.
Please use Chrome or Firefox if available.

A service map is a real-time visual representation of the instrumented services in your application's architecture.
It shows you how these services are connected, along with high-level metrics like average transaction duration,
requests per minute, and errors per minute.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ Get a list of field objects for an index pattern that may contain wildcards
getFieldsForWildcard(options: {
pattern: string | string[];
metaFields?: string[];
fieldCapsOptions?: {
allowNoIndices: boolean;
};
}): Promise<FieldDescriptor[]>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| options | <code>{</code><br/><code> pattern: string &#124; string[];</code><br/><code> metaFields?: string[];</code><br/><code> }</code> | |
| options | <code>{</code><br/><code> pattern: string &#124; string[];</code><br/><code> metaFields?: string[];</code><br/><code> fieldCapsOptions?: {</code><br/><code> allowNoIndices: boolean;</code><br/><code> };</code><br/><code> }</code> | |

<b>Returns:</b>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
"babel-eslint": "^10.0.3",
"babel-jest": "^25.5.1",
"babel-plugin-istanbul": "^6.0.0",
"backport": "5.5.1",
"backport": "5.6.0",
"brace": "0.11.1",
"chai": "3.5.0",
"chance": "1.0.18",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-es-archiver/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export function runCli() {

const query = flags.query;
let parsedQuery;
if (typeof query === 'string') {
if (typeof query === 'string' && query.length > 0) {
try {
parsedQuery = JSON.parse(query);
} catch (err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ function EditorUI({ initialTextValue }: EditorProps) {
unsubscribeResizer();
clearSubscriptions();
window.removeEventListener('hashchange', onHashChange);
if (editorInstanceRef.current) {
editorInstanceRef.current.getCoreEditor().destroy();
}
};
}, [saveCurrentTextObject, initialTextValue, history, setInputEditor, settingsService]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,4 +408,8 @@ export class LegacyCoreEditor implements CoreEditor {
},
]);
}

destroy() {
this.editor.destroy();
}
}
5 changes: 5 additions & 0 deletions src/plugins/console/public/types/core_editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,9 @@ export interface CoreEditor {
* detects a change
*/
registerAutocompleter(autocompleter: AutoCompleterFunction): void;

/**
* Release any resources in use by the editor.
*/
destroy(): void;
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ export class IndexPatternsFetcher {
async getFieldsForWildcard(options: {
pattern: string | string[];
metaFields?: string[];
fieldCapsOptions?: { allowNoIndices: boolean };
}): Promise<FieldDescriptor[]> {
const { pattern, metaFields } = options;
return await getFieldCapabilities(this._callDataCluster, pattern, metaFields);
const { pattern, metaFields, fieldCapsOptions } = options;
return await getFieldCapabilities(this._callDataCluster, pattern, metaFields, fieldCapsOptions);
}

/**
Expand Down
9 changes: 7 additions & 2 deletions src/plugins/data/server/index_patterns/fetcher/lib/es_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,20 @@ export async function callIndexAliasApi(
*
* @param {Function} callCluster bound function for accessing an es client
* @param {Array<String>|String} indices
* @param {Object} fieldCapsOptions
* @return {Promise<FieldCapsResponse>}
*/
export async function callFieldCapsApi(callCluster: LegacyAPICaller, indices: string[] | string) {
export async function callFieldCapsApi(
callCluster: LegacyAPICaller,
indices: string[] | string,
fieldCapsOptions: { allowNoIndices: boolean } = { allowNoIndices: false }
) {
try {
return (await callCluster('fieldCaps', {
index: indices,
fields: '*',
ignoreUnavailable: true,
allowNoIndices: false,
...fieldCapsOptions,
})) as FieldCapsResponse;
} catch (error) {
throw convertEsError(indices, error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('index_patterns/field_capabilities/field_capabilities', () => {

await getFieldCapabilities(footballs[0], footballs[1]);
sinon.assert.calledOnce(callFieldCapsApi);
calledWithExactly(callFieldCapsApi, [footballs[0], footballs[1]]);
calledWithExactly(callFieldCapsApi, [footballs[0], footballs[1], undefined]);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,20 @@ import { FieldDescriptor } from '../../index_patterns_fetcher';
* @param {Function} callCluster bound function for accessing an es client
* @param {Array} [indices=[]] the list of indexes to check
* @param {Array} [metaFields=[]] the list of internal fields to include
* @param {Object} fieldCapsOptions
* @return {Promise<Array<FieldDescriptor>>}
*/
export async function getFieldCapabilities(
callCluster: LegacyAPICaller,
indices: string | string[] = [],
metaFields: string[] = []
metaFields: string[] = [],
fieldCapsOptions?: { allowNoIndices: boolean }
) {
const esFieldCaps: FieldCapsResponse = await callFieldCapsApi(callCluster, indices);
const esFieldCaps: FieldCapsResponse = await callFieldCapsApi(
callCluster,
indices,
fieldCapsOptions
);
const fieldsFromFieldCapsByName = keyBy(readFieldCapsResponse(esFieldCaps), 'name');

const allFieldsUnsorted = Object.keys(fieldsFromFieldCapsByName)
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/data/server/server.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,9 @@ export class IndexPatternsFetcher {
getFieldsForWildcard(options: {
pattern: string | string[];
metaFields?: string[];
fieldCapsOptions?: {
allowNoIndices: boolean;
};
}): Promise<IndexPatternFieldDescriptor[]>;
}

Expand Down
8 changes: 0 additions & 8 deletions src/plugins/embeddable/public/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import { UiActionsSetup } from '../../ui_actions/public';
import {
contextMenuTrigger,
createFilterAction,
panelBadgeTrigger,
EmbeddableContext,
CONTEXT_MENU_TRIGGER,
Expand All @@ -29,8 +28,6 @@ import {
ACTION_INSPECT_PANEL,
REMOVE_PANEL_ACTION,
ACTION_EDIT_PANEL,
FilterActionContext,
ACTION_APPLY_FILTER,
panelNotificationTrigger,
PANEL_NOTIFICATION_TRIGGER,
} from './lib';
Expand All @@ -48,7 +45,6 @@ declare module '../../ui_actions/public' {
[ACTION_INSPECT_PANEL]: EmbeddableContext;
[REMOVE_PANEL_ACTION]: EmbeddableContext;
[ACTION_EDIT_PANEL]: EmbeddableContext;
[ACTION_APPLY_FILTER]: FilterActionContext;
}
}

Expand All @@ -60,8 +56,4 @@ export const bootstrap = (uiActions: UiActionsSetup) => {
uiActions.registerTrigger(contextMenuTrigger);
uiActions.registerTrigger(panelBadgeTrigger);
uiActions.registerTrigger(panelNotificationTrigger);

const actionApplyFilter = createFilterAction();

uiActions.registerAction(actionApplyFilter);
};
1 change: 0 additions & 1 deletion src/plugins/embeddable/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { EmbeddablePublicPlugin } from './plugin';

export {
ACTION_ADD_PANEL,
ACTION_APPLY_FILTER,
ACTION_EDIT_PANEL,
Adapters,
AddPanelAction,
Expand Down
134 changes: 0 additions & 134 deletions src/plugins/embeddable/public/lib/actions/apply_filter_action.test.ts

This file was deleted.

Loading

0 comments on commit 165734a

Please sign in to comment.