Remove Explorer.setFeaturesFromFlights (#801)

This commit is contained in:
Steve Faulkner
2021-05-19 18:58:44 -05:00
committed by GitHub
parent ac753b0780
commit 735a81db47
8 changed files with 14 additions and 30 deletions

View File

@@ -1,7 +1,7 @@
import { useEffect, useState } from "react";
import { applyExplorerBindings } from "../applyExplorerBindings";
import { AuthType } from "../AuthType";
import { AccountKind } from "../Common/Constants";
import { AccountKind, Flights } from "../Common/Constants";
import { normalizeArmEndpoint } from "../Common/EnvironmentUtility";
import { sendMessage, sendReadyMessage } from "../Common/MessageHandler";
import { configContext, Platform, updateConfigContext } from "../ConfigContext";
@@ -303,6 +303,14 @@ function updateContextsFromPortalMessage(inputs: DataExplorerInputsFrame) {
if (inputs.features) {
Object.assign(userContext.features, extractFeatures(new URLSearchParams(inputs.features)));
}
if (inputs.flights) {
if (inputs.flights.indexOf(Flights.AutoscaleTest) !== -1) {
userContext.features.autoscaleDefault;
}
if (inputs.flights.indexOf(Flights.SchemaAnalyzer) !== -1) {
userContext.features.enableSchemaAnalyzer = true;
}
}
}
interface PortalMessage {