Skip to content

Commit

Permalink
Merge branch 'main' into feature-add-fleet-server-policy
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Oct 27, 2022
2 parents 699e9d3 + 7a7b031 commit 83652ea
Show file tree
Hide file tree
Showing 158 changed files with 4,434 additions and 964 deletions.
2 changes: 1 addition & 1 deletion .github/relabel.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
issues:
- missingLabel: needs-team
regex: ^(\:ml)|(Team:.*)$
regex: (^\:ml$)|(^Team:.+$)|(^EUI$)
51 changes: 51 additions & 0 deletions .github/workflows/add-fleet-issues-to-ingest-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Add Fleet issue to Platform Ingest project

on:
issues:
types:
- labeled

env:
INGEST_PROJECT_ID: 'PVT_kwDOAGc3Zs4AEzn4'
FLEET_LABEL: 'Team:Fleet'
AREA_FIELD_ID: 'PVTSSF_lADOAGc3Zs4AEzn4zgEgZSo'
FLEET_UI_OPTION_ID: '411a7b86'

jobs:
add_to_ingest_project:
runs-on: ubuntu-latest
steps:
- uses: octokit/[email protected]
id: add_to_project
if: ${{ github.event.label.name == env.FLEET_LABEL }}
with:
query: |
# Variables have to be snake cased because of https://github.com/octokit/graphql-action/issues/164
mutation AddToIngestProject($project_id: ID!, $content_id: ID!) {
addProjectV2ItemById(input: { projectId: $project_id, contentId: $content_id }) {
item {
id
}
}
}
project_id: ${{ env.INGEST_PROJECT_ID }}
content_id: ${{ github.event.issue.node_id }}
env:
GITHUB_TOKEN: ${{ secrets.FLEET_TECH_KIBANA_USER_TOKEN }}
- uses: octokit/[email protected]
id: set_fleet_ui_area
if: github.event.label.name == env.FLEET_LABEL
with:
query: |
mutation updateIngestArea($item_id: ID!, $project_id: ID!, $area_field_id: ID!, $area_id: String) {
updateProjectV2ItemFieldValue(
input: { itemId: $item_id, projectId: $project_id, fieldId: $area_field_id, value: { singleSelectOptionId: $area_id } }) {
clientMutationId
}
}
item_id: ${{ fromJSON(steps.add_to_project.outputs.data).addProjectV2ItemById.item.id }}
project_id: ${{ env.INGEST_PROJECT_ID }}
area_field_id: ${{ env.AREA_FIELD_ID }}
area_id: ${{ env.FLEET_UI_OPTION_ID }}
env:
GITHUB_TOKEN: ${{ secrets.FLEET_TECH_KIBANA_USER_TOKEN }}
36 changes: 0 additions & 36 deletions .github/workflows/add-to-fleet-project.yml

This file was deleted.

Binary file modified docs/osquery/images/live-query-check-results.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 7 additions & 6 deletions docs/osquery/osquery.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ then view the results.
and you'll get suggestions for agents by name, ID, platform, and policy.
. Specify the query or pack to run:
** *Query*: Select a saved query or enter a new one in the text box. After you enter the query, you can expand the **Advanced** section to view or set <<osquery-map-fields,mapped ECS fields>> included in the results from the live query. Mapping ECS fields is optional.
** *Pack*: Select from query packs that have been loaded and activated. After you select a pack, all of the queries in the pack are displayed.
** *Pack*: Select from available query packs. After you select a pack, all of the queries in the pack are displayed.
+
TIP: Refer to <<osquery-prebuilt-packs,prebuilt packs>> to learn about using and managing Elastic prebuilt packs.
+
Expand Down Expand Up @@ -173,13 +173,14 @@ For information about the prebuilt packs that are available, refer to <<prebuilt
[[load-prebuilt-packs]]
==== Load and activate prebuilt Elastic packs

. Go to *Packs*, and then click *Load Elastic prebuilt packs*.
+
NOTE: This option is only available if new or updated prebuilt packs are available.
Follow these steps to load and turn on new or updated prebuilt packs:

. For each pack that you want to schedule:
. Go to *Packs*, and then click *Load Elastic prebuilt packs*.
. For each pack that you want to activate and schedule:

* Enable the option to make the pack *Active*.
* Turn on the *Active* toggle to ensure the pack runs continuously.
+
NOTE: You must manually run inactive packs.

* Click the pack name, then *Edit*.

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@
"callsites": "^3.1.0",
"chance": "1.0.18",
"chokidar": "^3.5.3",
"chromedriver": "^105.0.1",
"chromedriver": "^107.0.0",
"clean-webpack-plugin": "^3.0.0",
"compression-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^6.0.2",
Expand All @@ -1328,13 +1328,13 @@
"cssnano": "^5.1.12",
"cssnano-preset-default": "^5.2.12",
"csstype": "^3.0.2",
"cypress": "^10.9.0",
"cypress": "^10.10.0",
"cypress-axe": "^1.0.0",
"cypress-file-upload": "^5.0.8",
"cypress-multi-reporters": "^1.6.1",
"cypress-pipe": "^2.0.0",
"cypress-react-selector": "^3.0.0",
"cypress-real-events": "^1.7.1",
"cypress-real-events": "^1.7.2",
"cypress-recurse": "^1.23.0",
"debug": "^2.6.9",
"delete-empty": "^2.0.0",
Expand Down
20 changes: 9 additions & 11 deletions packages/kbn-apm-config-loader/src/apm_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@

import { schema } from '@kbn/config-schema';

