You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by cw...@apache.org on 2019/12/24 07:01:56 UTC

[druid] branch 0.17.0-incubating updated: Web console: fix spec reset (#9081) (#9095)

This is an automated email from the ASF dual-hosted git repository.

cwylie pushed a commit to branch 0.17.0-incubating
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/0.17.0-incubating by this push:
     new fe24402  Web console: fix spec reset (#9081) (#9095)
fe24402 is described below

commit fe24402b3fac5c498a816868f7b2f22a67742349
Author: Clint Wylie <cw...@apache.org>
AuthorDate: Mon Dec 23 23:01:46 2019 -0800

    Web console: fix spec reset (#9081) (#9095)
    
    * extract spec type
    
    * better text
    
    * better copy
    
    * de incubate the console
    
    * fix status dialog scss
    
    Co-authored-by: Vadim Ogievetsky <va...@gmail.com>
---
 .../__snapshots__/header-bar.spec.tsx.snap         |  2 +-
 .../__snapshots__/about-dialog.spec.tsx.snap       |  2 +-
 .../src/dialogs/about-dialog/about-dialog.tsx      |  4 +--
 ...coordinator-dynamic-config-dialog.spec.tsx.snap |  2 +-
 .../overload-dynamic-config-dialog.spec.tsx.snap   |  2 +-
 .../__snapshots__/retention-dialog.spec.tsx.snap   |  2 +-
 .../__snapshots__/status-dialog.spec.tsx.snap      |  6 ++--
 .../src/dialogs/status-dialog/status-dialog.scss   | 32 ++++++++++++++++++----
 .../src/dialogs/status-dialog/status-dialog.tsx    | 20 +++++++-------
 web-console/src/utils/ingestion-spec.tsx           |  3 +-
 web-console/src/variables.ts                       |  2 +-
 .../src/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 4ae640b..97b32dc 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`] = `
           />
           <Blueprint3.MenuItem
             disabled={false}
-            href="https://druid.apache.org/docs/0.16.0-incubating"
+            href="https://druid.apache.org/docs/0.17.0"
             icon="th"
             multiline={false}
             popoverProps={Object {}}
diff --git a/web-console/src/dialogs/about-dialog/__snapshots__/about-dialog.spec.tsx.snap b/web-console/src/dialogs/about-dialog/__snapshots__/about-dialog.spec.tsx.snap
index 6b5f30e..5c60bfd 100644
--- a/web-console/src/dialogs/about-dialog/__snapshots__/about-dialog.spec.tsx.snap
+++ b/web-console/src/dialogs/about-dialog/__snapshots__/about-dialog.spec.tsx.snap
@@ -76,7 +76,7 @@ exports[`about dialog matches snapshot 1`] = `
         >
           <p>
             <strong>
-              Apache Druid (incubating) is a high performance real-time analytics database.
+              Apache Druid is a high performance real-time analytics database.
             </strong>
           </p>
           <p>
diff --git a/web-console/src/dialogs/about-dialog/about-dialog.tsx b/web-console/src/dialogs/about-dialog/about-dialog.tsx
index 4c5f862..57e7721 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
     >
       <div className={Classes.DIALOG_BODY}>
         <p>
-          <strong>
-            Apache Druid (incubating) is a high performance real-time analytics database.
-          </strong>
+          <strong>Apache Druid is a high performance real-time analytics database.</strong>
         </p>
         <p>
           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 c5a54ea..9c4ee3d 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
              
             <a
-              href="https://druid.apache.org/docs/0.16.0-incubating/configuration/index.html#dynamic-configuration"
+              href="https://druid.apache.org/docs/0.17.0/configuration/index.html#dynamic-configuration"
               rel="noopener noreferrer"
               target="_blank"
             >
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 ad3005a..e4ece12 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
              
             <a
-              href="https://druid.apache.org/docs/0.16.0-incubating/configuration/index.html#overlord-dynamic-configuration"
+              href="https://druid.apache.org/docs/0.17.0/configuration/index.html#overlord-dynamic-configuration"
               rel="noopener noreferrer"
               target="_blank"
             >
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 91e767a..f80fdc0 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
              
             <a
-              href="https://druid.apache.org/docs/0.16.0-incubating/operations/rule-configuration.html"
+              href="https://druid.apache.org/docs/0.17.0/operations/rule-configuration.html"
               rel="noopener noreferrer"
               target="_blank"
             >
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 a33124b..d201577 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`] = `
           </button>
         </div>
         <div
-          class="status-dialog-main-area"
+          class="bp3-dialog-body"
         >
           <div
             class="loader"
@@ -93,7 +93,7 @@ exports[`status dialog matches snapshot 1`] = `
           class="bp3-dialog-footer"
         >
           <div
-            class="viewRawButton"
+            class="view-raw-button"
           >
             <button
               class="bp3-button bp3-minimal"
@@ -107,7 +107,7 @@ exports[`status dialog matches snapshot 1`] = `
             </button>
           </div>
           <div
-            class="closeButton"
+            class="close-button"
           >
             <button
               class="bp3-button bp3-intent-primary"
diff --git a/web-console/src/dialogs/status-dialog/status-dialog.scss b/web-console/src/dialogs/status-dialog/status-dialog.scss
index 5c5950c..fbda269 100644
--- a/web-console/src/dialogs/status-dialog/status-dialog.scss
+++ b/web-console/src/dialogs/status-dialog/status-dialog.scss
@@ -27,10 +27,27 @@ $side-bar-width: 120px;
     margin-top: 5vh;
     top: 5%;
     width: 60vw;
-    max-height: 95vh;
-    .status-dialog-main-area {
-      padding: 10px;
-      overflow: auto;
+    height: 90vh;
+
+    .bp3-dialog-body {
+      position: relative;
+
+      .main-container {
+        position: absolute;
+        width: 100%;
+        height: 100%;
+
+        .version {
+          padding: 0 3px;
+        }
+
+        .ReactTable {
+          position: absolute;
+          width: 100%;
+          top: 25px;
+          bottom: 0;
+        }
+      }
     }
 
     .bp3-dialog-footer {
@@ -38,12 +55,15 @@ $side-bar-width: 120px;
       display: inline;
       overflow: auto;
       white-space: nowrap;
-      .viewRawButton {
+
+      .view-raw-button {
         float: left;
       }
-      .closeButton {
+
+      .close-button {
         float: right;
       }
+
       .footer-actions-left {
         position: absolute;
         left: $side-bar-width;
diff --git a/web-console/src/dialogs/status-dialog/status-dialog.tsx b/web-console/src/dialogs/status-dialog/status-dialog.tsx
index f42e059..b444ce2 100644
--- a/web-console/src/dialogs/status-dialog/status-dialog.tsx
+++ b/web-console/src/dialogs/status-dialog/status-dialog.tsx
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-import { Button, Classes, Dialog, FormGroup, InputGroup, Intent } from '@blueprintjs/core';
+import { Button, Classes, Dialog, Intent } from '@blueprintjs/core';
 import axios from 'axios';
 import React from 'react';
 import ReactTable, { Filter } from 'react-table';
@@ -83,10 +83,10 @@ export class StatusDialog extends React.PureComponent<StatusDialogProps, StatusD
 
     if (response) {
       return (
-        <>
-          <FormGroup label="Version" labelFor="version" inline>
-            <InputGroup id="version" defaultValue={response.version} readOnly />
-          </FormGroup>
+        <div className="main-container">
+          <div className="version">
+            Version:&nbsp;<strong>{response.version}</strong>
+          </div>
           <ReactTable
             data={response.modules}
             columns={[
@@ -113,7 +113,7 @@ export class StatusDialog extends React.PureComponent<StatusDialogProps, StatusD
             filterable
             defaultFilterMethod={StatusDialog.anywhereMatcher}
           />
-        </>
+        </div>
       );
     }
 
@@ -124,17 +124,17 @@ export class StatusDialog extends React.PureComponent<StatusDialogProps, StatusD
     const { onClose } = this.props;
 
     return (
-      <Dialog className={'status-dialog'} onClose={onClose} isOpen title="Status">
-        <div className={'status-dialog-main-area'}>{this.renderContent()}</div>
+      <Dialog className="status-dialog" onClose={onClose} isOpen title="Status">
+        <div className={Classes.DIALOG_BODY}>{this.renderContent()}</div>
         <div className={Classes.DIALOG_FOOTER}>
-          <div className="viewRawButton">
+          <div className="view-raw-button">
             <Button
               text="View raw"
               minimal
               onClick={() => window.open(UrlBaser.base(`/status`), '_blank')}
             />
           </div>
-          <div className="closeButton">
+          <div className="close-button">
             <Button text="Close" intent={Intent.PRIMARY} onClick={onClose} />
           </div>
         </div>
diff --git a/web-console/src/utils/ingestion-spec.tsx b/web-console/src/utils/ingestion-spec.tsx
index 9ce733d..d063714 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>): 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 7a79341..f018073 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 79b502f..809e71a 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<LoadDataViewProps, LoadDat
           <>
             <p>Load data accessible through HTTP(s).</p>
             <p>
-              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.
             </p>
           </>
         );
@@ -754,8 +754,8 @@ export class LoadDataView extends React.PureComponent<LoadDataViewProps, LoadDat
             </p>
             <p>Load data directly from a local file.</p>
             <p>
-              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.
             </p>
           </>
         );
@@ -779,13 +779,13 @@ export class LoadDataView extends React.PureComponent<LoadDataViewProps, LoadDat
         );
 
       case 'index_parallel:s3':
-        return <p>Load text based data from Amazon S3.</p>;
+        return <p>Load text based, orc, or parquet data from Amazon S3.</p>;
 
       case 'index_parallel:google':
-        return <p>Load text based data from the Google Blobstore.</p>;
+        return <p>Load text based, orc, or parquet data from the Google Blobstore.</p>;
 
       case 'index_parallel:hdfs':
-        return <p>Load text based data from HDFS.</p>;
+        return <p>Load text based, orc, or parquet data from HDFS.</p>;
 
       case 'kafka':
         return <p>Load streaming data in real-time from Apache Kafka.</p>;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org