Added notebooksDownBanner flight (#1146)

* set isNotebookEnabled to true

* lint and format fixes

* modified shell enabled

* added notebooks down banner flight

* fixed typo
This commit is contained in:
Srinath Narayanan 2021-10-22 00:57:52 -07:00 committed by GitHub
parent 8aa764079a
commit 361ac45e52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 6421 deletions

View File

@ -97,6 +97,7 @@ export class Flights {
public static readonly PartitionKeyTest = "partitionkeytest";
public static readonly PKPartitionKeyTest = "pkpartitionkeytest";
public static readonly Phoenix = "phoenix";
public static readonly NotebooksDownBanner = "notebooksdownbanner";
}
export class AfecFeatures {

View File

@ -1234,7 +1234,7 @@ export default class Explorer {
await useNotebook.getState().refreshNotebooksEnabledStateForAccount();
// TODO: remove reference to isNotebookEnabled and isNotebooksEnabledForAccount
const isNotebookEnabled = true;
const isNotebookEnabled = userContext.features.notebooksDownBanner || userContext.features.phoenix;
useNotebook.getState().setIsNotebookEnabled(isNotebookEnabled);
useNotebook.getState().setIsShellEnabled(userContext.features.phoenix && isPublicInternetAccessAllowed());

View File

@ -12,6 +12,7 @@ export type Features = {
partitionKeyDefault: boolean;
partitionKeyDefault2: boolean;
phoenix: boolean;
notebooksDownBanner: boolean;
readonly enableSDKoperations: boolean;
readonly enableSpark: boolean;
readonly enableTtl: boolean;
@ -84,6 +85,7 @@ export function extractFeatures(given = new URLSearchParams(window.location.sear
partitionKeyDefault2: "true" === get("pkpartitionkeytest"),
notebooksTemporarilyDown: "true" === get("notebookstemporarilydown", "true"),
phoenix: "true" === get("phoenix"),
notebooksDownBanner: "true" === get("notebooksDownBanner"),
};
}

View File

@ -342,6 +342,9 @@ function updateContextsFromPortalMessage(inputs: DataExplorerInputsFrame) {
if (inputs.flights.indexOf(Flights.Phoenix) !== -1) {
userContext.features.phoenix = true;
}
if (inputs.flights.indexOf(Flights.NotebooksDownBanner) !== -1) {
userContext.features.notebooksDownBanner = true;
}
}
}