Documentation
¶
Index ¶
- type PagesConfig
- type PagesManager
- func (pm *PagesManager) ContributorPage(ctx *router.PageContext) (templ.Component, error)
- func (pm *PagesManager) HealthPage(ctx *router.PageContext) (templ.Component, error)
- func (pm *PagesManager) MetricsPage(ctx *router.PageContext) (templ.Component, error)
- func (pm *PagesManager) OverviewPage(ctx *router.PageContext) (templ.Component, error)
- func (pm *PagesManager) RegisterPages() error
- func (pm *PagesManager) RemotePage(ctx *router.PageContext) (templ.Component, error)
- func (pm *PagesManager) RemoteWidget(ctx *router.PageContext) (templ.Component, error)
- func (pm *PagesManager) ServicesPage(ctx *router.PageContext) (templ.Component, error)
- func (pm *PagesManager) WidgetFragment(ctx *router.PageContext) (templ.Component, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PagesConfig ¶
type PagesConfig struct {
EnableSettings bool
EnableSearch bool
BasePath string
EnableAuth bool
DefaultAccess string // "public", "protected", "partial"
LoginPath string // relative login path (e.g. "/auth/login")
}
PagesConfig holds configuration for the PagesManager.
type PagesManager ¶
type PagesManager struct {
// contains filtered or unexported fields
}
PagesManager registers and serves dashboard pages using forgeui's routing system. Page handlers return templ components and delegate rendering to the contributor system. Layout wrapping is handled automatically by forgeui.
func NewPagesManager ¶
func NewPagesManager( fuiApp *forgeui.App, basePath string, registry *contributor.ContributorRegistry, collector *collector.DataCollector, history *collector.DataHistory, fragmentProxy *proxy.FragmentProxy, config PagesConfig, ) *PagesManager
NewPagesManager creates a new PagesManager.
func (*PagesManager) ContributorPage ¶
func (pm *PagesManager) ContributorPage(ctx *router.PageContext) (templ.Component, error)
ContributorPage renders a page from a named contributor extension. The contributor name and file path are extracted from route parameters. When auth is enabled, it dynamically applies the access level from the contributor's NavItem.Access field.
func (*PagesManager) HealthPage ¶
func (pm *PagesManager) HealthPage(ctx *router.PageContext) (templ.Component, error)
HealthPage renders the health status page by delegating to the core contributor.
func (*PagesManager) MetricsPage ¶
func (pm *PagesManager) MetricsPage(ctx *router.PageContext) (templ.Component, error)
MetricsPage renders the metrics page by delegating to the core contributor.
func (*PagesManager) OverviewPage ¶
func (pm *PagesManager) OverviewPage(ctx *router.PageContext) (templ.Component, error)
OverviewPage renders the dashboard overview by delegating to the core contributor.
func (*PagesManager) RegisterPages ¶
func (pm *PagesManager) RegisterPages() error
RegisterPages registers all dashboard page routes with forgeui's router. Core dashboard pages inherit the default layout (typically "dashboard"). Settings routes are not registered here — they remain on forge.Router.
func (*PagesManager) RemotePage ¶
func (pm *PagesManager) RemotePage(ctx *router.PageContext) (templ.Component, error)
RemotePage fetches a page from a remote contributor via the fragment proxy and returns the raw HTML fragment. ForgeUI wraps it in the dashboard layout.
func (*PagesManager) RemoteWidget ¶
func (pm *PagesManager) RemoteWidget(ctx *router.PageContext) (templ.Component, error)
RemoteWidget fetches a widget from a remote contributor via the fragment proxy.
func (*PagesManager) ServicesPage ¶
func (pm *PagesManager) ServicesPage(ctx *router.PageContext) (templ.Component, error)
ServicesPage renders the services page by delegating to the core contributor.
func (*PagesManager) WidgetFragment ¶
func (pm *PagesManager) WidgetFragment(ctx *router.PageContext) (templ.Component, error)
WidgetFragment renders a single widget as an HTML fragment for HTMX auto-refresh.