@@ -3,33 +3,75 @@ title: Update Site Statistics
3
3
section: Extend:Update Sites
4
4
---
5
5
6
- <div id="controls" style="left: auto; right: auto; text-align: center; margin: 0 auto;">
7
- <div>
8
- <b>Update Site:</b> <select id="site" onchange="updateChart()"></select>
9
- </div>
10
-
11
- <div>
12
- <b>Time Window:</b>
13
- <input type="radio" id="time-daily" name="timeWindow" value="daily" checked onchange="updateChart()"><label for="time-daily">Daily</label>
14
- <input type="radio" id="time-monthly" name="timeWindow" value="monthly" onchange="updateChart()"><label for="time-monthly">Monthly</label>
15
- <input type="radio" id="time-yearly" name="timeWindow" value="yearly" onchange="updateChart()"><label for="time-yearly">Yearly</label>
16
- <input type="radio" id="time-ever" name="timeWindow" value="ever" onchange="updateChart()"><label for="time-ever">Ever/Cumulative</label>
17
- </div>
18
-
19
- <div>
20
- <b>Count Type:</b>
21
- <input type="radio" id="count-unique" name="countType" value="unique" checked onchange="updateChart()"><label for="count-unique">Unique IPs</label>
22
- <input type="radio" id="count-total" name="countType" value="total" onchange="updateChart()"><label for="count-total">Total Checks</label>
6
+ <style>
7
+ #controls {
8
+ margin: 0 auto;
9
+ padding-bottom: 2em;
10
+ width: fit-content;
11
+ }
12
+ #controls .grid {
13
+ display: grid;
14
+ grid-template-columns: 150px 1fr;
15
+ gap: 0.2em 0.2em;
16
+ align-items: start;
17
+ }
18
+ #controls .grid label.heading {
19
+ font-weight: bold;
20
+ text-align: right;
21
+ }
22
+ #controls .grid div.widgets {
23
+ display: flex;
24
+ gap: 2px;
25
+ flex-wrap: wrap;
26
+ }
27
+ #controls label, #controls select {
28
+ padding-right: 0.4em;
29
+ }
30
+ #loading {
31
+ display: none;
32
+ font-style: italic;
33
+ color: #666;
34
+ text-align: center;
35
+ margin-top: 15px;
36
+ }
37
+ .error {
38
+ color: #d32f2f;
39
+ font-weight: bold;
40
+ padding: 20px;
41
+ text-align: center;
42
+ }
43
+ </style>
44
+
45
+ <div id="controls">
46
+ <div class="grid">
47
+ <label class="heading">Update Site:</label>
48
+ <select id="site" onchange="updateChart()"></select>
49
+
50
+ <label class="heading">Time Window:</label>
51
+ <div class="widgets">
52
+ <label><input type="radio" id="time-daily" name="timeWindow" value="daily" checked onchange="updateChart()"> Daily</label>
53
+ <label><input type="radio" id="time-monthly" name="timeWindow" value="monthly" onchange="updateChart()"> Monthly</label>
54
+ <label><input type="radio" id="time-yearly" name="timeWindow" value="yearly" onchange="updateChart()"> Yearly</label>
55
+ <label><input type="radio" id="time-ever" name="timeWindow" value="ever" onchange="updateChart()"> Ever/Cumulative</label>
56
+ </div>
57
+
58
+ <label class="heading">Count Type:</label>
59
+ <div class="widgets">
60
+ <label><input type="radio" id="count-unique" name="countType" value="unique" checked onchange="updateChart()"> Unique IPs</label>
61
+ <label><input type="radio" id="count-total" name="countType" value="total" onchange="updateChart()"> Total Checks</label>
62
+ </div>
63
+
64
+ <label class="heading">Options:</label>
65
+ <div class="widgets">
66
+ <label for="rolling-average"><input type="checkbox" id="rolling-average" checked onchange="updateChart()"> 7-day rolling average</label>
67
+ </div>
23
68
</div>
24
69
25
- <div style="margin-bottom: 15px;">
26
- <input type="checkbox" id="rolling-average" checked onchange="updateChart()"><label for="rolling-average">7-day rolling average</label>
70
+ <div id="loading">Loading data...</div>
27
71
</div>
28
72
29
- <div id="loading" style="display: none; font-style: italic; color: #666;">Loading data...</div>
30
- </div>
73
+ <div id="stats-chart" style="width: 100%"></div>
31
74
32
- <div id="stats-chart" style="width: 100%;"></div>
33
75
<script src="https://cdn.jsdelivr.net/npm/
[email protected] /dist/pako.min.js"></script>
34
76
<script type="text/javascript">
35
77
// Data cache to avoid refetching
@@ -224,9 +266,8 @@ section: Extend:Update Sites
224
266
225
267
} catch (error) {
226
268
document.getElementById("stats-chart").innerHTML =
227
- `<div style="padding: 20px; text-align: center; color: #d32f2f;">
228
- <p><strong>Error loading data:</strong> ${error.message}</p>
229
- <p>Please try a different selection or contact support if the problem persists.</p>
269
+ `<div class="error">
270
+ <p>Error loading data: ${error.message}</p>
230
271
</div>`;
231
272
} finally {
232
273
// Hide loading indicator
@@ -314,11 +355,11 @@ You can download the raw data directly from individual update sites. Each site h
314
355
315
356
**URL Format:** `https://sites.imagej.net/{SITE_NAME}/{STATS_FILE}`
316
357
317
- **Sites Index:** {% include link-banner url=' https://sites.imagej.net/sites.json' %}
358
+ **Sites Index:** https://sites.imagej.net/sites.json
318
359
319
360
**Example URLs:**
320
- - {% include link-banner url=' https://sites.imagej.net/Java-8/stats-unique-daily.txt.gz' %}
321
- - {% include link-banner url=' https://sites.imagej.net/Fiji/stats-total-monthly.txt.gz' %}
361
+ - https://sites.imagej.net/Java-8/stats-unique-daily.txt.gz
362
+ - https://sites.imagej.net/Fiji/stats-total-monthly.txt.gz
322
363
323
364
**Data Format:** Each line contains a datestamp and count value separated by a space:
324
365
```
0 commit comments