control/instance: Show if excluded from resolver

This commit is contained in:
Tom Wiesing 2022-10-05 17:09:46 +02:00
parent ce0c053fde
commit d2d681a4f2
No known key found for this signature in database
3 changed files with 5 additions and 1 deletions

View file

@ -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)

View file

@ -12,12 +12,13 @@
<b>Slug:</b> <code>{{ .Info.Slug }}</code> <br />
<b>URL:</b> <a href="{{ .Info.URL }}" target="_blank" rel="noopener noreferrer">{{ .Info.URL }}</a> <br />
<hr />
<b>Resolver Prefixes:</b>
<b>URI Prefixes: </b>
<ul>
{{ range .Info.Prefixes }}
<li><code>{{ . }}</code></li>
{{ end}}
</ul>
<b>Excluded from Resolver:</b> <code>{{ .Info.NoPrefixes }}</code><br />
<hr />
<b>Running:</b> <code>{{ .Info.Running }}</code> <br />
<!-- <b>OwnerEmail:</b> <code>{{ .Instance.OwnerEmail }}</code> <br /> -->

View file

@ -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 {