mirror of
https://github.com/CyberL1/dlinux-dashboard.git
synced 2025-01-21 17:09:19 -05:00
feat: add link to syscall
This commit is contained in:
parent
03ddc35df0
commit
4ca8045df9
@ -17,6 +17,7 @@ export default function Login() {
|
||||
|
||||
if (json.message.startsWith("Hello")) {
|
||||
localStorage.setItem("key", data.key.toString());
|
||||
localStorage.setItem("hostname", json.message.slice(7).replace("!", ""));
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ export default function WebTerminal() {
|
||||
const terminal = new Terminal({ rows: 67 });
|
||||
|
||||
const socket = new WebSocket(
|
||||
`ws://127.0.0.1:3000/containers/${container.id}/terminal`,
|
||||
`ws://127.0.0.1:3000/containers/${container.id}/terminal`, // TODO: Replace this with dlinux ssh connector
|
||||
);
|
||||
|
||||
const fitAddon = new FitAddon();
|
||||
|
@ -26,11 +26,18 @@ interface Item {
|
||||
title: string;
|
||||
icon: keyof typeof Icons;
|
||||
href: string;
|
||||
openInNewTab?: boolean;
|
||||
}
|
||||
|
||||
const sidebarItems: Item[] = [
|
||||
{ title: "Info", icon: "Info", href: "/container" },
|
||||
{ title: "Terminal", icon: "Terminal", href: "/container/terminal" },
|
||||
{
|
||||
title: "Syscall",
|
||||
icon: "Memory",
|
||||
href: `//${localStorage.getItem("hostname")}.syscall.lol`,
|
||||
openInNewTab: true,
|
||||
},
|
||||
];
|
||||
|
||||
const drawerWidth = 240;
|
||||
@ -80,6 +87,7 @@ function App({ error }: { error?: boolean }) {
|
||||
key={item.title}
|
||||
component={Link}
|
||||
to={item.href}
|
||||
target={item.openInNewTab ? "_blank" : "_self"}
|
||||
disablePadding
|
||||
>
|
||||
<ListItemButton>
|
||||
|
Loading…
x
Reference in New Issue
Block a user