Skip to content

Commit

Permalink
Fix watch hook for config
Browse files Browse the repository at this point in the history
  • Loading branch information
NHAS committed Feb 5, 2024
1 parent f863db9 commit 53f808c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
5 changes: 4 additions & 1 deletion internal/webserver/statemachine.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package webserver

import (
"log"
"net/http"
"strings"

Expand All @@ -10,7 +11,9 @@ import (

func watchConfigChanges(serveMux *http.ServeMux) data.ConfigChangesFunc {
return func(be data.BasicEvent[string], i int) {
if strings.HasPrefix(be.Key, "wag-config-authenticaton-") {
if strings.HasPrefix(be.Key, "wag-config-authentication-") {

log.Println("authentication settings have changed, updating auth handlers")
authenticators.SetRoutesFromMethods(serveMux)
}
}
Expand Down
16 changes: 0 additions & 16 deletions ui/templates/management/clustering.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,6 @@ <h1 class="m-0 text-gray-900">Cluster</h1>
</p>
</div>
</div>
<div class="card-body">
<div id="toolbar">
<button id="add" class="btn btn-primary">
<i class="icon-plus"></i> Add
</button>
<button id="removeStart" class="btn btn-danger" disabled data-toggle='modal' data-target='#deleteModal'>
<i class="icon-trash"></i> Remove
</button>
</div>
<table id="devicesTable" data-toolbar="#toolbar" data-search="true" data-show-refresh="true"
data-show-columns="true" data-show-columns-toggle-all="true" data-minimum-count-columns="2"
data-show-pagination-switch="true" data-pagination="true" data-id-field="username"
data-page-list="[10, 25, 50, 100, all]" data-side-pagination="client" data-url="/management/clustering/data"
data-response-handler="responseHandler">
</table>
</div>
</div>

<script src="/vendor/bootstrap-table/js/bootstrap-table.min.js"></script>
Expand Down

0 comments on commit 53f808c

Please sign in to comment.