-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
73 lines (71 loc) · 2.7 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
<!DOCTYPE html>
<html>
<head>
<title>CASA prod metrics!</title>
<link rel="icon" type="image/png" href="img/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="img/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="img/favicon-96x96.png" sizes="96x96">
<link rel="stylesheet" href="css/index.css">
<link rel="stylesheet" href="css/materialize.min.css">
<script src="js/vue.min.js"></script>
</head>
<body>
<noscript>
<h1>Javascript Required</h1>
</noscript>
<div id="app">
<h2>Last updated {{ hoursSinceLastUpdated < 24 ? `${hoursSinceLastUpdated} hours ago` : `${Math.round(hoursSinceLastUpdated / 24)} days ago` }}</h2>
<div id="global-table">
<h3>Global Stats</h3>
<table>
<tbody>
<tr v-for="(stat, label) in global" :class="requests[label]">
<td>{{ label }}</td>
<td>
{{ stat.savedValue }}
<span
:class="diffs.global[label] < 0 ? 'red-text' : 'green-text text-accent-4'"
v-if="diffs.global[label] !== 0">
({{ (diffs.global[label] < 0 ? "" : "+") + diffs.global[label] }})
</span>
</td>
</tr>
</tbody>
</table>
</div>
<div id="org-tables">
<div v-for="org in orgs">
<h3>{{ org.name }}</h3>
<table>
<tbody>
<tr v-for="(stat, label) in org.metrics" :class="requests[label]">
<td >{{ label }}</td>
<td>
{{ stat.savedValue }}
<span
:class="diffs.orgs[org.name][label] < 0 ? 'red-text' : 'green-text text-accent-4'"
v-if="diffs.orgs[org.name][label] !== 0">
({{ (diffs.orgs[org.name][label] < 0 ? "" : "+") + diffs.orgs[org.name][label] }})
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<button @click="save">Update(to localstorage)</button>
<button class="red-text" @click="onClickClearStorage">{{ clearLocalStorageText }}</button>
<h2>Backup Script</h2>
<p>(paste into console on the page)</p>
<p id="backup-script"> {{ backup }} </p>
<button @click="download">Download Backup</button>
<div id="notifications">
<div v-for="(notification, index) in notifications">
<span :class="notification.color">{{ notification.text }}</span>
<button @click="notifications.splice(index, 1)">×</button>
</div>
</div>
</div>
</body>
<script src="js/index.min.js"></script>
</html>