From 320c50d24a1932cc7b3dfb12417f244b1defd73f Mon Sep 17 00:00:00 2001 From: Vadim Ogievetsky Date: Mon, 23 Dec 2019 18:23:14 -0800 Subject: [PATCH] Web console: fix spec reset (#9081) * extract spec type * better text * better copy * de incubate the console * fix status dialog scss --- .../__snapshots__/header-bar.spec.tsx.snap | 2 +- .../__snapshots__/about-dialog.spec.tsx.snap | 2 +- .../src/dialogs/about-dialog/about-dialog.tsx | 4 +-- ...inator-dynamic-config-dialog.spec.tsx.snap | 2 +- ...erload-dynamic-config-dialog.spec.tsx.snap | 2 +- .../retention-dialog.spec.tsx.snap | 2 +- .../__snapshots__/status-dialog.spec.tsx.snap | 6 ++-- .../dialogs/status-dialog/status-dialog.scss | 32 +++++++++++++++---- .../dialogs/status-dialog/status-dialog.tsx | 20 ++++++------ web-console/src/utils/ingestion-spec.tsx | 3 +- web-console/src/variables.ts | 2 +- .../views/load-data-view/load-data-view.tsx | 14 ++++---- 12 files changed, 55 insertions(+), 36 deletions(-) diff --git a/web-console/src/components/header-bar/__snapshots__/header-bar.spec.tsx.snap b/web-console/src/components/header-bar/__snapshots__/header-bar.spec.tsx.snap index 4ae640b6326..97b32dc319f 100644 --- a/web-console/src/components/header-bar/__snapshots__/header-bar.spec.tsx.snap +++ b/web-console/src/components/header-bar/__snapshots__/header-bar.spec.tsx.snap @@ -159,7 +159,7 @@ exports[`header bar matches snapshot 1`] = ` />

- Apache Druid (incubating) is a high performance real-time analytics database. + Apache Druid is a high performance real-time analytics database.

diff --git a/web-console/src/dialogs/about-dialog/about-dialog.tsx b/web-console/src/dialogs/about-dialog/about-dialog.tsx index 4c5f862f5c9..57e7721cc93 100644 --- a/web-console/src/dialogs/about-dialog/about-dialog.tsx +++ b/web-console/src/dialogs/about-dialog/about-dialog.tsx @@ -46,9 +46,7 @@ export const AboutDialog = React.memo(function AboutDialog(props: AboutDialogPro >

- - Apache Druid (incubating) is a high performance real-time analytics database. - + Apache Druid is a high performance real-time analytics database.

For help and support with Druid, please refer to the{' '} diff --git a/web-console/src/dialogs/coordinator-dynamic-config-dialog/__snapshots__/coordinator-dynamic-config-dialog.spec.tsx.snap b/web-console/src/dialogs/coordinator-dynamic-config-dialog/__snapshots__/coordinator-dynamic-config-dialog.spec.tsx.snap index c5a54ea9a3c..9c4ee3d2484 100644 --- a/web-console/src/dialogs/coordinator-dynamic-config-dialog/__snapshots__/coordinator-dynamic-config-dialog.spec.tsx.snap +++ b/web-console/src/dialogs/coordinator-dynamic-config-dialog/__snapshots__/coordinator-dynamic-config-dialog.spec.tsx.snap @@ -58,7 +58,7 @@ exports[`coordinator dynamic config matches snapshot 1`] = ` Edit the coordinator dynamic configuration on the fly. For more information please refer to the diff --git a/web-console/src/dialogs/overlord-dynamic-config-dialog/__snapshots__/overload-dynamic-config-dialog.spec.tsx.snap b/web-console/src/dialogs/overlord-dynamic-config-dialog/__snapshots__/overload-dynamic-config-dialog.spec.tsx.snap index ad3005a2a3c..e4ece12934f 100644 --- a/web-console/src/dialogs/overlord-dynamic-config-dialog/__snapshots__/overload-dynamic-config-dialog.spec.tsx.snap +++ b/web-console/src/dialogs/overlord-dynamic-config-dialog/__snapshots__/overload-dynamic-config-dialog.spec.tsx.snap @@ -58,7 +58,7 @@ exports[`overload dynamic config matches snapshot 1`] = ` Edit the overlord dynamic configuration on the fly. For more information please refer to the diff --git a/web-console/src/dialogs/retention-dialog/__snapshots__/retention-dialog.spec.tsx.snap b/web-console/src/dialogs/retention-dialog/__snapshots__/retention-dialog.spec.tsx.snap index 91e767ae121..f80fdc01730 100644 --- a/web-console/src/dialogs/retention-dialog/__snapshots__/retention-dialog.spec.tsx.snap +++ b/web-console/src/dialogs/retention-dialog/__snapshots__/retention-dialog.spec.tsx.snap @@ -58,7 +58,7 @@ exports[`retention dialog matches snapshot 1`] = ` Druid uses rules to determine what data should be retained in the cluster. The rules are evaluated in order from top to bottom. For more information please refer to the diff --git a/web-console/src/dialogs/status-dialog/__snapshots__/status-dialog.spec.tsx.snap b/web-console/src/dialogs/status-dialog/__snapshots__/status-dialog.spec.tsx.snap index a33124beaea..d2015778b63 100644 --- a/web-console/src/dialogs/status-dialog/__snapshots__/status-dialog.spec.tsx.snap +++ b/web-console/src/dialogs/status-dialog/__snapshots__/status-dialog.spec.tsx.snap @@ -53,7 +53,7 @@ exports[`status dialog matches snapshot 1`] = `

-
+
diff --git a/web-console/src/utils/ingestion-spec.tsx b/web-console/src/utils/ingestion-spec.tsx index 9ce733d45e5..d063714b2c5 100644 --- a/web-console/src/utils/ingestion-spec.tsx +++ b/web-console/src/utils/ingestion-spec.tsx @@ -265,7 +265,8 @@ export function normalizeSpec(spec: Partial): IngestionSpec { // Make sure that if we actually get a task payload we extract the spec if (typeof (spec as any).spec === 'object') spec = (spec as any).spec; - const specType = getSpecType(spec); + const specType = + deepGet(spec, 'type') || deepGet(spec, 'ioConfig.type') || deepGet(spec, 'tuningConfig.type'); if (!specType) return spec as IngestionSpec; if (!deepGet(spec, 'type')) spec = deepSet(spec, 'type', specType); if (!deepGet(spec, 'ioConfig.type')) spec = deepSet(spec, 'ioConfig.type', specType); diff --git a/web-console/src/variables.ts b/web-console/src/variables.ts index 7a793412099..f018073a6a2 100644 --- a/web-console/src/variables.ts +++ b/web-console/src/variables.ts @@ -17,7 +17,7 @@ */ // This is set to the latest available version and should be updated to the next version before release -export const DRUID_DOCS_VERSION = '0.16.0-incubating'; +export const DRUID_DOCS_VERSION = '0.17.0'; export const DRUID_WEBSITE = 'https://druid.apache.org'; export const DRUID_GITHUB = 'https://github.com/apache/druid'; diff --git a/web-console/src/views/load-data-view/load-data-view.tsx b/web-console/src/views/load-data-view/load-data-view.tsx index 79b502f2bbc..809e71abd54 100644 --- a/web-console/src/views/load-data-view/load-data-view.tsx +++ b/web-console/src/views/load-data-view/load-data-view.tsx @@ -740,8 +740,8 @@ export class LoadDataView extends React.PureComponent

Load data accessible through HTTP(s).

- Data must be in a text format and the HTTP(s) endpoint must be reachable by every - Druid process in the cluster. + Data must be in text, orc, or parquet format and the HTTP(s) endpoint must be + reachable by every Druid process in the cluster.

); @@ -754,8 +754,8 @@ export class LoadDataView extends React.PureComponent

Load data directly from a local file.

- Files must be in a text format and must be accessible to all the Druid processes in - the cluster. + Files must be in text, orc, or parquet format and must be accessible to all the Druid + processes in the cluster.

); @@ -779,13 +779,13 @@ export class LoadDataView extends React.PureComponentLoad text based data from Amazon S3.

; + return

Load text based, orc, or parquet data from Amazon S3.

; case 'index_parallel:google': - return

Load text based data from the Google Blobstore.

; + return

Load text based, orc, or parquet data from the Google Blobstore.

; case 'index_parallel:hdfs': - return

Load text based data from HDFS.

; + return

Load text based, orc, or parquet data from HDFS.

; case 'kafka': return

Load streaming data in real-time from Apache Kafka.

;