Limit and configure how many jobs the Jobs panels show

This commit is contained in:
tim
2026-09-27 23:38:28 +02:00
parent a7a89b145c
commit cc0f070661
12 changed files with 225 additions and 16 deletions
+5 -2
View File
@@ -45,7 +45,10 @@ const elements = (node) => node instanceof Element ? [node, ...node.children.fla
const text = (node) => node instanceof Element ? node.children.map(text).join('') : String(node);
const find = (root, tag, label) => elements(root).find((el) => el.tagName === tag && text(el) === label);
const settle = () => new Promise((resolve) => setImmediate(resolve));
const config = { metadata_fields: { title: 'Title' }, mode_labels: {}, library_available: true, update_interval: 0 };
const config = {
metadata_fields: { title: 'Title' }, mode_labels: {}, library_available: true, update_interval: 0,
job_list_max_hours: 720, job_list_max_count: 500,
};
const story = {
id: 1, title: 'Story', author: 'Author', url: 'https://example.com/story', site: 'example.com',
locked_fields: [], pinned: { title: 'Edited title' }, site_values: { title: 'Site title' },
@@ -101,7 +104,7 @@ test('button variants and attributes do not need a base class', () => {
});
for (const [name, render] of [
['settings', (main) => settingsPage(main)],
['settings', (main) => settingsPage(main, {}, config)],
['stories', (main) => storiesPage(main, {}, config)],
['story', (main) => storyPage(main, { storyId: '1' }, config)],
['chapter', (main) => chapterPage(main, { storyId: '1', chapterId: '2' })],