mirror of
https://github.com/henrygd/beszel.git
synced 2026-03-24 06:26:17 +01:00
built-in agent
This commit is contained in:
@@ -94,13 +94,15 @@ export function UserAuthForm({
|
||||
setErrors({ passwordConfirm: msg })
|
||||
return
|
||||
}
|
||||
// create admin user
|
||||
await pb.admins.create({
|
||||
email,
|
||||
password,
|
||||
passwordConfirm: password,
|
||||
})
|
||||
await pb.admins.authWithPassword(email, password)
|
||||
await pb.collection('users').create({
|
||||
// create regular user
|
||||
const user = await pb.collection('users').create({
|
||||
username,
|
||||
email,
|
||||
password,
|
||||
@@ -108,6 +110,13 @@ export function UserAuthForm({
|
||||
role: 'admin',
|
||||
verified: true,
|
||||
})
|
||||
// create hubsys
|
||||
await pb.collection('systems').create({
|
||||
name: 'x',
|
||||
port: 'x',
|
||||
host: 'hubsys',
|
||||
users: user.id,
|
||||
})
|
||||
await pb.collection('users').authWithPassword(email, password)
|
||||
} else {
|
||||
await pb.collection('users').authWithPassword(email, password)
|
||||
|
||||
@@ -197,7 +197,7 @@ export default function SystemDetail({ name }: { name: string }) {
|
||||
uptime = `${Math.trunc(system.info?.u / 86400)} days`
|
||||
}
|
||||
return [
|
||||
{ value: system.host, Icon: GlobeIcon },
|
||||
{ value: system.host, Icon: GlobeIcon, hide: system.host === 'hubsys' },
|
||||
{
|
||||
value: system.info.h,
|
||||
Icon: MonitorIcon,
|
||||
|
||||
Reference in New Issue
Block a user