client/web: populate device details view

Fills /details page with real values, passed back from the /data
endpoint.

Updates tailscale/corp#14335

Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:
Sonia Appasamy
2023-11-08 17:33:27 -05:00
committed by Sonia Appasamy
parent d852c616c6
commit d544e80fc1
6 changed files with 182 additions and 53 deletions

View File

@ -3,9 +3,14 @@ import { apiFetch, setUnraidCsrfToken } from "src/api"
export type NodeData = {
Profile: UserProfile
Status: string
Status: NodeState
DeviceName: string
OS: string
IP: string
IPv6: string
ID: string
KeyExpiry: string
KeyExpired: boolean
AdvertiseExitNode: boolean
AdvertiseRoutes: string
LicensesURL: string
@ -16,10 +21,21 @@ export type NodeData = {
UnraidToken: string
IPNVersion: string
URLPrefix: string
TailnetName: string
IsTagged: boolean
Tags: string[]
DebugMode: "" | "login" | "full" // empty when not running in any debug mode
}
type NodeState =
| "NoState"
| "NeedsLogin"
| "NeedsMachineAuth"
| "Stopped"
| "Starting"
| "Running"
export type UserProfile = {
LoginName: string
DisplayName: string