Remove Explorer.databaseAccount (#717)

Co-authored-by: Steve Faulkner <southpolesteve@gmail.com>
This commit is contained in:
Hardikkumar Nai
2021-05-06 03:24:50 +05:30
committed by GitHub
parent fdd12b41c4
commit 8c05ac740c
67 changed files with 1077 additions and 1046 deletions

View File

@@ -54,8 +54,7 @@ export class ScaleComponent extends React.Component<ScaleComponentProps> {
}
public isAutoScaleEnabled = (): boolean => {
const accountCapabilities: DataModels.Capability[] = this.props.container?.databaseAccount()?.properties
?.capabilities;
const accountCapabilities: DataModels.Capability[] = userContext?.databaseAccount?.properties?.capabilities;
const enableAutoScaleCapability =
accountCapabilities &&
accountCapabilities.find((capability: DataModels.Capability) => {
@@ -170,7 +169,7 @@ export class ScaleComponent extends React.Component<ScaleComponentProps> {
private getThroughputInputComponent = (): JSX.Element => (
<ThroughputInputAutoPilotV3Component
databaseAccount={this.props.container.databaseAccount()}
databaseAccount={userContext?.databaseAccount}
databaseName={this.databaseId}
collectionName={this.collectionId}
throughput={this.props.throughput}
@@ -199,8 +198,7 @@ export class ScaleComponent extends React.Component<ScaleComponentProps> {
);
private isFreeTierAccount(): boolean {
const databaseAccount = this.props.container?.databaseAccount();
return databaseAccount?.properties?.enableFreeTier;
return userContext?.databaseAccount?.properties?.enableFreeTier;
}
private getFreeTierInfoMessage(): JSX.Element {