Преглед на файлове

docs: address CodeRabbit review on entity display-name docs

Remove the unconditional field-list exclusion claim, drop the incorrect
#996 release reference, document Docker ID fallback for JSON entities,
and add an explicit entity-details-page anchor for cross-references.

Co-authored-by: Cursor <cursoragent@cursor.com>
jamesread преди 2 дни
родител
ревизия
961eaf6e3c
променени са 3 файла, в които са добавени 6 реда и са изтрити 5 реда
  1. 2 2
      docs/modules/ROOT/pages/entities/intro.adoc
  2. 3 3
      docs/modules/ROOT/pages/entities/json.adoc
  3. 1 0
      docs/modules/ROOT/pages/entities/properties.adoc

+ 2 - 2
docs/modules/ROOT/pages/entities/intro.adoc

@@ -18,13 +18,13 @@ Each entity instance needs a human-readable name in the UI. OliveTin picks the f
 
 If none of those fields contain a string value, the instance appears as **Untitled Entity**. Add one of those fields to every row in your entity file — for example `title: My Vehicle` or `name: server1`.
 
-The chosen field is shown as the instance name in lists and dashboards. It is not repeated again in the entity details field list.
+The chosen field is shown as the instance name in lists and dashboards. On the entity details page, it appears in the page heading; see xref:entities/properties.adoc#entity-details-page[Entity details page] for which other fields are listed.
 
 [#entity-live-reload]
 === Live reload
 
 * **Entity file content** — when a watched data file is updated on disk, OliveTin reloads instances and notifies the web UI. No restart is required.
-* **New entity types in `config.yaml`** — when you add a new entry under `entities:` and reload config, OliveTin starts watching that file without a full restart (from OliveTin 3k builds including the #996 live-reload fix).
+* **New entity types in `config.yaml`** — when you add a new entry under `entities:` and reload config, OliveTin starts watching that file without a full restart.
 * **Removing or renaming entity types** — restart OliveTin if you remove an entity definition or change its file path.
 
 [NOTE]

+ 3 - 3
docs/modules/ROOT/pages/entities/json.adoc

@@ -5,9 +5,9 @@ JSON files are parsed as if each line is a single JSON object. This can be super
 
 == Display names in JSON
 
-OliveTin uses the first string value found in fields named `title`, `name`, `id`, `hostname`, `host`, or `label` as the instance name in the UI. See xref:entities/intro.adoc#display-names[Display names] in the entities overview.
+OliveTin uses the first string value found in fields named `title`, `name`, `id`, `hostname`, `host`, or `label` as the instance name in the UI. Matching is case-insensitive. See xref:entities/intro.adoc#display-names[Display names] in the entities overview.
 
-Docker's JSON output uses `Names`, which is **not** one of those fields. Either map it when generating the file (for example with `jq` to add a `name` field) or include an explicit `title` or `name` key in each object.
+Docker's JSON output uses `Names`, which is **not** one of those fields. Without `title` or `name`, OliveTin falls back to Docker's `ID` field (matched as `id`) and shows the container ID instead of the human-readable name. Either map `Names` when generating the file (for example with `jq` to add a `name` field) or include an explicit `title` or `name` key in each object.
 
 [source,json]
 .Example with an explicit display name
@@ -17,7 +17,7 @@ Docker's JSON output uses `Names`, which is **not** one of those fields. Either
 ----
 
 [source,json]
-.Raw `docker ps --format=json` lines (add `title` or `name` for OliveTin display names)
+.Raw `docker ps --format=json` lines (without `title` or `name`, OliveTin shows `ID` instead of `Names`)
 ----
 {"Command":"\"/opt/entrypoint.sh\"","CreatedAt":"2024-02-08 15:27:42 +0000 GMT","ID":"4bafe6f9f956","Image":"fedora","Labels":"?","LocalVolumes":"0","Mounts":"","Names":"media-indexing-container","Networks":"bridge","Ports":"","RunningFor":"13 days ago","Size":"0B","State":"exited","Status":"Exited (128) 13 days ago"}
 {"Command":"\"/opt/entrypoint.sh\"","CreatedAt":"2023-12-17 20:58:03 +0000 GMT","ID":"d25f37c49c35","Image":"fedora","Labels":"?","LocalVolumes":"0","Mounts":"","Names":"media-playback-container","Networks":"bridge","Ports":"","RunningFor":"27 days ago","Size":"0B","State":"exited","Status":"Exited (137) 27 days ago"}

+ 1 - 0
docs/modules/ROOT/pages/entities/properties.adoc

@@ -61,6 +61,7 @@ When `properties` is configured, the Entities page shows a searchable, paginated
 
 When `properties` is omitted or empty, the Entities page shows a simple list of instance names and a total count instead of a table.
 
+[#entity-details-page]
 === Entity details page
 
 The entity details view shows only the fields listed in `properties`, plus type. The instance name appears in the page title, not again in the field list.