fixed through setTimeout

This commit is contained in:
nishthaAhujaa 2025-05-07 17:15:24 +05:30
parent 2fa95a281e
commit 919a344d1e

View File

@ -202,6 +202,8 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({
const showRetrySettings = const showRetrySettings =
(userContext.apiType === "SQL" || userContext.apiType === "Tables" || userContext.apiType === "Gremlin") && (userContext.apiType === "SQL" || userContext.apiType === "Tables" || userContext.apiType === "Gremlin") &&
!isEmulator; !isEmulator;
const showRegionSelection = userContext.apiType === "SQL" && userContext.authType === AuthType.AAD && !isFabric();
const showQueryTimeout = userContext.apiType === "SQL" && !isEmulator;
const shouldShowGraphAutoVizOption = userContext.apiType === "Gremlin" && !isEmulator; const shouldShowGraphAutoVizOption = userContext.apiType === "Gremlin" && !isEmulator;
const shouldShowCrossPartitionOption = userContext.apiType !== "Gremlin" && !isEmulator; const shouldShowCrossPartitionOption = userContext.apiType !== "Gremlin" && !isEmulator;
const shouldShowParallelismOption = userContext.apiType !== "Gremlin" && !isEmulator; const shouldShowParallelismOption = userContext.apiType !== "Gremlin" && !isEmulator;
@ -406,28 +408,62 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({
} }
setIsExecuting(false); setIsExecuting(false);
logConsoleInfo( setTimeout(() => {
`Updated items per page setting to ${LocalStorageUtility.getEntryNumber(StorageKey.ActualItemPerPage)}`, shouldShowQueryPageOptions &&
); logConsoleInfo(
logConsoleInfo(`${crossPartitionQueryEnabled ? "Enabled" : "Disabled"} cross-partition query feed option`); `Updated items per page setting to ${LocalStorageUtility.getEntryNumber(StorageKey.ActualItemPerPage)}`,
logConsoleInfo( );
`Updated the max degree of parallelism query feed option to ${LocalStorageUtility.getEntryNumber(
StorageKey.MaxDegreeOfParellism,
)}`,
);
logConsoleInfo(`Updated priority level setting to ${LocalStorageUtility.getEntryString(StorageKey.PriorityLevel)}`);
if (shouldShowGraphAutoVizOption) { showEnableEntraIdRbac &&
logConsoleInfo( logConsoleInfo(
`Graph result will be displayed as ${ `Updated Enable Entra ID RBAC to ${LocalStorageUtility.hasItem(StorageKey.DataPlaneRbacEnabled)}`,
LocalStorageUtility.getEntryBoolean(StorageKey.IsGraphAutoVizDisabled) ? "JSON" : "Graph" );
}`,
); showRegionSelection && logConsoleInfo(`Updated region ${AppStateComponentNames.SelectedRegionalEndpoint}`);
}
showQueryTimeout &&
(() => {
logConsoleInfo(`${queryTimeout ? "Enabled" : "Disabled"} query timeout`);
logConsoleInfo(
ruThresholdEnabled
? `RU Limit is ${LocalStorageUtility.getEntryNumber(StorageKey.RUThreshold)} units`
: "RU limit disabled",
);
logConsoleInfo(
`Updated default query result view ${LocalStorageUtility.getEntryString(
StorageKey.DefaultQueryResultsView,
)}`,
);
})();
showRetrySettings &&
logConsoleInfo(`Updated retry attempts ${LocalStorageUtility.getEntryNumber(StorageKey.RetryAttempts)}`);
!isEmulator && logConsoleInfo(`${containerPaginationEnabled ? "Enabled" : "Disabled"} container pagination`);
shouldShowCrossPartitionOption &&
logConsoleInfo(`${crossPartitionQueryEnabled ? "Enabled" : "Disabled"} cross-partition query feed option`);
shouldShowParallelismOption &&
logConsoleInfo(
`Updated the max degree of parallelism query feed option to ${LocalStorageUtility.getEntryNumber(
StorageKey.MaxDegreeOfParellism,
)}`,
);
shouldShowPriorityLevelOption &&
logConsoleInfo(
`Updated priority level setting to ${LocalStorageUtility.getEntryString(StorageKey.PriorityLevel)}`,
);
shouldShowGraphAutoVizOption &&
logConsoleInfo(
`Graph result will be displayed as ${
LocalStorageUtility.getEntryBoolean(StorageKey.IsGraphAutoVizDisabled) ? "JSON" : "Graph"
}`,
);
}, 0);
logConsoleInfo(
`Updated query setting to ${LocalStorageUtility.getEntryString(StorageKey.SetPartitionKeyUndefined)}`,
);
refreshExplorer && (await explorer.refreshExplorer()); refreshExplorer && (await explorer.refreshExplorer());
closeSidePanel(); closeSidePanel();
}; };
@ -688,7 +724,7 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({
</AccordionPanel> </AccordionPanel>
</AccordionItem> </AccordionItem>
)} )}
{userContext.apiType === "SQL" && userContext.authType === AuthType.AAD && !isFabric() && ( {showRegionSelection && (
<AccordionItem value="3"> <AccordionItem value="3">
<AccordionHeader> <AccordionHeader>
<div className={styles.header}>Region Selection</div> <div className={styles.header}>Region Selection</div>
@ -718,7 +754,7 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({
</AccordionPanel> </AccordionPanel>
</AccordionItem> </AccordionItem>
)} )}
{userContext.apiType === "SQL" && !isEmulator && ( {showQueryTimeout && (
<> <>
<AccordionItem value="4"> <AccordionItem value="4">
<AccordionHeader> <AccordionHeader>