From eddc334cb5b40aa9b54af82418653b1edf7bee4e Mon Sep 17 00:00:00 2001 From: Srinath Narayanan Date: Wed, 17 Feb 2021 12:52:47 -0800 Subject: [PATCH] mongo index editor for AAD login + hostedExplorer (#438) --- .../Controls/Settings/SettingsComponent.tsx | 13 ++++++------- test/testExplorer/TestExplorer.ts | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Explorer/Controls/Settings/SettingsComponent.tsx b/src/Explorer/Controls/Settings/SettingsComponent.tsx index 354fe5929..0d9dbe7cf 100644 --- a/src/Explorer/Controls/Settings/SettingsComponent.tsx +++ b/src/Explorer/Controls/Settings/SettingsComponent.tsx @@ -44,7 +44,6 @@ import { MongoDBCollectionResource, MongoIndex } from "../../../Utils/arm/genera import { readMongoDBCollectionThroughRP } from "../../../Common/dataAccess/readMongoDBCollection"; import { getIndexTransformationProgress } from "../../../Common/dataAccess/getIndexTransformationProgress"; import { getErrorMessage, getErrorStack } from "../../../Common/ErrorHandlingUtils"; -import { isEmpty } from "underscore"; interface SettingsV2TabInfo { tab: SettingsV2TabTypes; @@ -1004,16 +1003,16 @@ export class SettingsComponent extends React.Component, }); } else if (this.container.isPreferredApiMongoDB()) { - if (isEmpty(this.container.features())) { - tabs.push({ - tab: SettingsV2TabTypes.IndexingPolicyTab, - content: mongoIndexingPolicyAADError, - }); - } else if (this.container.isEnableMongoCapabilityPresent()) { + if (this.container.isEnableMongoCapabilityPresent()) { tabs.push({ tab: SettingsV2TabTypes.IndexingPolicyTab, content: , }); + } else { + tabs.push({ + tab: SettingsV2TabTypes.IndexingPolicyTab, + content: mongoIndexingPolicyAADError, + }); } } diff --git a/test/testExplorer/TestExplorer.ts b/test/testExplorer/TestExplorer.ts index e7bc37720..32afe8a44 100644 --- a/test/testExplorer/TestExplorer.ts +++ b/test/testExplorer/TestExplorer.ts @@ -78,7 +78,7 @@ const initTestExplorer = async (): Promise => { subscriptionId: portalRunnerSubscripton, resourceGroup: portalRunnerResourceGroup, authorizationToken: `Bearer ${token}`, - features: { sampleFeature: "sampleFeatureValue" }, + features: {}, hasWriteAccess: true, csmEndpoint: "https://management.azure.com", dnsSuffix: "documents.azure.com",