Skip to content

Commit

Permalink
Merge branch 'main' into empty-datalayer-with-ref-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored May 11, 2022
2 parents 275457f + fb5aee2 commit 521603b
Show file tree
Hide file tree
Showing 231 changed files with 7,741 additions and 5,049 deletions.
63 changes: 55 additions & 8 deletions .buildkite/package-lock.json

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

2 changes: 1 addition & 1 deletion .buildkite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"kibana-buildkite-library": "git+https://git@github.com/elastic/kibana-buildkite-library#b9f6b423059cac7554a7402277f2ad3ecfe132a4"
"kibana-buildkite-library": "git+https://git@github.com/elastic/kibana-buildkite-library#a0037514b7650296a23dbad99b165601d4eab1be"
}
}
10 changes: 5 additions & 5 deletions .buildkite/scripts/steps/package_testing/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ trap "echoKibanaLogs" EXIT

vagrant provision "$TEST_PACKAGE"

export TEST_BROWSER_HEADLESS=1
export TEST_KIBANA_URL="http://elastic:changeme@$KIBANA_IP_ADDRESS:5601"
export TEST_ES_URL=http://elastic:changeme@192.168.56.1:9200
# export TEST_BROWSER_HEADLESS=1
# export TEST_KIBANA_URL="http://elastic:changeme@$KIBANA_IP_ADDRESS:5601"
# export TEST_ES_URL=http://elastic:changeme@192.168.56.1:9200

