-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.html
executable file
·116 lines (105 loc) · 5.46 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
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Basic Page Needs
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta charset="utf-8">
<title>Hivemind - Server Stats</title>
<meta name="description" content="Usage stats for the Berkeley EECS instructional computers.">
<meta name="author" content="Allen Guo">
<!-- 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">Hivemind</a>
<a href="https://github.com/guoguo12/hivemind" id="gh-link" target="_blank">View on GitHub</a>
</div>
</div>
<div class="container" id="main" v-cloak>
<div class="row box warning" v-if="offline && dataLoaded">
<p>Hivemind is currently not being updated. Operations will resume in August 2017.</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 the Berkeley EECS instructional computers.</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 email the author at <a href="mailto:[email protected]">[email protected]</a>.</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" v-if="dataLoaded">
This site was developed with the support of the EECS Instructional Support Group, but is independently student-operated.
<br>
This site uses Google Analytics to better understand user behavior. Learn more or opt out <a href="https://support.google.com/analytics/answer/6004245" target="_blank">here</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>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-43676088-3', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>