mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-25 06:56:38 +00:00
Add Cassandra Shell back in
This commit is contained in:
parent
12442fadfb
commit
ccf4f8af86
@ -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")
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user