Documentation
¶
Index ¶
- Variables
- func ClientIP(trustedProxies []string) func(http.Handler) http.Handler
- func SecurityHeaders(next http.Handler) http.Handler
- func StaticFS() http.FileSystem
- type Deps
- type UIHandler
- func (u *UIHandler) HandleAPIKeys(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleAgentDetail(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleAgents(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleAuthCallback(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleAuthLogin(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleDashboard(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleInstallScript(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleInstallScriptPS(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleJobs(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleKubernetes(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleLoginPage(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleLogout(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleOnboarding(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleRunDetail(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleRuns(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleTargets(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleTenants(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleTokens(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) RegisterRoutes(r chi.Router)
Constants ¶
This section is empty.
Variables ¶
var Content embed.FS
Functions ¶
func ClientIP ¶ added in v0.14.2
ClientIP stores the client IP for middleware.GetClientIP. X-Forwarded-For is only believed when the peer is a trusted proxy; the chain is then walked right-to-left, skipping trusted hops. Prefixes must already be validated (config.Validate).
func SecurityHeaders ¶
SecurityHeaders sets a conservative set of browser security headers. The embedded Temporal UI (SvelteKit) needs inline scripts/styles, so its prefix gets a looser CSP.
func StaticFS ¶
func StaticFS() http.FileSystem
Types ¶
type Deps ¶
type Deps struct {
TokenManager *auth.TokenManager
// OIDC is nil when admin authentication is disabled (development)
OIDC *auth.OIDC
// Admin protects every administrative page; nil means "insecure, allow all"
Admin *auth.AdminAuth
// TemporalUI is the embedded Temporal Web UI to proxy under /temporal/ (nil = disabled)
TemporalUI *temporalui.Server
Version string
}
Deps are the collaborators the UI needs beyond the database and config
type UIHandler ¶
type UIHandler struct {
DB *db.DB
Config *config.ServerConfig
// contains filtered or unexported fields
}
UIHandler manages rendering of HTML templates and static assets
func NewUIHandler ¶
NewUIHandler creates a new UIHandler
func (*UIHandler) HandleAPIKeys ¶
func (u *UIHandler) HandleAPIKeys(w http.ResponseWriter, r *http.Request)
func (*UIHandler) HandleAgentDetail ¶ added in v0.12.0
func (u *UIHandler) HandleAgentDetail(w http.ResponseWriter, r *http.Request)
HandleAgentDetail renders the status page of one agent: connectivity, alerts, the inventory summary it sends with heartbeats (credential profile names, client tools, disk space), the stored full inventory (type-specific resources), its jobs and recent runs. The page's Refresh and Logs buttons reach the agent through the API (Temporal activities on the agent's queue).
func (*UIHandler) HandleAgents ¶
func (u *UIHandler) HandleAgents(w http.ResponseWriter, r *http.Request)
func (*UIHandler) HandleAuthCallback ¶
func (u *UIHandler) HandleAuthCallback(w http.ResponseWriter, r *http.Request)
HandleAuthCallback completes the OIDC flow and establishes the session cookie
func (*UIHandler) HandleAuthLogin ¶
func (u *UIHandler) HandleAuthLogin(w http.ResponseWriter, r *http.Request)
HandleAuthLogin starts the OIDC authorization-code flow
func (*UIHandler) HandleDashboard ¶
func (u *UIHandler) HandleDashboard(w http.ResponseWriter, r *http.Request)
func (*UIHandler) HandleInstallScript ¶
func (u *UIHandler) HandleInstallScript(w http.ResponseWriter, r *http.Request)
func (*UIHandler) HandleInstallScriptPS ¶ added in v0.9.5
func (u *UIHandler) HandleInstallScriptPS(w http.ResponseWriter, r *http.Request)
HandleInstallScriptPS serves the Windows installer: downloads the agent MSI from the GitHub release and installs it with the enrollment parameters, which makes the MSI enroll the agent and start the service.
func (*UIHandler) HandleJobs ¶
func (u *UIHandler) HandleJobs(w http.ResponseWriter, r *http.Request)
func (*UIHandler) HandleKubernetes ¶ added in v0.7.2
func (u *UIHandler) HandleKubernetes(w http.ResponseWriter, r *http.Request)
HandleKubernetes keeps old links working: cluster jobs are listed on the Backup Jobs page (filter type=kubernetes) and cluster agents on the Agents page
func (*UIHandler) HandleLoginPage ¶
func (u *UIHandler) HandleLoginPage(w http.ResponseWriter, r *http.Request)
HandleLoginPage renders the sign-in page
func (*UIHandler) HandleLogout ¶
func (u *UIHandler) HandleLogout(w http.ResponseWriter, r *http.Request)
HandleLogout clears the session (called via fetch from the UI)
func (*UIHandler) HandleOnboarding ¶ added in v0.11.0
func (u *UIHandler) HandleOnboarding(w http.ResponseWriter, r *http.Request)
HandleOnboarding renders the guided flow that installs an agent and creates its first backup jobs (agent type → platform → install → wait for the enrollment → backup type → target → contents → schedule → review, then a summary). The page keeps its state in the URL; existing agents and targets are listed for the "existing agent" shortcut and the target step.
func (*UIHandler) HandleRunDetail ¶ added in v0.9.0
func (u *UIHandler) HandleRunDetail(w http.ResponseWriter, r *http.Request)
HandleRunDetail renders the per-run detail page; the page loads the run (with its type-specific details blob) from the API and renders client-side.
func (*UIHandler) HandleRuns ¶
func (u *UIHandler) HandleRuns(w http.ResponseWriter, r *http.Request)
func (*UIHandler) HandleTargets ¶
func (u *UIHandler) HandleTargets(w http.ResponseWriter, r *http.Request)
func (*UIHandler) HandleTenants ¶ added in v0.14.2
func (u *UIHandler) HandleTenants(w http.ResponseWriter, r *http.Request)
func (*UIHandler) HandleTokens ¶
func (u *UIHandler) HandleTokens(w http.ResponseWriter, r *http.Request)
func (*UIHandler) RegisterRoutes ¶
RegisterRoutes mounts UI page routes and static file server