Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into nls/esql-autofocus
Browse files Browse the repository at this point in the history
  • Loading branch information
smith committed Sep 23, 2024
2 parents ca6d079 + a8ebc7f commit 7f631e8
Show file tree
Hide file tree
Showing 104 changed files with 5,862 additions and 660 deletions.
10 changes: 0 additions & 10 deletions packages/kbn-cli-dev-mode/src/dev_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,16 +196,6 @@ export class DevServer {
this.phase$.next('listening');
this.ready$.next(true);
}

// TODO: remove this once Pier is done migrating log rotation to KP
if (msg === 'RELOAD_LOGGING_CONFIG_FROM_SERVER_WORKER') {
// When receive that event from server worker
// forward a reloadLoggingConfig message to parent
// and child proc. This is only used by LogRotator service
// when the cluster mode is enabled
process.emit('message' as any, { reloadLoggingConfig: true } as any);
proc.send({ reloadLoggingConfig: true });
}
}),
takeUntil(exit$)
);
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ async function updateRoutingAllocations(
});
}

// Failing 9.0 version update: https://github.com/elastic/kibana/issues/192624
describe.skip('incompatible_cluster_routing_allocation', () => {
describe('incompatible_cluster_routing_allocation', () => {
let client: ElasticsearchClient;
let root: Root;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ kibana_vars=(
elasticsearch.logQueries
elasticsearch.password
elasticsearch.pingTimeout
elasticsearch.publicBaseUrl
elasticsearch.requestHeadersWhitelist
elasticsearch.requestTimeout
elasticsearch.serviceAccountToken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ export function Main({ currentTabProp, isEmbeddable = false }: MainProps) {
{currentTab === HISTORY_TAB_ID && <History isVerticalLayout={isVerticalLayout} />}
{currentTab === CONFIG_TAB_ID && <Config isVerticalLayout={isVerticalLayout} />}
</EuiSplitPanel.Inner>
<EuiHorizontalRule margin="none" className="consoleVariablesBottomBar" />
<EuiHorizontalRule margin="none" />
<EuiSplitPanel.Inner
paddingSize="xs"
grow={false}
Expand Down
7 changes: 2 additions & 5 deletions src/plugins/console/public/styles/_app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@
left: 0;
bottom: 0;
right: 0;
}

.consoleVariablesBottomBar {
// Give priority to the variables bar so that it doesn't get covered by the empty prompt when in vertical layout
z-index: $euiZLevel2;
overflow: hidden;
}

.conApp__editor {
Expand Down Expand Up @@ -123,6 +119,7 @@
border-radius: $euiSizeXS;
box-shadow: 0 0 $euiSizeXS $euiSizeXS transparentize($euiShadowColor, .9);
padding-top: $euiSize * .1;
overflow-y: auto;
}

.conApp__editorActions {
Expand Down
7 changes: 6 additions & 1 deletion x-pack/packages/security/plugin_types_public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export type {
UserProfileSuggestParams,
UserProfileAPIClient,
} from './src/user_profile';
export type { RolePutPayload, RolesAPIClient } from './src/roles';
export type {
BulkUpdatePayload,
BulkUpdateRoleResponse,
RolePutPayload,
RolesAPIClient,
} from './src/roles';
export { PrivilegesAPIClientPublicContract } from './src/privileges';
export type { PrivilegesAPIClientGetAllArgs } from './src/privileges';
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface PrivilegesAPIClientGetAllArgs {
*/
respectLicenseLevel: boolean;
}
// TODO: Eyo include the proper return types for contract

export abstract class PrivilegesAPIClientPublicContract {
abstract getAll(args: PrivilegesAPIClientGetAllArgs): Promise<RawKibanaPrivileges>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@
* 2.0.
*/

export type { RolePutPayload, RolesAPIClient } from './roles_api_client';
export type {
BulkUpdatePayload,
BulkUpdateRoleResponse,
RolePutPayload,
RolesAPIClient,
} from './roles_api_client';
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,20 @@ export interface RolePutPayload {
createOnly?: boolean;
}

export interface BulkUpdatePayload {
rolesUpdate: Role[];
}

export interface BulkUpdateRoleResponse {
created?: string[];
updated?: string[];
errors?: Record<string, { type: string; reason: string }>;
}

export interface RolesAPIClient {
getRoles: () => Promise<Role[]>;
getRole: (roleName: string) => Promise<Role>;
deleteRole: (roleName: string) => Promise<void>;
saveRole: (payload: RolePutPayload) => Promise<void>;
bulkUpdateRoles: (payload: BulkUpdatePayload) => Promise<BulkUpdateRoleResponse>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import {
kibanaFeatures,
} from '@kbn/security-role-management-model/src/__fixtures__';
import { findTestSubject, mountWithIntl } from '@kbn/test-jest-helpers';
import type { Role } from '@kbn/security-plugin-types-common';

import { getDisplayedFeaturePrivileges } from './__fixtures__';
import { FeatureTable } from './feature_table';
import type { Role } from '@kbn/security-plugin-types-common';
import { PrivilegeFormCalculator } from '../privilege_form_calculator';

const createRole = (kibana: Role['kibana'] = []): Role => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ interface Props {
canCustomizeSubFeaturePrivileges: boolean;
allSpacesSelected: boolean;
disabled?: boolean;
/**
* default is true, to remain backwards compatible
*/
showTitle?: boolean;
}

interface State {
Expand All @@ -58,6 +62,7 @@ export class FeatureTable extends Component<Props, State> {
public static defaultProps = {
privilegeIndex: -1,
showLocks: true,
showTitle: true,
};

private featureCategories: Map<string, SecuredFeature[]> = new Map();
Expand Down Expand Up @@ -187,16 +192,18 @@ export class FeatureTable extends Component<Props, State> {
<div>
<EuiFlexGroup alignItems={'flexEnd'}>
<EuiFlexItem>
<EuiText size="xs">
<b>
{i18n.translate(
'xpack.security.management.editRole.featureTable.featureVisibilityTitle',
{
defaultMessage: 'Customize feature privileges',
}
)}
</b>
</EuiText>
{this.props.showTitle && (
<EuiText size="xs">
<b>
{i18n.translate(
'xpack.security.management.editRole.featureTable.featureVisibilityTitle',
{
defaultMessage: 'Customize feature privileges',
}
)}
</b>
</EuiText>
)}
</EuiFlexItem>
{!this.props.disabled && (
<EuiFlexItem grow={false}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import {
createKibanaPrivileges,
kibanaFeatures,
} from '@kbn/security-role-management-model/src/__fixtures__';
import type { Role } from '@kbn/security-plugin-types-common';
import { findTestSubject, mountWithIntl } from '@kbn/test-jest-helpers';

import { FeatureTableExpandedRow } from './feature_table_expanded_row';
import type { Role } from '@kbn/security-plugin-types-common';
import { PrivilegeFormCalculator } from '../privilege_form_calculator';

const createRole = (kibana: Role['kibana'] = []): Role => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {
createKibanaPrivileges,
kibanaFeatures,
} from '@kbn/security-role-management-model/src/__fixtures__';
import type { Role } from '@kbn/security-plugin-types-common';

import { PrivilegeFormCalculator } from './privilege_form_calculator';
import type { Role } from '@kbn/security-plugin-types-common';

const createRole = (kibana: Role['kibana'] = []): Role => {
return {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/cloud/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export interface CloudSetup {

export interface PublicElasticsearchConfigType {
/**
* The URL to the Elasticsearch cluster, derived from xpack.elasticsearch.publicBaseUrl if populated
* The URL to the Elasticsearch cluster, derived from elasticsearch.publicBaseUrl if populated
* Otherwise this is based on the cloudId
* If neither is populated, this will be undefined
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import * as Utils from '../util';
import { ensureDirSync, createSync } from '../util';
import { createAgentInput } from './agent';
import { InputType } from '../../common';

Expand All @@ -27,13 +27,13 @@ describe('createAgentInput', () => {

createAgentInput(dataStreamPath, inputTypes);

expect(Utils.ensureDirSync).toHaveBeenCalledWith(`${dataStreamPath}/agent/stream`);
expect(ensureDirSync).toHaveBeenCalledWith(`${dataStreamPath}/agent/stream`);

expect(Utils.createSync).toHaveBeenCalledWith(
expect(createSync).toHaveBeenCalledWith(
`${dataStreamPath}/agent/stream/aws-s3.yml.hbs`,
expect.any(String)
);
expect(Utils.createSync).toHaveBeenCalledWith(
expect(createSync).toHaveBeenCalledWith(
`${dataStreamPath}/agent/stream/filestream.yml.hbs`,
expect.any(String)
);
Expand All @@ -42,7 +42,7 @@ describe('createAgentInput', () => {
it('Should not create agent files if there are no input types', async () => {
createAgentInput(dataStreamPath, []);

expect(Utils.ensureDirSync).toHaveBeenCalledWith(`${dataStreamPath}/agent/stream`);
expect(Utils.createSync).not.toHaveBeenCalled();
expect(ensureDirSync).toHaveBeenCalledWith(`${dataStreamPath}/agent/stream`);
expect(createSync).not.toHaveBeenCalled();
});
});
Loading

0 comments on commit 7f631e8

Please sign in to comment.