Add Cassandra Shell back in

This commit is contained in:
Asier Isayas 2024-07-17 11:04:17 -04:00
parent 12442fadfb
commit ccf4f8af86
2 changed files with 25 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 (
configContext.platform !== Platform.Fabric &&
(userContext.apiType === "SQL" || userContext.apiType === "Gremlin")

View File

@ -143,6 +143,21 @@ export function createContextCommandBarButtons(
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;
}