export const apmConfigSchema = schema.object({
apm: schema.object(
{
active: schema.maybe(schema.boolean()),
serverUrl: schema.maybe(schema.uri()),
secretToken: schema.maybe(schema.string()),
globalLabels: schema.object({}, { unknowns: 'allow' }),
},
{ unknowns: 'allow' }
),
});
export const apmConfigSchema = schema.object(
{
active: schema.maybe(schema.boolean()),
serverUrl: schema.maybe(schema.uri()),
secretToken: schema.maybe(schema.string()),
globalLabels: schema.object({}, { unknowns: 'allow' }),
},
{ unknowns: 'allow' }
);

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 @@ -232,6 +232,7 @@ export const heatmapFunction = (): HeatmapExpressionFunctionDefinition => ({
},
syncTooltips: handlers?.isSyncTooltipsEnabled?.() ?? false,
syncCursor: handlers?.isSyncCursorEnabled?.() ?? true,
canNavigateToLens: Boolean(handlers?.variables?.canNavigateToLens),
},
};
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export interface HeatmapExpressionProps {
args: HeatmapArguments;
syncTooltips: boolean;
syncCursor: boolean;
canNavigateToLens?: boolean;
}

export interface HeatmapRender {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,14 @@ export const heatmapRenderer: (
const visualizationType = extractVisualizationType(executionContext);

if (containerType && visualizationType) {
plugins.usageCollection?.reportUiCounter(containerType, METRIC_TYPE.COUNT, [
const events = [
`render_${visualizationType}_${EXPRESSION_HEATMAP_NAME}`,
]);
config.canNavigateToLens
? `render_${visualizationType}_${EXPRESSION_HEATMAP_NAME}_convertable`
: undefined,
].filter<string>((event): event is string => Boolean(event));

plugins.usageCollection?.reportUiCounter(containerType, METRIC_TYPE.COUNT, events);
}

handlers.done();
Expand Down
1 change: 1 addition & 0 deletions src/plugins/kibana_react/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export { ValidatedDualRange } from './validated_range';
export type { ToastInput, KibanaReactNotifications } from './notifications';
export { createNotifications } from './notifications';

/** @deprecated use `Markdown` from `@kbn/shared-ux-markdown` */
export { Markdown, MarkdownSimple } from './markdown';

export { reactToUiComponent, uiToReactComponent } from './adapters';
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/kibana_react/public/markdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ const Fallback = () => (
</EuiDelayRender>
);

/** @deprecated use `Markdown` from `@kbn/shared-ux-markdown` */
const LazyMarkdownSimple = React.lazy(() => import('./markdown_simple'));
export const MarkdownSimple = (props: MarkdownSimpleProps) => (
<React.Suspense fallback={<Fallback />}>
<LazyMarkdownSimple {...props} />
</React.Suspense>
);

/** @deprecated use `Markdown` from `@kbn/shared-ux-markdown` */
const LazyMarkdown = React.lazy(() => import('./markdown'));
export const Markdown = (props: MarkdownProps) => (
<React.Suspense fallback={<Fallback />}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export interface FieldStatsProps {
'data-test-subj'?: string;
overrideMissingContent?: (params: {
element: JSX.Element;
noDataFound?: boolean;
reason: 'no-data' | 'unsupported';
}) => JSX.Element | null;
overrideFooter?: (params: {
element: JSX.Element;
Expand Down Expand Up @@ -304,7 +304,7 @@ const FieldStatsComponent: React.FC<FieldStatsProps> = ({

return overrideMissingContent
? overrideMissingContent({
noDataFound: false,
reason: 'unsupported',
element: messageNoAnalysis,
})
: messageNoAnalysis;
Expand Down Expand Up @@ -338,7 +338,7 @@ const FieldStatsComponent: React.FC<FieldStatsProps> = ({

return overrideMissingContent
? overrideMissingContent({
noDataFound: true,
reason: 'no-data',
element: messageNoData,
})
: messageNoData;
Expand All @@ -358,12 +358,14 @@ const FieldStatsComponent: React.FC<FieldStatsProps> = ({
defaultMessage: 'Top values',
}),
id: 'topValues',
'data-test-subj': `${dataTestSubject}-buttonGroup-topValuesButton`,
},
{
label: i18n.translate('unifiedFieldList.fieldStats.fieldDistributionLabel', {
defaultMessage: 'Distribution',
}),
id: 'histogram',
'data-test-subj': `${dataTestSubject}-buttonGroup-distributionButton`,
},
]}
onChange={(optionId: string) => {
Expand Down
39 changes: 26 additions & 13 deletions src/plugins/vis_types/heatmap/kibana.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
{
"id": "visTypeHeatmap",
"version": "kibana",
"ui": true,
"server": true,
"requiredPlugins": ["charts", "data", "expressions", "visualizations", "usageCollection", "fieldFormats"],
"requiredBundles": ["visDefaultEditor"],
"extraPublicDirs": ["common/index"],
"owner": {
"name": "Vis Editors",
"githubTeam": "kibana-vis-editors"
},
"description": "Contains the heatmap implementation using the elastic-charts library. The goal is to eventually deprecate the old implementation and keep only this. Until then, the library used is defined by the Legacy heatmap charts library advanced setting."
}
"id": "visTypeHeatmap",
"version": "kibana",
"ui": true,
"server": true,
"requiredPlugins": [
"charts",
"data",
"expressions",
"visualizations",
"usageCollection",
"fieldFormats",
"dataViews"
],
"requiredBundles": [
"visDefaultEditor",
"kibanaUtils"
],
"extraPublicDirs": [
"common/index"
],
"owner": {
"name": "Vis Editors",
"githubTeam": "kibana-vis-editors"
},
"description": "Contains the heatmap implementation using the elastic-charts library. The goal is to eventually deprecate the old implementation and keep only this. Until then, the library used is defined by the Legacy heatmap charts library advanced setting."
}
Loading

0 comments on commit 83652ea

Please sign in to comment.