pub struct View {
pub id: String,
pub description: Option<String>,
pub widgets: Vec<AggregateWidget>,
pub sql_widgets: Vec<SqlWidget>,
pub tags: Vec<String>,
pub origin: Option<RepoOrigin>,
}Expand description
A standalone declarative read/aggregation for the Analytics page (#743).
A view aggregates stored fleet data (obs_events, …) without an
execute or a schedule — unlike a Manifest it only declares
AggregateWidgets. (The first line is concise on purpose: schemars
uses it as the generated schema’s title.) The backend reads views from
BUCKET_VIEWS at
query time and merges their widgets with the co-located aggregate:
hints on jobs, so a cross-cutting dashboard (one that charts events
emitted by several other jobs / the agent) has a home that doesn’t need
a noop job carrier. Stored JSON in BUCKET_VIEWS, keyed by id.
Fields§
§id: StringStable identifier (the KV key). Required, validated non-empty.
description: Option<String>Optional human description shown on the Views admin page.
widgets: Vec<AggregateWidget>The obs_events aggregate widgets this view contributes to the
Analytics page. Optional since PR3 — a view may instead (or also)
carry sql_widgets; a view must have at least one
widget across the two lists.
sql_widgets: Vec<SqlWidget>#vuln-roadmap PR3: SQL-backed, materialized widgets — raw read-only SQL
over the projector tables (inventory/feeds/…) mapped to a visual. This
is how a correlation dashboard (vulnerability / EOL / license) is
expressed as config. See SqlWidget.
Free-form operator taxonomy (same role as Manifest::tags).
origin: Option<RepoOrigin>GitOps provenance (#678), stamped by kanade view create from the
source YAML’s Git context — same as Manifest::origin.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for View
impl<'de> Deserialize<'de> for View
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for View
impl JsonSchema for View
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl StrictSchema for View
View likewise has no flattened field.
impl StrictSchema for View
View likewise has no flattened field.
Source§fn strict_top_level_keys() -> Option<&'static [&'static str]>
fn strict_top_level_keys() -> Option<&'static [&'static str]>
None when the
type has no flattened field. See the trait docs.