feat(strategy): add option to show instances details

Closes #77
This commit is contained in:
Alexis Couvreur
2022-11-10 15:07:33 +00:00
parent 77b2611328
commit 546b378416
15 changed files with 107 additions and 2 deletions

View File

@@ -3,12 +3,14 @@ package traefik
import (
"fmt"
"net/http"
"strconv"
"strings"
"time"
)
type DynamicConfiguration struct {
DisplayName string `yaml:"displayname"`
ShowDetails *bool `yaml:"showDetails"`
Theme string `yaml:"theme"`
RefreshFrequency string `yaml:"refreshFrequency"`
}
@@ -110,6 +112,10 @@ func (c *Config) buildDynamicRequest(middlewareName string) (*http.Request, erro
q.Add("refresh_frequency", c.Dynamic.RefreshFrequency)
}
if c.Dynamic.ShowDetails != nil {
q.Add("show_details", strconv.FormatBool(*c.Dynamic.ShowDetails))
}
request.URL.RawQuery = q.Encode()
return request, nil