mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-06-08 13:37:29 +01:00
fixed formatting
This commit is contained in:
@@ -514,8 +514,7 @@ function createOpenTerminalButtonByKind(
|
||||
const label = `Open ${terminalFriendlyName()} shell`;
|
||||
const tooltip =
|
||||
"This feature is not yet available in your account's region. View supported regions here: https://aka.ms/cosmos-enable-notebooks.";
|
||||
const isNativeAuthDisabled =
|
||||
terminalKind === ViewModels.TerminalKind.VCoreMongo && isVCoreMongoNativeAuthDisabled();
|
||||
const isNativeAuthDisabled = terminalKind === ViewModels.TerminalKind.VCoreMongo && isVCoreMongoNativeAuthDisabled();
|
||||
const disableButton =
|
||||
(!useNotebook.getState().isNotebooksEnabledForAccount && !useNotebook.getState().isNotebookEnabled) ||
|
||||
isNativeAuthDisabled;
|
||||
@@ -524,11 +523,10 @@ function createOpenTerminalButtonByKind(
|
||||
iconAlt: label,
|
||||
onCommandClick: () => {
|
||||
if (isNativeAuthDisabled) {
|
||||
useDialog.getState().showOkModalDialog(
|
||||
"Native Authentication Disabled",
|
||||
VCoreMongoNativeAuthDisabledMessage,
|
||||
{ linkText: "Learn more", linkUrl: VCoreMongoNativeAuthLearnMoreUrl },
|
||||
);
|
||||
useDialog.getState().showOkModalDialog("Native Authentication Disabled", VCoreMongoNativeAuthDisabledMessage, {
|
||||
linkText: "Learn more",
|
||||
linkUrl: VCoreMongoNativeAuthLearnMoreUrl,
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (useNotebook.getState().isNotebookEnabled || userContext.features.enableCloudShell) {
|
||||
|
||||
@@ -436,11 +436,12 @@ export const SplashScreen: React.FC<SplashScreenProps> = ({ explorer }) => {
|
||||
description: "Create a collection and interact with data using MongoDB's shell interface",
|
||||
onClick: () => {
|
||||
if (isNativeAuthDisabled) {
|
||||
useDialog.getState().showOkModalDialog(
|
||||
"Native Authentication Disabled",
|
||||
VCoreMongoNativeAuthDisabledMessage,
|
||||
{ linkText: "Learn more", linkUrl: VCoreMongoNativeAuthLearnMoreUrl },
|
||||
);
|
||||
useDialog
|
||||
.getState()
|
||||
.showOkModalDialog("Native Authentication Disabled", VCoreMongoNativeAuthDisabledMessage, {
|
||||
linkText: "Learn more",
|
||||
linkUrl: VCoreMongoNativeAuthLearnMoreUrl,
|
||||
});
|
||||
} else {
|
||||
container.openNotebookTerminal(TerminalKind.VCoreMongo);
|
||||
}
|
||||
|
||||
@@ -227,4 +227,3 @@ export function apiType(account: DatabaseAccount | undefined): ApiType {
|
||||
}
|
||||
|
||||
export { updateUserContext, userContext };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user