You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/03/26 01:08:28 UTC

[GitHub] [druid] mcbrewster opened a new pull request #9567: fix global filter input

mcbrewster opened a new pull request #9567: fix global filter input
URL: https://github.com/apache/druid/pull/9567
 
 
   <img width="394" alt="Screen Shot 2020-03-25 at 7 03 26 PM" src="https://user-images.githubusercontent.com/37322608/77599750-57486480-6ecb-11ea-97a9-e9b7bf148734.png">
   
   Previously the filters would be applied as soon as they passed the try catch of the jsonInput component, not when the user hit apply. The user must now actually click apply for the filter to work. Additionally, I have changed it so now the jsonInput is a controlled component which will allow for the input to be reset upon clicking apply.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [druid] vogievetsky commented on a change in pull request #9567: fix global filter input

Posted by GitBox <gi...@apache.org>.
vogievetsky commented on a change in pull request #9567: fix global filter input
URL: https://github.com/apache/druid/pull/9567#discussion_r398817796
 
 

 ##########
 File path: web-console/src/views/load-data-view/load-data-view.tsx
 ##########
 @@ -2094,19 +2096,25 @@ export class LoadDataView extends React.PureComponent<LoadDataViewProps, LoadDat
           />
           <FormGroup label="Extra filter">
             <JsonInput
-              value={restFilter}
-              onChange={f => {
+              value={newFilterValue}
 
 Review comment:
   I think this should be `newFilterValue || restFilter` otherwise the filter disappears after you click Apply

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [druid] vogievetsky commented on issue #9567: fix global filter input

Posted by GitBox <gi...@apache.org>.
vogievetsky commented on issue #9567: fix global filter input
URL: https://github.com/apache/druid/pull/9567#issuecomment-610605142
 
 
   Perfect. Thank you for addressing the feedback! 👍 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [druid] mcbrewster commented on a change in pull request #9567: fix global filter input

Posted by GitBox <gi...@apache.org>.
mcbrewster commented on a change in pull request #9567: fix global filter input
URL: https://github.com/apache/druid/pull/9567#discussion_r399514506
 
 

 ##########
 File path: web-console/src/views/load-data-view/load-data-view.tsx
 ##########
 @@ -2094,19 +2096,25 @@ export class LoadDataView extends React.PureComponent<LoadDataViewProps, LoadDat
           />
           <FormGroup label="Extra filter">
             <JsonInput
-              value={restFilter}
-              onChange={f => {
+              value={newFilterValue}
 
 Review comment:
   I am manually clearing the filter by setting newFilter to undefined. I think I can just remove that. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [druid] vogievetsky commented on a change in pull request #9567: fix global filter input

Posted by GitBox <gi...@apache.org>.
vogievetsky commented on a change in pull request #9567: fix global filter input
URL: https://github.com/apache/druid/pull/9567#discussion_r401855581
 
 

 ##########
 File path: web-console/src/views/load-data-view/load-data-view.tsx
 ##########
 @@ -2116,7 +2123,12 @@ export class LoadDataView extends React.PureComponent<LoadDataViewProps, LoadDat
         <FormGroup>
           <Button
             text={`${hasGlobalFilter ? 'Edit' : 'Add'} global filter`}
-            onClick={() => this.setState({ showGlobalFilter: true })}
+            onClick={() =>
+              this.setState({
+                showGlobalFilter: true,
+                newFilterValue: deepGet(spec, 'spec.dataSchema.transformSpec.filter'),
 
 Review comment:
   you need to set this to `restFilter` from `const { restFilter } = splitFilter`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [druid] vogievetsky merged pull request #9567: fix global filter input

Posted by GitBox <gi...@apache.org>.
vogievetsky merged pull request #9567: fix global filter input
URL: https://github.com/apache/druid/pull/9567
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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