forked from locustio/locust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
27 lines (24 loc) 路 899 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/assets/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<title>Locust</title>
<script type="module" crossorigin src="/assets/index-dc1c0e5b.js"></script>
</head>
<body>
<div id="root"></div>
<script>
window.templateArgs = {{ template_args|tojson }}
// The server sets timestamps in UTC
// We need to convert these timestamps to locale time
window.templateArgs.history =
window.templateArgs.history.length ? window.templateArgs.history.map(({ time: serverTime, ...history }) => ({
...history,
time: new Date(new Date().setUTCHours(...(serverTime.split(":")))).toLocaleTimeString()
})) : []
</script>
</body>
</html>