From 2d9dc37c9fed72a356fc5aeb79ce057541b58ca3 Mon Sep 17 00:00:00 2001 From: Vadim Ogievetsky Date: Thu, 29 Aug 2024 09:58:15 -0700 Subject: [PATCH] Web console: expose forceSegmentSortByTime (#16967) * no force time * time UI * update menus * tweaks * dont use bp5 * nicer values * update snapshots * similar engine lables * update snaps --- docs/operations/web-console.md | 2 +- docs/tutorials/tutorial-sql-query-view.md | 4 +- web-console/src/components/index.ts | 2 +- .../__snapshots__/menu-boolean.spec.tsx.snap} | 62 ++++++- .../menu-boolean.spec.tsx} | 16 +- .../menu-boolean.tsx} | 49 ++++-- .../dimension-spec/dimension-spec.ts | 12 +- .../ingestion-spec/ingestion-spec.spec.ts | 88 ++++++++++ .../ingestion-spec/ingestion-spec.tsx | 18 ++ .../query-context/query-context.tsx | 2 + web-console/src/entry.scss | 6 + web-console/src/helpers/spec-conversion.ts | 8 + web-console/src/utils/sampler.ts | 12 +- .../views/load-data-view/load-data-view.tsx | 143 +++++++++++++--- .../schema-table/schema-table.tsx | 4 +- .../schema-step/schema-step.tsx | 33 +++- .../sql-data-loader-view.tsx | 12 ++ .../max-tasks-button.spec.tsx.snap | 24 ++- .../max-tasks-button/max-tasks-button.tsx | 31 +++- .../__snapshots__/run-panel.spec.tsx.snap | 4 +- .../workbench-view/run-panel/run-panel.tsx | 158 ++++++++++++------ 21 files changed, 570 insertions(+), 120 deletions(-) rename web-console/src/components/{menu-tristate/__snapshots__/menu-tristate.spec.tsx.snap => menu-boolean/__snapshots__/menu-boolean.spec.tsx.snap} (63%) rename web-console/src/components/{menu-tristate/menu-tristate.spec.tsx => menu-boolean/menu-boolean.spec.tsx} (78%) rename web-console/src/components/{menu-tristate/menu-tristate.tsx => menu-boolean/menu-boolean.tsx} (55%) diff --git a/docs/operations/web-console.md b/docs/operations/web-console.md index db25792d3e0a..ef1118ebc4ce 100644 --- a/docs/operations/web-console.md +++ b/docs/operations/web-console.md @@ -87,7 +87,7 @@ It is equivalent to the **Task** view in the **Ingestion** view with the filter 9. The **Preview** button appears when you enter an INSERT/REPLACE query. It runs the query inline without the INSERT/REPLACE clause and with an added LIMIT to give you a preview of the data that would be ingested if you click **Run**. The added LIMIT makes the query run faster but provides incomplete results. 10. The engine selector lets you choose which engine (API endpoint) to send a query to. By default, it automatically picks which endpoint to use based on an analysis of the query, but you can select a specific engine explicitly. You can also configure the engine specific context parameters from this menu. -11. The **Max tasks** picker appears when you have the **sql-msq-task** engine selected. It lets you configure the degree of parallelism. +11. The **Max tasks** picker appears when you have the **SQL MSQ-task** engine selected. It lets you configure the degree of parallelism. 12. The More menu (**...**) contains the following helpful tools: - **Explain SQL query** shows you the logical plan returned by `EXPLAIN PLAN FOR` for a SQL query. - **Query history** shows you previously executed queries. diff --git a/docs/tutorials/tutorial-sql-query-view.md b/docs/tutorials/tutorial-sql-query-view.md index a313c7a300c2..e51661f56b72 100644 --- a/docs/tutorials/tutorial-sql-query-view.md +++ b/docs/tutorials/tutorial-sql-query-view.md @@ -100,9 +100,9 @@ In this section you run some queries using aggregate functions and perform some ![aggregate-query](../assets/tutorial-sql-aggregate-query.png) -7. Click **Engine: auto (sql-native)** to display the engine options—**native** for native (JSON-based) queries, **sql-native** for Druid SQL queries, and **sql-msq-task** for SQL-based ingestion. +7. Click **Engine: Auto (SQL native)** to display the engine options—**Native** for native (JSON-based) queries, **SQL native** for Druid SQL queries, and **SQL MSQ-task** for SQL-based ingestion. - Select **auto** to let Druid select the most efficient engine based on your query input. + Select **Auto** to let Druid select the most efficient engine based on your query input. 8. From the engine menu you can also edit the query context and turn off some query defaults. diff --git a/web-console/src/components/index.ts b/web-console/src/components/index.ts index 42f8257b5dde..bbae88a5d438 100644 --- a/web-console/src/components/index.ts +++ b/web-console/src/components/index.ts @@ -37,8 +37,8 @@ export * from './json-collapse/json-collapse'; export * from './json-input/json-input'; export * from './learn-more/learn-more'; export * from './loader/loader'; +export * from './menu-boolean/menu-boolean'; export * from './menu-checkbox/menu-checkbox'; -export * from './menu-tristate/menu-tristate'; export * from './more-button/more-button'; export * from './plural-pair-if-needed/plural-pair-if-needed'; export * from './popover-text/popover-text'; diff --git a/web-console/src/components/menu-tristate/__snapshots__/menu-tristate.spec.tsx.snap b/web-console/src/components/menu-boolean/__snapshots__/menu-boolean.spec.tsx.snap similarity index 63% rename from web-console/src/components/menu-tristate/__snapshots__/menu-tristate.spec.tsx.snap rename to web-console/src/components/menu-boolean/__snapshots__/menu-boolean.spec.tsx.snap index d5a0f0c2e262..3fc368ecd355 100644 --- a/web-console/src/components/menu-tristate/__snapshots__/menu-tristate.spec.tsx.snap +++ b/web-console/src/components/menu-boolean/__snapshots__/menu-boolean.spec.tsx.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`MenuTristate matches snapshot false 1`] = ` +exports[`MenuBoolean matches snapshot false 1`] = `
  • `; -exports[`MenuTristate matches snapshot undefined 1`] = ` +exports[`MenuBoolean matches snapshot no undefined 1`] = `
  • +`; + +exports[`MenuBoolean matches snapshot undefined 1`] = ` +
  • + +