diff --git a/panoramix/__init__.py b/panoramix/__init__.py
index 25a90e3c5f93..ca909882ed73 100644
--- a/panoramix/__init__.py
+++ b/panoramix/__init__.py
@@ -20,11 +20,11 @@
class MyIndexView(IndexView):
- index_template = 'refactor/index.html'
+ index_template = 'panoramix/featured_datasets.html'
appbuilder = AppBuilder(
app, db.session,
- base_template='refactor/base.html',
+ base_template='panoramix/base.html',
indexview=MyIndexView,
security_manager_class=app.config.get("CUSTOM_SECURITY_MANAGER"))
diff --git a/panoramix/assets/html/base.html b/panoramix/assets/html/base.html
deleted file mode 100644
index 006b74d1cce6..000000000000
--- a/panoramix/assets/html/base.html
+++ /dev/null
@@ -1,45 +0,0 @@
-{% extends 'appbuilder/init.html' %}
-{% import 'appbuilder/baselib.html' as baselib %}
-
-{% block head_css %}
- {{super()}}
-
-
-
-
-
-
-{% endblock %}
-
-{% block body %}
- {% include 'appbuilder/general/confirm.html' %}
- {% include 'appbuilder/general/alert.html' %}
-
- {% block navbar %}
-
+ |
{{ dataset.table_name }}{{ utils.markdown(dataset.description) | safe }} @@ -34,13 +34,13 @@{{ dataset.table_name }}{% block head_css %} {{ super() }} - + {% endblock %} {% block tail_js %} {{ super() }} - - + + - - - + + + {% endblock %} diff --git a/panoramix/templates/panoramix/viz.html b/panoramix/templates/panoramix/viz.html deleted file mode 100644 index 5a6b0bc721db..000000000000 --- a/panoramix/templates/panoramix/viz.html +++ /dev/null @@ -1,27 +0,0 @@ -{% if viz.form_data.get("json") == "true" %} - {{ viz.get_json() }} -{% else %} - - {% if viz.request.args.get("standalone") == "true" %} - {% extends 'panoramix/standalone.html' %} - {% else %} - {% extends 'panoramix/explore.html' %} - {% endif %} - - - {% block head_css %} - {{super()}} - {% for css in viz.css_files %} - - {% endfor %} - {% endblock %} - - - {% block tail %} - {{super()}} - {% for js in viz.js_files %} - - {% endfor %} - {% endblock %} - -{% endif %} diff --git a/panoramix/views.py b/panoramix/views.py index cb9b6ad20f05..5c3d5764f330 100644 --- a/panoramix/views.py +++ b/panoramix/views.py @@ -150,7 +150,8 @@ def pre_update(self, db): class TableModelView(PanoramixModelView, DeleteMixin): datamodel = SQLAInterface(models.SqlaTable) list_columns = [ - 'table_link', 'database', 'sql_link', 'changed_by_', 'changed_on_'] + 'table_link', 'database', 'sql_link', 'is_featured', + 'changed_by_', 'changed_on_'] add_columns = ['table_name', 'database', 'default_endpoint', 'offset'] edit_columns = [ 'table_name', 'is_featured', 'database', 'description', 'owner', @@ -705,10 +706,16 @@ def show_traceback(self): @expose("/featured_datasets", methods=['GET']) def featured_datasets(self): session = db.session() - datasets_sqla = (session.query(models.SqlaTable) - .filter_by(is_featured=True).all()) - datasets_druid = (session.query(models.DruidDatasource) - .filter_by(is_featured=True).all()) + datasets_sqla = ( + session.query(models.SqlaTable) + .filter_by(is_featured=True) + .all() + ) + datasets_druid = ( + session.query(models.DruidDatasource) + .filter_by(is_featured=True) + .all() + ) featured_datasets = datasets_sqla + datasets_druid return self.render_template( 'panoramix/featured_datasets.html', |