forked from compserv/hivemind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
107 lines (96 loc) · 4.76 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Basic Page Needs
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta charset="utf-8">
<title>AUTOLab Machines Stats</title>
<meta name="description" content="Usage stats for AUTOLab machines.">
<!-- Mobile Specific Metas
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CSS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/skeleton.css">
<link rel="stylesheet" href="css/hint.css">
<link rel="stylesheet" href="css/styles.css">
<!-- Favicon
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="icon" type="image/png" href="images/favicon.png">
</head>
<body>
<!-- Primary Page Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<div id="top">
<div class="container">
<a href="#" id="title">AUTOLab Machines</a>
<a href="https://github.com/BerkeleyAutomation/machines-stats" id="gh-link" target="_blank">GitHub</a>
</div>
</div>
<div class="container" id="main" v-cloak>
<div class="row box warning" v-if="offline && dataLoaded">
<p>Status is currently not being updated.</p>
<p>The data below is from <b>{{ lastUpdate | formatTime }}</b>.</p>
</div>
<div class="row box" v-else>
<p>This site displays usage stats for AUTOLab machines.</p>
<p v-if="dataLoaded">
The data below was gathered <b>{{ lastUpdate | timeSince }}</b>. Refresh to check for updates.
</p>
<p v-else>
Loading latest data...
</p>
</div>
<div class="row box warning" v-if="failed">
<p>Couldn't retrieve latest data. Try again later?</p>
<p>If the issue persists, please contact AUTOLab sysadmins through email or Slack.</p>
</div>
<div class="row" v-if="dataLoaded">
<input v-model="search" class="form-control u-full-width" placeholder="Regex filter by name" tabindex=1 />
<table class="u-full-width tablesorter">
<thead>
<tr>
<th @click="headerClick('sortName')" :class="headerClass('sortName')">Server name</th>
<th @click="headerClick('rating')" :class="headerClass('rating')">Overall load<sup><a href="#" class="hint--right" data-hint="Click 'View on GitHub' above for details on how this is calculated">?</a></sup></th>
<th @click="headerClick('userCount')" :class="headerClass('userCount')">User count</th>
<th @click="headerClick('usage')" :class="headerClass('usage')">CPU usage<sup><a href="#" class="hint--right" data-hint="Average CPU utilization over the past 5 minutes across all cores">?</a></sup></th>
</tr>
</thead>
<tbody>
<tr v-for="server in filteredServers" :key="server.name">
<td>
<span class="dashed hint--bottom click" data-hint="Click to copy address" :data-clipboard-text="server.name + '.berkeley.edu'">
{{ server.shortName }}
</span>
</td>
<td>
<span class="rating" :class="'rating-' + server.rating">● {{ server.rating | ratingText }}</span>
</td>
<td v-if="server.available">
<span :class="{ 'dashed hint--bottom' : server.users.length }" :data-hint="server.users | userList">
{{ server.userCount | userCount }}
</span>
</td>
<td v-else>—</td>
<td v-if="server.available">{{ server.usage | percent }}%</td>
<td v-else>—</td>
</tr>
</tbody>
</table>
</div>
<div id="footer" >
<a href="https://www.ocf.berkeley.edu">
<img src="https://www.ocf.berkeley.edu/hosting-logos/ocf-hosted-penguin-dark.svg" alt="Hosted by the OCF" style="border: 0;" />
</a>
</div>
</div>
<!-- End Document
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<script src="js/jquery.js"></script>
<script src="js/vue.min.js"></script>
<script src="js/moment.js"></script>
<script src="js/clipboard.min.js"></script>
<script src="js/main.js?t=1"></script>
</body>
</html>