Skip to content

Commit

Permalink
Merge branch 'main' into renovate/main-apm
Browse files Browse the repository at this point in the history
  • Loading branch information
afharo authored Jan 10, 2025
2 parents 0254a9d + baf79bc commit 809f75c
Show file tree
Hide file tree
Showing 329 changed files with 3,377 additions and 10,553 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ steps:
retry:
automatic:
- exit_status: '-1'
limit: 1
limit: 1
20 changes: 10 additions & 10 deletions oas_docs/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 oas_docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"bump-cli": "^2.8.4",
"@redocly/cli": "^1.26.0"
"@redocly/cli": "^1.27.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"@elastic/charts": "68.0.4",
"@elastic/datemath": "5.0.3",
"@elastic/ebt": "^1.1.1",
"@elastic/ecs": "^8.11.1",
"@elastic/ecs": "^8.11.5",
"@elastic/elasticsearch": "^8.16.0",
"@elastic/ems-client": "8.6.2",
"@elastic/eui": "98.2.1-borealis.2",
Expand Down Expand Up @@ -1160,7 +1160,7 @@
"icalendar": "0.7.1",
"immer": "^9.0.21",
"inquirer": "^7.3.3",
"io-ts": "^2.0.5",
"io-ts": "^2.2.22",
"ipaddr.js": "2.0.0",
"isbinaryfile": "4.0.2",
"joi": "^17.13.3",
Expand Down Expand Up @@ -1527,7 +1527,7 @@
"@octokit/rest": "^17.11.2",
"@parcel/watcher": "^2.1.0",
"@playwright/test": "1.49.0",
"@redocly/cli": "^1.26.0",
"@redocly/cli": "^1.27.0",
"@statoscope/webpack-plugin": "^5.28.2",
"@storybook/addon-a11y": "^6.5.16",
"@storybook/addon-actions": "^6.5.16",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pageLoadAssetSize:
cloudExperiments: 109746
cloudFullStory: 18493
cloudLinks: 55984
cloudSecurityPosture: 19109
cloudSecurityPosture: 19270
console: 46091
contentManagement: 16254
controls: 60000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ import { format as formatUrl } from 'url';
import Fs from 'fs';

import { CA_CERT_PATH, kibanaDevServiceAccount } from '@kbn/dev-utils';
import { defineDockerServersConfig, getDockerFileMountPath } from '@kbn/test';
import {
fleetPackageRegistryDockerImage,
defineDockerServersConfig,
getDockerFileMountPath,
} from '@kbn/test';
import { MOCK_IDP_REALM_NAME } from '@kbn/mock-idp-utils';

