Remove Explorer.isHostedDataExplorerEnabled (#890)

This commit is contained in:
Steve Faulkner 2021-06-14 12:46:14 -07:00 committed by GitHub
parent 5da9724deb
commit 3bc58a80e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 17 deletions

View File

@ -34,7 +34,6 @@ exports[`SettingsComponent renders 1`] = `
"databases": [Function], "databases": [Function],
"isAccountReady": [Function], "isAccountReady": [Function],
"isFixedCollectionWithSharedThroughputSupported": [Function], "isFixedCollectionWithSharedThroughputSupported": [Function],
"isHostedDataExplorerEnabled": [Function],
"isNotebookEnabled": [Function], "isNotebookEnabled": [Function],
"isNotebooksEnabledForAccount": [Function], "isNotebooksEnabledForAccount": [Function],
"isResourceTokenCollectionNodeSelected": [Function], "isResourceTokenCollectionNodeSelected": [Function],
@ -129,7 +128,6 @@ exports[`SettingsComponent renders 1`] = `
"databases": [Function], "databases": [Function],
"isAccountReady": [Function], "isAccountReady": [Function],
"isFixedCollectionWithSharedThroughputSupported": [Function], "isFixedCollectionWithSharedThroughputSupported": [Function],
"isHostedDataExplorerEnabled": [Function],
"isNotebookEnabled": [Function], "isNotebookEnabled": [Function],
"isNotebooksEnabledForAccount": [Function], "isNotebooksEnabledForAccount": [Function],
"isResourceTokenCollectionNodeSelected": [Function], "isResourceTokenCollectionNodeSelected": [Function],

View File

@ -12,7 +12,7 @@ import { isPublicInternetAccessAllowed } from "../Common/DatabaseAccountUtility"
import { getErrorMessage, getErrorStack, handleError } from "../Common/ErrorHandlingUtils"; import { getErrorMessage, getErrorStack, handleError } from "../Common/ErrorHandlingUtils";
import * as Logger from "../Common/Logger"; import * as Logger from "../Common/Logger";
import { QueriesClient } from "../Common/QueriesClient"; import { QueriesClient } from "../Common/QueriesClient";
import { configContext, Platform } from "../ConfigContext"; import { configContext } from "../ConfigContext";
import * as DataModels from "../Contracts/DataModels"; import * as DataModels from "../Contracts/DataModels";
import * as ViewModels from "../Contracts/ViewModels"; import * as ViewModels from "../Contracts/ViewModels";
import { GitHubOAuthService } from "../GitHub/GitHubOAuthService"; import { GitHubOAuthService } from "../GitHub/GitHubOAuthService";
@ -34,7 +34,6 @@ import {
import { getAuthorizationHeader } from "../Utils/AuthorizationUtils"; import { getAuthorizationHeader } from "../Utils/AuthorizationUtils";
import { stringToBlob } from "../Utils/BlobUtils"; import { stringToBlob } from "../Utils/BlobUtils";
import { isCapabilityEnabled } from "../Utils/CapabilityUtils"; import { isCapabilityEnabled } from "../Utils/CapabilityUtils";
import { isRunningOnNationalCloud } from "../Utils/CloudUtils";
import { fromContentUri, toRawContentUri } from "../Utils/GitHubUtils"; import { fromContentUri, toRawContentUri } from "../Utils/GitHubUtils";
import * as NotificationConsoleUtils from "../Utils/NotificationConsoleUtils"; import * as NotificationConsoleUtils from "../Utils/NotificationConsoleUtils";
import { logConsoleError, logConsoleInfo, logConsoleProgress } from "../Utils/NotificationConsoleUtils"; import { logConsoleError, logConsoleInfo, logConsoleProgress } from "../Utils/NotificationConsoleUtils";
@ -109,9 +108,6 @@ export default class Explorer {
public tabsManager: TabsManager; public tabsManager: TabsManager;
public gitHubOAuthService: GitHubOAuthService; public gitHubOAuthService: GitHubOAuthService;
// features
public isHostedDataExplorerEnabled: ko.Computed<boolean>;
public isSchemaEnabled: ko.Computed<boolean>; public isSchemaEnabled: ko.Computed<boolean>;
// Notebooks // Notebooks
@ -222,11 +218,6 @@ export default class Explorer {
return isCapabilityEnabled("EnableMongo"); return isCapabilityEnabled("EnableMongo");
}); });
this.isHostedDataExplorerEnabled = ko.computed<boolean>(
() =>
configContext.platform === Platform.Portal && !isRunningOnNationalCloud() && userContext.apiType !== "Gremlin"
);
this.selectedDatabaseId = ko.computed<string>(() => { this.selectedDatabaseId = ko.computed<string>(() => {
const selectedNode = this.selectedNode(); const selectedNode = this.selectedNode();
if (!selectedNode) { if (!selectedNode) {

View File

@ -166,7 +166,10 @@ export function createControlCommandBarButtons(container: Explorer): CommandButt
}, },
]; ];
if (container.isHostedDataExplorerEnabled()) { const showOpenFullScreen =
configContext.platform === Platform.Portal && !isRunningOnNationalCloud() && userContext.apiType !== "Gremlin";
if (showOpenFullScreen) {
const label = "Open Full Screen"; const label = "Open Full Screen";
const fullScreenButton: CommandButtonComponentProps = { const fullScreenButton: CommandButtonComponentProps = {
iconSrc: OpenInTabIcon, iconSrc: OpenInTabIcon,
@ -178,7 +181,7 @@ export function createControlCommandBarButtons(container: Explorer): CommandButt
ariaLabel: label, ariaLabel: label,
tooltipText: label, tooltipText: label,
hasPopup: false, hasPopup: false,
disabled: !container.isHostedDataExplorerEnabled(), disabled: !showOpenFullScreen,
className: "OpenFullScreen", className: "OpenFullScreen",
}; };
buttons.push(fullScreenButton); buttons.push(fullScreenButton);

View File

@ -23,7 +23,6 @@ exports[`GitHub Repos Panel should render Default properly 1`] = `
"databases": [Function], "databases": [Function],
"isAccountReady": [Function], "isAccountReady": [Function],
"isFixedCollectionWithSharedThroughputSupported": [Function], "isFixedCollectionWithSharedThroughputSupported": [Function],
"isHostedDataExplorerEnabled": [Function],
"isNotebookEnabled": [Function], "isNotebookEnabled": [Function],
"isNotebooksEnabledForAccount": [Function], "isNotebooksEnabledForAccount": [Function],
"isResourceTokenCollectionNodeSelected": [Function], "isResourceTokenCollectionNodeSelected": [Function],

View File

@ -13,7 +13,6 @@ exports[`StringInput Pane should render Create new directory properly 1`] = `
"databases": [Function], "databases": [Function],
"isAccountReady": [Function], "isAccountReady": [Function],
"isFixedCollectionWithSharedThroughputSupported": [Function], "isFixedCollectionWithSharedThroughputSupported": [Function],
"isHostedDataExplorerEnabled": [Function],
"isNotebookEnabled": [Function], "isNotebookEnabled": [Function],
"isNotebooksEnabledForAccount": [Function], "isNotebooksEnabledForAccount": [Function],
"isResourceTokenCollectionNodeSelected": [Function], "isResourceTokenCollectionNodeSelected": [Function],

View File

@ -11,7 +11,6 @@ exports[`Delete Database Confirmation Pane submit() Should call delete database
"databases": [Function], "databases": [Function],
"isAccountReady": [Function], "isAccountReady": [Function],
"isFixedCollectionWithSharedThroughputSupported": [Function], "isFixedCollectionWithSharedThroughputSupported": [Function],
"isHostedDataExplorerEnabled": [Function],
"isLastCollection": [Function], "isLastCollection": [Function],
"isLastNonEmptyDatabase": [Function], "isLastNonEmptyDatabase": [Function],
"isNotebookEnabled": [Function], "isNotebookEnabled": [Function],