mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
fix(viz-gallery): respect denylist in viz gallery (#22658)
This commit is contained in:
@@ -23,6 +23,7 @@ import {
|
||||
logging,
|
||||
} from '@superset-ui/core';
|
||||
import { SupersetError } from 'src/components/ErrorMessage/types';
|
||||
import getBootstrapData from 'src/utils/getBootstrapData';
|
||||
import { FeatureFlag, isFeatureEnabled } from '../featureFlags';
|
||||
import {
|
||||
getClientErrorObject,
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
config = appConfig || getBootstrapData().config;
|
||||
transport = config.GLOBAL_ASYNC_QUERIES_TRANSPORT || TRANSPORT_POLLING;
|
||||
pollingDelayMs = config.GLOBAL_ASYNC_QUERIES_POLLING_DELAY || 500;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user