File tree 1 file changed +14
-4
lines changed
1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 49
49
</table>
50
50
</div>
51
51
</div>
52
- <script src="https://unpkg.com/
[email protected] .
11/dist/htmx.js "
53
- integrity="sha384-l9bYT9SL4CAW0Hl7pAOpfRc18mys1b0wK4U8UtGnWOxPVbVMgrOdB+jyz/WY8Jue "
52
+ <script src="https://unpkg.com/
[email protected] .
12 "
53
+ integrity="sha384-ujb1lZYygJmzgSwoxRggbCHcjc0rB2XoQrxeTUQyRjrOnlCoYta87iKBWq3EsdM2 "
54
54
crossorigin="anonymous"></script>
55
55
<script>
56
+ <?php
57
+ echo " let mNames = " . json_encode ($ PageOptions ['ShortNames ' ]) . "; \n" ;
58
+ ?>
56
59
clearTimeout(PageRefresh);
57
60
graphModules();
58
61
59
62
function graphModules() {
60
-
61
63
let canvas = document.getElementById('mgraph');
64
+ if (!canvas) {
65
+ return;
66
+ }
62
67
let labels = [];
63
68
let data = [];
64
69
let tbody = document.getElementById('modules').querySelector('tbody');
65
70
for (let i = 0; i < tbody.rows.length; i++) {
66
- labels.push(tbody.rows[i].cells[0].textContent);
71
+ let m = tbody.rows[i].cells[0].textContent;
72
+ let n = mNames[m].trim();
73
+ if (n) {
74
+ tbody.rows[i].cells[0].textContent = `${m}: ${n}`;
75
+ }
76
+ labels.push(m);
67
77
data.push(parseInt(tbody.rows[i].cells[1].textContent, 10));
68
78
}
69
79
new Chart(canvas, {
You can’t perform that action at this time.
0 commit comments