From e092e5140ffb0b68b0426fcfe949efb83cf80c4e Mon Sep 17 00:00:00 2001 From: Deborah Chen Date: Mon, 22 Feb 2021 10:54:55 -0800 Subject: [PATCH] Fixing issue with autoscale A/B test (#442) Currently, the first time a user opens the New Container pane, the autoscale setting is not being read from the flight info. This is because the flight into is being set in resetData(), which is not called the 1st time a user opens the pane. This change adds logic to set the flight info on the open call. --- src/Explorer/Panes/AddCollectionPane.ts | 2 ++ src/Explorer/Panes/CassandraAddCollectionPane.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/Explorer/Panes/AddCollectionPane.ts b/src/Explorer/Panes/AddCollectionPane.ts index 9466f95e4..83c7ddde1 100644 --- a/src/Explorer/Panes/AddCollectionPane.ts +++ b/src/Explorer/Panes/AddCollectionPane.ts @@ -680,6 +680,8 @@ export default class AddCollectionPane extends ContextualPaneBase { this.formWarnings(""); this.databaseCreateNewShared(this.getSharedThroughputDefault()); this.shouldCreateMongoWildcardIndex(this.container.isMongoIndexingEnabled()); + this.isAutoPilotSelected(this.container.isAutoscaleDefaultEnabled()); + this.isSharedAutoPilotSelected(this.container.isAutoscaleDefaultEnabled()); if (this.isPreferredApiTable() && !databaseId) { databaseId = SharedConstants.CollectionCreation.TablesAPIDefaultDatabase; } diff --git a/src/Explorer/Panes/CassandraAddCollectionPane.ts b/src/Explorer/Panes/CassandraAddCollectionPane.ts index 837c8f5ce..a6aea9c6c 100644 --- a/src/Explorer/Panes/CassandraAddCollectionPane.ts +++ b/src/Explorer/Panes/CassandraAddCollectionPane.ts @@ -289,6 +289,7 @@ export default class CassandraAddCollectionPane extends ContextualPaneBase { public open() { super.open(); + this.isAutoPilotSelected(this.container.isAutoscaleDefaultEnabled()); const addCollectionPaneOpenMessage = { databaseAccountName: this.container.databaseAccount().name, defaultExperience: this.container.defaultExperience(),