Implement template export/import endpoints and enhance grid generation logic
ci / build-backend (push) Successful in 1m31s
ci / build-frontend (push) Successful in 1m5s
ci / tests (push) Successful in 3m54s
ci / sonar (push) Successful in 4m40s

Added new endpoints for exporting and importing grid configurations in TemplateEndpoints, allowing for better management of template data. Enhanced the GenerateGridCommandHandler to support seasonal layers in grid generation, improving scheduling accuracy during holiday periods. Updated related classes and records to accommodate these changes, ensuring a cohesive integration of new features. Improved documentation for clarity and maintainability.
This commit is contained in:
Leonid Pershin
2026-07-28 02:15:04 +03:00
parent 7bee84c548
commit f7e7b5f7c3
45 changed files with 2929 additions and 242 deletions
+41
View File
@@ -429,6 +429,38 @@ export const en = {
addSlotHere: 'Add slot',
newSlot: 'New slot',
/** Grid auto-build by profile: plan preview and creation. */
transfer: {
action: 'Import / export',
title: 'Grid configuration exchange',
hint: 'The file references groups and junctions by name, so it moves between channels and installations. The AI request is not sent anywhere — you copy it into your own model and bring the answer back to the import tab.',
tabs: { export: 'Export', import: 'Import', ai: 'AI request' },
exportHint:
'Exports layers, slots, rules and references to groups and junctions. Works both as a backup before an experiment and as a sample for a model.',
exportAction: 'Download file',
exported: 'File exported',
importHint:
'Load a file or paste JSON — a model answer, for example. Unknown references do not break the import: such slots are skipped and listed below.',
pickFile: 'Pick a file',
replace: 'Remove existing slots',
pastePlaceholder: 'Paste the grid configuration JSON',
importAction: 'Import',
imported: 'Slots created: {{slots}}, skipped: {{skipped}}',
badJson: 'That does not look like JSON — check that the whole answer was copied.',
warnings: 'What could not be resolved',
aiHint:
'We build the request: channel settings, your groups and library, your references and notes, plus the answer schema. The model returns JSON that loads on the import tab.',
references: 'Reference channels',
referencesPlaceholder: 'Cartoon Network, Paramount Comedy',
referencesHint:
'Comma-separated. The model matches their rhythm — block length, prime, night.',
notes: 'Notes',
notesPlaceholder:
'For example: kids in the morning, films in the evening, adult block at night',
buildPrompt: 'Build the request',
copyPrompt: 'Copy',
copied: 'Request copied',
aiNext: 'Send this to your model and paste the JSON you get back on the "Import" tab.',
},
generate: {
action: 'Build grid',
title: 'Grid auto-build',
@@ -712,6 +744,11 @@ export const en = {
timeWindow: 'Channel time window',
clearWindow: 'Clear',
timeWindowHint: 'Empty — any time. The window may cross midnight.',
nearHour: 'Near the round hour',
nearHourUnit: 'min before and after :00',
nearHourHint:
'0 — no anchoring. Time signals and jingles work this way: the break only plays around :00, not somewhere within the hour.',
badgeNearHour: '±{{minutes}} min off the hour',
badgeOnChange: 'on change',
badgeInterval: 'once per {{minutes}} min',
},
@@ -792,6 +829,10 @@ export const en = {
'next.year': 'Next show year',
'next.genre': 'Next show genre',
'next.time': 'Next start time',
'tonight.title': 'Tonights programme',
'tonight.time': 'Tonights start time',
'tomorrow.title': 'Tomorrows programme',
'tomorrow.time': 'Tomorrows start time',
time: 'Bumper airing time',
date: 'Date',
weekday: 'Weekday',