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],
"isAccountReady": [Function],
"isFixedCollectionWithSharedThroughputSupported": [Function],
"isHostedDataExplorerEnabled": [Function],
"isNotebookEnabled": [Function],
"isNotebooksEnabledForAccount": [Function],
"isResourceTokenCollectionNodeSelected": [Function],
@ -129,7 +128,6 @@ exports[`SettingsComponent renders 1`] = `
"databases": [Function],
"isAccountReady": [Function],
"isFixedCollectionWithSharedThroughputSupported": [Function],
"isHostedDataExplorerEnabled": [Function],
"isNotebookEnabled": [Function],
"isNotebooksEnabledForAccount": [Function],
"isResourceTokenCollectionNodeSelected": [Function],

View File

@ -12,7 +12,7 @@ import { isPublicInternetAccessAllowed } from "../Common/DatabaseAccountUtility"
import { getErrorMessage, getErrorStack, handleError } from "../Common/ErrorHandlingUtils";
import * as Logger from "../Common/Logger";
import { QueriesClient } from "../Common/QueriesClient";
import { configContext, Platform } from "../ConfigContext";
import { configContext } from "../ConfigContext";
import * as DataModels from "../Contracts/DataModels";
import * as ViewModels from "../Contracts/ViewModels";
import { GitHubOAuthService } from "../GitHub/GitHubOAuthService";
@ -34,7 +34,6 @@ import {
import { getAuthorizationHeader } from "../Utils/AuthorizationUtils";
import { stringToBlob } from "../Utils/BlobUtils";
import { isCapabilityEnabled } from "../Utils/CapabilityUtils";
import { isRunningOnNationalCloud } from "../Utils/CloudUtils";
import { fromContentUri, toRawContentUri } from "../Utils/GitHubUtils";
import * as NotificationConsoleUtils from "../Utils/NotificationConsoleUtils";
import { logConsoleError, logConsoleInfo, logConsoleProgress } from "../Utils/NotificationConsoleUtils";
@ -109,9 +108,6 @@ export default class Explorer {
public tabsManager: TabsManager;
public gitHubOAuthService: GitHubOAuthService;
// features
public isHostedDataExplorerEnabled: ko.Computed<boolean>;
public isSchemaEnabled: ko.Computed<boolean>;
// Notebooks
@ -222,11 +218,6 @@ export default class Explorer {
return isCapabilityEnabled("EnableMongo");
});
this.isHostedDataExplorerEnabled = ko.computed<boolean>(
() =>
configContext.platform === Platform.Portal && !isRunningOnNationalCloud() && userContext.apiType !== "Gremlin"
);
this.selectedDatabaseId = ko.computed<string>(() => {
const selectedNode = this.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 fullScreenButton: CommandButtonComponentProps = {
iconSrc: OpenInTabIcon,
@ -178,7 +181,7 @@ export function createControlCommandBarButtons(container: Explorer): CommandButt
ariaLabel: label,
tooltipText: label,
hasPopup: false,
disabled: !container.isHostedDataExplorerEnabled(),
disabled: !showOpenFullScreen,
className: "OpenFullScreen",
};
buttons.push(fullScreenButton);

View File

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

View File

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

View File

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