You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2023/01/10 16:04:01 UTC

[GitHub] [superset] villebro commented on a diff in pull request #22658: fix(viz-gallery): respect denylist in viz gallery

villebro commented on code in PR #22658:
URL: https://github.com/apache/superset/pull/22658#discussion_r1065967182


##########
superset-frontend/src/middleware/asyncEvent.ts:
##########
@@ -235,21 +236,7 @@ export const init = (appConfig?: AppConfig) => {
   retriesByJobId = {};
   lastReceivedEventId = null;
 
-  if (appConfig) {
-    config = appConfig;
-  } else {
-    // load bootstrap data from DOM
-    const appContainer = document.getElementById('app');
-    if (appContainer) {
-      const bootstrapData = JSON.parse(
-        appContainer?.getAttribute('data-bootstrap') || '{}',
-      );
-      config = bootstrapData?.common?.conf;
-    } else {
-      config = {};
-      logging.warn('asyncEvent: app config data not found');

Review Comment:
   Well, the weird thing is, I don't really see any situation where we would ever hit a page that doesn't have bootstrap data on it. This is related to GAQ, and GAQ is definitely always called from some place where there's bootstrap data. So I think it should be safe to remove (incidentally, I'll probably be working on GAQ soon, so I can address this later if it's really needed).



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

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


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