Skip to content

Commit 474f718

Browse files
Merge branch 'master' of github.com:elastic/kibana into chore/security-use-global-time-hook
# Conflicts: # x-pack/plugins/security_solution/public/common/components/top_n/index.tsx # x-pack/plugins/security_solution/public/common/components/top_n/top_n.tsx # x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx # x-pack/plugins/security_solution/public/overview/components/signals_by_category/index.tsx
2 parents 888234c + c96d9b4 commit 474f718

255 files changed

Lines changed: 7297 additions & 1994 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.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
"@babel/plugin-transform-modules-commonjs": "^7.10.1",
124124
"@babel/register": "^7.10.1",
125125
"@elastic/apm-rum": "^5.2.0",
126-
"@elastic/charts": "19.6.3",
126+
"@elastic/charts": "19.7.0",
127127
"@elastic/datemath": "5.0.3",
128128
"@elastic/ems-client": "7.9.3",
129129
"@elastic/eui": "24.1.0",

packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ afterAll(async () => {
6363
await del(TMP_DIR);
6464
});
6565

66-
it('builds expected bundles, saves bundle counts to metadata', async () => {
66+
// FLAKY: https://github.com/elastic/kibana/issues/70762
67+
it.skip('builds expected bundles, saves bundle counts to metadata', async () => {
6768
const config = OptimizerConfig.create({
6869
repoRoot: MOCK_REPO_DIR,
6970
pluginScanDirs: [Path.resolve(MOCK_REPO_DIR, 'plugins')],
@@ -167,7 +168,8 @@ it('builds expected bundles, saves bundle counts to metadata', async () => {
167168
`);
168169
});
169170

170-
it('uses cache on second run and exist cleanly', async () => {
171+
// FLAKY: https://github.com/elastic/kibana/issues/70764
172+
it.skip('uses cache on second run and exist cleanly', async () => {
171173
const config = OptimizerConfig.create({
172174
repoRoot: MOCK_REPO_DIR,
173175
pluginScanDirs: [Path.resolve(MOCK_REPO_DIR, 'plugins')],

packages/kbn-ui-shared-deps/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"kbn:watch": "node scripts/build --dev --watch"
1010
},
1111
"dependencies": {
12-
"@elastic/charts": "19.6.3",
12+
"@elastic/charts": "19.7.0",
1313
"@elastic/eui": "24.1.0",
1414
"@elastic/numeral": "^2.5.0",
1515
"@kbn/i18n": "1.0.0",

src/plugins/es_ui_shared/public/forms/form_wizard/form_wizard_context.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { WithMultiContent, useMultiContentContext, HookProps } from '../multi_co
2323

2424
export interface Props<T extends object> {
2525
onSave: (data: T) => void | Promise<void>;
26-
children: JSX.Element | JSX.Element[];
26+
children: JSX.Element | Array<JSX.Element | null | false>;
2727
isEditing?: boolean;
2828
defaultActiveStep?: number;
2929
defaultValue?: HookProps<T>['defaultValue'];

src/plugins/es_ui_shared/public/forms/multi_content/multi_content_context.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function useMultiContentContext<T extends object = { [key: string]: any }
5454
*
5555
* @param contentId The content id to be added to the "contents" map
5656
*/
57-
export function useContent<T extends object = { [key: string]: any }>(contentId: keyof T) {
57+
export function useContent<T extends object, K extends keyof T>(contentId: K) {
5858
const { updateContentAt, saveSnapshotAndRemoveContent, getData } = useMultiContentContext<T>();
5959

6060
const updateContent = useCallback(
@@ -71,8 +71,11 @@ export function useContent<T extends object = { [key: string]: any }>(contentId:
7171
};
7272
}, [contentId, saveSnapshotAndRemoveContent]);
7373

74+
const data = getData();
75+
const defaultValue = data[contentId];
76+
7477
return {
75-
defaultValue: getData()[contentId]!,
78+
defaultValue,
7679
updateContent,
7780
getData,
7881
};

src/plugins/es_ui_shared/public/forms/multi_content/use_multi_content.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ export function useMultiContent<T extends object>({
150150
* Validate the multi-content active content(s) in the DOM
151151
*/
152152
const validate = useCallback(async () => {
153+
if (Object.keys(contents.current).length === 0) {
154+
return Boolean(validation.isValid);
155+
}
156+
153157
const updatedValidation = {} as { [key in keyof T]?: boolean | undefined };
154158

155159
for (const [id, _content] of Object.entries(contents.current)) {

src/plugins/es_ui_shared/public/index.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* In the future, each top level folder should be exported like that to avoid naming collision
2323
*/
2424
import * as Forms from './forms';
25+
import * as Monaco from './monaco';
2526

2627
export { JsonEditor, OnJsonEditorUpdateHandler } from './components/json_editor';
2728

@@ -53,10 +54,6 @@ export {
5354
expandLiteralStrings,
5455
} from './console_lang';
5556

56-
import * as Monaco from './monaco';
57-
58-
export { Monaco };
59-
6057
export {
6158
AuthorizationContext,
6259
AuthorizationProvider,
@@ -69,7 +66,7 @@ export {
6966
useAuthorizationContext,
7067
} from './authorization';
7168

72-
export { Forms };
69+
export { Monaco, Forms };
7370

7471
/** dummy plugin, we just want esUiShared to have its own bundle */
7572
export function plugin() {

src/plugins/es_ui_shared/static/forms/helpers/field_validators/is_json.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ import { ValidationFunc } from '../../hook_form_lib';
2121
import { isJSON } from '../../../validators/string';
2222
import { ERROR_CODE } from './types';
2323

24-
export const isJsonField = (message: string) => (
25-
...args: Parameters<ValidationFunc>
26-
): ReturnType<ValidationFunc<any, ERROR_CODE>> => {
24+
export const isJsonField = (
25+
message: string,
26+
{ allowEmptyString = false }: { allowEmptyString?: boolean } = {}
27+
) => (...args: Parameters<ValidationFunc>): ReturnType<ValidationFunc<any, ERROR_CODE>> => {
2728
const [{ value }] = args;
2829

29-
if (typeof value !== 'string') {
30+
if (typeof value !== 'string' || (allowEmptyString && value.trim() === '')) {
3031
return;
3132
}
3233

2.71 MB
Loading

src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export interface TutorialSchema {
8282
name: string;
8383
isBeta?: boolean;
8484
shortDescription: string;
85-
euiIconType?: IconType; // EUI icon type string, one of https://elastic.github.io/eui/#/icon;
85+
euiIconType?: IconType; // EUI icon type string, one of https://elastic.github.io/eui/#/display/icons;
8686
longDescription: string;
8787
completionTimeMinutes?: number;
8888
previewImagePath?: string;

0 commit comments

Comments
 (0)