Show posture values and report history

Pass/fail was the main device UI signal, but operators need
the agent's observed value. Expose a formatted value per
check, show current postures on the device page, and replace
the Postures tab with paginated report history grouped by
agent push time. Status stays in the model for later rulesets.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
Ludovic Vielle
2026-07-28 16:21:30 +02:00
parent 6e2a2ff995
commit ad615a47a0
39 changed files with 4439 additions and 399 deletions

View File

@@ -95,6 +95,55 @@ type Device implements Node {
owner: Profile @goField(forceResolver: true)
latestPostures: [DevicePosture!]! @goField(forceResolver: true)
postureReports(
first: Int
after: CursorKey
last: Int
before: CursorKey
orderBy: DevicePostureReportOrder
): DevicePostureReportConnection! @goField(forceResolver: true)
}
enum DevicePostureValueKind
@goModel(
model: "go.probo.inc/probo/pkg/coredata.DevicePostureValueKind"
) {
ON @goEnum(value: "go.probo.inc/probo/pkg/coredata.DevicePostureValueKindOn")
OFF
@goEnum(value: "go.probo.inc/probo/pkg/coredata.DevicePostureValueKindOff")
IMMEDIATE
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.DevicePostureValueKindImmediate"
)
SECONDS
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.DevicePostureValueKindSeconds"
)
MIN_PASSWORD_LENGTH
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.DevicePostureValueKindMinPasswordLength"
)
CONFIGURED
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.DevicePostureValueKindConfigured"
)
NONE
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.DevicePostureValueKindNone"
)
TEXT
@goEnum(value: "go.probo.inc/probo/pkg/coredata.DevicePostureValueKindText")
UNKNOWN
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.DevicePostureValueKindUnknown"
)
}
type DevicePostureValue
@goModel(model: "go.probo.inc/probo/pkg/coredata.DevicePostureValue") {
kind: DevicePostureValueKind!
text: String!
number: Int
}
type DevicePosture implements Node {
@@ -102,9 +151,48 @@ type DevicePosture implements Node {
deviceId: ID!
checkKey: String!
status: DevicePostureStatus!
value: DevicePostureValue!
observedAt: Datetime!
}
enum DevicePostureReportOrderField
@goModel(
model: "go.probo.inc/probo/pkg/coredata.DevicePostureReportOrderField"
) {
CREATED_AT
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.DevicePostureReportOrderFieldCreatedAt"
)
}
input DevicePostureReportOrder
@goModel(
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.DevicePostureReportOrderBy"
) {
direction: OrderDirection!
field: DevicePostureReportOrderField!
}
type DevicePostureReport {
id: ID!
createdAt: Datetime!
postures: [DevicePosture!]!
}
type DevicePostureReportConnection
@goModel(
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.DevicePostureReportConnection"
) {
edges: [DevicePostureReportEdge!]!
pageInfo: PageInfo!
totalCount: Int! @goField(forceResolver: true)
}
type DevicePostureReportEdge {
cursor: CursorKey!
node: DevicePostureReport!
}
type DeviceConnection
@goModel(
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.DeviceConnection"