When opening scale and settings, refresh databases

This commit is contained in:
Asier Isayas
2025-12-30 12:20:20 -05:00
parent 459b2c7050
commit 44de3ade5c
5 changed files with 24 additions and 10 deletions

View File

@@ -437,13 +437,14 @@ export default class Explorer {
public onRefreshResourcesClick = async (): Promise<void> => {
if (isFabricMirroredKey()) {
scheduleRefreshFabricToken(true).then(() => this.refreshAllDatabases());
return;
} else {
await (userContext.authType === AuthType.ResourceToken
? this.refreshDatabaseForResourceToken()
: this.refreshAllDatabases());
await this.refreshNotebookList();
}
await (userContext.authType === AuthType.ResourceToken
? this.refreshDatabaseForResourceToken()
: this.refreshAllDatabases());
await this.refreshNotebookList();
logConsoleInfo("Successfully refreshed databases");
};
// Facade

View File

@@ -599,6 +599,16 @@ export default class Collection implements ViewModels.Collection {
useSelectedNode.getState().setSelectedNode(this);
const throughputCap = userContext.databaseAccount?.properties.capacity?.totalThroughputLimit;
throughputCap && throughputCap !== -1 ? await useDatabases.getState().loadAllOffers() : await this.loadOffer();
// if (throughputCap && throughputCap !== -1) {
// try {
// await useDatabases.getState().loadAllOffers();
// } catch {
// console.log("Fail quietly");
// return;
// }
// } else {
// await this.loadOffer();
// }
this.selectedSubnodeKind(ViewModels.CollectionTabKind.Settings);
TelemetryProcessor.trace(Action.SelectItem, ActionModifiers.Mark, {
description: "Settings node",