mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-12-01 01:46:57 +00:00
Force enable notebooks
This commit is contained in:
parent
f060d4b1b8
commit
2a5ccbb51b
@ -300,11 +300,7 @@ export default class Explorer {
|
|||||||
);
|
);
|
||||||
Promise.all([this._refreshNotebooksEnabledStateForAccount(), this._refreshSparkEnabledStateForAccount()]).then(
|
Promise.all([this._refreshNotebooksEnabledStateForAccount(), this._refreshSparkEnabledStateForAccount()]).then(
|
||||||
async () => {
|
async () => {
|
||||||
this.isNotebookEnabled(
|
this.isNotebookEnabled(false);
|
||||||
userContext.authType !== AuthType.ResourceToken &&
|
|
||||||
((await this._containsDefaultNotebookWorkspace(this.databaseAccount())) ||
|
|
||||||
userContext.features.enableNotebooks)
|
|
||||||
);
|
|
||||||
|
|
||||||
TelemetryProcessor.trace(Action.NotebookEnabled, ActionModifiers.Mark, {
|
TelemetryProcessor.trace(Action.NotebookEnabled, ActionModifiers.Mark, {
|
||||||
isNotebookEnabled: this.isNotebookEnabled(),
|
isNotebookEnabled: this.isNotebookEnabled(),
|
||||||
@ -1810,11 +1806,7 @@ export default class Explorer {
|
|||||||
|
|
||||||
private async _refreshNotebooksEnabledStateForAccount(): Promise<void> {
|
private async _refreshNotebooksEnabledStateForAccount(): Promise<void> {
|
||||||
const authType = userContext.authType;
|
const authType = userContext.authType;
|
||||||
if (
|
if (true) {
|
||||||
authType === AuthType.EncryptedToken ||
|
|
||||||
authType === AuthType.ResourceToken ||
|
|
||||||
authType === AuthType.MasterKey
|
|
||||||
) {
|
|
||||||
this.isNotebooksEnabledForAccount(false);
|
this.isNotebooksEnabledForAccount(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -456,7 +456,7 @@ function createEnableNotebooksButton(container: Explorer): CommandButtonComponen
|
|||||||
onCommandClick: () => container.setupNotebooksPane.openWithTitleAndDescription(label, description),
|
onCommandClick: () => container.setupNotebooksPane.openWithTitleAndDescription(label, description),
|
||||||
commandButtonLabel: label,
|
commandButtonLabel: label,
|
||||||
hasPopup: false,
|
hasPopup: false,
|
||||||
disabled: !container.isNotebooksEnabledForAccount(),
|
disabled: false,
|
||||||
ariaLabel: label,
|
ariaLabel: label,
|
||||||
tooltipText: container.isNotebooksEnabledForAccount() ? "" : tooltip,
|
tooltipText: container.isNotebooksEnabledForAccount() ? "" : tooltip,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user