You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/04/01 12:09:33 UTC

[GitHub] [incubator-superset] dpgaspar opened a new pull request #9435: [dashboards] New, tittle and slug OR filter

dpgaspar opened a new pull request #9435: [dashboards] New, tittle and slug OR filter
URL: https://github.com/apache/incubator-superset/pull/9435
 
 
   ### CATEGORY
   
   - [ ] Bug Fix
   - [X] Enhancement (new features, refinement)
   - [ ] Refactor
   - [ ] Add tests
   - [ ] Build / Development Environment
   - [ ] Documentation
   
   ### SUMMARY
   Add a custom filter to dashboards so that it's possible to filter by dashboard tittle and slug at the same time. This is a requirement for future dashboard list view design. Requires FAB 2.3.2 still on RC1
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   ### REVIEWERS
   @nytai 

----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #9435: [dashboards] New, tittle and slug OR filter

Posted by GitBox <gi...@apache.org>.
dpgaspar commented on a change in pull request #9435: [dashboards] New, tittle and slug OR filter
URL: https://github.com/apache/incubator-superset/pull/9435#discussion_r404250181
 
 

 ##########
 File path: superset/dashboards/filters.py
 ##########
 @@ -23,6 +24,20 @@
 from superset.views.base import BaseFilter, get_user_roles
 
 
+class DashboardTitleOrSlugFilter(BaseFilter):  # pylint: disable=too-few-public-methods
+    name = _("Title or Slug")
+    arg_name = "title_or_slug"
+
+    def apply(self, query, value):
+        ilike_value = f"%{value}%"
 
 Review comment:
   Good point! `None` will not get accepted since the query parameters are schema validated

----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io edited a comment on issue #9435: [dashboards] New, tittle and slug OR filter

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #9435: [dashboards] New, tittle and slug OR filter
URL: https://github.com/apache/incubator-superset/pull/9435#issuecomment-607219297
 
 
   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=h1) Report
   > Merging [#9435](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/a9ff51bd6133559c71a43318f46c80e0fe913618&el=desc) will **decrease** coverage by `0.24%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9435/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9435      +/-   ##
   ==========================================
   - Coverage   59.01%   58.77%   -0.25%     
   ==========================================
     Files         378      385       +7     
     Lines       12167    12229      +62     
     Branches     3008     3020      +12     
   ==========================================
   + Hits         7180     7187       +7     
   - Misses       4806     4858      +52     
   - Partials      181      184       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset-frontend/src/explore/controlUtils.js](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29udHJvbFV0aWxzLmpz) | `89.36% <0.00%> (-0.86%)` | :arrow_down: |
   | [superset-frontend/src/SqlLab/reducers/sqlLab.js](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9yZWR1Y2Vycy9zcWxMYWIuanM=) | `35.39% <0.00%> (ø)` | |
   | [...et-frontend/src/explore/controlPanels/sections.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29udHJvbFBhbmVscy9zZWN0aW9ucy5qc3g=) | `100.00% <0.00%> (ø)` | |
   | [...et-frontend/src/explore/reducers/exploreReducer.js](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvZXhwbG9yZVJlZHVjZXIuanM=) | `25.00% <0.00%> (ø)` | |
   | [...-frontend/src/explore/controlPanels/DeckScatter.js](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29udHJvbFBhbmVscy9EZWNrU2NhdHRlci5qcw==) | `0.00% <0.00%> (ø)` | |
   | [...-frontend/src/explore/reducers/saveModalReducer.js](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvc2F2ZU1vZGFsUmVkdWNlci5qcw==) | `0.00% <0.00%> (ø)` | |
   | [...rontend/src/visualizations/FilterBox/FilterBox.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL0ZpbHRlckJveC9GaWx0ZXJCb3guanN4) | `5.08% <0.00%> (ø)` | |
   | [...nd/src/explore/components/ExploreViewContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9FeHBsb3JlVmlld0NvbnRhaW5lci5qc3g=) | `46.47% <0.00%> (ø)` | |
   | [.../src/explore/components/ControlPanelsContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9Db250cm9sUGFuZWxzQ29udGFpbmVyLmpzeA==) | `66.66% <0.00%> (ø)` | |
   | [...explore/components/controls/ColorPickerControl.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9Db2xvclBpY2tlckNvbnRyb2wuanN4) | `85.00% <0.00%> (ø)` | |
   | ... and [9 more](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=footer). Last update [a9ff51b...db93b2b](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io commented on issue #9435: [dashboards] New, tittle and slug OR filter

Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #9435: [dashboards] New, tittle and slug OR filter
URL: https://github.com/apache/incubator-superset/pull/9435#issuecomment-607219297
 
 
   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=h1) Report
   > Merging [#9435](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/a9ff51bd6133559c71a43318f46c80e0fe913618&el=desc) will **not change** coverage by `%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9435/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=tree)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #9435   +/-   ##
   =======================================
     Coverage   59.01%   59.01%           
   =======================================
     Files         378      378           
     Lines       12167    12167           
     Branches     3008     3008           
   =======================================
     Hits         7180     7180           
     Misses       4806     4806           
     Partials      181      181           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=footer). Last update [a9ff51b...17885f9](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #9435: [dashboards] New, tittle and slug OR filter

Posted by GitBox <gi...@apache.org>.
dpgaspar commented on a change in pull request #9435: [dashboards] New, tittle and slug OR filter
URL: https://github.com/apache/incubator-superset/pull/9435#discussion_r404248463
 
 

 ##########
 File path: setup.py
 ##########
 @@ -76,7 +76,7 @@ def get_git_sha():
         "croniter>=0.3.28",
         "cryptography>=2.4.2",
         "flask>=1.1.0, <2.0.0",
-        "flask-appbuilder>=2.3.1, <2.4.0",
+        "flask-appbuilder==2.3.2rc1",
 
 Review comment:
   I actually want to revert this before changing and after flask-appbuilder 2.3.2 is out

----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] willbarrett commented on a change in pull request #9435: [dashboards] New, tittle and slug OR filter

