Remove Explorer.isPreferredAPIMongo (#557)

Co-authored-by: hardiknai-techm <HN00734461@TechMahindra.com>
This commit is contained in:
Steve Faulkner
2021-04-27 20:50:01 -05:00
committed by GitHub
parent 8f3cb7282b
commit 5a019eb431
23 changed files with 64 additions and 116 deletions

View File

@@ -118,11 +118,6 @@ export default class Explorer {
* Use userContext.apiType instead
* */
public defaultExperience: ko.Observable<string>;
/**
* @deprecated
* Compare a string with userContext.apiType instead: userContext.apiType === "Mongo"
* */
public isPreferredApiMongoDB: ko.Computed<boolean>;
public isFixedCollectionWithSharedThroughputSupported: ko.Computed<boolean>;
/**
* @deprecated
@@ -409,27 +404,6 @@ export default class Explorer {
) !== undefined
);
this.isPreferredApiMongoDB = ko.computed(() => {
const defaultExperience = (this.defaultExperience && this.defaultExperience()) || "";
if (defaultExperience.toLowerCase() === Constants.DefaultAccountExperience.MongoDB.toLowerCase()) {
return true;
}
if (defaultExperience.toLowerCase() === Constants.DefaultAccountExperience.ApiForMongoDB.toLowerCase()) {
return true;
}
if (
this.databaseAccount &&
this.databaseAccount() &&
this.databaseAccount().kind.toLowerCase() === Constants.AccountKind.MongoDB
) {
return true;
}
return false;
});
this.isEnableMongoCapabilityPresent = ko.computed(() => {
const capabilities = this.databaseAccount && this.databaseAccount()?.properties?.capabilities;
if (!capabilities) {