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