feat(foundry): add composable subject detail profiles
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
{
|
||||
"schemaVersion": "nodedc.map-subject-detail-profiles/v1",
|
||||
"profiles": [
|
||||
{
|
||||
"id": "map.subject-detail.operational.default",
|
||||
"version": "1.0.0",
|
||||
"title": "Техническая карточка объекта",
|
||||
"semanticTypes": ["map.moving_object"],
|
||||
"defaultTabId": "overview",
|
||||
"tabs": [
|
||||
{
|
||||
"id": "overview",
|
||||
"label": "Обзор",
|
||||
"emptyMessage": "Оперативные данные объекта пока не получены.",
|
||||
"sections": [
|
||||
{
|
||||
"id": "state",
|
||||
"label": "Состояние",
|
||||
"fields": [
|
||||
{ "id": "overview.signal", "source": "attribute", "field": "signal_state", "label": "Связь", "format": "signal_state" },
|
||||
{ "id": "overview.movement", "source": "attribute", "field": "movement_state", "label": "Движение", "format": "movement_state" },
|
||||
{ "id": "overview.speed", "source": "attribute", "field": "speed_kph", "label": "Скорость", "format": "number", "unit": "км/ч" },
|
||||
{ "id": "overview.observed", "source": "fact", "field": "observedAt", "label": "Данные объекта", "format": "timestamp" }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "position",
|
||||
"label": "Позиция",
|
||||
"emptyMessage": "Для объекта нет разрешённой позиции.",
|
||||
"sections": [
|
||||
{
|
||||
"id": "coordinates",
|
||||
"label": "Координаты и движение",
|
||||
"fields": [
|
||||
{ "id": "position.latitude", "source": "geometry", "field": "latitude", "label": "Широта", "format": "coordinate" },
|
||||
{ "id": "position.longitude", "source": "geometry", "field": "longitude", "label": "Долгота", "format": "coordinate" },
|
||||
{ "id": "position.course", "source": "attribute", "field": "course_degrees", "label": "Курс", "format": "number", "unit": "°" },
|
||||
{ "id": "position.elevation", "source": "attribute", "field": "elevation_meters", "label": "Высота", "format": "number", "unit": "м" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "quality",
|
||||
"label": "Качество GPS",
|
||||
"fields": [
|
||||
{ "id": "position.satellites", "source": "attribute", "field": "satellite_count", "label": "Спутники", "format": "number" },
|
||||
{ "id": "position.hdop", "source": "attribute", "field": "hdop", "label": "HDOP", "format": "number" },
|
||||
{ "id": "position.accuracy", "source": "attribute", "field": "horizontal_accuracy_meters", "label": "Точность", "format": "number", "unit": "м" }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "telemetry",
|
||||
"label": "Телеметрия",
|
||||
"emptyMessage": "Разрешённые сенсоры появятся после профилирования подключения.",
|
||||
"sections": [
|
||||
{
|
||||
"id": "readings",
|
||||
"label": "Датчики",
|
||||
"fields": [
|
||||
{ "id": "telemetry.readings", "source": "attribute", "field": "sensor_readings", "label": "Датчики", "format": "telemetry_readings", "allowedReadingIds": [] }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "counters",
|
||||
"label": "Счётчики",
|
||||
"emptyMessage": "Счётчики для объекта не получены.",
|
||||
"sections": [
|
||||
{
|
||||
"id": "operation",
|
||||
"label": "Эксплуатация",
|
||||
"fields": [
|
||||
{ "id": "counters.mileage", "source": "attribute", "field": "mileage_km", "label": "Пробег", "format": "number", "unit": "км" },
|
||||
{ "id": "counters.engine-hours", "source": "attribute", "field": "engine_hours", "label": "Моточасы", "format": "number", "unit": "ч" }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{ "id": "equipment", "label": "Оборудование", "emptyMessage": "Технический профиль оборудования ещё не подключён.", "sections": [] },
|
||||
{ "id": "settings", "label": "Настройки", "emptyMessage": "Trip/fuel settings ещё не подключены.", "sections": [] },
|
||||
{ "id": "maintenance", "label": "ТО", "emptyMessage": "Планы технического обслуживания ещё не подключены.", "sections": [] },
|
||||
{
|
||||
"id": "diagnostics",
|
||||
"label": "Данные",
|
||||
"emptyMessage": "Диагностические метаданные не получены.",
|
||||
"sections": [
|
||||
{
|
||||
"id": "provenance",
|
||||
"label": "Происхождение",
|
||||
"fields": [
|
||||
{ "id": "diagnostics.source-id", "source": "fact", "field": "sourceId", "label": "ID объекта", "format": "text" },
|
||||
{ "id": "diagnostics.semantic-type", "source": "fact", "field": "semanticType", "label": "Семантический тип", "format": "text" },
|
||||
{ "id": "diagnostics.product", "source": "context", "field": "dataProductId", "label": "Продукт данных", "format": "text" },
|
||||
{ "id": "diagnostics.received", "source": "fact", "field": "receivedAt", "label": "Получено NODE.DC", "format": "timestamp" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -24,6 +24,7 @@
|
||||
{ "id": "traces", "kind": "trace-stream", "label": "Traces", "description": "Time-ordered entity traces.", "required": false, "multiple": true },
|
||||
{ "id": "routes", "kind": "route-stream", "label": "Routes", "description": "Planned or computed routes.", "required": false, "multiple": true },
|
||||
{ "id": "zones", "kind": "zone-stream", "label": "Zones", "description": "Polygons, geofences and operational areas.", "required": false, "multiple": true },
|
||||
{ "id": "subject-details", "kind": "subject-aspect-stream", "label": "Subject details", "description": "Provider-neutral current aspects joined to a stable selected subject.", "required": false, "multiple": true },
|
||||
{ "id": "selection", "kind": "selection", "label": "Selection", "description": "Selected map entity and contextual state.", "required": false, "multiple": false },
|
||||
{ "id": "commands", "kind": "command", "label": "Commands", "description": "Capability-backed actions for selected entities.", "required": false, "multiple": true },
|
||||
{ "id": "assistant", "kind": "assistant", "label": "Assistant context", "description": "Context exposed to the assistant overlay.", "required": false, "multiple": false }
|
||||
|
||||
@@ -55,5 +55,6 @@
|
||||
"mapSceneFixtureSchema": "schemas/map-scene-fixture-v0.1.schema.json",
|
||||
"mapLodPolicySchema": "schemas/map-lod-policy-v0.1.schema.json",
|
||||
"mapPresentationProfileRegistry": "map-presentation-profiles.json",
|
||||
"mapSubjectDetailProfileRegistry": "map-subject-detail-profiles.json",
|
||||
"operatingRule": "Check this registry before creating a NODE.DC interface element. Reuse or extend the canonical export instead of creating an application-local copy."
|
||||
}
|
||||
|
||||
@@ -80,7 +80,27 @@
|
||||
"properties": {
|
||||
"id": { "type": "string", "minLength": 1 },
|
||||
"displayName": { "type": "string", "minLength": 1, "maxLength": 120 },
|
||||
"order": { "type": "integer", "minimum": 0, "maximum": 10000 }
|
||||
"order": { "type": "integer", "minimum": 0, "maximum": 10000 },
|
||||
"aspectId": { "type": "string", "minLength": 1, "maxLength": 160 },
|
||||
"joinToBindingId": { "type": "string", "minLength": 1, "maxLength": 128 },
|
||||
"subjectDetailProfileId": { "type": "string", "minLength": 1, "maxLength": 160 }
|
||||
}
|
||||
}
|
||||
},
|
||||
"subjectDetailProfiles": {
|
||||
"type": "array",
|
||||
"maxItems": 32,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["id", "version", "title", "semanticTypes", "defaultTabId", "tabs"],
|
||||
"properties": {
|
||||
"id": { "type": "string", "minLength": 1 },
|
||||
"version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
|
||||
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
|
||||
"semanticTypes": { "type": "array", "minItems": 1, "maxItems": 8, "uniqueItems": true, "items": { "type": "string" } },
|
||||
"defaultTabId": { "type": "string", "minLength": 1 },
|
||||
"tabs": { "type": "array", "minItems": 1, "maxItems": 12, "items": { "type": "object" } }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user