-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
363 additions
and
13 deletions.
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
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
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,87 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<title>Mermaid.js Live Update Demo: Cluster Messages</title> | ||
|
||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1, shrink-to-fit=no" | ||
/> | ||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha256-CDOy6cOibCWEdsRiZuaHf8dSGGJRYuBGC+mjoJimHGw=" crossorigin="anonymous"></script> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" integrity="sha256-PI8n5gCcz9cQqQXm3PEtDuPG8qx9oFsFctPg0S5zb8g=" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css" integrity="sha256-XOqroi11tY4EFQMR9ZYwZWKj5ZXiftSx36RRuC3anlA=" crossorigin="anonymous"> | ||
<script src="https://cdn.jsdelivr.net/npm/mermaid@10.9.1/dist/mermaid.min.js" integrity="sha256-YbM1pG3wWnzhyYN49g5fPnen+2CKEFaZfopkkwSpNtY=" crossorigin="anonymous"></script> | ||
|
||
<link rel="stylesheet" href="./index.css" /> | ||
<script src="./cluster.js"></script> | ||
</head> | ||
|
||
<body> | ||
<main role="main" class="container"> | ||
<div class="container"> | ||
<h4>Cluster Events</h4> | ||
<p> | ||
<small>Visit the UI of replicas several times to observe cluster events</small> | ||
<br> | ||
<small>This will be empty if only one replica is available.</small> | ||
</p> | ||
<div class="d-flex flex-row mt-2 mb-2" id="graph"> | ||
<pre class="mermaid"> | ||
sequenceDiagram | ||
A->>+B: {"a": 42} | ||
B->>+A: {"b": 33} | ||
</pre> | ||
</div> | ||
|
||
<h4>Server-side updates & info</h4> | ||
|
||
<div id="alerts"> | ||
<div id="alert-placeholder"></div> | ||
<div class="alert alert-warning" role="alert" id="offline-alert" style="display: none;"> | ||
Offline, hold on ... | ||
</div> | ||
<div class="alert alert-success fade" id="connected-alert" style="display: none;"> | ||
Connected | ||
</div> | ||
</div> | ||
|
||
<div class="table-responsive-sm d-flex flex-row mt-2 mb-2"> | ||
<table class="table table-fit"> | ||
<thead class="thead-light"> | ||
<tr> | ||
<th scope="col" style="display: none;">Info</th> | ||
<th scope="col" style="display: none;">Value</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr class="monospaced"> | ||
<td>Visitors active on this replica</td> | ||
<td><span id="visitors-active"></span></td> | ||
</tr> | ||
<tr class="monospaced"> | ||
<td>Visitors active in the cluster</td> | ||
<td><span id="visitors-active-cluster"></span></td> | ||
</tr> | ||
<tr class="monospaced"> | ||
<td>Replicas</td> | ||
<td><span id="replicas"></span></td> | ||
</tr> | ||
<tr class="monospaced"> | ||
<td>Total started connections</td> | ||
<td><span id="total-visitors"></span></td> | ||
</tr> | ||
<tr class="monospaced"> | ||
<td>Source</td> | ||
<td><a href="https://github.com/d-led/mermaidlive">github.com/d-led/mermaidlive</a></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</main> | ||
<script type="module"> | ||
mermaid.initialize({ startOnLoad: false }); | ||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.