This commit is contained in:
@@ -56,7 +56,9 @@ export function ObservationHistoryDialog({
|
||||
<DialogHeader>
|
||||
<DialogTitle>Observation History</DialogTitle>
|
||||
<DialogDescription>
|
||||
{observation ? observationLabel(observation) : "No observation selected"}
|
||||
{observation
|
||||
? observationLabel(observation)
|
||||
: "No observation selected"}
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
@@ -84,7 +86,9 @@ export function ObservationHistoryDialog({
|
||||
{formatSeen(event.ts_unix)}
|
||||
</span>
|
||||
<span>
|
||||
<Badge variant={event.action === "remove" ? "outline" : "secondary"}>
|
||||
<Badge
|
||||
variant={event.action === "remove" ? "outline" : "secondary"}
|
||||
>
|
||||
{observationStateLabel(event.action)}
|
||||
</Badge>
|
||||
</span>
|
||||
|
||||
@@ -7,7 +7,10 @@ import {
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
} from "@/components/ui/select";
|
||||
import { identifierSummary, observationLabel } from "@/pages/observations/utils";
|
||||
import {
|
||||
identifierSummary,
|
||||
observationLabel,
|
||||
} from "@/pages/observations/utils";
|
||||
|
||||
type Props = {
|
||||
observation: AgentDeviceObservation;
|
||||
@@ -81,7 +84,11 @@ export function ObservationIdentityActions({
|
||||
placeholder={`Create as ${observationLabel(observation)}`}
|
||||
disabled={busy || !attachable}
|
||||
/>
|
||||
<Button size="sm" disabled={busy || !attachable} onClick={onCreateAndAttach}>
|
||||
<Button
|
||||
size="sm"
|
||||
disabled={busy || !attachable}
|
||||
onClick={onCreateAndAttach}
|
||||
>
|
||||
Create
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -95,9 +95,7 @@ export function ObservationTable({
|
||||
</span>
|
||||
</div>
|
||||
<span className="text-xs text-muted-foreground">
|
||||
{observation.known_device.pinned
|
||||
? "pinned"
|
||||
: "not pinned"}
|
||||
{observation.known_device.pinned ? "pinned" : "not pinned"}
|
||||
</span>
|
||||
</div>
|
||||
) : (
|
||||
|
||||
@@ -210,9 +210,7 @@ export function ObservationsPage() {
|
||||
setNewNames((prev) => ({ ...prev, [observationKey]: name }))
|
||||
}
|
||||
onAttachExisting={(observation) => void attachExisting(observation)}
|
||||
onCreateAndAttach={(observation) =>
|
||||
void createAndAttach(observation)
|
||||
}
|
||||
onCreateAndAttach={(observation) => void createAndAttach(observation)}
|
||||
onOpenHistory={setHistoryObservation}
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user