michael-s-molina commented on a change in pull request #19078:
URL: https://github.com/apache/superset/pull/19078#discussion_r824084959



##########
File path: superset/views/core.py
##########
@@ -1978,6 +2005,23 @@ def dashboard(
             ),
         )
 
+    @has_access
+    @expose("/dashboard/p/<key>/", methods=["GET"])
+    def dashboard_permalink(  # pylint: disable=no-self-use
+        self, key: str,
+    ) -> FlaskResponse:
+        key_type = config["PERMALINK_KEY_TYPE"]
+        filter_state = GetDashboardPermalinkCommand(g.user, key, 
key_type).run()
+        if not filter_state:
+            return json_error_response(_("permanent link state not found"), 
status=404)
+        hash_ = filter_state.get("hash")
+        id_or_slug = filter_state["id_or_slug"]
+        url = f"/superset/dashboard/{id_or_slug}?permalink_state_key={key}"
+        if hash_:
+            url = f"{url}#{hash_}"
+        return redirect(url)
+        # return self.dashboard(dashboard_id_or_slug=str(10), 
filter_state=filter_state)

Review comment:
       ```suggestion
   ```




-- 
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-unsubscr...@superset.apache.org

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



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

Reply via email to