Show more data in webapp deliveries-table
Some checks failed
Build Docker and Deploy / Build Docker Container (push) Successful in 1m25s
Build Docker and Deploy / Run Unit-Tests (push) Failing after 10m51s
Build Docker and Deploy / Deploy to Server (push) Has been skipped

This commit is contained in:
2026-01-19 18:49:38 +01:00
parent 08fd34632a
commit b5e098a694
11 changed files with 225 additions and 8 deletions

View File

@@ -21,3 +21,25 @@ type Client struct {
Name *string `db:"name" json:"name"`
Deleted bool `db:"deleted" json:"-"`
}
type ClientPreview struct {
ClientID ClientID `json:"client_id"`
UserID UserID `json:"user_id"`
Type ClientType `json:"type"`
TimestampCreated SCNTime `json:"timestamp_created"`
AgentModel string `json:"agent_model"`
AgentVersion string `json:"agent_version"`
Name *string `json:"name"`
}
func (c Client) Preview() ClientPreview {
return ClientPreview{
ClientID: c.ClientID,
UserID: c.UserID,
Type: c.Type,
TimestampCreated: c.TimestampCreated,
AgentModel: c.AgentModel,
AgentVersion: c.AgentVersion,
Name: c.Name,
}
}

View File

@@ -135,7 +135,7 @@ func (u User) MaxTimestampDiffHours() int {
return 24
}
func (u User) JSONPreview() UserPreview {
func (u User) Preview() UserPreview {
return UserPreview{
UserID: u.UserID,
Username: u.Username,