Aktualisierung
This commit is contained in:
parent
bebb0a0aa5
commit
47ebaa4fcd
10 changed files with 180 additions and 0 deletions
41
6aus49APP/static/app.js
Normal file
41
6aus49APP/static/app.js
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
function renderDrawsTable(data) {
|
||||
if (!data || !Array.isArray(data.items)) {
|
||||
return '<p class="muted">Keine Daten</p>';
|
||||
}
|
||||
const rows = data.items.map(d => `
|
||||
<tr>
|
||||
<td class="nowrap"><a href="/api/draw/${d.datum}" target="_blank">${d.datum}</a></td>
|
||||
<td class="numbers">${[d.z1,d.z2,d.z3,d.z4,d.z5,d.z6].map(n => `<span class="badge">${n}</span>`).join(' ')}</td>
|
||||
<td class="nowrap"><strong>${d.sz}</strong></td>
|
||||
</tr>
|
||||
`).join('');
|
||||
return `
|
||||
<p class="muted">Treffer: ${data.total}</p>
|
||||
<table role="grid">
|
||||
<thead>
|
||||
<tr><th>Datum</th><th>Zahlen</th><th>Superzahl</th></tr>
|
||||
</thead>
|
||||
<tbody>${rows}</tbody>
|
||||
</table>`;
|
||||
}
|
||||
|
||||
function renderFrequencyPanels(data) {
|
||||
const z = (data.zahlen || []).map(x => `<tr><td>${x.zahl}</td><td>${x.haeufigkeit}</td></tr>`).join('');
|
||||
const sz = (data.superzahl || []).map(x => `<tr><td>${x.zahl}</td><td>${x.haeufigkeit}</td></tr>`).join('');
|
||||
return `
|
||||
<div>
|
||||
<h3>Häufigkeit Zahlen (1–49)</h3>
|
||||
<table role="grid">
|
||||
<thead><tr><th>Zahl</th><th>Häufigkeit</th></tr></thead>
|
||||
<tbody>${z}</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Häufigkeit Superzahl (0–9)</h3>
|
||||
<table role="grid">
|
||||
<thead><tr><th>Superzahl</th><th>Häufigkeit</th></tr></thead>
|
||||
<tbody>${sz}</tbody>
|
||||
</table>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue