Remove obsolete feature flags (and reformat) (#27)

* Reformat

* Remove unused feature flags: graph, cacheOptimizations, settingsPane, throughputOverview, enableNteract
This commit is contained in:
Laurent Nguyen 2020-06-11 12:39:58 +02:00 committed by GitHub
parent 1662d20e8a
commit 23b2d8100f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 19 deletions

View File

@ -104,11 +104,9 @@ export class CapabilityNames {
} }
export class Features { export class Features {
public static readonly graphs = "graphs";
public static readonly cosmosdb = "cosmosdb"; public static readonly cosmosdb = "cosmosdb";
public static readonly enableChangeFeedPolicy = "enablechangefeedpolicy"; public static readonly enableChangeFeedPolicy = "enablechangefeedpolicy";
public static readonly enableRupm = "enablerupm"; public static readonly enableRupm = "enablerupm";
public static readonly cacheOptimizations = "dataexplorercacheoptimizations";
public static readonly executeSproc = "dataexplorerexecutesproc"; public static readonly executeSproc = "dataexplorerexecutesproc";
public static readonly hostedDataExplorer = "hosteddataexplorerenabled"; public static readonly hostedDataExplorer = "hosteddataexplorerenabled";
public static readonly enableTtl = "enablettl"; public static readonly enableTtl = "enablettl";
@ -116,9 +114,6 @@ export class Features {
public static readonly enableGallery = "enablegallery"; public static readonly enableGallery = "enablegallery";
public static readonly enableSpark = "enablespark"; public static readonly enableSpark = "enablespark";
public static readonly livyEndpoint = "livyendpoint"; public static readonly livyEndpoint = "livyendpoint";
public static readonly settingsPane = "dataexplorersettingspane";
public static readonly throughputOverview = "throughputOverview";
public static readonly enableNteract = "enablenteract";
public static readonly notebookServerUrl = "notebookserverurl"; public static readonly notebookServerUrl = "notebookserverurl";
public static readonly notebookServerToken = "notebookservertoken"; public static readonly notebookServerToken = "notebookservertoken";
public static readonly notebookBasePath = "notebookbasepath"; public static readonly notebookBasePath = "notebookbasepath";

View File

@ -87,7 +87,6 @@ export interface Explorer {
isFeatureEnabled: (feature: string) => boolean; isFeatureEnabled: (feature: string) => boolean;
isGalleryEnabled: ko.Computed<boolean>; isGalleryEnabled: ko.Computed<boolean>;
isGitHubPaneEnabled: ko.Observable<boolean>; isGitHubPaneEnabled: ko.Observable<boolean>;
isGraphsEnabled: ko.Computed<boolean>;
isRightPanelV2Enabled: ko.Computed<boolean>; isRightPanelV2Enabled: ko.Computed<boolean>;
canExceedMaximumValue: ko.Computed<boolean>; canExceedMaximumValue: ko.Computed<boolean>;
hasAutoPilotV2FeatureFlag: ko.Computed<boolean>; hasAutoPilotV2FeatureFlag: ko.Computed<boolean>;

View File

@ -205,7 +205,6 @@ export default class Explorer implements ViewModels.Explorer {
// features // features
public isGalleryEnabled: ko.Computed<boolean>; public isGalleryEnabled: ko.Computed<boolean>;
public isGitHubPaneEnabled: ko.Observable<boolean>; public isGitHubPaneEnabled: ko.Observable<boolean>;
public isGraphsEnabled: ko.Computed<boolean>;
public isHostedDataExplorerEnabled: ko.Computed<boolean>; public isHostedDataExplorerEnabled: ko.Computed<boolean>;
public isRightPanelV2Enabled: ko.Computed<boolean>; public isRightPanelV2Enabled: ko.Computed<boolean>;
public canExceedMaximumValue: ko.Computed<boolean>; public canExceedMaximumValue: ko.Computed<boolean>;
@ -414,9 +413,6 @@ export default class Explorer implements ViewModels.Explorer {
this.shouldShowContextSwitchPrompt = ko.observable<boolean>(false); this.shouldShowContextSwitchPrompt = ko.observable<boolean>(false);
this.isGalleryEnabled = ko.computed<boolean>(() => this.isFeatureEnabled(Constants.Features.enableGallery)); this.isGalleryEnabled = ko.computed<boolean>(() => this.isFeatureEnabled(Constants.Features.enableGallery));
this.isGitHubPaneEnabled = ko.observable<boolean>(false); this.isGitHubPaneEnabled = ko.observable<boolean>(false);
this.isGraphsEnabled = ko.computed<boolean>(() => {
return this.isFeatureEnabled(Constants.Features.graphs);
});
this.canExceedMaximumValue = ko.computed<boolean>(() => this.canExceedMaximumValue = ko.computed<boolean>(() =>
this.isFeatureEnabled(Constants.Features.canExceedMaximumValue) this.isFeatureEnabled(Constants.Features.canExceedMaximumValue)
@ -554,7 +550,9 @@ export default class Explorer implements ViewModels.Explorer {
!this.isRunningOnNationalCloud() && !this.isRunningOnNationalCloud() &&
!this.isPreferredApiGraph() !this.isPreferredApiGraph()
); );
this.isRightPanelV2Enabled = ko.computed<boolean>(() => this.isFeatureEnabled(Constants.Features.enableRightPanelV2)); this.isRightPanelV2Enabled = ko.computed<boolean>(() =>
this.isFeatureEnabled(Constants.Features.enableRightPanelV2)
);
this.defaultExperience.subscribe((defaultExperience: string) => { this.defaultExperience.subscribe((defaultExperience: string) => {
if ( if (
defaultExperience && defaultExperience &&

View File

@ -98,7 +98,6 @@ export class ExplorerStub implements ViewModels.Explorer {
public manageSparkClusterPane: ViewModels.ContextualPane; public manageSparkClusterPane: ViewModels.ContextualPane;
public isGalleryEnabled: ko.Computed<boolean>; public isGalleryEnabled: ko.Computed<boolean>;
public isGitHubPaneEnabled: ko.Observable<boolean>; public isGitHubPaneEnabled: ko.Observable<boolean>;
public isGraphsEnabled: ko.Computed<boolean>;
public isRightPanelV2Enabled: ko.Computed<boolean>; public isRightPanelV2Enabled: ko.Computed<boolean>;
public canExceedMaximumValue: ko.Computed<boolean>; public canExceedMaximumValue: ko.Computed<boolean>;
public isHostedDataExplorerEnabled: ko.Computed<boolean>; public isHostedDataExplorerEnabled: ko.Computed<boolean>;

View File

@ -49,7 +49,12 @@ export class GenericRightPaneComponent extends React.Component<GenericRightPaneP
return ( return (
<div tabIndex={-1} onKeyDown={this.onKeyDown}> <div tabIndex={-1} onKeyDown={this.onKeyDown}>
<div className="contextual-pane-out" onClick={this.props.onClose}></div> <div className="contextual-pane-out" onClick={this.props.onClose}></div>
<div className="contextual-pane" id={this.props.id} style={{ height: this.state.panelHeight }} onKeyDown={this.onKeyDown}> <div
className="contextual-pane"
id={this.props.id}
style={{ height: this.state.panelHeight }}
onKeyDown={this.onKeyDown}
>
<div className="panelContentWrapper"> <div className="panelContentWrapper">
{this.createPanelHeader()} {this.createPanelHeader()}
{this.createErrorSection()} {this.createErrorSection()}
@ -137,5 +142,5 @@ export class GenericRightPaneComponent extends React.Component<GenericRightPaneP
private getPanelHeight = (): number => { private getPanelHeight = (): number => {
const notificationConsoleElement: HTMLElement = document.getElementById("explorerNotificationConsole"); const notificationConsoleElement: HTMLElement = document.getElementById("explorerNotificationConsole");
return window.innerHeight - $(notificationConsoleElement).height(); return window.innerHeight - $(notificationConsoleElement).height();
} };
} }

View File

@ -110,11 +110,7 @@ export class UploadItemsPaneAdapter implements ReactAdapter {
} }
private createContent = (): JSX.Element => { private createContent = (): JSX.Element => {
return ( return <div className="panelContent">{this.createMainContentSection()}</div>;
<div className="panelContent">
{this.createMainContentSection()}
</div>
);
}; };
private createMainContentSection = (): JSX.Element => { private createMainContentSection = (): JSX.Element => {