跳转至

Data Freshness(数据新鲜度(Data Freshness))

The Data Freshness widget enables users to track data freshness directly within their application by displaying the Last Updated timestamp corresponding to the most recent index time for configured object types and datasources. The widget helps provide users with more visibility into the state of their data and helps builders catch any unexpected data staleness directly from their application's interface.

An example of the data freshness widget.

The widget displays the Last Updated timestamp for configured object types and datasources to reflect when they were last indexed. If the last index time exceeds 24 hours, the timestamp renders an absolute format (Thu, Jul 17, 2025, 1:52 PM). If the last index time is within 24 hours, the timestamp renders a relative format (2 hours ago or 30 min ago).

Configuration options

Data freshness widget configuration empty state.

  • Add item Adds a new item that enables builders to display an object type and its backing datasources in the widget.
  • Object type: Select an object type to display in the widget.
  • Add source: Configure one or multiple datasources per object type to display.
    • Resource: Select a datasource to be displayed in the widget with the configured object type using the Foundry resource selector.
    • Override resource name: An optional configuration field that allows builders to override and set the name displayed for the datasource in the widget.

中文翻译


数据新鲜度(Data Freshness)

数据新鲜度(Data Freshness) 小部件(Widget)可支持用户直接在应用内追踪数据新鲜度,它会展示已配置的对象类型(Object Type)和数据源(Datasource)对应的「最后更新」时间戳,该时间戳对应这些资源的最近一次索引(Index)时间。该小部件既能帮助用户更清晰地掌握数据状态,也便于应用构建者直接在应用界面排查意外的数据陈旧问题。

数据新鲜度小部件示例

该小部件展示的已配置对象类型、数据源的「最后更新」时间戳,用于反映其最近一次被索引的时间。若上次索引时间距今超过24小时,时间戳将以绝对格式展示(Thu, Jul 17, 2025, 1:52 PM);若在24小时以内,则以相对格式展示(2 hours ago30 min ago)。

配置选项

数据新鲜度小部件空配置状态

  • 添加项:新增条目,支持构建者在小部件中展示某一对象类型及其背后的数据源。
  • 对象类型:选择需要在小部件中展示的对象类型。
  • 添加源:为每个对象类型配置一个或多个需要展示的数据源。
    • 资源:通过Foundry 资源选择器(Resource Selector),选择要和已配置对象类型共同在小部件中展示的数据源。
    • 覆盖资源名称:可选配置字段,支持构建者自定义数据源在小部件中的展示名称,覆盖默认的资源名。