mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-26 07:26:58 +00:00
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:
parent
8aa764079a
commit
361ac45e52
@ -97,6 +97,7 @@ export class Flights {
|
|||||||
public static readonly PartitionKeyTest = "partitionkeytest";
|
public static readonly PartitionKeyTest = "partitionkeytest";
|
||||||
public static readonly PKPartitionKeyTest = "pkpartitionkeytest";
|
public static readonly PKPartitionKeyTest = "pkpartitionkeytest";
|
||||||
public static readonly Phoenix = "phoenix";
|
public static readonly Phoenix = "phoenix";
|
||||||
|
public static readonly NotebooksDownBanner = "notebooksdownbanner";
|
||||||
}
|
}
|
||||||
|
|
||||||
export class AfecFeatures {
|
export class AfecFeatures {
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1234,7 +1234,7 @@ export default class Explorer {
|
|||||||
await useNotebook.getState().refreshNotebooksEnabledStateForAccount();
|
await useNotebook.getState().refreshNotebooksEnabledStateForAccount();
|
||||||
|
|
||||||
// TODO: remove reference to isNotebookEnabled and isNotebooksEnabledForAccount
|
// TODO: remove reference to isNotebookEnabled and isNotebooksEnabledForAccount
|
||||||
const isNotebookEnabled = true;
|
const isNotebookEnabled = userContext.features.notebooksDownBanner || userContext.features.phoenix;
|
||||||
useNotebook.getState().setIsNotebookEnabled(isNotebookEnabled);
|
useNotebook.getState().setIsNotebookEnabled(isNotebookEnabled);
|
||||||
useNotebook.getState().setIsShellEnabled(userContext.features.phoenix && isPublicInternetAccessAllowed());
|
useNotebook.getState().setIsShellEnabled(userContext.features.phoenix && isPublicInternetAccessAllowed());
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -12,6 +12,7 @@ export type Features = {
|
|||||||
partitionKeyDefault: boolean;
|
partitionKeyDefault: boolean;
|
||||||
partitionKeyDefault2: boolean;
|
partitionKeyDefault2: boolean;
|
||||||
phoenix: boolean;
|
phoenix: boolean;
|
||||||
|
notebooksDownBanner: boolean;
|
||||||
readonly enableSDKoperations: boolean;
|
readonly enableSDKoperations: boolean;
|
||||||
readonly enableSpark: boolean;
|
readonly enableSpark: boolean;
|
||||||
readonly enableTtl: boolean;
|
readonly enableTtl: boolean;
|
||||||
@ -84,6 +85,7 @@ export function extractFeatures(given = new URLSearchParams(window.location.sear
|
|||||||
partitionKeyDefault2: "true" === get("pkpartitionkeytest"),
|
partitionKeyDefault2: "true" === get("pkpartitionkeytest"),
|
||||||
notebooksTemporarilyDown: "true" === get("notebookstemporarilydown", "true"),
|
notebooksTemporarilyDown: "true" === get("notebookstemporarilydown", "true"),
|
||||||
phoenix: "true" === get("phoenix"),
|
phoenix: "true" === get("phoenix"),
|
||||||
|
notebooksDownBanner: "true" === get("notebooksDownBanner"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,6 +342,9 @@ function updateContextsFromPortalMessage(inputs: DataExplorerInputsFrame) {
|
|||||||
if (inputs.flights.indexOf(Flights.Phoenix) !== -1) {
|
if (inputs.flights.indexOf(Flights.Phoenix) !== -1) {
|
||||||
userContext.features.phoenix = true;
|
userContext.features.phoenix = true;
|
||||||
}
|
}
|
||||||
|
if (inputs.flights.indexOf(Flights.NotebooksDownBanner) !== -1) {
|
||||||
|
userContext.features.notebooksDownBanner = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user