Web console: fix spec reset (#9081)

* extract spec type

* better text

* better copy

* de incubate the console

* fix status dialog scss
This commit is contained in:
Vadim Ogievetsky 2019-12-23 18:23:14 -08:00 committed by Clint Wylie
parent 9ec9619143
commit 320c50d24a
12 changed files with 55 additions and 36 deletions

View File

@ -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 {}}

View File

@ -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>

View File

@ -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{' '}

View File

@ -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"
>

View File

@ -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"
>

View File

@ -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"
>

View File

@ -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"

View File

@ -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;

View File

@ -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>

View File

@ -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);

View File

@ -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';

View File

@ -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>;