Compare commits

...

2 Commits

Author SHA1 Message Date
Asier Isayas
3d367f9f77 Add Cassandra Shell back in 2024-07-17 11:06:50 -04:00
Asier Isayas
ccf4f8af86 Add Cassandra Shell back in 2024-07-17 11:04:17 -04:00
2 changed files with 29 additions and 0 deletions

View File

@@ -100,6 +100,16 @@ export const createCollectionContextMenuButton = (
}); });
} }
if (useNotebook.getState().isShellEnabled && userContext.apiType === "Cassandra") {
items.push({
iconSrc: HostedTerminalIcon,
onClick: () => {
container.openNotebookTerminal(ViewModels.TerminalKind.Cassandra);
},
label: "Open Cassandra Shell",
});
}
if ( if (
configContext.platform !== Platform.Fabric && configContext.platform !== Platform.Fabric &&
(userContext.apiType === "SQL" || userContext.apiType === "Gremlin") (userContext.apiType === "SQL" || userContext.apiType === "Gremlin")

View File

@@ -143,6 +143,25 @@ export function createContextCommandBarButtons(
buttons.push(newMongoShellBtn); buttons.push(newMongoShellBtn);
} }
if (
useNotebook.getState().isShellEnabled &&
!selectedNodeState.isDatabaseNodeOrNoneSelected() &&
userContext.apiType === "Cassandra"
) {
const label: string = "Open Cassandra Shell";
const newCassandraShellButton: CommandButtonComponentProps = {
iconSrc: HostedTerminalIcon,
iconAlt: label,
onCommandClick: () => {
container.openNotebookTerminal(ViewModels.TerminalKind.Cassandra);
},
commandButtonLabel: label,
ariaLabel: label,
hasPopup: true,
};
buttons.push(newCassandraShellButton);
}
return buttons; return buttons;
} }