mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
chore(docs): keep root naming
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<div style="padding: 20px">
|
||||
<p>This table shows notes with most revisions</p>
|
||||
|
||||
<table class="table stats-table" style="font-size: 90%;">
|
||||
<tr>
|
||||
<th>Note</th>
|
||||
<th nowrap>Revision count</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
const notes = await api.runOnBackend(() => {
|
||||
return api.sql.getRows(`
|
||||
SELECT
|
||||
notes.noteId,
|
||||
COUNT(revisions.revisionId) AS count
|
||||
FROM notes
|
||||
JOIN revisions USING (noteId)
|
||||
WHERE notes.isDeleted = 0
|
||||
GROUP BY notes.noteId
|
||||
ORDER BY count DESC
|
||||
LIMIT 100`);
|
||||
});
|
||||
|
||||
const $statsTable = api.$container.find('.stats-table');
|
||||
|
||||
for (const note of notes) {
|
||||
$statsTable.append(
|
||||
$("<tr>")
|
||||
.append(
|
||||
$("<td>").append(await api.createNoteLink(note.noteId, {showNotePath: true}))
|
||||
)
|
||||
.append($("<td nowrap>").text(note.count))
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user