mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-05-13 20:05:57 +01:00
fixed through setTimeout
This commit is contained in:
parent
2fa95a281e
commit
919a344d1e
@ -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);
|
||||||
|
setTimeout(() => {
|
||||||
|
shouldShowQueryPageOptions &&
|
||||||
logConsoleInfo(
|
logConsoleInfo(
|
||||||
`Updated items per page setting to ${LocalStorageUtility.getEntryNumber(StorageKey.ActualItemPerPage)}`,
|
`Updated items per page setting to ${LocalStorageUtility.getEntryNumber(StorageKey.ActualItemPerPage)}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
showEnableEntraIdRbac &&
|
||||||
|
logConsoleInfo(
|
||||||
|
`Updated Enable Entra ID RBAC to ${LocalStorageUtility.hasItem(StorageKey.DataPlaneRbacEnabled)}`,
|
||||||
|
);
|
||||||
|
|
||||||
|
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`);
|
logConsoleInfo(`${crossPartitionQueryEnabled ? "Enabled" : "Disabled"} cross-partition query feed option`);
|
||||||
|
|
||||||
|
shouldShowParallelismOption &&
|
||||||
logConsoleInfo(
|
logConsoleInfo(
|
||||||
`Updated the max degree of parallelism query feed option to ${LocalStorageUtility.getEntryNumber(
|
`Updated the max degree of parallelism query feed option to ${LocalStorageUtility.getEntryNumber(
|
||||||
StorageKey.MaxDegreeOfParellism,
|
StorageKey.MaxDegreeOfParellism,
|
||||||
)}`,
|
)}`,
|
||||||
);
|
);
|
||||||
logConsoleInfo(`Updated priority level setting to ${LocalStorageUtility.getEntryString(StorageKey.PriorityLevel)}`);
|
|
||||||
|
|
||||||
if (shouldShowGraphAutoVizOption) {
|
shouldShowPriorityLevelOption &&
|
||||||
|
logConsoleInfo(
|
||||||
|
`Updated priority level setting to ${LocalStorageUtility.getEntryString(StorageKey.PriorityLevel)}`,
|
||||||
|
);
|
||||||
|
|
||||||
|
shouldShowGraphAutoVizOption &&
|
||||||
logConsoleInfo(
|
logConsoleInfo(
|
||||||
`Graph result will be displayed as ${
|
`Graph result will be displayed as ${
|
||||||
LocalStorageUtility.getEntryBoolean(StorageKey.IsGraphAutoVizDisabled) ? "JSON" : "Graph"
|
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>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user