Fix scale tab not showing the correct throughput mode and value and remove freetierautoscalethroughput feature flag (#1245)

This commit is contained in:
victor-meng
2022-03-31 12:13:08 -07:00
committed by GitHub
parent 06f6df83ad
commit 2e3e547a46
10 changed files with 28 additions and 39 deletions

View File

@@ -1,5 +1,3 @@
import { userContext } from "UserContext";
export const autoPilotThroughput1K = 1000;
export const autoPilotIncrementStep = 1000;
export const autoPilotThroughput4K = 4000;
@@ -8,10 +6,7 @@ export function isValidAutoPilotThroughput(maxThroughput: number): boolean {
if (!maxThroughput) {
return false;
}
const minAutoPilotThroughput = userContext.features.freetierAutoscaleThroughput
? autoPilotThroughput4K
: autoPilotThroughput1K;
if (maxThroughput < minAutoPilotThroughput) {
if (maxThroughput < autoPilotThroughput1K) {
return false;
}
if (maxThroughput % 1000) {