Skip to content

Commit 29a309d

Browse files
author
Ankit Goel
committed
Show ingester tokens after button click in ring status page
Signed-off-by: Ankit Goel <[email protected]>
1 parent d7cfe81 commit 29a309d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/ring/http.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ const tpl = `
2121
<head>
2222
<meta charset="UTF-8">
2323
<title>Cortex Ring Status</title>
24+
<script>
25+
function showIngesterTokens() {
26+
document.getElementById('ingesterTokens').style.display = "block";
27+
document.getElementById('showTokensButton').style.display = "none";
28+
}
29+
</script>
2430
</head>
2531
<body>
2632
<h1>Cortex Ring Status</h1>
@@ -57,7 +63,11 @@ const tpl = `
5763
{{ end }}
5864
</tbody>
5965
</table>
66+
<br>
67+
<input id="showTokensButton" type="button" name="showTokens" style="display:block" value="Show Ingester Tokens" onclick="showIngesterTokens()" />
68+
<div id="ingesterTokens" style="display:none;">
6069
<pre>{{ .Ring }}</pre>
70+
</div>
6171
</form>
6272
</body>
6373
</html>`

0 commit comments

Comments
 (0)