// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
import cx from "classnames"
import React from "react"
import { apiFetch } from "src/api"
import ACLTag from "src/components/acl-tag"
import * as Control from "src/components/control-components"
import { UpdateAvailableNotification } from "src/components/update-available"
import { NodeData } from "src/hooks/node-data"
import { useLocation } from "wouter"
export default function DeviceDetailsView({
readonly,
node,
}: {
readonly: boolean
node: NodeData
}) {
const [, setLocation] = useLocation()
return (
<>
Device details
{node.Features["auto-update"] &&
!readonly &&
node.ClientVersion &&
!node.ClientVersion.RunningLatest && (
)}
General
| Managed by |
{node.IsTagged
? node.Tags.map((t) => )
: node.Profile?.DisplayName}
|
| Machine name |
{node.DeviceName} |
| OS |
{node.OS} |
| ID |
{node.ID} |
| Tailscale version |
{node.IPNVersion} |
| Key expiry |
{node.KeyExpired
? "Expired"
: // TODO: present as relative expiry (e.g. "5 months from now")
new Date(node.KeyExpiry).toLocaleString()}
|
Addresses
| Tailscale IPv4 |
{node.IP} |
| Tailscale IPv6 |
{node.IPv6} |
| Short domain |
{node.DeviceName} |
| Full domain |
{node.DeviceName}.{node.TailnetName}
|
Want even more details? Visit{" "}
this device’s page
{" "}
in the admin console.
>
)
}