Posted by GitBox <gi...@apache.org>.
willbarrett commented on a change in pull request #9435: [dashboards] New, tittle and slug OR filter
URL: https://github.com/apache/incubator-superset/pull/9435#discussion_r401790613
 
 

 ##########
 File path: superset/dashboards/filters.py
 ##########
 @@ -23,6 +24,19 @@
 from superset.views.base import BaseFilter, get_user_roles
 
 
+class DashboardTitleOrSlugFilter(BaseFilter):  # pylint: disable=too-few-public-methods
+    name = _("Title or Slug")
+    arg_name = "title_or_slug"
+
+    def apply(self, query, value):
+        return query.filter(
+            or_(
+                Dashboard.dashboard_title.ilike(value + "%"),
 
 Review comment:
   Should there be `%` at the beginning of these filters as well?

----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #9435: [dashboards] New, tittle and slug OR filter

Posted by GitBox <gi...@apache.org>.
dpgaspar commented on a change in pull request #9435: [dashboards] New, tittle and slug OR filter
URL: https://github.com/apache/incubator-superset/pull/9435#discussion_r404248463
 
 

 ##########
 File path: setup.py
 ##########
 @@ -76,7 +76,7 @@ def get_git_sha():
         "croniter>=0.3.28",
         "cryptography>=2.4.2",
         "flask>=1.1.0, <2.0.0",
-        "flask-appbuilder>=2.3.1, <2.4.0",
+        "flask-appbuilder==2.3.2rc1",
 
 Review comment:
   I actually want to revert this before changing and after flask-appbuolder 2.3.2 is out

----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #9435: [dashboards] New, tittle and slug OR filter

Posted by GitBox <gi...@apache.org>.
dpgaspar commented on a change in pull request #9435: [dashboards] New, tittle and slug OR filter
URL: https://github.com/apache/incubator-superset/pull/9435#discussion_r404250181
 
 

 ##########
 File path: superset/dashboards/filters.py
 ##########
 @@ -23,6 +24,20 @@
 from superset.views.base import BaseFilter, get_user_roles
 
 
+class DashboardTitleOrSlugFilter(BaseFilter):  # pylint: disable=too-few-public-methods
+    name = _("Title or Slug")
+    arg_name = "title_or_slug"
+
+    def apply(self, query, value):
+        ilike_value = f"%{value}%"
 
 Review comment:
   Good point!

----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] dpgaspar merged pull request #9435: [dashboards] New, tittle and slug OR filter

Posted by GitBox <gi...@apache.org>.
dpgaspar merged pull request #9435: [dashboards] New, tittle and slug OR filter
URL: https://github.com/apache/incubator-superset/pull/9435
 
 
   

----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io edited a comment on issue #9435: [dashboards] New, tittle and slug OR filter

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #9435: [dashboards] New, tittle and slug OR filter
URL: https://github.com/apache/incubator-superset/pull/9435#issuecomment-607219297
 
 
   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=h1) Report
   > Merging [#9435](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/a9ff51bd6133559c71a43318f46c80e0fe913618&el=desc) will **decrease** coverage by `0.00%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9435/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9435      +/-   ##
   ==========================================
   - Coverage   59.01%   59.01%   -0.01%     
   ==========================================
     Files         378      383       +5     
     Lines       12167    12191      +24     
     Branches     3008     3014       +6     
   ==========================================
   + Hits         7180     7194      +14     
   - Misses       4806     4813       +7     
   - Partials      181      184       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset-frontend/src/explore/controlUtils.js](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29udHJvbFV0aWxzLmpz) | `89.36% <0.00%> (-0.86%)` | :arrow_down: |
   | [superset-frontend/src/SqlLab/reducers/sqlLab.js](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9yZWR1Y2Vycy9zcWxMYWIuanM=) | `35.39% <0.00%> (ø)` | |
   | [...et-frontend/src/explore/controlPanels/sections.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29udHJvbFBhbmVscy9zZWN0aW9ucy5qc3g=) | `100.00% <0.00%> (ø)` | |
   | [...et-frontend/src/explore/reducers/exploreReducer.js](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvZXhwbG9yZVJlZHVjZXIuanM=) | `25.00% <0.00%> (ø)` | |
   | [...-frontend/src/explore/controlPanels/DeckScatter.js](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29udHJvbFBhbmVscy9EZWNrU2NhdHRlci5qcw==) | `0.00% <0.00%> (ø)` | |
   | [...-frontend/src/explore/reducers/saveModalReducer.js](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvc2F2ZU1vZGFsUmVkdWNlci5qcw==) | `0.00% <0.00%> (ø)` | |
   | [...rontend/src/visualizations/FilterBox/FilterBox.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL0ZpbHRlckJveC9GaWx0ZXJCb3guanN4) | `5.08% <0.00%> (ø)` | |
   | [...nd/src/explore/components/ExploreViewContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9FeHBsb3JlVmlld0NvbnRhaW5lci5qc3g=) | `46.47% <0.00%> (ø)` | |
   | [.../src/explore/components/ControlPanelsContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9Db250cm9sUGFuZWxzQ29udGFpbmVyLmpzeA==) | `66.66% <0.00%> (ø)` | |
   | [...explore/components/controls/ColorPickerControl.jsx](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9Db2xvclBpY2tlckNvbnRyb2wuanN4) | `85.00% <0.00%> (ø)` | |
   | ... and [7 more](https://codecov.io/gh/apache/incubator-superset/pull/9435/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=footer). Last update [a9ff51b...46d2004](https://codecov.io/gh/apache/incubator-superset/pull/9435?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #9435: [dashboards] New, tittle and slug OR filter

Posted by GitBox <gi...@apache.org>.
dpgaspar commented on a change in pull request #9435: [dashboards] New, tittle and slug OR filter
URL: https://github.com/apache/incubator-superset/pull/9435#discussion_r403974511
 
 

 ##########
 File path: superset/dashboards/filters.py
 ##########
 @@ -23,6 +24,19 @@
 from superset.views.base import BaseFilter, get_user_roles
 
 
+class DashboardTitleOrSlugFilter(BaseFilter):  # pylint: disable=too-few-public-methods
+    name = _("Title or Slug")
+    arg_name = "title_or_slug"
+
+    def apply(self, query, value):
+        return query.filter(
+            or_(
+                Dashboard.dashboard_title.ilike(value + "%"),
 
 Review comment:
   Good idea, changed it

----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] nytai commented on a change in pull request #9435: [dashboards] New, tittle and slug OR filter

Posted by GitBox <gi...@apache.org>.
nytai commented on a change in pull request #9435: [dashboards] New, tittle and slug OR filter
URL: https://github.com/apache/incubator-superset/pull/9435#discussion_r404249388
 
 

 ##########
 File path: superset/dashboards/filters.py
 ##########
 @@ -23,6 +24,20 @@
 from superset.views.base import BaseFilter, get_user_roles
 
 
+class DashboardTitleOrSlugFilter(BaseFilter):  # pylint: disable=too-few-public-methods
+    name = _("Title or Slug")
+    arg_name = "title_or_slug"
+
+    def apply(self, query, value):
+        ilike_value = f"%{value}%"
 
 Review comment:
   we may want to handle `None` or `''` cases here and not apply the filter. I think running an `ilike %%` can be very slow on some dbs. I can handle these cases before issuing the request, however we may want some protection via the api. 

----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] nytai commented on a change in pull request #9435: [dashboards] New, tittle and slug OR filter

Posted by GitBox <gi...@apache.org>.
nytai commented on a change in pull request #9435: [dashboards] New, tittle and slug OR filter
URL: https://github.com/apache/incubator-superset/pull/9435#discussion_r404244709
 
 

 ##########
 File path: setup.py
 ##########
 @@ -76,7 +76,7 @@ def get_git_sha():
         "croniter>=0.3.28",
         "cryptography>=2.4.2",
         "flask>=1.1.0, <2.0.0",
-        "flask-appbuilder>=2.3.1, <2.4.0",
+        "flask-appbuilder==2.3.2rc1",
 
 Review comment:
   nice, this makes more sense

----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org