fix: disable domain sharding on explore view (#10787)
This commit is contained in:
parent
9bcb15091c
commit
596200528d
|
|
@ -40,7 +40,7 @@ import { addDangerToast } from '../messageToasts/actions';
|
||||||
import { logEvent } from '../logger/actions';
|
import { logEvent } from '../logger/actions';
|
||||||
import { Logger, LOG_ACTIONS_LOAD_CHART } from '../logger/LogUtils';
|
import { Logger, LOG_ACTIONS_LOAD_CHART } from '../logger/LogUtils';
|
||||||
import getClientErrorObject from '../utils/getClientErrorObject';
|
import getClientErrorObject from '../utils/getClientErrorObject';
|
||||||
import { allowCrossDomain as allowDomainSharding } from '../utils/hostNamesConfig';
|
import { allowCrossDomain as domainShardingEnabled } from '../utils/hostNamesConfig';
|
||||||
|
|
||||||
export const CHART_UPDATE_STARTED = 'CHART_UPDATE_STARTED';
|
export const CHART_UPDATE_STARTED = 'CHART_UPDATE_STARTED';
|
||||||
export function chartUpdateStarted(queryController, latestQueryFormData, key) {
|
export function chartUpdateStarted(queryController, latestQueryFormData, key) {
|
||||||
|
|
@ -106,6 +106,9 @@ const legacyChartDataRequest = async (
|
||||||
requestParams = {},
|
requestParams = {},
|
||||||
) => {
|
) => {
|
||||||
const endpointType = getLegacyEndpointType({ resultFormat, resultType });
|
const endpointType = getLegacyEndpointType({ resultFormat, resultType });
|
||||||
|
const allowDomainSharding =
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
|
domainShardingEnabled && requestParams?.dashboard_id;
|
||||||
const url = getExploreUrl({
|
const url = getExploreUrl({
|
||||||
formData,
|
formData,
|
||||||
endpointType,
|
endpointType,
|
||||||
|
|
@ -153,6 +156,9 @@ const v1ChartDataRequest = async (
|
||||||
const qs = requestParams.dashboard_id
|
const qs = requestParams.dashboard_id
|
||||||
? { dashboard_id: requestParams.dashboard_id }
|
? { dashboard_id: requestParams.dashboard_id }
|
||||||
: {};
|
: {};
|
||||||
|
const allowDomainSharding =
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
|
domainShardingEnabled && requestParams?.dashboard_id;
|
||||||
const url = getChartDataUri({
|
const url = getChartDataUri({
|
||||||
path: '/api/v1/chart/data',
|
path: '/api/v1/chart/data',
|
||||||
qs,
|
qs,
|
||||||
|
|
@ -182,7 +188,7 @@ export async function getChartDataRequest({
|
||||||
...requestParams,
|
...requestParams,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (allowDomainSharding) {
|
if (domainShardingEnabled) {
|
||||||
querySettings = {
|
querySettings = {
|
||||||
...querySettings,
|
...querySettings,
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue