Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/elastic/kibana into portabl…
Browse files Browse the repository at this point in the history
…eDashboard/removeSavedObjectClass
  • Loading branch information
ThomThomson committed Sep 23, 2022
2 parents 4448541 + e89ec58 commit 26103a4
Show file tree
Hide file tree
Showing 132 changed files with 402 additions and 171 deletions.
7 changes: 7 additions & 0 deletions packages/kbn-doc-links/src/get_doc_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,15 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
bulkApi: `${ELASTICSEARCH_DOCS}docs-bulk.html`,
configuration: `${ENTERPRISE_SEARCH_DOCS}configuration.html`,
connectors: `${ENTERPRISE_SEARCH_DOCS}connectors.html`,
connectorsMongoDB: `${ENTERPRISE_SEARCH_DOCS}connectors-mongodb.html`,
connectorsMySQL: `${ENTERPRISE_SEARCH_DOCS}connectors-mysql.html`,
connectorsWorkplaceSearch: `${ENTERPRISE_SEARCH_DOCS}connectors.html#connectors-workplace-search`,
contentExtraction: `${ENTERPRISE_SEARCH_DOCS}content-extraction.html`,
crawlerGettingStarted: `${ENTERPRISE_SEARCH_DOCS}crawler-getting-started.html`,
crawlerManaging: `${ENTERPRISE_SEARCH_DOCS}crawler-managing.html`,
crawlerOverview: `${ENTERPRISE_SEARCH_DOCS}crawler.html`,
documentLevelSecurity: `${ELASTICSEARCH_DOCS}document-level-security.html`,
ingestPipelines: `${ENTERPRISE_SEARCH_DOCS}ingest-pipelines.html`,
languageAnalyzers: `${ELASTICSEARCH_DOCS}analysis-lang-analyzer.html`,
languageClients: `${ENTERPRISE_SEARCH_DOCS}programming-language-clients.html`,
licenseManagement: `${ENTERPRISE_SEARCH_DOCS}license-management.html`,
Expand Down Expand Up @@ -332,6 +338,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
remoteClustersProxy: `${ELASTICSEARCH_DOCS}remote-clusters.html#proxy-mode`,
remoteClusersProxySettings: `${ELASTICSEARCH_DOCS}remote-clusters-settings.html#remote-cluster-proxy-settings`,
scriptParameters: `${ELASTICSEARCH_DOCS}modules-scripting-using.html#prefer-params`,
secureCluster: `${ELASTICSEARCH_DOCS}secure-cluster.html`,
shardAllocationSettings: `${ELASTICSEARCH_DOCS}modules-cluster.html#cluster-shard-allocation-settings`,
sortSearch: `${ELASTICSEARCH_DOCS}sort-search-results.html`,
transportSettings: `${ELASTICSEARCH_DOCS}modules-network.html#common-network-settings`,
Expand Down
6 changes: 6 additions & 0 deletions packages/kbn-doc-links/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,15 @@ export interface DocLinks {
readonly bulkApi: string;
readonly configuration: string;
readonly connectors: string;
readonly connectorsMongoDB: string;
readonly connectorsMySQL: string;
readonly connectorsWorkplaceSearch: string;
readonly contentExtraction: string;
readonly crawlerGettingStarted: string;
readonly crawlerManaging: string;
readonly crawlerOverview: string;
readonly documentLevelSecurity: string;
readonly ingestPipelines: string;
readonly languageAnalyzers: string;
readonly languageClients: string;
readonly licenseManagement: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* Side Public License, v 1.
*/

/** @deprecated SolutionToolbar - use `Toolbar` from @kbn/shared-ux-button-toolbar" */
export { SolutionToolbar } from './solution_toolbar';
/** @deprecated QuickButtonGroup - use `IconButtonGroup` from `@kbn/shared-ux-button-toolbar` */
/** @deprecated AddFromLibraryButton - use `AddFromLibraryButton` from `@kbn/shared-ux-button-toolbar` */
/** @deprecated PrimaryButton and Button - use `Primary` from `@kbn/shared-ux-button-toolbar` */
/** @deprecated PrimaryActionPopover - use `ToolbarPopover` from @kbn/shared-ux-button-toolber` */
export * from './items';
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,12 @@ export function DualBrush({
})
.each((brushObject: DualBrush, i, n) => {
const x = d3.scaleLinear().domain([min, max]).rangeRound([0, widthRef.current]);
// Ensure brush style is applied
brushObject.brush.extent([
[0, BRUSH_MARGIN],
[widthRef.current, BRUSH_HEIGHT - BRUSH_MARGIN],
]);

brushObject.brush(d3.select(n[i]));
const xStart = x(brushObject.start) ?? 0;
const xEnd = x(brushObject.end) ?? 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export const getDestinationMap = ({
events: [ProcessorEvent.span],
},
body: {
track_total_hits: false,
size: 0,
query: {
bool: {
Expand Down Expand Up @@ -144,6 +145,7 @@ export const getDestinationMap = ({
events: [ProcessorEvent.transaction],
},
body: {
track_total_hits: false,
query: {
bool: {
filter: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('APMEventClient', () => {
apm: {
events: [],
},
body: { size: 0 },
body: { size: 0, track_total_hits: false },
});

return res.ok({ body: 'ok' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export type APMEventESSearchRequest = Omit<ESSearchRequest, 'index'> & {
};
body: {
size: number;
track_total_hits: boolean | number;
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ describe('unpackProcessorEvents', () => {
const request = {
apm: { events: ['transaction', 'error'] },
body: {
track_total_hits: false,
size: 0,
query: { bool: { filter: [{ terms: { foo: 'bar' } }] } },
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export async function getHasAggregatedServicesMetrics({
events: [ProcessorEvent.metric],
},
body: {
track_total_hits: 1,
size: 1,
query: {
bool: {
Expand Down
7 changes: 4 additions & 3 deletions x-pack/plugins/apm/server/lib/helpers/setup_request.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe('setupRequest', () => {
const { apmEventClient } = await setupRequest(mockResources);
await apmEventClient.search('foo', {
apm: { events: [ProcessorEvent.transaction] },
body: { size: 10 },
body: { track_total_hits: 10_000, size: 10 },
});

expect(
Expand All @@ -111,6 +111,7 @@ describe('setupRequest', () => {
{
index: ['apm-*'],
body: {
track_total_hits: 10000,
size: 10,
query: {
bool: {
Expand Down Expand Up @@ -166,7 +167,7 @@ describe('with includeFrozen=false', () => {
apm: {
events: [],
},
body: { size: 10 },
body: { track_total_hits: 10_000, size: 10 },
});

const params =
Expand All @@ -188,7 +189,7 @@ describe('with includeFrozen=true', () => {

await apmEventClient.search('foo', {
apm: { events: [] },
body: { size: 10 },
body: { track_total_hits: 10_000, size: 10 },
});

const params =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export async function getIsUsingServiceDestinationMetrics({
events: [getProcessorEventForServiceDestinationStatistics(true)],
},
body: {
track_total_hits: 1,
size: 1,
terminate_after: 1,
query: {
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 @@ -64,6 +64,7 @@ async function getHasTransactions({
events: [ProcessorEvent.transaction],
},
body: {
track_total_hits: 1,
size: 0,
query: {
bool: {
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/apm/server/lib/helpers/transactions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export async function getHasAggregatedTransactions({
events: [ProcessorEvent.metric],
},
body: {
track_total_hits: 1,
terminate_after: 1,
size: 1,
query: {
bool: {
Expand All @@ -46,7 +48,6 @@ export async function getHasAggregatedTransactions({
},
},
},
terminate_after: 1,
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export async function getColdstartRate({
events: [getProcessorEventForTransactions(searchAggregatedTransactions)],
},
body: {
track_total_hits: false,
size: 0,
query: { bool: { filter } },
aggs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export async function getFailedTransactionRate({
events: [getProcessorEventForTransactions(searchAggregatedTransactions)],
},
body: {
track_total_hits: false,
size: 0,
query: { bool: { filter } },
aggs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export async function getTransactionDurationChartPreview({
apm: {
events: [getProcessorEventForTransactions(searchAggregatedTransactions)],
},
body: { size: 0, query, aggs },
body: { size: 0, track_total_hits: false, query, aggs },
};
const resp = await apmEventClient.search(
'get_transaction_duration_chart_preview',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export async function getTransactionErrorCountChartPreview({

const params = {
apm: { events: [ProcessorEvent.error] },
body: { size: 0, query, aggs },
body: { size: 0, track_total_hits: false, query, aggs },
};

const resp = await apmEventClient.search(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export async function getTransactionErrorRateChartPreview({
events: [getProcessorEventForTransactions(searchAggregatedTransactions)],
},
body: {
track_total_hits: false,
size: 0,
query: {
bool: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const fetchDurationCorrelation = async ({
events: [eventType],
},
body: {
track_total_hits: false,
size: 0,
query: getCommonCorrelationsQuery({
start,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const fetchDurationFieldCandidates = async ({
events: [eventType],
},
body: {
track_total_hits: false,
fields: ['*'],
_source: false,
query: getCommonCorrelationsQuery({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const fetchDurationFractions = async ({
events: [eventType],
},
body: {
track_total_hits: false,
size: 0,
query: getCommonCorrelationsQuery({
start,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export const fetchDurationHistogramRangeSteps = async ({
events: [getEventType(chartType, searchMetrics)],
},
body: {
track_total_hits: 1,
size: 0,
query: getCommonCorrelationsQuery({
start,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export const fetchDurationRanges = async ({
events: [getEventType(chartType, searchMetrics)],
},
body: {
track_total_hits: false,
size: 0,
query: getCommonCorrelationsQuery({
start,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const fetchFailedEventsCorrelationPValues = async ({
events: [eventType],
},
body: {
track_total_hits: false,
size: 0,
query: {
bool: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const fetchFieldValuePairs = async ({
events: [eventType],
},
body: {
track_total_hits: false,
size: 0,
query: getCommonCorrelationsQuery({
start,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export async function getErrorRateChartsForDependency({
],
},
body: {
track_total_hits: false,
size: 0,
query: {
bool: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export async function getLatencyChartsForDependency({
],
},
body: {
track_total_hits: false,
size: 0,
query: {
bool: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export async function getMetadataForDependency({
events: [ProcessorEvent.span],
},
body: {
track_total_hits: false,
size: 1,
query: {
bool: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export async function getThroughputChartsForDependency({
],
},
body: {
track_total_hits: false,
size: 0,
query: {
bool: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export async function getTopDependencyOperations({
events: [ProcessorEvent.span],
},
body: {
track_total_hits: false,
size: 0,
query: {
bool: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export async function getTopDependencySpans({
events: [ProcessorEvent.span],
},
body: {
track_total_hits: false,
size: MAX_NUM_SPANS,
query: {
bool: {
Expand Down Expand Up @@ -123,6 +124,7 @@ export async function getTopDependencySpans({
events: [ProcessorEvent.transaction],
},
body: {
track_total_hits: false,
size: transactionIds.length,
query: {
bool: {
Expand Down

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

Loading

0 comments on commit 26103a4

Please sign in to comment.