cd x-pack
node scripts/functional_test_runner.js --include-tag=smoke
# cd x-pack
# node scripts/functional_test_runner.js --include-tag=smoke
2 changes: 1 addition & 1 deletion docs/maps/asset-tracking-tutorial.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ filter {
"type" => "%{[resultSet][vehicle][type]}"
"vehicle_id" => "%{[resultSet][vehicle][vehicleID]}"
}
remove_field => [ "resultSet", "@version", "@timestamp" ]
remove_field => [ "resultSet", "@version", "@timestamp", "[event][original]" ]
}
mutate {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
"constate": "^1.3.2",
"content-disposition": "0.5.3",
"copy-to-clipboard": "^3.0.8",
"core-js": "^3.21.1",
"core-js": "^3.22.4",
"cronstrue": "^1.51.0",
"cytoscape": "^3.10.0",
"cytoscape-dagre": "^2.2.2",
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-doc-links/src/get_doc_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,6 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
installElasticAgent: `${FLEET_DOCS}install-fleet-managed-elastic-agent.html`,
installElasticAgentStandalone: `${FLEET_DOCS}install-standalone-elastic-agent.html`,
upgradeElasticAgent: `${FLEET_DOCS}upgrade-elastic-agent.html`,
upgradeElasticAgent712lower: `${FLEET_DOCS}upgrade-elastic-agent.html#upgrade-7.12-lower`,
learnMoreBlog: `${ELASTIC_WEBSITE_URL}blog/elastic-agent-and-fleet-make-it-easier-to-integrate-your-systems-with-elastic`,
apiKeysLearnMore: `${KIBANA_DOCS}api-keys.html`,
onPremRegistry: `${FLEET_DOCS}air-gapped.html`,
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-doc-links/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ export interface DocLinks {
installElasticAgent: string;
installElasticAgentStandalone: string;
upgradeElasticAgent: string;
upgradeElasticAgent712lower: string;
learnMoreBlog: string;
apiKeysLearnMore: string;
onPremRegistry: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ describe('interpreter/functions#gauge', () => {
logDatatable: (name: string, datatable: Datatable) => {
loggedTable = datatable;
},
reset: () => {},
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ export const gaugeFunction = (): GaugeExpressionFunctionDefinition => ({
}

if (handlers?.inspectorAdapters?.tables) {
handlers.inspectorAdapters.tables.reset();
handlers.inspectorAdapters.tables.allowCsvExport = true;

const logTable = prepareLogTable(
data,
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ describe('interpreter/functions#heatmap', () => {
logDatatable: (name: string, datatable: Datatable) => {
loggedTable = datatable;
},
reset: () => {},
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ export const heatmapFunction = (): HeatmapExpressionFunctionDefinition => ({
validateAccessor(args.splitColumnAccessor, data.columns);

if (handlers?.inspectorAdapters?.tables) {
handlers.inspectorAdapters.tables.reset();
handlers.inspectorAdapters.tables.allowCsvExport = true;

const argsTable: Dimension[] = [];
if (args.valueAccessor) {
prepareHeatmapLogTable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ describe('interpreter/functions#metric', () => {
logDatatable: (name: string, datatable: Datatable) => {
loggedTable = datatable;
},
reset: () => {},
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ export const metricVisFunction = (): MetricVisExpressionFunctionDefinition => ({
validateAccessor(args.bucket, input.columns);

if (handlers?.inspectorAdapters?.tables) {
handlers.inspectorAdapters.tables.reset();
handlers.inspectorAdapters.tables.allowCsvExport = true;

const argsTable: Dimension[] = [
[
args.metric,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,6 @@ export interface MetricOptions {
color?: string;
bgColor?: string;
lightText: boolean;
colIndex: number;
rowIndex: number;
}

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 @@ -63,6 +63,7 @@ class MetricVisComponent extends Component<MetricVisComponentProps> {
return dimensions.metrics.reduce(
(acc: MetricOptions[], metric: string | ExpressionValueVisDimension) => {
const column = getColumnByAccessor(metric, table?.columns);
const colIndex = table?.columns.indexOf(column!);
const formatter = getFormatService().deserialize(
getFormatByAccessor(metric, table.columns)
);
Expand All @@ -89,6 +90,7 @@ class MetricVisComponent extends Component<MetricVisComponentProps> {
bgColor: shouldBrush && (style.bgColor ?? false) ? color : undefined,
lightText: shouldBrush && (style.bgColor ?? false) && needsLightText(color),
rowIndex,
colIndex,
};
});

Expand All @@ -98,20 +100,21 @@ class MetricVisComponent extends Component<MetricVisComponentProps> {
);
}

private filterBucket = (row: number) => {
private filterColumn = (row: number, metricColIndex: number) => {
const { dimensions } = this.props.visParams;
if (!dimensions.bucket) {
return;
}

const table = this.props.visData;
let column = dimensions.bucket ? getAccessor(dimensions.bucket) : metricColIndex;
if (typeof column === 'object' && 'id' in column) {
column = table.columns.indexOf(column);
}
this.props.fireEvent({
name: 'filterBucket',
name: 'filter',
data: {
data: [
{
table,
column: getAccessor(dimensions.bucket),
column,
row,
},
],
Expand Down Expand Up @@ -144,9 +147,7 @@ class MetricVisComponent extends Component<MetricVisComponentProps> {
key={index}
metric={metric}
style={this.props.visParams.metric.style}
onFilter={
this.props.visParams.dimensions.bucket ? () => this.filterBucket(index) : undefined
}
onFilter={() => this.filterColumn(metric.rowIndex, metric.colIndex)}
autoScale={this.props.visParams.metric.autoScale}
colorFullBackground={this.props.visParams.metric.colorFullBackground}
labelConfig={this.props.visParams.metric.labels}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ import { MetricVisValue } from './metric_value';
import { MetricOptions, MetricStyle, VisParams } from '../../common/types';
import { LabelPosition } from '../../common/constants';

const baseMetric: MetricOptions = { label: 'Foo', value: 'foo', lightText: false };
const baseMetric: MetricOptions = {
label: 'Foo',
value: 'foo',
lightText: false,
rowIndex: 0,
colIndex: 0,
};
const font: MetricStyle = {
spec: { fontSize: '12px' },

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import React, { CSSProperties } from 'react';
import classNames from 'classnames';
import { i18n } from '@kbn/i18n';
import type { MetricOptions, MetricStyle, MetricVisParam } from '../../common/types';

interface MetricVisValueProps {
Expand Down Expand Up @@ -72,7 +73,13 @@ export const MetricVisValue = ({

if (onFilter) {
return (
<button style={{ display: 'block' }} onClick={() => onFilter()}>
<button
style={{ display: 'block' }}
onClick={() => onFilter()}
title={i18n.translate('expressionMetricVis.filterTitle', {
defaultMessage: 'Click to filter by field',
})}
>
{metricComponent}
</button>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ describe('interpreter/functions#mosaicVis', () => {
logDatatable: (name: string, datatable: Datatable) => {
loggedTable = datatable;
},
reset: () => {},
},
},
};
Expand Down
Loading

0 comments on commit 521603b

Please sign in to comment.