Skip to content

Commit

Permalink
removed SB collections from UI db page and fix HTML issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dstpierre committed Jul 27, 2022
1 parent 9bb9a96 commit 5351407
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/db_cols.html
Expand Up @@ -74,7 +74,7 @@
</vid>
</div>
</div>

</div>
<div class="columns pt-3">
<div x-show="showQuery == false" class="column">
<a @click="showQuery = true" class="button">
Expand Down
12 changes: 11 additions & 1 deletion ui.go
Expand Up @@ -160,12 +160,22 @@ func (x *ui) dbCols(w http.ResponseWriter, r *http.Request) {
Query string
})

names, err := datastore.ListCollections(conf.Name)
allNames, err := datastore.ListCollections(conf.Name)
if err != nil {
renderErr(w, r, err)
return
}

// we remove the "system" collection
var names []string
for _, name := range allNames {
if strings.HasPrefix(name, "sb_") {
continue
}

names = append(names, name)
}

if len(names) == 0 {
render(w, r, "db_cols.html", data, nil)
return
Expand Down

0 comments on commit 5351407

Please sign in to comment.