mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-25 15:06:55 +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 (
|
if (
|
||||||
configContext.platform !== Platform.Fabric &&
|
configContext.platform !== Platform.Fabric &&
|
||||||
(userContext.apiType === "SQL" || userContext.apiType === "Gremlin")
|
(userContext.apiType === "SQL" || userContext.apiType === "Gremlin")
|
||||||
|
@ -143,6 +143,21 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user