chen-ABC opened a new issue #13524:
URL: https://github.com/apache/superset/issues/13524


   I created a new table
   ```
   class PrometheusBusinessMetrics(Model, AuditMixinNullable):
   
   
       __tablename__ = "prometheus_business_metrics"
   
       id = Column(Integer, primary_key=True)
       name = Column(String(100))
       labels = Column(Text)
       value = Column(BigInteger)
       time = Column(BigInteger)
       time_expiry = Column(BigInteger)
   
       def __repr__(self) -> str:
           return self.name or str(self.id)
   ```
   and created an API file
   ```
   class PrometheusBusinessMetricsApi(BaseSupersetModelRestApi):
       datamodel = SQLAInterface(PrometheusBusinessMetrics)
       resource_name = "prometheus_business_metrics"
       allow_browser_login = True
       openapi_spec_tag = "PrometheusBusinessMetrics"
       include_route_methods = RouteMethod.REST_MODEL_VIEW_CRUD_SET
   
       @expose("/chart_add_bootstrap_data", methods=["GET"])
       @has_access
       @permission_name("get")
       def get_chart_add_bootstrap_data(self):
           return ""
   ```
   run `superset init` cmd , But the database does not add the corresponding 
view menu
   
   
![image](https://user-images.githubusercontent.com/30097790/110441564-e22e6900-80f4-11eb-83b7-f0c1284ce6c4.png)
   
   What should I do?
   
   ### Environment
   
   (please complete the following information):
   
   - superset version: `0.38`
   - python version: `3.7.9`
   - node.js version: `v12.18.3`
   
   


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



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

Reply via email to