Skip to content

Commit 91fd4f8

Browse files
Merge branch 'main' into fix-127802
2 parents 0b61084 + 3b07ec6 commit 91fd4f8

86 files changed

Lines changed: 2115 additions & 1380 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.buildkite/scripts/steps/checks.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export DISABLE_BOOTSTRAP_VALIDATION=false
88
.buildkite/scripts/steps/checks/commit/commit.sh
99
.buildkite/scripts/steps/checks/bazel_packages.sh
1010
.buildkite/scripts/steps/checks/telemetry.sh
11+
.buildkite/scripts/steps/checks/validate_ci_groups.sh
1112
.buildkite/scripts/steps/checks/ts_projects.sh
1213
.buildkite/scripts/steps/checks/jest_configs.sh
1314
.buildkite/scripts/steps/checks/doc_api_changes.sh
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
source .buildkite/scripts/common/util.sh
6+
7+
echo --- Ensure that all tests are in a CI Group
8+
checks-reporter-with-killswitch "Ensure that all tests are in a CI Group" \
9+
node scripts/ensure_all_tests_in_ci_group

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
"base64-js": "^1.3.1",
222222
"bitmap-sdf": "^1.0.3",
223223
"brace": "0.11.1",
224-
"broadcast-channel": "^4.11.0",
224+
"broadcast-channel": "4.10.0",
225225
"canvg": "^3.0.9",
226226
"chalk": "^4.1.0",
227227
"cheerio": "^1.0.0-rc.10",
@@ -249,7 +249,7 @@
249249
"deep-freeze-strict": "^1.1.1",
250250
"deepmerge": "^4.2.2",
251251
"del": "^5.1.0",
252-
"elastic-apm-node": "^3.31.0",
252+
"elastic-apm-node": "^3.32.0",
253253
"email-addresses": "^5.0.0",
254254
"execa": "^4.0.2",
255255
"exit-hook": "^2.2.0",

src/plugins/console/public/application/containers/console_history/history_viewer.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import * as InputMode from '../../models/legacy_core_editor/mode/input';
1717
const inputMode = new InputMode.Mode();
1818
import * as editor from '../../models/legacy_core_editor';
1919
import { applyCurrentSettings } from '../editor/legacy/console_editor/apply_editor_settings';
20+
import { formatRequestBodyDoc } from '../../../lib/utils';
2021

