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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to