ui

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

README

Grafana Alloy UI

Prerequisites

  • Yarn >= v1.22
  • Node.js >= v16

Documentation

Overview

Package ui exposes utilities to get a Handler for the Grafana Alloy UI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assets

func Assets() http.FileSystem

Assets contains the UI's assets.

func RegisterRoutes

func RegisterRoutes(pathPrefix string, router *mux.Router)

RegisterRoutes registers routes to the provided mux.Router for serving the Grafana Alloy UI. The UI will be served relative to pathPrefix. If no pathPrefix is specified, the UI will be served at root.

By default, the UI is retrieved from the ./internal/web/ui/build directory relative to working directory, assuming that Alloy is run from the repo root. However, if the builtinassets Go tag is present, the built UI will be embedded into the binary; run go generate -tags builtinassets for this package to generate the assets to embed.

RegisterRoutes catches all requests from pathPrefix and so should only be invoked after all other routes have been registered.

RegisterRoutes is not intended for public use and will only work properly when called from github.com/grafana/alloy.

Types

This section is empty.

Jump to

Keyboard shortcuts

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