Added router priority to webui's list and detail page
This commit is contained in:
parent
cd90b9761a
commit
8cd4923e72
43 changed files with 2913 additions and 131 deletions
|
@ -193,6 +193,89 @@ func TestHandler_TCP(t *testing.T) {
|
|||
jsonFile: "testdata/tcprouters-filtered-search.json",
|
||||
},
|
||||
},
|
||||
{
|
||||
desc: "TCP routers filtered by service",
|
||||
path: "/api/tcp/routers?serviceName=foo-service@myprovider",
|
||||
conf: runtime.Configuration{
|
||||
TCPRouters: map[string]*runtime.TCPRouterInfo{
|
||||
"test@myprovider": {
|
||||
TCPRouter: &dynamic.TCPRouter{
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "foo-service@myprovider",
|
||||
Rule: "Host(`foo.bar.other`)",
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: false,
|
||||
},
|
||||
},
|
||||
Status: runtime.StatusEnabled,
|
||||
},
|
||||
"bar@myprovider": {
|
||||
TCPRouter: &dynamic.TCPRouter{
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "foo-service",
|
||||
Rule: "Host(`foo.bar`)",
|
||||
},
|
||||
Status: runtime.StatusWarning,
|
||||
},
|
||||
"foo@myprovider": {
|
||||
TCPRouter: &dynamic.TCPRouter{
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "bar-service@myprovider",
|
||||
Rule: "Host(`foo.bar`)",
|
||||
},
|
||||
Status: runtime.StatusDisabled,
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: expected{
|
||||
statusCode: http.StatusOK,
|
||||
nextPage: "1",
|
||||
jsonFile: "testdata/tcprouters-filtered-serviceName.json",
|
||||
},
|
||||
},
|
||||
{
|
||||
desc: "TCP routers filtered by middleware",
|
||||
path: "/api/tcp/routers?middlewareName=auth",
|
||||
conf: runtime.Configuration{
|
||||
TCPRouters: map[string]*runtime.TCPRouterInfo{
|
||||
"test@myprovider": {
|
||||
TCPRouter: &dynamic.TCPRouter{
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "foo-service@myprovider",
|
||||
Rule: "Host(`foo.bar.other`)",
|
||||
Middlewares: []string{"inflightconn@myprovider"},
|
||||
TLS: &dynamic.RouterTCPTLSConfig{
|
||||
Passthrough: false,
|
||||
},
|
||||
},
|
||||
Status: runtime.StatusEnabled,
|
||||
},
|
||||
"bar@myprovider": {
|
||||
TCPRouter: &dynamic.TCPRouter{
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "foo-service",
|
||||
Rule: "Host(`foo.bar`)",
|
||||
Middlewares: []string{"auth", "inflightconn@myprovider"},
|
||||
},
|
||||
Status: runtime.StatusWarning,
|
||||
},
|
||||
"foo@myprovider": {
|
||||
TCPRouter: &dynamic.TCPRouter{
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "bar-service@myprovider",
|
||||
Rule: "Host(`foo.bar`)",
|
||||
Middlewares: []string{"inflightconn@myprovider", "auth"},
|
||||
},
|
||||
Status: runtime.StatusDisabled,
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: expected{
|
||||
statusCode: http.StatusOK,
|
||||
nextPage: "1",
|
||||
jsonFile: "testdata/tcprouters-filtered-middlewareName.json",
|
||||
},
|
||||
},
|
||||
{
|
||||
desc: "one TCP router by id",
|
||||
path: "/api/tcp/routers/bar@myprovider",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue