Skip to content

Use auto-form for add an edit lookups#9587

Merged
vogievetsky merged 13 commits intoapache:masterfrom
implydata:add-auto-form-to-lookups
Apr 8, 2020
Merged

Use auto-form for add an edit lookups#9587
vogievetsky merged 13 commits intoapache:masterfrom
implydata:add-auto-form-to-lookups

Conversation

@mcbrewster
Copy link
Copy Markdown
Contributor

@mcbrewster mcbrewster commented Mar 30, 2020

Screen Shot 2020-04-02 at 1 14 38 AM

The lookup 'spec json input has been replace with an auto form the capture the type and the map for the auto form. You cannot submit a lookup unless it has a type and that the map is an object composed of key value pairs where the value is of type string.

@lgtm-com
Copy link
Copy Markdown

lgtm-com Bot commented Mar 30, 2020

This pull request introduces 1 alert when merging 4c3385b into fa5da66 - view on LGTM.com

new alerts:

  • 1 for Unreachable statement

{
name: 'extractionNamespace.pollPeriod',
type: 'string',
label: 'Poll Period',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

caps?

(lookupSpec.type === 'cachedNamespace' && lookupSpec.extractionNamespace === undefined);

if (!disableSubmit && lookupSpec.type === 'cachedNamespace' && lookupSpec.extractionNamespace) {
const namespaceParseSpec = lookupSpec.extractionNamespace.namespaceParseSpec;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you extract his whole check into a function please?

name: 'extractionNamespace.connectorConfig.user',
type: 'string',
label: 'User',
info: 'Defines the user too be used by the connector config',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: to

name: 'extractionNamespace.connectorConfig.password',
type: 'string',
label: 'Password',
info: 'Defines the password too be used by the connector config',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

<br />
SELECT keyColumn, valueColumn, tsColumn? FROM namespace.<strong>table</strong> WHERE
filter
</p>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of <br> it is better to use multiple <p>s like so:

<>
        <p>
          The table which contains the key value pairs. This will become the table value in the SQL
          query:
          </p>
          <p>
          SELECT keyColumn, valueColumn, tsColumn? FROM namespace.<strong>table</strong> WHERE
          filter
        </p>
</>

{
name: 'extractionNamespace.filter',
type: 'string',
label: 'Filter',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a placeholder of '(optional)' that is the convention that I've been using in several places.

@vogievetsky
Copy link
Copy Markdown
Contributor

Thank you for responding to all the feedback!

@vogievetsky vogievetsky merged commit 6f3d403 into apache:master Apr 8, 2020
@vogievetsky vogievetsky deleted the add-auto-form-to-lookups branch April 8, 2020 23:35
JulianJaffePinterest pushed a commit to JulianJaffePinterest/druid that referenced this pull request Jun 12, 2020
* use auto form

* jest -u

* fix unreachable statment

* complete the owl

* jest -u

* remove changes to query-view

* fix permissions

* add test, fix info

* add cool highlights

* fix formatting

* fix capitalization

* add optional placeholder

* add space
@clintropolis clintropolis added this to the 0.19.0 milestone Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants