feat(audit): job runs and config changes read in the reader's language (E30 S5)
The audit log showed the server's fixed English lines ("rss_poll: ok — new=5, failed=0",
"log_level = DEBUG", "Background sync paused") to a Hungarian reader. The details are rebuilt from the
row's data on the client: a job run names the job and its result as the inbox does, a config change
names the field and its values (on/off, grouped counts, "default"), a pause/resume adds nothing the
action does not say. A failed run keeps its error text (diagnostic). parseSummary reads enrich's bare
count ("50") back as `enriched`, as the server's `_result_data` names it — the audit and old notices
keep only the one-liner. No backend change; old rows render too.
This commit is contained in:
@@ -55,12 +55,13 @@ describe("an older notice's one-liner", () => {
|
||||
enriched: 0,
|
||||
skipped: "tmdb_api_key not set",
|
||||
});
|
||||
// enrich's bare count, as the server's `_result_data` names it
|
||||
expect(parseSummary("42")).toEqual({ enriched: 42 });
|
||||
});
|
||||
|
||||
it("does not when a phase is nested, or it is no summary at all", () => {
|
||||
expect(parseSummary("recent={'channels_processed': 0}, deep={'videos_added': 1}")).toBeNull();
|
||||
expect(parseSummary("sync paused")).toBeNull();
|
||||
expect(parseSummary("42")).toBeNull();
|
||||
expect(parseSummary(null)).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user