Capability report: PUT /devices/{id}/report, a Capabilities section, offline devices degraded
A device reports its board, screen, camera and ports from its own credential (16 KB, schema 1, replacing the last report), and the flows are validated against it again. The node panel turns a reported port's config schema into a form, a reported screen is a canvas preset and a touch screen's first report turns Touch friendly on. An offline device node is degraded: amber on the canvas, a warning on Home, never a fault.
This commit is contained in:
@@ -1137,6 +1137,18 @@ export const DevicePublicSchema = {
|
||||
}
|
||||
],
|
||||
title: 'Report'
|
||||
},
|
||||
reported_at: {
|
||||
anyOf: [
|
||||
{
|
||||
type: 'string',
|
||||
format: 'date-time'
|
||||
},
|
||||
{
|
||||
type: 'null'
|
||||
}
|
||||
],
|
||||
title: 'Reported At'
|
||||
}
|
||||
},
|
||||
type: 'object',
|
||||
@@ -1932,6 +1944,14 @@ export const HealthSummarySchema = {
|
||||
type: 'array',
|
||||
title: 'Problems'
|
||||
},
|
||||
warnings: {
|
||||
items: {
|
||||
type: 'string'
|
||||
},
|
||||
type: 'array',
|
||||
title: 'Warnings',
|
||||
default: []
|
||||
},
|
||||
flows: {
|
||||
additionalProperties: {
|
||||
type: 'integer'
|
||||
@@ -4727,7 +4747,7 @@ export const ValidationIssueSchema = {
|
||||
properties: {
|
||||
code: {
|
||||
type: 'string',
|
||||
enum: ['cycle', 'unconnected_input', 'missing_initial_value', 'node_error', 'unauthenticated_hook', 'self_loop_needs_initial', 'missing_source', 'node_unhealthy', 'ignored_worker', 'unknown_device', 'device_port'],
|
||||
enum: ['cycle', 'unconnected_input', 'missing_initial_value', 'node_error', 'unauthenticated_hook', 'self_loop_needs_initial', 'missing_source', 'node_unhealthy', 'node_degraded', 'ignored_worker', 'unknown_device', 'device_port'],
|
||||
title: 'Code'
|
||||
},
|
||||
message: {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -301,6 +301,7 @@ export type DevicePublic = {
|
||||
report?: ({
|
||||
[key: string]: unknown;
|
||||
} | null);
|
||||
reported_at?: (string | null);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -657,6 +658,7 @@ export type fluksio__flow__schemas__MessageValue = {
|
||||
export type HealthSummary = {
|
||||
status: string;
|
||||
problems: Array<(string)>;
|
||||
warnings?: Array<(string)>;
|
||||
flows: {
|
||||
[key: string]: (number);
|
||||
};
|
||||
@@ -1514,7 +1516,7 @@ export type ValidationError = {
|
||||
* Something wrong with a flow — a fault, or merely advisory.
|
||||
*/
|
||||
export type ValidationIssue = {
|
||||
code: 'cycle' | 'unconnected_input' | 'missing_initial_value' | 'node_error' | 'unauthenticated_hook' | 'self_loop_needs_initial' | 'missing_source' | 'node_unhealthy' | 'ignored_worker' | 'unknown_device' | 'device_port';
|
||||
code: 'cycle' | 'unconnected_input' | 'missing_initial_value' | 'node_error' | 'unauthenticated_hook' | 'self_loop_needs_initial' | 'missing_source' | 'node_unhealthy' | 'node_degraded' | 'ignored_worker' | 'unknown_device' | 'device_port';
|
||||
message: string;
|
||||
flow?: string;
|
||||
nodes?: Array<(string)>;
|
||||
@@ -1524,7 +1526,7 @@ export type ValidationIssue = {
|
||||
advisory?: boolean;
|
||||
};
|
||||
|
||||
export type code = 'cycle' | 'unconnected_input' | 'missing_initial_value' | 'node_error' | 'unauthenticated_hook' | 'self_loop_needs_initial' | 'missing_source' | 'node_unhealthy' | 'ignored_worker' | 'unknown_device' | 'device_port';
|
||||
export type code = 'cycle' | 'unconnected_input' | 'missing_initial_value' | 'node_error' | 'unauthenticated_hook' | 'self_loop_needs_initial' | 'missing_source' | 'node_unhealthy' | 'node_degraded' | 'ignored_worker' | 'unknown_device' | 'device_port';
|
||||
|
||||
export type ValidationResult = {
|
||||
issues?: Array<ValidationIssue>;
|
||||
@@ -1875,6 +1877,12 @@ export type DevicesDeleteDeviceData = {
|
||||
|
||||
export type DevicesDeleteDeviceResponse = (Message);
|
||||
|
||||
export type DevicesPutReportData = {
|
||||
deviceId: string;
|
||||
};
|
||||
|
||||
export type DevicesPutReportResponse = (Message);
|
||||
|
||||
export type DevicesApprovePairingData = {
|
||||
deviceId: string;
|
||||
requestBody: PairRequest;
|
||||
|
||||
Reference in New Issue
Block a user