mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-06-12 23:47:29 +01:00
db share throughput acc fix
This commit is contained in:
@@ -299,12 +299,6 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
|||||||
if (this.isCollectionSettingsTab) {
|
if (this.isCollectionSettingsTab) {
|
||||||
this.refreshIndexTransformationProgress();
|
this.refreshIndexTransformationProgress();
|
||||||
this.loadMongoIndexes();
|
this.loadMongoIndexes();
|
||||||
}
|
|
||||||
|
|
||||||
this.setBaseline();
|
|
||||||
if (this.props.settingsTab.isActive()) {
|
|
||||||
useCommandBar.getState().setContextButtons(this.getTabsButtons());
|
|
||||||
}
|
|
||||||
this.unsubscribe = useIndexingPolicyStore.subscribe(
|
this.unsubscribe = useIndexingPolicyStore.subscribe(
|
||||||
() => {
|
() => {
|
||||||
this.refreshCollectionData();
|
this.refreshCollectionData();
|
||||||
@@ -313,6 +307,12 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
|||||||
);
|
);
|
||||||
this.refreshCollectionData();
|
this.refreshCollectionData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.setBaseline();
|
||||||
|
if (this.props.settingsTab.isActive()) {
|
||||||
|
useCommandBar.getState().setContextButtons(this.getTabsButtons());
|
||||||
|
}
|
||||||
|
}
|
||||||
componentWillUnmount(): void {
|
componentWillUnmount(): void {
|
||||||
if (this.unsubscribe) {
|
if (this.unsubscribe) {
|
||||||
this.unsubscribe();
|
this.unsubscribe();
|
||||||
@@ -873,8 +873,7 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
|||||||
const numberOfRegions = userContext.databaseAccount?.properties.locations?.length || 1;
|
const numberOfRegions = userContext.databaseAccount?.properties.locations?.length || 1;
|
||||||
const throughputDelta = (newThroughput - this.offer.autoscaleMaxThroughput) * numberOfRegions;
|
const throughputDelta = (newThroughput - this.offer.autoscaleMaxThroughput) * numberOfRegions;
|
||||||
if (throughputCap && throughputCap !== -1 && throughputCap - this.totalThroughputUsed < throughputDelta) {
|
if (throughputCap && throughputCap !== -1 && throughputCap - this.totalThroughputUsed < throughputDelta) {
|
||||||
throughputError = `Your account is currently configured with a total throughput limit of ${throughputCap} RU/s. This update isn't possible because it would increase the total throughput to ${
|
throughputError = `Your account is currently configured with a total throughput limit of ${throughputCap} RU/s. This update isn't possible because it would increase the total throughput to ${this.totalThroughputUsed + throughputDelta
|
||||||
this.totalThroughputUsed + throughputDelta
|
|
||||||
} RU/s. Change total throughput limit in cost management.`;
|
} RU/s. Change total throughput limit in cost management.`;
|
||||||
}
|
}
|
||||||
this.setState({ autoPilotThroughput: newThroughput, throughputError });
|
this.setState({ autoPilotThroughput: newThroughput, throughputError });
|
||||||
@@ -886,8 +885,7 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
|||||||
const numberOfRegions = userContext.databaseAccount?.properties.locations?.length || 1;
|
const numberOfRegions = userContext.databaseAccount?.properties.locations?.length || 1;
|
||||||
const throughputDelta = (newThroughput - this.offer.manualThroughput) * numberOfRegions;
|
const throughputDelta = (newThroughput - this.offer.manualThroughput) * numberOfRegions;
|
||||||
if (throughputCap && throughputCap !== -1 && throughputCap - this.totalThroughputUsed < throughputDelta) {
|
if (throughputCap && throughputCap !== -1 && throughputCap - this.totalThroughputUsed < throughputDelta) {
|
||||||
throughputError = `Your account is currently configured with a total throughput limit of ${throughputCap} RU/s. This update isn't possible because it would increase the total throughput to ${
|
throughputError = `Your account is currently configured with a total throughput limit of ${throughputCap} RU/s. This update isn't possible because it would increase the total throughput to ${this.totalThroughputUsed + throughputDelta
|
||||||
this.totalThroughputUsed + throughputDelta
|
|
||||||
} RU/s. Change total throughput limit in cost management.`;
|
} RU/s. Change total throughput limit in cost management.`;
|
||||||
}
|
}
|
||||||
this.setState({ throughput: newThroughput, throughputError });
|
this.setState({ throughput: newThroughput, throughputError });
|
||||||
|
|||||||
Reference in New Issue
Block a user