Skip to main content
zerotal

Documentation


Documentation / @zerotal/admin / index / PageContribution

Interface: PageContribution

Defined in: admin/src/plugin.ts:55

A page contributed by a package.

ability is required here, unlike on an app-authored AdminPage. Contributions register themselves without the app asking, so the ability is the only thing standing between a package's page and every user who can reach the panel — a contributed page with no ability would be a package deciding who sees production internals, which is not the package's decision to make.

Properties

slug

slug: string

Defined in: admin/src/plugin.ts:57

Path under the panel root, without leading slash — "jobs", "monitor/requests".


page

page: PanelPageClass

Defined in: admin/src/plugin.ts:59

The page component class. Mounted with the panel's layout and guard.


title

title: string

Defined in: admin/src/plugin.ts:61

Page title, and the navigation label unless navigationLabel overrides it.


ability

ability: string

Defined in: admin/src/plugin.ts:63

Ability required to see the nav entry and open the route.


optional navigationLabel?: string

Defined in: admin/src/plugin.ts:65

Sidebar label, when it should differ from the title.


optional navigationIcon?: string

Defined in: admin/src/plugin.ts:67

Icon name from the panel's icon set.


optional navigationGroup?: string

Defined in: admin/src/plugin.ts:69

Sidebar group heading. Ungrouped entries sort above every group.


cluster?

optional cluster?: typeof Cluster

Defined in: admin/src/plugin.ts:71

A cluster to file this page under, sharing its URL segment and nav entry.


optional navigationSort?: number

Defined in: admin/src/plugin.ts:73

Sort weight within the group. Ties break alphabetically.


showInNavigation?

optional showInNavigation?: boolean

Defined in: admin/src/plugin.ts:75

Mount the route but keep it out of the sidebar (detail pages, drill-ins).


routeParams?

optional routeParams?: string[]

Defined in: admin/src/plugin.ts:80

Extra route patterns mounted onto the same page, relative to slug — e.g. [":section"] so one page serves /jobs and /jobs/failed.


optional navigationBadge?: () => string | number | Promise<string | number | null> | null

Defined in: admin/src/plugin.ts:82

A count pill beside the sidebar entry. Failures are swallowed.

Returns

string | number | Promise<string | number | null> | null


optional navigationBadgeColor?: BadgeTone

Defined in: admin/src/plugin.ts:84

Tone of the navigation badge.