gws.plugin.admin_action.inspector¶
Object inspector: an html page to inspect the object tree.
The page lists all tree nodes, shows the properties of the selected object and
lets the user follow references to other objects. It is served by the
adminInspector command of the admin action.
An object is addressed by a path of /-separated, url-quoted segments.
The first segment is the uid of a tree node, or empty for the root.
Further segments are attribute names, dict keys or list indexes.
Values are shown as primitives, as links to tree nodes and other objects,
or, for dicts, lists and gws.Data, expanded inline up to a fixed depth.
The search walks the whole object graph from the root, breadth first, and lists
objects with a primitive property containing the search text (text),
or a specific property containing it (prop=text). The search is case-insensitive
and the number of results is limited.
Example:
/_/adminInspector?path=
/_/adminInspector?path=<node uid>/config/layers/0
/_/adminInspector?search=title=roads
Source code: gws.plugin.admin_action.inspector
Package Contents¶
- gws.plugin.admin_action.inspector.get_content(root: gws.Root, path: str, search: str) gws.ContentResponse¶
Render the inspector page for an object path, or return a page asset.
- Parameters:
root – The configuration root.
path – Object path, or the name of an asset (
page.js,page.css).search – Optional search text,
textorprop=text.
- Returns:
The rendered page or the asset.
- Raises:
gws.NotFoundError – If the path cannot be resolved.