2122
interface Props {
2223
settings: DevToolsSettings;
@@ -41,7 +42,9 @@ export function HistoryViewer({ settings, req }: Props) {
4142
if (viewerRef.current) {
4243
const { current: viewer } = viewerRef;
4344
if (req) {
44-
const s = req.method + ' ' + req.endpoint + '\n' + (req.data || '');
45+
const indent = true;
46+
const formattedData = req.data ? formatRequestBodyDoc([req.data], indent).data : '';
47+
const s = req.method + ' ' + req.endpoint + '\n' + formattedData;
4548
viewer.update(s, inputMode);
4649
viewer.clearSelection();
4750
} else {

src/plugins/console/public/application/hooks/use_restore_request_from_history/restore_request_from_history.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import RowParser from '../../../lib/row_parser';
1010
import { ESRequest } from '../../../types';
1111
import { SenseEditor } from '../../models/sense_editor';
12+
import { formatRequestBodyDoc } from '../../../lib/utils';
1213

1314
export function restoreRequestFromHistory(editor: SenseEditor, req: ESRequest) {
1415
const coreEditor = editor.getCoreEditor();
@@ -32,7 +33,9 @@ export function restoreRequestFromHistory(editor: SenseEditor, req: ESRequest) {
3233

3334
let s = prefix + req.method + ' ' + req.endpoint;
3435
if (req.data) {
35-
s += '\n' + req.data;
36+
const indent = true;
37+
const formattedData = formatRequestBodyDoc([req.data], indent);
38+
s += '\n' + formattedData.data;
3639
}
3740

3841
s += suffix;

src/plugins/vis_types/timeseries/server/lib/vis_data/response_processors/series/math.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
import { convertIntervalToUnit } from '../../helpers/unit_to_seconds';
10+
import { getLastMetric } from '../../helpers/get_last_metric';
1011
import { SERIES_SEPARATOR } from '../../../../../common/constants';
1112

1213
const percentileValueMatch = /\[([0-9\.]+)\]$/;
@@ -16,7 +17,7 @@ import { evaluate } from '@kbn/tinymath';
1617

1718
export function mathAgg(resp, panel, series, meta, extractFields) {
1819
return (next) => async (results) => {
19-
const mathMetric = last(series.metrics);
20+
const mathMetric = getLastMetric(series);
2021
if (mathMetric.type !== 'math') return next(results);
2122
// Filter the results down to only the ones that match the series.id. Sometimes
2223
// there will be data from other series mixed in.

src/plugins/vis_types/timeseries/server/lib/vis_data/response_processors/series/math.test.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,33 @@ describe('math(resp, panel, series)', () => {
108108
});
109109
});
110110

111+
test('handles math even if there is a series agg', async () => {
112+
series.metrics.push({
113+
id: 'myid',
114+
type: 'series_agg',
115+
function: 'sum',
116+
});
117+
const next = await mathAgg(resp, panel, series)((results) => results);
118+
const results = await stdMetric(resp, panel, series)(next)([]);
119+
120+
expect(results).toHaveLength(1);
121+
122+
expect(results[0]).toEqual({
123+
id: 'test╰┄►example-01',
124+
label: 'example-01',
125+
color: 'rgb(255, 0, 0)',
126+
stack: false,
127+
seriesId: 'test',
128+
lines: { show: true, fill: 0, lineWidth: 1, steps: false },
129+
points: { show: true, radius: 1, lineWidth: 1 },
130+
bars: { fill: 0, lineWidth: 1, show: false },
131+
data: [
132+
[1, 2],
133+
[2, 1],
134+
],
135+
});
136+
});
137+
111138
test('turns division by zero into null values', async () => {
112139
resp.aggregations.test.buckets[0].timeseries.buckets[0].mincpu = 0;
113140
const next = await mathAgg(resp, panel, series)((results) => results);

test/plugin_functional/test_suites/core_plugins/rendering.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
182182
'xpack.maps.showMapsInspectorAdapter (boolean)',
183183
'xpack.observability.unsafe.alertingExperience.enabled (boolean)',
184184
'xpack.observability.unsafe.cases.enabled (boolean)',
185-
'xpack.observability.unsafe.overviewNext.enabled (boolean)',
186185
'xpack.observability.unsafe.rules.enabled (boolean)',
187186
'xpack.osquery.actionEnabled (boolean)',
188187
'xpack.osquery.packs (boolean)',

x-pack/plugins/alerting/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ The following table describes the properties of the `options` object.
104104

105105
### Executor
106106

107-
This is the primary function for a rule type. Whenever the rule needs to execute, this function will perform the execution. It receives a variety of parameters. The following table describes the properties the executor receives.
107+
This is the primary function for a rule type. Whenever the rule needs to execute, this function will perform the execution. This function is for running a custom query that returns documents meeting a condition and report them to the framework using the `services.alertFactory`. The function receives a variety of parameters. The following table describes the properties the executor receives.
108108

109109
**executor(options)**
110110

x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -84,25 +84,27 @@ const AgentPolicyLogsNotEnabledCallout: React.FunctionComponent<{ agentPolicy: A
8484
/>
8585
}
8686
>
87-
<FormattedMessage
88-
id="xpack.fleet.agentLogs.logDisabledCallOutDescription"
89-
defaultMessage="Update the agent's policy {settingsLink} to enable logs collection."
90-
values={{
91-
settingsLink: (
92-
<EuiLink
93-
href={getHref('policy_details', {
94-
policyId: agentPolicy.id,
95-
tabId: 'settings',
96-
})}
97-
>
98-
<FormattedMessage
99-
id="xpack.fleet.agentLogs.settingsLink"
100-
defaultMessage="settings"
101-
/>
102-
</EuiLink>
103-
),
104-
}}
105-
/>
87+
{agentPolicy.is_managed ? null : (
88+
<FormattedMessage
89+
id="xpack.fleet.agentLogs.logDisabledCallOutDescription"
90+
defaultMessage="Update the agent's policy {settingsLink} to enable logs collection."
91+
values={{
92+
settingsLink: (
93+
<EuiLink
94+
href={getHref('policy_details', {
95+
policyId: agentPolicy.id,
96+
tabId: 'settings',
97+
})}
98+
>
99+
<FormattedMessage
100+
id="xpack.fleet.agentLogs.settingsLink"
101+
defaultMessage="settings"
102+
/>
103+
</EuiLink>
104+
),
105+
}}
106+
/>
107+
)}
106108
</EuiCallOut>
107109
</EuiFlexItem>
108110
);
@@ -278,9 +280,9 @@ export const AgentLogsUI: React.FunctionComponent<AgentLogsProps> = memo(
278280

279281
return (
280282
<WrapperFlexGroup direction="column" gutterSize="m">
281-
{agentPolicy &&
282-
!agentPolicy.monitoring_enabled?.includes('logs') &&
283-
!agentPolicy.is_managed && <AgentPolicyLogsNotEnabledCallout agentPolicy={agentPolicy} />}
283+
{agentPolicy && !agentPolicy.monitoring_enabled?.includes('logs') && (
284+
<AgentPolicyLogsNotEnabledCallout agentPolicy={agentPolicy} />
285+
)}
284286
<EuiFlexItem grow={false}>
285287
<EuiFlexGroup gutterSize="m">
286288
<EuiFlexItem>

0 commit comments

Comments
 (0)