Remove unused Explorer methods (#750)

This commit is contained in:
Steve Faulkner 2021-05-05 17:35:35 -05:00 committed by GitHub
parent 8c05ac740c
commit bd47e5ed49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 1 additions and 81 deletions

View File

@ -399,8 +399,6 @@ exports[`SettingsComponent renders 1`] = `
"userTableQuery": [Function], "userTableQuery": [Function],
"visible": [Function], "visible": [Function],
}, },
"clickHostedAccountSwitch": [Function],
"clickHostedDirectorySwitch": [Function],
"closeDialog": undefined, "closeDialog": undefined,
"closeSidePanel": undefined, "closeSidePanel": undefined,
"collapsedResourceTreeWidth": 36, "collapsedResourceTreeWidth": 36,
@ -1223,7 +1221,6 @@ exports[`SettingsComponent renders 1`] = `
"isNotebooksEnabledForAccount": [Function], "isNotebooksEnabledForAccount": [Function],
"isPublishNotebookPaneEnabled": [Function], "isPublishNotebookPaneEnabled": [Function],
"isResourceTokenCollectionNodeSelected": [Function], "isResourceTokenCollectionNodeSelected": [Function],
"isRightPanelV2Enabled": [Function],
"isSchemaEnabled": [Function], "isSchemaEnabled": [Function],
"isServerlessEnabled": [Function], "isServerlessEnabled": [Function],
"isSparkEnabled": [Function], "isSparkEnabled": [Function],
@ -1239,14 +1236,12 @@ exports[`SettingsComponent renders 1`] = `
"onGitHubClientError": [Function], "onGitHubClientError": [Function],
"onRefreshDatabasesKeyPress": [Function], "onRefreshDatabasesKeyPress": [Function],
"onRefreshResourcesClick": [Function], "onRefreshResourcesClick": [Function],
"onSwitchToConnectionString": [Function],
"openDialog": undefined, "openDialog": undefined,
"openSidePanel": undefined, "openSidePanel": undefined,
"provideFeedbackEmail": [Function], "provideFeedbackEmail": [Function],
"queriesClient": QueriesClient { "queriesClient": QueriesClient {
"container": [Circular], "container": [Circular],
}, },
"refreshDatabaseAccount": [Function],
"refreshNotebookList": [Function], "refreshNotebookList": [Function],
"refreshTreeTitle": [Function], "refreshTreeTitle": [Function],
"resourceTokenCollection": [Function], "resourceTokenCollection": [Function],
@ -1270,7 +1265,6 @@ exports[`SettingsComponent renders 1`] = `
"setInProgressConsoleDataIdToBeDeleted": undefined, "setInProgressConsoleDataIdToBeDeleted": undefined,
"setIsNotificationConsoleExpanded": undefined, "setIsNotificationConsoleExpanded": undefined,
"setNotificationConsoleData": undefined, "setNotificationConsoleData": undefined,
"signInAad": [Function],
"sparkClusterConnectionInfo": [Function], "sparkClusterConnectionInfo": [Function],
"splitter": Splitter { "splitter": Splitter {
"bounds": Object { "bounds": Object {
@ -1681,8 +1675,6 @@ exports[`SettingsComponent renders 1`] = `
"userTableQuery": [Function], "userTableQuery": [Function],
"visible": [Function], "visible": [Function],
}, },
"clickHostedAccountSwitch": [Function],
"clickHostedDirectorySwitch": [Function],
"closeDialog": undefined, "closeDialog": undefined,
"closeSidePanel": undefined, "closeSidePanel": undefined,
"collapsedResourceTreeWidth": 36, "collapsedResourceTreeWidth": 36,
@ -2505,7 +2497,6 @@ exports[`SettingsComponent renders 1`] = `
"isNotebooksEnabledForAccount": [Function], "isNotebooksEnabledForAccount": [Function],
"isPublishNotebookPaneEnabled": [Function], "isPublishNotebookPaneEnabled": [Function],
"isResourceTokenCollectionNodeSelected": [Function], "isResourceTokenCollectionNodeSelected": [Function],
"isRightPanelV2Enabled": [Function],
"isSchemaEnabled": [Function], "isSchemaEnabled": [Function],
"isServerlessEnabled": [Function], "isServerlessEnabled": [Function],
"isSparkEnabled": [Function], "isSparkEnabled": [Function],
@ -2521,14 +2512,12 @@ exports[`SettingsComponent renders 1`] = `
"onGitHubClientError": [Function], "onGitHubClientError": [Function],
"onRefreshDatabasesKeyPress": [Function], "onRefreshDatabasesKeyPress": [Function],
"onRefreshResourcesClick": [Function], "onRefreshResourcesClick": [Function],
"onSwitchToConnectionString": [Function],
"openDialog": undefined, "openDialog": undefined,
"openSidePanel": undefined, "openSidePanel": undefined,
"provideFeedbackEmail": [Function], "provideFeedbackEmail": [Function],
"queriesClient": QueriesClient { "queriesClient": QueriesClient {
"container": [Circular], "container": [Circular],
}, },
"refreshDatabaseAccount": [Function],
"refreshNotebookList": [Function], "refreshNotebookList": [Function],
"refreshTreeTitle": [Function], "refreshTreeTitle": [Function],
"resourceTokenCollection": [Function], "resourceTokenCollection": [Function],
@ -2552,7 +2541,6 @@ exports[`SettingsComponent renders 1`] = `
"setInProgressConsoleDataIdToBeDeleted": undefined, "setInProgressConsoleDataIdToBeDeleted": undefined,
"setIsNotificationConsoleExpanded": undefined, "setIsNotificationConsoleExpanded": undefined,
"setNotificationConsoleData": undefined, "setNotificationConsoleData": undefined,
"signInAad": [Function],
"sparkClusterConnectionInfo": [Function], "sparkClusterConnectionInfo": [Function],
"splitter": Splitter { "splitter": Splitter {
"bounds": Object { "bounds": Object {
@ -2976,8 +2964,6 @@ exports[`SettingsComponent renders 1`] = `
"userTableQuery": [Function], "userTableQuery": [Function],
"visible": [Function], "visible": [Function],
}, },
"clickHostedAccountSwitch": [Function],
"clickHostedDirectorySwitch": [Function],
"closeDialog": undefined, "closeDialog": undefined,
"closeSidePanel": undefined, "closeSidePanel": undefined,
"collapsedResourceTreeWidth": 36, "collapsedResourceTreeWidth": 36,
@ -3800,7 +3786,6 @@ exports[`SettingsComponent renders 1`] = `
"isNotebooksEnabledForAccount": [Function], "isNotebooksEnabledForAccount": [Function],
"isPublishNotebookPaneEnabled": [Function], "isPublishNotebookPaneEnabled": [Function],
"isResourceTokenCollectionNodeSelected": [Function], "isResourceTokenCollectionNodeSelected": [Function],
"isRightPanelV2Enabled": [Function],
"isSchemaEnabled": [Function], "isSchemaEnabled": [Function],
"isServerlessEnabled": [Function], "isServerlessEnabled": [Function],
"isSparkEnabled": [Function], "isSparkEnabled": [Function],
@ -3816,14 +3801,12 @@ exports[`SettingsComponent renders 1`] = `
"onGitHubClientError": [Function], "onGitHubClientError": [Function],
"onRefreshDatabasesKeyPress": [Function], "onRefreshDatabasesKeyPress": [Function],
"onRefreshResourcesClick": [Function], "onRefreshResourcesClick": [Function],
"onSwitchToConnectionString": [Function],
"openDialog": undefined, "openDialog": undefined,
"openSidePanel": undefined, "openSidePanel": undefined,
"provideFeedbackEmail": [Function], "provideFeedbackEmail": [Function],
"queriesClient": QueriesClient { "queriesClient": QueriesClient {
"container": [Circular], "container": [Circular],
}, },
"refreshDatabaseAccount": [Function],
"refreshNotebookList": [Function], "refreshNotebookList": [Function],
"refreshTreeTitle": [Function], "refreshTreeTitle": [Function],
"resourceTokenCollection": [Function], "resourceTokenCollection": [Function],
@ -3847,7 +3830,6 @@ exports[`SettingsComponent renders 1`] = `
"setInProgressConsoleDataIdToBeDeleted": undefined, "setInProgressConsoleDataIdToBeDeleted": undefined,
"setIsNotificationConsoleExpanded": undefined, "setIsNotificationConsoleExpanded": undefined,
"setNotificationConsoleData": undefined, "setNotificationConsoleData": undefined,
"signInAad": [Function],
"sparkClusterConnectionInfo": [Function], "sparkClusterConnectionInfo": [Function],
"splitter": Splitter { "splitter": Splitter {
"bounds": Object { "bounds": Object {
@ -4258,8 +4240,6 @@ exports[`SettingsComponent renders 1`] = `
"userTableQuery": [Function], "userTableQuery": [Function],
"visible": [Function], "visible": [Function],
}, },
"clickHostedAccountSwitch": [Function],
"clickHostedDirectorySwitch": [Function],
"closeDialog": undefined, "closeDialog": undefined,
"closeSidePanel": undefined, "closeSidePanel": undefined,
"collapsedResourceTreeWidth": 36, "collapsedResourceTreeWidth": 36,
@ -5082,7 +5062,6 @@ exports[`SettingsComponent renders 1`] = `
"isNotebooksEnabledForAccount": [Function], "isNotebooksEnabledForAccount": [Function],
"isPublishNotebookPaneEnabled": [Function], "isPublishNotebookPaneEnabled": [Function],
"isResourceTokenCollectionNodeSelected": [Function], "isResourceTokenCollectionNodeSelected": [Function],
"isRightPanelV2Enabled": [Function],
"isSchemaEnabled": [Function], "isSchemaEnabled": [Function],
"isServerlessEnabled": [Function], "isServerlessEnabled": [Function],
"isSparkEnabled": [Function], "isSparkEnabled": [Function],
@ -5098,14 +5077,12 @@ exports[`SettingsComponent renders 1`] = `
"onGitHubClientError": [Function], "onGitHubClientError": [Function],
"onRefreshDatabasesKeyPress": [Function], "onRefreshDatabasesKeyPress": [Function],
"onRefreshResourcesClick": [Function], "onRefreshResourcesClick": [Function],
"onSwitchToConnectionString": [Function],
"openDialog": undefined, "openDialog": undefined,
"openSidePanel": undefined, "openSidePanel": undefined,
"provideFeedbackEmail": [Function], "provideFeedbackEmail": [Function],
"queriesClient": QueriesClient { "queriesClient": QueriesClient {
"container": [Circular], "container": [Circular],
}, },
"refreshDatabaseAccount": [Function],
"refreshNotebookList": [Function], "refreshNotebookList": [Function],
"refreshTreeTitle": [Function], "refreshTreeTitle": [Function],
"resourceTokenCollection": [Function], "resourceTokenCollection": [Function],
@ -5129,7 +5106,6 @@ exports[`SettingsComponent renders 1`] = `
"setInProgressConsoleDataIdToBeDeleted": undefined, "setInProgressConsoleDataIdToBeDeleted": undefined,
"setIsNotificationConsoleExpanded": undefined, "setIsNotificationConsoleExpanded": undefined,
"setNotificationConsoleData": undefined, "setNotificationConsoleData": undefined,
"signInAad": [Function],
"sparkClusterConnectionInfo": [Function], "sparkClusterConnectionInfo": [Function],
"splitter": Splitter { "splitter": Splitter {
"bounds": Object { "bounds": Object {

View File

@ -12,7 +12,7 @@ import { readCollection } from "../Common/dataAccess/readCollection";
import { readDatabases } from "../Common/dataAccess/readDatabases"; import { readDatabases } from "../Common/dataAccess/readDatabases";
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 { sendCachedDataMessage, sendMessage } from "../Common/MessageHandler"; import { sendCachedDataMessage } from "../Common/MessageHandler";
import { QueriesClient } from "../Common/QueriesClient"; import { QueriesClient } from "../Common/QueriesClient";
import { Splitter, SplitterBounds, SplitterDirection } from "../Common/Splitter"; import { Splitter, SplitterBounds, SplitterDirection } from "../Common/Splitter";
import { configContext, Platform } from "../ConfigContext"; import { configContext, Platform } from "../ConfigContext";
@ -161,7 +161,6 @@ export default class Explorer {
// features // features
public isPublishNotebookPaneEnabled: ko.Observable<boolean>; public isPublishNotebookPaneEnabled: ko.Observable<boolean>;
public isHostedDataExplorerEnabled: ko.Computed<boolean>; public isHostedDataExplorerEnabled: ko.Computed<boolean>;
public isRightPanelV2Enabled: ko.Computed<boolean>;
public isMongoIndexingEnabled: ko.Observable<boolean>; public isMongoIndexingEnabled: ko.Observable<boolean>;
public canExceedMaximumValue: ko.Computed<boolean>; public canExceedMaximumValue: ko.Computed<boolean>;
public isAutoscaleDefaultEnabled: ko.Observable<boolean>; public isAutoscaleDefaultEnabled: ko.Observable<boolean>;
@ -386,7 +385,6 @@ export default class Explorer {
!this.isRunningOnNationalCloud() && !this.isRunningOnNationalCloud() &&
userContext.apiType !== "Gremlin" userContext.apiType !== "Gremlin"
); );
this.isRightPanelV2Enabled = ko.computed<boolean>(() => userContext.features.enableRightPanelV2);
this.selectedDatabaseId = ko.computed<string>(() => { this.selectedDatabaseId = ko.computed<string>(() => {
const selectedNode = this.selectedNode(); const selectedNode = this.selectedNode();
if (!selectedNode) { if (!selectedNode) {
@ -709,10 +707,6 @@ export default class Explorer {
this.setIsNotificationConsoleExpanded(true); this.setIsNotificationConsoleExpanded(true);
} }
public collapseConsole(): void {
this.setIsNotificationConsoleExpanded(false);
}
public toggleLeftPaneExpanded() { public toggleLeftPaneExpanded() {
this.isLeftPaneExpanded(!this.isLeftPaneExpanded()); this.isLeftPaneExpanded(!this.isLeftPaneExpanded());
@ -1127,38 +1121,6 @@ export default class Explorer {
this.commandBarComponentAdapter.onUpdateTabsButtons(buttons); this.commandBarComponentAdapter.onUpdateTabsButtons(buttons);
} }
public signInAad = () => {
TelemetryProcessor.trace(Action.SignInAad, undefined, { area: "Explorer" });
sendMessage({
type: MessageTypes.AadSignIn,
});
};
public onSwitchToConnectionString = () => {
$("#connectWithAad").hide();
$("#connectWithConnectionString").show();
};
public clickHostedAccountSwitch = () => {
sendMessage({
type: MessageTypes.UpdateAccountSwitch,
click: true,
});
};
public clickHostedDirectorySwitch = () => {
sendMessage({
type: MessageTypes.UpdateDirectoryControl,
click: true,
});
};
public refreshDatabaseAccount = () => {
sendMessage({
type: MessageTypes.RefreshDatabaseAccount,
});
};
private refreshAndExpandNewDatabases(newDatabases: ViewModels.Database[]): Q.Promise<void> { private refreshAndExpandNewDatabases(newDatabases: ViewModels.Database[]): Q.Promise<void> {
// we reload collections for all databases so the resource tree reflects any collection-level changes // we reload collections for all databases so the resource tree reflects any collection-level changes
// i.e addition of stored procedures, etc. // i.e addition of stored procedures, etc.

View File

@ -388,8 +388,6 @@ exports[`GitHub Repos Panel should render Default properly 1`] = `
"userTableQuery": [Function], "userTableQuery": [Function],
"visible": [Function], "visible": [Function],
}, },
"clickHostedAccountSwitch": [Function],
"clickHostedDirectorySwitch": [Function],
"closeDialog": undefined, "closeDialog": undefined,
"closeSidePanel": undefined, "closeSidePanel": undefined,
"collapsedResourceTreeWidth": 36, "collapsedResourceTreeWidth": 36,
@ -1212,7 +1210,6 @@ exports[`GitHub Repos Panel should render Default properly 1`] = `
"isNotebooksEnabledForAccount": [Function], "isNotebooksEnabledForAccount": [Function],
"isPublishNotebookPaneEnabled": [Function], "isPublishNotebookPaneEnabled": [Function],
"isResourceTokenCollectionNodeSelected": [Function], "isResourceTokenCollectionNodeSelected": [Function],
"isRightPanelV2Enabled": [Function],
"isSchemaEnabled": [Function], "isSchemaEnabled": [Function],
"isServerlessEnabled": [Function], "isServerlessEnabled": [Function],
"isSparkEnabled": [Function], "isSparkEnabled": [Function],
@ -1228,14 +1225,12 @@ exports[`GitHub Repos Panel should render Default properly 1`] = `
"onGitHubClientError": [Function], "onGitHubClientError": [Function],
"onRefreshDatabasesKeyPress": [Function], "onRefreshDatabasesKeyPress": [Function],
"onRefreshResourcesClick": [Function], "onRefreshResourcesClick": [Function],
"onSwitchToConnectionString": [Function],
"openDialog": undefined, "openDialog": undefined,
"openSidePanel": undefined, "openSidePanel": undefined,
"provideFeedbackEmail": [Function], "provideFeedbackEmail": [Function],
"queriesClient": QueriesClient { "queriesClient": QueriesClient {
"container": [Circular], "container": [Circular],
}, },
"refreshDatabaseAccount": [Function],
"refreshNotebookList": [Function], "refreshNotebookList": [Function],
"refreshTreeTitle": [Function], "refreshTreeTitle": [Function],
"resourceTokenCollection": [Function], "resourceTokenCollection": [Function],
@ -1259,7 +1254,6 @@ exports[`GitHub Repos Panel should render Default properly 1`] = `
"setInProgressConsoleDataIdToBeDeleted": undefined, "setInProgressConsoleDataIdToBeDeleted": undefined,
"setIsNotificationConsoleExpanded": undefined, "setIsNotificationConsoleExpanded": undefined,
"setNotificationConsoleData": undefined, "setNotificationConsoleData": undefined,
"signInAad": [Function],
"sparkClusterConnectionInfo": [Function], "sparkClusterConnectionInfo": [Function],
"splitter": Splitter { "splitter": Splitter {
"bounds": Object { "bounds": Object {

View File

@ -378,8 +378,6 @@ exports[`StringInput Pane should render Create new directory properly 1`] = `
"userTableQuery": [Function], "userTableQuery": [Function],
"visible": [Function], "visible": [Function],
}, },
"clickHostedAccountSwitch": [Function],
"clickHostedDirectorySwitch": [Function],
"closeDialog": undefined, "closeDialog": undefined,
"closeSidePanel": undefined, "closeSidePanel": undefined,
"collapsedResourceTreeWidth": 36, "collapsedResourceTreeWidth": 36,
@ -1202,7 +1200,6 @@ exports[`StringInput Pane should render Create new directory properly 1`] = `
"isNotebooksEnabledForAccount": [Function], "isNotebooksEnabledForAccount": [Function],
"isPublishNotebookPaneEnabled": [Function], "isPublishNotebookPaneEnabled": [Function],
"isResourceTokenCollectionNodeSelected": [Function], "isResourceTokenCollectionNodeSelected": [Function],
"isRightPanelV2Enabled": [Function],
"isSchemaEnabled": [Function], "isSchemaEnabled": [Function],
"isServerlessEnabled": [Function], "isServerlessEnabled": [Function],
"isSparkEnabled": [Function], "isSparkEnabled": [Function],
@ -1218,14 +1215,12 @@ exports[`StringInput Pane should render Create new directory properly 1`] = `
"onGitHubClientError": [Function], "onGitHubClientError": [Function],
"onRefreshDatabasesKeyPress": [Function], "onRefreshDatabasesKeyPress": [Function],
"onRefreshResourcesClick": [Function], "onRefreshResourcesClick": [Function],
"onSwitchToConnectionString": [Function],
"openDialog": undefined, "openDialog": undefined,
"openSidePanel": undefined, "openSidePanel": undefined,
"provideFeedbackEmail": [Function], "provideFeedbackEmail": [Function],
"queriesClient": QueriesClient { "queriesClient": QueriesClient {
"container": [Circular], "container": [Circular],
}, },
"refreshDatabaseAccount": [Function],
"refreshNotebookList": [Function], "refreshNotebookList": [Function],
"refreshTreeTitle": [Function], "refreshTreeTitle": [Function],
"resourceTokenCollection": [Function], "resourceTokenCollection": [Function],
@ -1249,7 +1244,6 @@ exports[`StringInput Pane should render Create new directory properly 1`] = `
"setInProgressConsoleDataIdToBeDeleted": undefined, "setInProgressConsoleDataIdToBeDeleted": undefined,
"setIsNotificationConsoleExpanded": undefined, "setIsNotificationConsoleExpanded": undefined,
"setNotificationConsoleData": undefined, "setNotificationConsoleData": undefined,
"signInAad": [Function],
"sparkClusterConnectionInfo": [Function], "sparkClusterConnectionInfo": [Function],
"splitter": Splitter { "splitter": Splitter {
"bounds": Object { "bounds": Object {

View File

@ -376,8 +376,6 @@ exports[`Delete Database Confirmation Pane submit() Should call delete database
"userTableQuery": [Function], "userTableQuery": [Function],
"visible": [Function], "visible": [Function],
}, },
"clickHostedAccountSwitch": [Function],
"clickHostedDirectorySwitch": [Function],
"closeDialog": undefined, "closeDialog": undefined,
"closeSidePanel": undefined, "closeSidePanel": undefined,
"collapsedResourceTreeWidth": 36, "collapsedResourceTreeWidth": 36,
@ -1202,7 +1200,6 @@ exports[`Delete Database Confirmation Pane submit() Should call delete database
"isNotebooksEnabledForAccount": [Function], "isNotebooksEnabledForAccount": [Function],
"isPublishNotebookPaneEnabled": [Function], "isPublishNotebookPaneEnabled": [Function],
"isResourceTokenCollectionNodeSelected": [Function], "isResourceTokenCollectionNodeSelected": [Function],
"isRightPanelV2Enabled": [Function],
"isSchemaEnabled": [Function], "isSchemaEnabled": [Function],
"isSelectedDatabaseShared": [Function], "isSelectedDatabaseShared": [Function],
"isServerlessEnabled": [Function], "isServerlessEnabled": [Function],
@ -1219,7 +1216,6 @@ exports[`Delete Database Confirmation Pane submit() Should call delete database
"onGitHubClientError": [Function], "onGitHubClientError": [Function],
"onRefreshDatabasesKeyPress": [Function], "onRefreshDatabasesKeyPress": [Function],
"onRefreshResourcesClick": [Function], "onRefreshResourcesClick": [Function],
"onSwitchToConnectionString": [Function],
"openDialog": undefined, "openDialog": undefined,
"openSidePanel": undefined, "openSidePanel": undefined,
"provideFeedbackEmail": [Function], "provideFeedbackEmail": [Function],
@ -1227,7 +1223,6 @@ exports[`Delete Database Confirmation Pane submit() Should call delete database
"container": [Circular], "container": [Circular],
}, },
"refreshAllDatabases": [Function], "refreshAllDatabases": [Function],
"refreshDatabaseAccount": [Function],
"refreshNotebookList": [Function], "refreshNotebookList": [Function],
"refreshTreeTitle": [Function], "refreshTreeTitle": [Function],
"resourceTokenCollection": [Function], "resourceTokenCollection": [Function],
@ -1251,7 +1246,6 @@ exports[`Delete Database Confirmation Pane submit() Should call delete database
"setInProgressConsoleDataIdToBeDeleted": undefined, "setInProgressConsoleDataIdToBeDeleted": undefined,
"setIsNotificationConsoleExpanded": undefined, "setIsNotificationConsoleExpanded": undefined,
"setNotificationConsoleData": undefined, "setNotificationConsoleData": undefined,
"signInAad": [Function],
"sparkClusterConnectionInfo": [Function], "sparkClusterConnectionInfo": [Function],
"splitter": Splitter { "splitter": Splitter {
"bounds": Object { "bounds": Object {