-
Notifications
You must be signed in to change notification settings - Fork 521
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Render template for /memberlist endpoint (#3937)
* Render template for /memberlist endpoint * Add missing file
- Loading branch information
Showing
11 changed files
with
2,081 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package app | ||
|
||
import ( | ||
_ "embed" | ||
"html/template" | ||
"net/http" | ||
"path" | ||
"strings" | ||
|
||
"github.com/grafana/dskit/kv/memberlist" | ||
) | ||
|
||
//go:embed memberlist_status.gohtml | ||
var memberlistStatusPageHTML string | ||
|
||
func memberlistStatusHandler(httpPathPrefix string, kvs *memberlist.KVInitService) http.Handler { | ||
templ := template.New("memberlist_status") | ||
templ.Funcs(map[string]interface{}{ | ||
"AddPathPrefix": func(link string) string { return path.Join(httpPathPrefix, link) }, | ||
"StringsJoin": strings.Join, | ||
}) | ||
template.Must(templ.Parse(memberlistStatusPageHTML)) | ||
return memberlist.NewHTTPStatusHandler(kvs, templ) | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
a { | ||
color: #2864bb; | ||
text-decoration: none; | ||
} | ||
|
||
a:hover, a:active { | ||
text-decoration: underline; | ||
} | ||
|
||
.header .tempo-brand { | ||
max-width: 150px; | ||
} | ||
|
||
@media (min-width: 576px) { | ||
.header .tempo-brand { | ||
max-height: calc(1.375rem + 1.5vw); /* same as h1 font-size */ | ||
} | ||
} | ||
|
||
@media (min-width: 1200px) { | ||
.header .tempo-brand { | ||
max-height: 2.5rem; /* same as h1 font-size */ | ||
} | ||
} | ||
|
||
|
||
.service-row h2 { | ||
display: inline; | ||
font-size: var(--bs-body-font-size); | ||
font-weight: bolder !important; | ||
line-height: var(--bs-body-line-height); | ||
} | ||
|
||
/* fit table column to the width of the content */ | ||
.fit-width { | ||
width:0.1%; | ||
white-space: nowrap; | ||
} |