From 9e1544e9c40df60e348344a5c55cbca78b462408 Mon Sep 17 00:00:00 2001 From: Vadim Ogievetsky Date: Wed, 11 Sep 2024 08:43:00 -0700 Subject: [PATCH] Fix maxRowsInMemory default for streaming (#17028) * fix maxRowsInMemory * fix button css --- web-console/src/components/auto-form/auto-form.tsx | 6 ++++-- .../src/druid-models/ingestion-spec/ingestion-spec.tsx | 2 +- web-console/src/entry.scss | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/web-console/src/components/auto-form/auto-form.tsx b/web-console/src/components/auto-form/auto-form.tsx index 91282d971b6..4c51d2cbf5a 100644 --- a/web-console/src/components/auto-form/auto-form.tsx +++ b/web-console/src/components/auto-form/auto-form.tsx @@ -57,7 +57,7 @@ export interface Field { | 'json' | 'interval' | 'custom'; - defaultValue?: any; + defaultValue?: Functor; emptyValue?: any; suggestions?: Functor; placeholder?: Functor; @@ -131,7 +131,9 @@ export class AutoForm> extends React.PureComponent const required = AutoForm.evaluateFunctor(field.required, model, false); return { required, - defaultValue: required ? undefined : field.defaultValue, + defaultValue: required + ? undefined + : AutoForm.evaluateFunctor(field.defaultValue, model as any, undefined), modelValue: deepGet(model as any, field.name), }; } diff --git a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx index 45f84c8a809..65a7ed3b6c4 100644 --- a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx +++ b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx @@ -2045,7 +2045,7 @@ const TUNING_FORM_FIELDS: Field[] = [ { name: 'spec.tuningConfig.maxRowsInMemory', type: 'number', - defaultValue: 1000000, + defaultValue: (spec: IngestionSpec) => (isStreamingSpec(spec) ? 150000 : 1000000), info: <>Used in determining when intermediate persists to disk should occur., }, { diff --git a/web-console/src/entry.scss b/web-console/src/entry.scss index 1304f2aa350..c980decba1e 100644 --- a/web-console/src/entry.scss +++ b/web-console/src/entry.scss @@ -64,6 +64,11 @@ body { } } +// Make segmented control buttons appear blue when they are primary +.#{$bp-ns}-segmented-control > .#{$bp-ns}-button.#{$bp-ns}-small.#{$bp-ns}-intent-primary { + color: $blue5; +} + // Prevent popover menus from being longer than 45% of available height, let them scroll instead .#{$bp-ns}-popover-content > .#{$bp-ns}-menu { max-height: 47vh;