[GitHub] goldymanikoth opened a new issue #4393: Bypassing the login for Supreset using iframe
goldymanikoth opened a new issue #4393: Bypassing the login for Supreset using iframe URL: https://github.com/apache/incubator-superset/issues/4393 Make sure these boxes are checked before submitting your issue - thank you! - [ ] I have checked the superset logs for python stacktraces and included it here as text if any - [ ] I have reproduced the issue with at least the latest released version of superset - [ ] I have checked the issue tracker for the same issue and I haven't found one similar I am using Superset version 0.22.1. I create a slice and use its iframe to embed into my webpage. When I do so, it directs me to superset login on the webpage. Is there a way I can pass the username and credentials using iframe as a parameter if yes please let me know the iframe parameter name for that? ### Superset version 0.22.1 ### Expected results bypass authentication ### Actual results asking for authentication This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] thakur00mayank opened a new pull request #3729: Added multi-tenancy support.
thakur00mayank opened a new pull request #3729: Added multi-tenancy support. URL: https://github.com/apache/incubator-superset/pull/3729 Issue: apache/incubator-superset#1089 To achieve multi-tenancy: 1. set "ENABLE_MULTI_TENANCY = True" in superset_config file. 2. add column tenant_id String(256) in the tables or views in which you want multi-tenancy. 3. if you are adding the multi-tenancy in existing project then make sure that ab_user table have the column tenant_id else alter the table. 4. if you want to enable multi-tenancy with CUSTOM_SECURITY_MANAGER, then your custom security manager class should be a subclass of MultiTenantSecurityManager class. Added the documentation for multi-tenancy. Fixed few typing errors. Also remove tenant_id from user view. Fixes few test cases and role update api to support the custom user model. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] thakur00mayank closed pull request #3729: Added multi-tenancy support.
thakur00mayank closed pull request #3729: Added multi-tenancy support. URL: https://github.com/apache/incubator-superset/pull/3729 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/.gitignore b/.gitignore index df190c8abe..9039cdd886 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ superset/assets/version_info.json # IntelliJ *.iml +venv diff --git a/docs/installation.rst b/docs/installation.rst index 8cd253b15b..8f0734bbd9 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -196,6 +196,7 @@ of the parameters you can copy / paste in that configuration module: :: SUPERSET_WORKERS = 4 SUPERSET_WEBSERVER_PORT = 8088 +ENABLE_MULTI_TENANCY = False #- #- @@ -235,6 +236,16 @@ auth postback endpoint, you can add them to *WTF_CSRF_EXEMPT_LIST* WTF_CSRF_EXEMPT_LIST = [''] +Enable Multi Tenancy +- + +To achieve multi-tenancy follow following steps: + +* set *ENABLE_MULTI_TENANCY = True* in superset_config file. +* add column *tenant_id StringDataType(256)* in the tables or views in which you want multi-tenancy. This tenant_id is the same tenant_id as in ab_user table. +* Make sure that ab_user table have the column *tenant_id* else alter the table to add column tenant_id. +* if you want to enable multi-tenancy with *CUSTOM_SECURITY_MANAGER*, then your custom security manager class should be a subclass of *MultiTenantSecurityManager* class. + Database dependencies - diff --git a/superset/__init__.py b/superset/__init__.py index 1e563031df..799e76a551 100644 --- a/superset/__init__.py +++ b/superset/__init__.py @@ -19,6 +19,7 @@ from superset.connectors.connector_registry import ConnectorRegistry from superset import utils, config # noqa +from superset.multi_tenant import MultiTenantSecurityManager APP_DIR = os.path.dirname(__file__) CONFIG_MODULE = os.environ.get('SUPERSET_CONFIG', 'superset.config') @@ -144,13 +145,22 @@ class MyIndexView(IndexView): def index(self): return redirect('/superset/welcome') +security_manager_classs = app.config.get("CUSTOM_SECURITY_MANAGER") +if app.config.get("ENABLE_MULTI_TENANCY"): +if security_manager_classs is not None and \ +not issubclass(security_manager_classs, MultiTenantSecurityManager): +print("Not using the configured CUSTOM_SECURITY_MANAGER \ +as ENABLE_MULTI_TENANCY is True and CUSTOM_SECURITY_MANAGER \ +is not subclass of MultiTenantSecurityManager.") +print("Using MultiTenantSecurityManager as AppBuilder security_manager_class.") +security_manager_classs = MultiTenantSecurityManager appbuilder = AppBuilder( app, db.session, base_template='superset/base.html', indexview=MyIndexView, -security_manager_class=app.config.get("CUSTOM_SECURITY_MANAGER")) +security_manager_class=security_manager_classs) sm = appbuilder.sm diff --git a/superset/config.py b/superset/config.py index 4a12bff149..96a69b996c 100644 --- a/superset/config.py +++ b/superset/config.py @@ -48,6 +48,9 @@ SUPERSET_WEBSERVER_PORT = 8088 SUPERSET_WEBSERVER_TIMEOUT = 60 EMAIL_NOTIFICATIONS = False +ENABLE_MULTI_TENANCY = False +# CUSTOM_SECURITY_MANAGER will not be used if ENABLE_MULTI_TENANCY +# is True and it is not a subclass of MultiTenantSecurityManager class. CUSTOM_SECURITY_MANAGER = None SQLALCHEMY_TRACK_MODIFICATIONS = False # - diff --git a/superset/multi_tenant.py b/superset/multi_tenant.py new file mode 100644 index 00..9d9dce44a0 --- /dev/null +++ b/superset/multi_tenant.py @@ -0,0 +1,37 @@ +from flask_appbuilder.security.sqla.manager import SecurityManager +from flask_appbuilder.security.sqla.models import User +from sqlalchemy import Column, Integer, ForeignKey, String, Sequence, Table +from sqlalchemy.orm import relationship, backref +from flask_appbuilder import Model +from flask_appbuilder.security.views import UserDBModelView +from flask_babel import lazy_gettext + +class MultiTenantUser(User): +tenant_id = Column(String(256)) + +class MultiTenantUserDBModelView(UserDBModelView): +show_fieldsets = [ +(lazy_gettext('User info'), + {'fields': ['username', 'active', 'roles', 'login_count', 'tenant_id']}), +(lazy_gettext('Personal Info'), + {'fields': ['first_name', 'last_name', 'email'], 'expanded': True}), +(lazy_gettext('Audit Info'), + {'fields': ['last_login', 'fail_login_count', 'created_on', + 'created_by', 'changed_on', 'changed_by'], 'expanded': False}), +] + +us
[GitHub] thakur00mayank commented on issue #3729: Added multi-tenancy support.
thakur00mayank commented on issue #3729: Added multi-tenancy support. URL: https://github.com/apache/incubator-superset/pull/3729#issuecomment-364337378 For us, it is working. Can you please tell us what steps you have taken to achieve this(please mention whether you are doing it in the existing project or new one). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] darylerwin closed issue #4392: bigquery select putting in extra "schema" in the column names.
darylerwin closed issue #4392: bigquery select putting in extra "schema" in the column names. URL: https://github.com/apache/incubator-superset/issues/4392 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] darylerwin commented on issue #4392: bigquery select putting in extra "schema" in the column names.
darylerwin commented on issue #4392: bigquery select putting in extra "schema" in the column names. URL: https://github.com/apache/incubator-superset/issues/4392#issuecomment-364316494 Deleting the "table" from superset and recreating it with dataset.tablename from the initial create fixed the issue. When I was just modifying it, it didnt clear out the column names correctly. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] darylerwin opened a new issue #4392: bigquery select putting in extra "schema" in the column names.
darylerwin opened a new issue #4392: bigquery select putting in extra "schema" in the column names. URL: https://github.com/apache/incubator-superset/issues/4392 Make sure these boxes are checked before submitting your issue - thank you! - [ ] I have checked the superset logs for python stacktraces and included it here as text if any - [ ] I have reproduced the issue with at least the latest released version of superset - [ ] I have checked the issue tracker for the same issue and I haven't found one similar ### Superset version Latest ### Expected results (google.cloud.bigquery.dbapi.exceptions.DatabaseError) [{u'reason': u'invalidQuery', u'message': u'Unrecognized name: abc at [1:12]', u'location': u'query'}] ### Actual results ### Steps to reproduce Created table. It generates what looks to be somewhat correct sql except for the schema in front of the dataset.column name in the select statement. table is defined as abc.revenue schema is left blank database is defined as bigquery://myprojectid/ It looks as thought `myschema.revenue`.`exchange_rate` would work! .. so just the extra ` ` are causing the problem. SELECT SUM(`myschema`.`revenue`.`exchange_rate`) AS `sum__exchange_rate` FROM `abc.revenue` WHERE `day` >= '2018-02-02' AND `day` <= '2018-02-09' ORDER BY `sum__exchange_rate` DESC LIMIT 5000 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mistercrunch closed pull request #4346: Add permission checks to save_or_overwrite_slice
mistercrunch closed pull request #4346: Add permission checks to save_or_overwrite_slice URL: https://github.com/apache/incubator-superset/pull/4346 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/superset/views/core.py b/superset/views/core.py index 0419c042f8..4a21947e5c 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -1179,7 +1179,12 @@ def explore(self, datasource_type, datasource_id): if action == 'overwrite' and not slice_overwrite_perm: return json_error_response( -"You don't have the rights to alter this slice", +_('You don\'t have the rights to ') + _('alter this ') + _('chart'), +status=400) + +if action == 'saveas' and not slice_add_perm: +return json_error_response( +_('You don\'t have the rights to ') + _('create a ') + _('chart'), status=400) if action in ('saveas', 'overwrite'): @@ -1287,12 +1292,28 @@ def save_or_overwrite_slice( .filter_by(id=int(request.args.get('save_to_dashboard_id'))) .one() ) + +# check edit dashboard permissions +dash_overwrite_perm = check_ownership(dash, raise_if_false=False) +if not dash_overwrite_perm: +return json_error_response( +_('You don\'t have the rights to ') + _('alter this ') + +_('dashboard'), +status=400) + flash( 'Slice [{}] was added to dashboard [{}]'.format( slc.slice_name, dash.dashboard_title), 'info') elif request.args.get('add_to_dash') == 'new': +# check create dashboard permissions +dash_add_perm = self.can_access('can_add', 'DashboardModelView') +if not dash_add_perm: +return json_error_response( +_('You don\'t have the rights to ') + _('create a ') + _('dashboard'), +status=400) + dash = models.Dashboard( dashboard_title=request.args.get('new_dashboard_name'), owners=[g.user] if g.user else []) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] raffas opened a new issue #4391: [Bug] FilterBox: An error occurred while rendering the visualization: TypeError: Cannot read property 'xxx' of undefined
raffas opened a new issue #4391: [Bug] FilterBox: An error occurred while rendering the visualization: TypeError: Cannot read property 'xxx' of undefined URL: https://github.com/apache/incubator-superset/issues/4391 Make sure these boxes are checked before submitting your issue - thank you! - [x ] I have checked the superset logs for python stacktraces and included it here as text if any - [ x] I have reproduced the issue with at least the latest released version of superset - [ x] I have checked the issue tracker for the same issue and I haven't found one similar ### Superset version 0.23rc2 ### Expected results FilterBox with Date Filter ### Actual results FilterBox not rendering. Error Message: An error occurred while rendering the visualization: TypeError: Cannot read property 'desregione' of undefined ### Steps to reproduce Create a FilterBox Slice - Use Time column to choose a date field - Select Since: infinity - Until: now - Select a dimension to group by - Select a metric - Show Date Filter - Instant Filtering Version: 0.23rc2 Cloned from the official repository and builded following the instruction described in CONTRIBUTING.md No errors in javascript console or in superset logs. Same behaviour in debug mode (superset runserver -d) and production mode. Server: Ubuntu 16.04 LTS Python: 3.5 Node: v8.9.4 Npm: 5.6.0 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ddworken-sc opened a new pull request #4390: Fix 4 security vulnerabilities
ddworken-sc opened a new pull request #4390: Fix 4 security vulnerabilities URL: https://github.com/apache/incubator-superset/pull/4390 As discussed with @mistercrunch privately, here are patches for 4 different security vulnerabilities. The fixed vulnerabilities are: 1. Code execution via yaml.load (fixed in 7e949ee) 2. Clickjacking to SQL execution in SQLLab (fixed in f113d2b) 3. XSS via chart descriptions (fixed in b6fcc22) 4. XSS via javascript link handler in markown (fixed in b6fcc22) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mistercrunch commented on issue #4386: Canada
mistercrunch commented on issue #4386: Canada URL: https://github.com/apache/incubator-superset/pull/4386#issuecomment-364281640 Ooops merge conflicts, let me know if I can help with the git workflow. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mistercrunch opened a new pull request #4389: [geo] introduce "Auto Zoom" control
mistercrunch opened a new pull request #4389: [geo] introduce "Auto Zoom" control URL: https://github.com/apache/incubator-superset/pull/4389 On geospatial visualization, checking the "Auto Zoom" control makes it such that the viewport is fitted to the data upon rendering the chart. For dashboards with region filters, the map should jump to the right position. Eventually we should enhance this to fly and ease to the position in an animated way. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ahsanshah commented on issue #4283: [FilterBox] Select single value
ahsanshah commented on issue #4283: [FilterBox] Select single value URL: https://github.com/apache/incubator-superset/issues/4283#issuecomment-364266168 This would be great. We sometimes have cases where having a multi select results in double counting values so the ability to independently configure a filterbox would match most standard BI requirements. Any workaround for this in the meantime? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rahulsingh303 commented on issue #3729: Added multi-tenancy support.
rahulsingh303 commented on issue #3729: Added multi-tenancy support. URL: https://github.com/apache/incubator-superset/pull/3729#issuecomment-364232598 I tried doing this , it doesn't work , anyone was able to do this successfully ? Idea is that , this should solve the issue of dynamic data level filtering on user login. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rahulsingh303 commented on issue #4127: How can I only authorize users to dashboards?
rahulsingh303 commented on issue #4127: How can I only authorize users to dashboards? URL: https://github.com/apache/incubator-superset/issues/4127#issuecomment-364229591 Create user and the assign roles . You can start with Gamma , and create additional roles with custom access to data source. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] graceguo-supercat closed pull request #4388: Remove permission check for frontend logging API
graceguo-supercat closed pull request #4388: Remove permission check for frontend logging API URL: https://github.com/apache/incubator-superset/pull/4388 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/superset/views/core.py b/superset/views/core.py index 65f431e6f0..8e8a95d97e 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -1978,7 +1978,6 @@ def dashboard(**kwargs): # noqa ) @api -@has_access_api @log_this @expose('/log/', methods=['POST']) def log(self): This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] SpyderRivera commented on issue #4370: Two user profile pages - let's make it one
SpyderRivera commented on issue #4370: Two user profile pages - let's make it one URL: https://github.com/apache/incubator-superset/issues/4370#issuecomment-364226090 @mistercrunch Maybe then not use `/users/userinfo` and put that information on the other page ignoring `/users/userinfo` altogether..? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] john-bodley commented on issue #4388: Remove permission check for frontend logging API
john-bodley commented on issue #4388: Remove permission check for frontend logging API URL: https://github.com/apache/incubator-superset/pull/4388#issuecomment-364224098 Note @mistercrunch for context we've been running into possible FAB race permission issues again even though we've isolated the updating of FAB permissions, via the `SUPERSET_UPDATE_PERMS` environment variable, to a single pod. Regardless given this is a logging endpoint it seems there shouldn't be any permission check. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] michellethomas commented on issue #4388: Remove permission check for frontend logging API
michellethomas commented on issue #4388: Remove permission check for frontend logging API URL: https://github.com/apache/incubator-superset/pull/4388#issuecomment-364223012 lgtm This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] graceguo-supercat opened a new pull request #4388: Remove permission check for frontend logging API
graceguo-supercat opened a new pull request #4388: Remove permission check for frontend logging API URL: https://github.com/apache/incubator-superset/pull/4388 it seems no permission check for logging. @john-bodley @mistercrunch This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] vylc opened a new issue #4387: Time filter - remove infinity for end date
vylc opened a new issue #4387: Time filter - remove infinity for end date URL: https://github.com/apache/incubator-superset/issues/4387 Default infinity to now for time filter end date. Also, time shift does not work when end date is infinity - [ ] I have checked the superset logs for python stacktraces and included it here as text if any - [ ] I have reproduced the issue with at least the latest released version of superset - [ ] I have checked the issue tracker for the same issue and I haven't found one similar ### Superset version ### Expected results ### Actual results ### Steps to reproduce This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] SpyderRivera commented on issue #4371: Mapbox isn't working on Druid
SpyderRivera commented on issue #4371: Mapbox isn't working on Druid URL: https://github.com/apache/incubator-superset/issues/4371#issuecomment-364209847 I am not using a post agg. I am using COUNT(*) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] SpyderRivera commented on issue #4371: Mapbox isn't working on Druid
SpyderRivera commented on issue #4371: Mapbox isn't working on Druid URL: https://github.com/apache/incubator-superset/issues/4371#issuecomment-364142896 ```{"status": "failed", "stacktrace": "Traceback (most recent call last):\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/viz.py\", line 276, in get_payload\ndf = self.get_df()\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/viz.py\", line 98, in get_df\nself.results = self.datasource.query(query_obj)\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/connectors/druid/models.py\", line 1145, in query\nclient=client, query_obj=query_obj, phase=2)\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/connectors/druid/models.py\", line 933, in get_query_str\nreturn self.run_query(client=client, phase=phase, **query_obj)\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/connectors/druid/models.py\", line 995, in run_query\nmetrics_dict)\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/connectors/druid/models.py\", line 892, in metrics_and_post_aggs\nif metrics_dict[metric_name].metric_type != 'postagg':\nKeyError: None\n", "cached_dttm": "2018-02-08T15:15:05", "is_cached": false, "query": "", "cache_timeout": 86400, "data": null, "error": "None", "form_data": {"show_bubbles": false, "viz_type": "world_map", "having_filters": [], "metric": "count", "since": "7 days ago", "entity": "targets_geo_country_code", "druid_time_origin": null, "country_fieldtype": "cca2", "datasource": "2__druid", "filters": [], "granularity": "one day", "secondary_metric": null, "until": "now", "max_bubble_size": "25"}, "cache_key": "a9c07ee3943383be73254cb35af81543", "annotations": []}``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] SpyderRivera commented on issue #4371: Mapbox isn't working on Druid
SpyderRivera commented on issue #4371: Mapbox isn't working on Druid URL: https://github.com/apache/incubator-superset/issues/4371#issuecomment-364142896 ``` {"status": "failed", "stacktrace": "Traceback (most recent call last):\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/viz.py\", line 276, in get_payload\ndf = self.get_df()\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/viz.py\", line 98, in get_df\nself.results = self.datasource.query(query_obj)\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/connectors/druid/models.py\", line 1145, in query\nclient=client, query_obj=query_obj, phase=2)\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/connectors/druid/models.py\", line 933, in get_query_str\nreturn self.run_query(client=client, phase=phase, **query_obj)\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/connectors/druid/models.py\", line 995, in run_query\nmetrics_dict)\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/connectors/druid/models.py\", line 892, in metrics_and_post_aggs\nif metrics_dict[metric_name].metric_type != 'postagg':\nKeyError: None\n", "cached_dttm": "2018-02-08T15:15:05", "is_cached": false, "query": "", "cache_timeout": 86400, "data": null, "error": "None", "form_data": {"show_bubbles": false, "viz_type": "world_map", "having_filters": [], "metric": "count", "since": "7 days ago", "entity": "targets_geo_country_code", "druid_time_origin": null, "country_fieldtype": "cca2", "datasource": "2__druid", "filters": [], "granularity": "one day", "secondary_metric": null, "until": "now", "max_bubble_size": "25"}, "cache_key": "a9c07ee3943383be73254cb35af81543", "annotations": []} ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] maver1ck commented on issue #4370: Two user profile pages - let's make it one
maver1ck commented on issue #4370: Two user profile pages - let's make it one URL: https://github.com/apache/incubator-superset/issues/4370#issuecomment-364198319 So idea is to merge information from /superset/profile/admin/ to /welcome ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] vylc opened a new pull request #4386: Canada
vylc opened a new pull request #4386: Canada URL: https://github.com/apache/incubator-superset/pull/4386 Adding Canada to the list of countries - geojson file This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mistercrunch commented on issue #4193: Init docker for local development environment.
mistercrunch commented on issue #4193: Init docker for local development environment. URL: https://github.com/apache/incubator-superset/pull/4193#issuecomment-364192852 I agree @brylie, I'm just wondering where it fits in the project. Anything that the maintainer can't commit to maintain should probably go under a `contrib/` folder. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mistercrunch commented on issue #4370: Two user profile pages - let's make it one
mistercrunch commented on issue #4370: Two user profile pages - let's make it one URL: https://github.com/apache/incubator-superset/issues/4370#issuecomment-364192204 `/users/userinfo/` is the page we get out of the web framework we use. It'd be hard to customize, the vision is to improve the other profile page, we should probably make it the welcome page as well. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mistercrunch commented on issue #4371: Mapbox isn't working on Druid
mistercrunch commented on issue #4371: Mapbox isn't working on Druid URL: https://github.com/apache/incubator-superset/issues/4371#issuecomment-364191648 I meant the JSON expression for your post aggregation definition, also not that you can use triple backticks for better multi line rendering on github ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mistercrunch commented on issue #4371: Mapbox isn't working on Druid
mistercrunch commented on issue #4371: Mapbox isn't working on Druid URL: https://github.com/apache/incubator-superset/issues/4371#issuecomment-364191648 I mean the JSON expression for your post aggregation definition, also not that you can use triple backticks for better multi line rendering on github ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mistercrunch commented on issue #4371: Mapbox isn't working on Druid
mistercrunch commented on issue #4371: Mapbox isn't working on Druid URL: https://github.com/apache/incubator-superset/issues/4371#issuecomment-364191648 I mean the JSON expression for your post aggregation definition, also not that you can use triple backticks for better multi line rendering on github ` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mistercrunch commented on issue #4351: use enum.Enum to rewrite querystatus
mistercrunch commented on issue #4351: use enum.Enum to rewrite querystatus URL: https://github.com/apache/incubator-superset/pull/4351#issuecomment-364191221 I just had to re-release `pydruid` because of some issue around using `Enum` conditionally in py2/py3 which tripped setuptools. I really don't think this is worth the trouble. Class attributes may take nanoseconds more to evaluate and that's fine. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mistercrunch closed pull request #4351: use enum.Enum to rewrite querystatus
mistercrunch closed pull request #4351: use enum.Enum to rewrite querystatus URL: https://github.com/apache/incubator-superset/pull/4351 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py index 6ccddbe79c..b42f060315 100644 --- a/superset/connectors/sqla/models.py +++ b/superset/connectors/sqla/models.py @@ -42,11 +42,11 @@ def query(self, query_obj): qry = qry.filter(Annotation.layer_id == query_obj['filter'][0]['val']) qry = qry.filter(Annotation.start_dttm >= query_obj['from_dttm']) qry = qry.filter(Annotation.end_dttm <= query_obj['to_dttm']) -status = QueryStatus.SUCCESS +status = QueryStatus.SUCCESS.value try: df = pd.read_sql_query(qry.statement, db.engine) except Exception as e: -status = QueryStatus.FAILED +status = QueryStatus.FAILED.value logging.exception(e) error_message = ( utils.error_msg_from_exception(e)) @@ -679,13 +679,13 @@ def _get_top_groups(self, df, dimensions): def query(self, query_obj): qry_start_dttm = datetime.now() sql = self.get_query_str(query_obj) -status = QueryStatus.SUCCESS +status = QueryStatus.SUCCESS.value error_message = None df = None try: df = self.database.get_df(sql, self.schema) except Exception as e: -status = QueryStatus.FAILED +status = QueryStatus.FAILED.value logging.exception(e) error_message = ( self.database.db_engine_spec.extract_error_message(e)) diff --git a/superset/db_engine_specs.py b/superset/db_engine_specs.py index d26f633bbd..1d73fdd626 100644 --- a/superset/db_engine_specs.py +++ b/superset/db_engine_specs.py @@ -585,7 +585,7 @@ def handle_cursor(cls, cursor, query, session): stats = polled.get('stats', {}) query = session.query(type(query)).filter_by(id=query.id).one() -if query.status == QueryStatus.STOPPED: +if query.status == QueryStatus.STOPPED.value: cursor.cancel() break @@ -914,7 +914,7 @@ def handle_cursor(cls, cursor, query, session): job_id = None while polled.operationState in unfinished_states: query = session.query(type(query)).filter_by(id=query.id).one() -if query.status == QueryStatus.STOPPED: +if query.status == QueryStatus.STOPPED.value: cursor.cancel() break diff --git a/superset/models/helpers.py b/superset/models/helpers.py index 948cf0d49e..5e60068dbc 100644 --- a/superset/models/helpers.py +++ b/superset/models/helpers.py @@ -292,7 +292,7 @@ def __init__( # noqa df, query, duration, -status=QueryStatus.SUCCESS, +status=QueryStatus.SUCCESS.value, error_message=None): self.df = df self.query = query diff --git a/superset/models/sql_lab.py b/superset/models/sql_lab.py index 44b692b915..53069b3c9c 100644 --- a/superset/models/sql_lab.py +++ b/superset/models/sql_lab.py @@ -35,7 +35,7 @@ class Query(Model): # Store the tmp table into the DB only if the user asks for it. tmp_table_name = Column(String(256)) user_id = Column(Integer, ForeignKey('ab_user.id'), nullable=True) -status = Column(String(16), default=QueryStatus.PENDING) +status = Column(String(16), default=QueryStatus.PENDING.value) tab_name = Column(String(256)) sql_editor_id = Column(String(256)) schema = Column(String(256)) diff --git a/superset/sql_lab.py b/superset/sql_lab.py index 63225f3e2d..f2faf8ae6f 100644 --- a/superset/sql_lab.py +++ b/superset/sql_lab.py @@ -100,7 +100,7 @@ def get_sql_results( sesh = get_session(not ctask.request.called_directly) query = get_query(query_id, sesh) query.error_message = str(e) -query.status = QueryStatus.FAILED +query.status = QueryStatus.FAILED.value query.tmp_table_name = None sesh.commit() raise @@ -127,7 +127,7 @@ def handle_error(msg): resolutions at: {}'.format(msg, troubleshooting_link) \ if troubleshooting_link else msg query.error_message = msg -query.status = QueryStatus.FAILED +query.status = QueryStatus.FAILED.value query.tmp_table_name = None session.commit() payload.update({ @@ -150,7 +150,6 @@ def handle_error(msg): return handle_error( 'Only `SELECT` statements can be used with the CREATE TABLE ' 'feature.') -
[GitHub] mistercrunch commented on issue #4384: Fix the bug of chord diagram shows incorrect flow from target to source
mistercrunch commented on issue #4384: Fix the bug of chord diagram shows incorrect flow from target to source URL: https://github.com/apache/incubator-superset/pull/4384#issuecomment-364189209 Mmmh. We probably need a database migration script to flip things up in people's charts. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mistercrunch opened a new issue #4385: Create an integration test around data accessibility
mistercrunch opened a new issue #4385: Create an integration test around data accessibility URL: https://github.com/apache/incubator-superset/issues/4385 In this unit test, create a set of users with different access profiles, include a set of `Gamma` users that have access to an individual table, schema or database. Assert that: * each user can only view/load the dashboards and charts that they should * each user can only modify/alter/create the dashboards and charts as expected * each user sees the proper list of dashboards / charts in the list views * ... This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mistercrunch commented on issue #4346: Add permission checks to save_or_overwrite_slice
mistercrunch commented on issue #4346: Add permission checks to save_or_overwrite_slice URL: https://github.com/apache/incubator-superset/pull/4346#issuecomment-364184601 Sorry our linter configuration is picky about `'` over `"`. As a sidenote (may be out-of-scope for this PR) we need to write a solid test suite around accessibility/security. I'll create an issue for it. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] liutgnu opened a new pull request #4384: Fix the bug of chord diagram shows incorrect flow from target to sour?????
liutgnu opened a new pull request #4384: Fix the bug of chord diagram shows incorrect flow from target to sour? URL: https://github.com/apache/incubator-superset/pull/4384 ?ce. (#3342) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] SpyderRivera commented on issue #4370: Two user profile pages - let's make it one
SpyderRivera commented on issue #4370: Two user profile pages - let's make it one URL: https://github.com/apache/incubator-superset/issues/4370#issuecomment-364145118 I would say the `/users/userinfo/` page should be linked to on `/superset/profile/admin/` as a tab. Similar to the recent activity and security & access. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] SpyderRivera commented on issue #4371: Mapbox isn't working on Druid
SpyderRivera commented on issue #4371: Mapbox isn't working on Druid URL: https://github.com/apache/incubator-superset/issues/4371#issuecomment-364142896 `{"status": "failed", "stacktrace": "Traceback (most recent call last):\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/viz.py\", line 276, in get_payload\ndf = self.get_df()\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/viz.py\", line 98, in get_df\nself.results = self.datasource.query(query_obj)\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/connectors/druid/models.py\", line 1145, in query\nclient=client, query_obj=query_obj, phase=2)\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/connectors/druid/models.py\", line 933, in get_query_str\nreturn self.run_query(client=client, phase=phase, **query_obj)\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/connectors/druid/models.py\", line 995, in run_query\nmetrics_dict)\n File \"/home/mtraylor/venv/lib/python2.7/site-packages/superset-0.21.0rc1-py2.7.egg/superset/connectors/druid/models.py\", line 892, in metrics_and_post_aggs\nif metrics_dict[metric_name].metric_type != 'postagg':\nKeyError: None\n", "cached_dttm": "2018-02-08T15:15:05", "is_cached": false, "query": "", "cache_timeout": 86400, "data": null, "error": "None", "form_data": {"show_bubbles": false, "viz_type": "world_map", "having_filters": [], "metric": "count", "since": "7 days ago", "entity": "targets_geo_country_code", "druid_time_origin": null, "country_fieldtype": "cca2", "datasource": "2__druid", "filters": [], "granularity": "one day", "secondary_metric": null, "until": "now", "max_bubble_size": "25"}, "cache_key": "a9c07ee3943383be73254cb35af81543", "annotations": []}` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] SpyderRivera commented on issue #4371: Mapbox isn't working on Druid
SpyderRivera commented on issue #4371: Mapbox isn't working on Druid URL: https://github.com/apache/incubator-superset/issues/4371#issuecomment-364140796 that doesn't come up ![screen shot 2018-02-08 at 8 09 05 am](https://user-images.githubusercontent.com/3988262/35980215-6449fd0c-0ca7-11e8-955b-4d689e75e9ff.png) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] SpyderRivera commented on issue #4371: Mapbox isn't working on Druid
SpyderRivera commented on issue #4371: Mapbox isn't working on Druid URL: https://github.com/apache/incubator-superset/issues/4371#issuecomment-364140796 that doesn't come up ![screen shot 2018-02-08 at 8 09 05 am](https://user-images.githubusercontent.com/3988262/35980215-6449fd0c-0ca7-11e8-955b-4d689e75e9ff.png) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] brylie commented on issue #4193: Init docker for local development environment.
brylie commented on issue #4193: Init docker for local development environment. URL: https://github.com/apache/incubator-superset/pull/4193#issuecomment-364105468 A `docker-compose.yml` file would be a great step to make Superset deployment easier! :-) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] xiaohanyu opened a new pull request #4383: Typo fix: dashbaord -> dashboard.
xiaohanyu opened a new pull request #4383: Typo fix: dashbaord -> dashboard. URL: https://github.com/apache/incubator-superset/pull/4383 Just some small typo fix. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] xrmx commented on issue #4355: Superset issue #4354 - Properly filter datasources
xrmx commented on issue #4355: Superset issue #4354 - Properly filter datasources URL: https://github.com/apache/incubator-superset/pull/4355#issuecomment-364044168 @maver1ck AFAIR access_tests are specfic to inviting people to access a dashboard This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] maver1ck commented on issue #4376: Landing Page for Superset
maver1ck commented on issue #4376: Landing Page for Superset URL: https://github.com/apache/incubator-superset/issues/4376#issuecomment-364034354 I think also related. https://github.com/apache/incubator-superset/issues/4370 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] FloPit closed issue #4332: Filter Box: "No Data" although filterbox slice and time series slice in dashboard have same source
FloPit closed issue #4332: Filter Box: "No Data" although filterbox slice and time series slice in dashboard have same source URL: https://github.com/apache/incubator-superset/issues/4332 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] FloPit commented on issue #4332: Filter Box: "No Data" although filterbox slice and time series slice in dashboard have same source
FloPit commented on issue #4332: Filter Box: "No Data" although filterbox slice and time series slice in dashboard have same source URL: https://github.com/apache/incubator-superset/issues/4332#issuecomment-364031902 Hi, Update: with 0.22.1, it is now working! This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services