This is an automated email from the ASF dual-hosted git repository.

villebro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 7cb38fe  chore: remove markup from viz.py (#9997)
7cb38fe is described below

commit 7cb38fe28ba0523b2831f95f83eb85acfc5b5a1e
Author: Ville Brofeldt <33317356+ville...@users.noreply.github.com>
AuthorDate: Wed Jun 10 07:49:09 2020 +0300

    chore: remove markup from viz.py (#9997)
---
 superset/viz.py       | 30 ------------------------------
 superset/viz_sip38.py | 30 ------------------------------
 2 files changed, 60 deletions(-)

diff --git a/superset/viz.py b/superset/viz.py
index 90d89eb..a8b1abc 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -794,36 +794,6 @@ class PivotTableViz(BaseViz):
         )
 
 
-class MarkupViz(BaseViz):
-
-    """Use html or markdown to create a free form widget"""
-
-    viz_type = "markup"
-    verbose_name = _("Markup")
-    is_timeseries = False
-
-    def query_obj(self) -> QueryObjectDict:
-        return {}
-
-    def get_df(self, query_obj: Optional[QueryObjectDict] = None) -> 
pd.DataFrame:
-        return pd.DataFrame()
-
-    def get_data(self, df: pd.DataFrame) -> VizData:
-        markup_type = self.form_data.get("markup_type")
-        code = self.form_data.get("code", "")
-        if markup_type == "markdown":
-            code = markdown(code)
-        return dict(html=code, theme_css=get_manifest_files("theme", "css"))
-
-
-class SeparatorViz(MarkupViz):
-
-    """Use to create section headers in a dashboard, similar to `Markup`"""
-
-    viz_type = "separator"
-    verbose_name = _("Separator")
-
-
 class TreemapViz(BaseViz):
 
     """Tree map visualisation for hierarchical data."""
diff --git a/superset/viz_sip38.py b/superset/viz_sip38.py
index 32df001..b1a3b77 100644
--- a/superset/viz_sip38.py
+++ b/superset/viz_sip38.py
@@ -832,36 +832,6 @@ class PivotTableViz(BaseViz):
         )
 
 
-class MarkupViz(BaseViz):
-
-    """Use html or markdown to create a free form widget"""
-
-    viz_type = "markup"
-    verbose_name = _("Markup")
-    is_timeseries = False
-
-    def query_obj(self):
-        return None
-
-    def get_df(self, query_obj: Optional[Dict[str, Any]] = None) -> 
pd.DataFrame:
-        return pd.DataFrame()
-
-    def get_data(self, df: pd.DataFrame) -> VizData:
-        markup_type = self.form_data.get("markup_type")
-        code = self.form_data.get("code", "")
-        if markup_type == "markdown":
-            code = markdown(code)
-        return dict(html=code, theme_css=get_manifest_files("theme", "css"))
-
-
-class SeparatorViz(MarkupViz):
-
-    """Use to create section headers in a dashboard, similar to `Markup`"""
-
-    viz_type = "separator"
-    verbose_name = _("Separator")
-
-
 class TreemapViz(BaseViz):
 
     """Tree map visualisation for hierarchical data."""

Reply via email to