import { dockerImage } from '@kbn/test-suites-xpack/fleet_api_integration/config.base';
import { REPO_ROOT } from '@kbn/repo-info';
import { ScoutServerConfig } from '../../types';
import { SAML_IDP_PLUGIN_PATH, SERVERLESS_IDP_METADATA_PATH, JWKS_PATH } from '../constants';
Expand Down Expand Up @@ -55,7 +57,7 @@ export const defaultConfig: ScoutServerConfig = {
dockerServers: defineDockerServersConfig({
registry: {
enabled: !!dockerRegistryPort,
image: dockerImage,
image: fleetPackageRegistryDockerImage,
portInContainer: 8080,
port: dockerRegistryPort,
args: dockerArgs,
Expand Down
7 changes: 2 additions & 5 deletions packages/kbn-scout/src/config/stateful/base.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@ import {
MOCK_IDP_ATTRIBUTE_EMAIL,
MOCK_IDP_ATTRIBUTE_NAME,
} from '@kbn/mock-idp-utils';
import { defineDockerServersConfig } from '@kbn/test';
import { fleetPackageRegistryDockerImage, defineDockerServersConfig } from '@kbn/test';
import path from 'path';

import { MOCK_IDP_REALM_NAME } from '@kbn/mock-idp-utils';

import { dockerImage } from '@kbn/test-suites-xpack/fleet_api_integration/config.base';
import { REPO_ROOT } from '@kbn/repo-info';
import { STATEFUL_ROLES_ROOT_PATH } from '@kbn/es';
import type { ScoutServerConfig } from '../../types';
Expand Down Expand Up @@ -66,7 +63,7 @@ export const defaultConfig: ScoutServerConfig = {
dockerServers: defineDockerServersConfig({
registry: {
enabled: !!dockerRegistryPort,
image: dockerImage,
image: fleetPackageRegistryDockerImage,
portInContainer: 8080,
port: dockerRegistryPort,
args: dockerArgs,
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-scout/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"@kbn/es-archiver",
"@kbn/dev-utils",
"@kbn/mock-idp-utils",
"@kbn/test-suites-xpack",
"@kbn/test-subj-selector",
"@kbn/scout-info",
"@kbn/scout-reporting"
Expand Down
7 changes: 7 additions & 0 deletions packages/kbn-test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,10 @@ export * from './src/kbn_client';
export * from './src/find_test_plugin_paths';

export { getDockerFileMountPath } from '@kbn/es';

// Docker image to use for Fleet API integration tests.
// This image comes from the latest successful build of https://buildkite.com/elastic/kibana-package-registry-promote
// which is promoted after acceptance tests succeed against docker.elastic.co/package-registry/distribution:lite
export const fleetPackageRegistryDockerImage =
process.env.FLEET_PACKAGE_REGISTRY_DOCKER_IMAGE ||
'docker.elastic.co/kibana-ci/package-registry-distribution:lite';
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ import {
EuiPopover,
EuiPopoverTitle,
EuiSpacer,
EuiTitle,
EuiHorizontalRule,
EuiPopoverFooter,
withEuiTheme,
WithEuiThemeProps,
} from '@elastic/eui';

import type { InternalApplicationStart } from '@kbn/core-application-browser-internal';
Expand All @@ -33,6 +34,7 @@ import type {
import type { ChromeHelpMenuLink } from '@kbn/core-chrome-browser/src';
import type { DocLinksStart } from '@kbn/core-doc-links-browser';

import { css } from '@emotion/react';
import { HeaderExtension } from './header_extension';
import { isModifiedOrPrevented } from './nav_link';

Expand Down Expand Up @@ -68,7 +70,6 @@ const buildDefaultContentLinks = ({
defaultMessage: 'Open an issue in GitHub',
}),
href: docLinks.links.kibana.createGithubIssue,
iconType: 'logoGithub',
},
];

Expand All @@ -92,10 +93,10 @@ interface State {
defaultContentLinks: ChromeHelpMenuLink[];
}

export class HeaderHelpMenu extends Component<Props, State> {
class HelpMenu extends Component<Props & WithEuiThemeProps, State> {
private subscription?: Subscription;

constructor(props: Props) {
constructor(props: Props & WithEuiThemeProps) {
super(props);

this.state = {
Expand Down Expand Up @@ -136,12 +137,16 @@ export class HeaderHelpMenu extends Component<Props, State> {
}

public render() {
const { kibanaVersion } = this.props;
const { kibanaVersion, theme } = this.props;

const defaultContent = this.renderDefaultContent();
const globalCustomContent = this.renderGlobalCustomContent();
const customContent = this.renderCustomContent();

const euiThemePadding = css`
padding: ${theme.euiTheme.size.s};
`;

const button = (
<EuiHeaderSectionItemButton
aria-expanded={this.state.isOpen}
Expand Down Expand Up @@ -196,7 +201,7 @@ export class HeaderHelpMenu extends Component<Props, State> {
{defaultContent}
{customContent && (
<>
<EuiHorizontalRule margin="m" />
<EuiPopoverFooter css={euiThemePadding} />
{customContent}
</>
)}
Expand All @@ -210,40 +215,37 @@ export class HeaderHelpMenu extends Component<Props, State> {

return (
<Fragment>
{defaultContentLinks.map(
({ href, title, iconType, onClick: _onClick, dataTestSubj }, i) => {
const isLast = i === defaultContentLinks.length - 1;

if (href && _onClick) {
throw new Error(
'Only one of `href` and `onClick` should be provided for the help menu link.'
);
}

const hrefProps = href ? { href, target: '_blank' } : {};
const onClick = () => {
if (!_onClick) return;
_onClick();
this.closeMenu();
};

return (
<Fragment key={i}>
<EuiButtonEmpty
{...hrefProps}
onClick={onClick}
size="s"
flush="left"
iconType={iconType}
data-test-subj={dataTestSubj}
>
{title}
</EuiButtonEmpty>
{!isLast && <EuiSpacer size="xs" />}
</Fragment>
{defaultContentLinks.map(({ href, title, onClick: _onClick, dataTestSubj }, i) => {
const isLast = i === defaultContentLinks.length - 1;

if (href && _onClick) {
throw new Error(
'Only one of `href` and `onClick` should be provided for the help menu link.'
);
}
)}

const hrefProps = href ? { href, target: '_blank' } : {};
const onClick = () => {
if (!_onClick) return;
_onClick();
this.closeMenu();
};

return (
<Fragment key={i}>
<EuiButtonEmpty
{...hrefProps}
onClick={onClick}
size="s"
flush="left"
data-test-subj={dataTestSubj}
>
{title}
</EuiButtonEmpty>
{!isLast && <EuiSpacer size="xs" />}
</Fragment>
);
})}
</Fragment>
);
}
Expand Down Expand Up @@ -333,10 +335,9 @@ export class HeaderHelpMenu extends Component<Props, State> {

return (
<>
<EuiTitle size="xxs">
<EuiPopoverTitle>
<h3>{appName}</h3>
</EuiTitle>
<EuiSpacer size="s" />
</EuiPopoverTitle>
{customLinks}
{content && (
<>
Expand Down Expand Up @@ -402,3 +403,5 @@ const createCustomLink = (
</Fragment>
);
};

export const HeaderHelpMenu = withEuiTheme(HelpMenu);
1 change: 0 additions & 1 deletion src/core/packages/chrome/browser/src/nav_controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export interface ChromeNavControl {
export interface ChromeHelpMenuLink {
title: string;
href?: string;
iconType?: string;
onClick?: () => void;
dataTestSubj?: string;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import { isRetryableEsClientErrorMock } from './is_scripting_enabled.test.mocks';
import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import * as estypes from '@elastic/elasticsearch/lib/api/types';
import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';
import { isInlineScriptingEnabled } from './is_scripting_enabled';

Expand Down
Loading

0 comments on commit 809f75c

Please sign in to comment.