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 2021/09/28 20:56:15 UTC

[GitHub] [superset] akettmann-e24 opened a new issue #16879: [1.3.0] [FAB] Installing flask-appbuilder addon does not create new menu

akettmann-e24 opened a new issue #16879:
URL: https://github.com/apache/superset/issues/16879


   Reference: https://github.com/akettmann-e24/superset_ticket_example for environment
   
   Working to get familiar with how to extend/change superset, ran into problems getting a new menu to actually show up in the application. The addon works on stock FAB, but once I bring in superset, the endpoint gets defined, but the menu does not seem to be created. 
   
   AddonManager code:
   ```python
   class MyAddOnManager(BaseManager):
       def __init__(self, appbuilder):
           """
           Use the constructor to setup any config keys specific for your app.
           """
           super(MyAddOnManager, self).__init__(appbuilder)
   
       def register_views(self):
           """
           This method is called by AppBuilder when initializing, use it to add you views
           """
           self.appbuilder: "AppBuilder"
           self.appbuilder.add_view(
               MyView,
               "MyView",
               category="MyAddonCategory",
               category_label="MyAddonCategory",
               category_icon="air-freshener",
           )
   
       def pre_process(self):
           pass
   
       def post_process(self):
           pass
   ```
   
   #### How to reproduce the bug
   1. Check out reference repo
   2. Create venv
   3. pip install -r requirements.txt
   4. Run Superset
   
   ### Expected results
   
   New menu named "MyAddonCategory" or "MyView"
   
   ### Actual results
   No new menus, however the endpoint is accessible at http://127.0.0.1:8080/myview/derpderp
   
   #### Screenshots
   
   ![no_menu](https://user-images.githubusercontent.com/50422880/135164068-a9360758-bd58-4a2b-80db-010dcafee999.png)
   
   ### Environment
   
   - browser type and version: Firefox 89.0
   - superset version: `1.3.0`
   - python version: `3.9.5`
   - node.js version: `v14.17.0`
   - any feature flags active: All Default
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [ x] I have checked the superset logs for python stacktraces and included it here as text if there are 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.
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] akettmann-e24 commented on issue #16879: [1.3.0] [FAB] Installing flask-appbuilder addon does not create new menu

Posted by GitBox <gi...@apache.org>.
akettmann-e24 commented on issue #16879:
URL: https://github.com/apache/superset/issues/16879#issuecomment-938175210


   This was a side effect of permissions. Need to ensure that when you run `superset init` you have:
   
   * Superset home/DB con defined
   * Addon is on your path, whether installed or not
   * Addon defined in your `superset_config.py` as `ADDON_MANAGERS = ["package.manager.AddonManager"]`
   
   Once these are complete and you have run superset init, the menu should appear. It was not appearing before due to permissions issues.


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] akettmann-e24 closed issue #16879: [1.3.0] [FAB] Installing flask-appbuilder addon does not create new menu

Posted by GitBox <gi...@apache.org>.
akettmann-e24 closed issue #16879:
URL: https://github.com/apache/superset/issues/16879


   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] akettmann-e24 commented on issue #16879: [1.3.0] [FAB] Installing flask-appbuilder addon does not create new menu

Posted by GitBox <gi...@apache.org>.
akettmann-e24 commented on issue #16879:
URL: https://github.com/apache/superset/issues/16879#issuecomment-938175210


   This was a side effect of permissions. Need to ensure that when you run `superset init` you have:
   
   * Superset home/DB con defined
   * Addon is on your path, whether installed or not
   * Addon defined in your `superset_config.py` as `ADDON_MANAGERS = ["package.manager.AddonManager"]`
   
   Once these are complete and you have run superset init, the menu should appear. It was not appearing before due to permissions issues.


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] akettmann-e24 closed issue #16879: [1.3.0] [FAB] Installing flask-appbuilder addon does not create new menu

Posted by GitBox <gi...@apache.org>.
akettmann-e24 closed issue #16879:
URL: https://github.com/apache/superset/issues/16879


   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org