From d2d681a4f23241d3d876539f87306dc4fd0d805f Mon Sep 17 00:00:00 2001 From: Tom Wiesing Date: Wed, 5 Oct 2022 17:09:46 +0200 Subject: [PATCH] control/instance: Show if excluded from resolver --- cmd/info.go | 1 + internal/component/control/html/instance.html | 3 ++- internal/component/instances/wisski_status.go | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/info.go b/cmd/info.go index a06a349..5bec2d1 100644 --- a/cmd/info.go +++ b/cmd/info.go @@ -60,6 +60,7 @@ func (i info) Run(context wisski_distillery.Context) error { context.Printf("Running: %v\n", info.Running) context.Printf("Last Rebuild: %v\n", info.LastRebuild.String()) + context.Printf("Skip Prefixes: %v\n", info.NoPrefixes) context.Printf("Prefixes: (count %d)\n", len(info.Prefixes)) for _, prefix := range info.Prefixes { context.Printf("- %s\n", prefix) diff --git a/internal/component/control/html/instance.html b/internal/component/control/html/instance.html index 440bec9..6ef2b82 100644 --- a/internal/component/control/html/instance.html +++ b/internal/component/control/html/instance.html @@ -12,12 +12,13 @@ Slug: {{ .Info.Slug }}
URL: {{ .Info.URL }}

- Resolver Prefixes: + URI Prefixes: + Excluded from Resolver: {{ .Info.NoPrefixes }}

Running: {{ .Info.Running }}
diff --git a/internal/component/instances/wisski_status.go b/internal/component/instances/wisski_status.go index 62ec039..6096c11 100644 --- a/internal/component/instances/wisski_status.go +++ b/internal/component/instances/wisski_status.go @@ -24,6 +24,7 @@ type WissKIInfo struct { Snapshots []models.Snapshot // WissKI content information + NoPrefixes bool Prefixes []string // list of prefixes Pathbuilders map[string]string // all the pathbuilders } @@ -60,6 +61,7 @@ func (wisski *WissKI) Info(quick bool) (info WissKIInfo, err error) { }) group.Go(func() (err error) { info.Prefixes, _ = wisski.Prefixes() + info.NoPrefixes = wisski.NoPrefix() return nil }) group.Go(func() error {