mirror of
https://github.com/CyberL1/dlinux-dashboard.git
synced 2025-01-22 01:19:18 -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")) {
|
if (json.message.startsWith("Hello")) {
|
||||||
localStorage.setItem("key", data.key.toString());
|
localStorage.setItem("key", data.key.toString());
|
||||||
|
localStorage.setItem("hostname", json.message.slice(7).replace("!", ""));
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ export default function WebTerminal() {
|
|||||||
const terminal = new Terminal({ rows: 67 });
|
const terminal = new Terminal({ rows: 67 });
|
||||||
|
|
||||||
const socket = new WebSocket(
|
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();
|
const fitAddon = new FitAddon();
|
||||||
|
@ -26,11 +26,18 @@ interface Item {
|
|||||||
title: string;
|
title: string;
|
||||||
icon: keyof typeof Icons;
|
icon: keyof typeof Icons;
|
||||||
href: string;
|
href: string;
|
||||||
|
openInNewTab?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const sidebarItems: Item[] = [
|
const sidebarItems: Item[] = [
|
||||||
{ title: "Info", icon: "Info", href: "/container" },
|
{ title: "Info", icon: "Info", href: "/container" },
|
||||||
{ title: "Terminal", icon: "Terminal", href: "/container/terminal" },
|
{ title: "Terminal", icon: "Terminal", href: "/container/terminal" },
|
||||||
|
{
|
||||||
|
title: "Syscall",
|
||||||
|
icon: "Memory",
|
||||||
|
href: `//${localStorage.getItem("hostname")}.syscall.lol`,
|
||||||
|
openInNewTab: true,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const drawerWidth = 240;
|
const drawerWidth = 240;
|
||||||
@ -80,6 +87,7 @@ function App({ error }: { error?: boolean }) {
|
|||||||
key={item.title}
|
key={item.title}
|
||||||
component={Link}
|
component={Link}
|
||||||
to={item.href}
|
to={item.href}
|
||||||
|
target={item.openInNewTab ? "_blank" : "_self"}
|
||||||
disablePadding
|
disablePadding
|
||||||
>
|
>
|
||||||
<ListItemButton>
|
<ListItemButton>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user