dashpages

package
v0.9.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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
}

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 gomponents nodes 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) (g.Node, error)

ContributorPage renders a page from a named contributor extension. The contributor name and file path are extracted from route parameters.

func (*PagesManager) HealthPage

func (pm *PagesManager) HealthPage(ctx *router.PageContext) (g.Node, error)

HealthPage renders the health status page by delegating to the core contributor.

func (*PagesManager) MetricsPage

func (pm *PagesManager) MetricsPage(ctx *router.PageContext) (g.Node, error)

MetricsPage renders the metrics page by delegating to the core contributor.

func (*PagesManager) OverviewPage

func (pm *PagesManager) OverviewPage(ctx *router.PageContext) (g.Node, 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) (g.Node, 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) (g.Node, error)

RemoteWidget fetches a widget from a remote contributor via the fragment proxy.

func (*PagesManager) ServicesPage

func (pm *PagesManager) ServicesPage(ctx *router.PageContext) (g.Node, error)

ServicesPage renders the services page by delegating to the core contributor.

func (*PagesManager) WidgetFragment

func (pm *PagesManager) WidgetFragment(ctx *router.PageContext) (g.Node, error)

WidgetFragment renders a single widget as an HTML fragment for HTMX auto-refresh.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL