Agent-Fernsteuerung: Neustart-Befehl + Logs an Directus
- bootstrap: Collections agent_logs (Logs/Fehler von Agent & AutoRecover) und agent_commands (Befehle an den Agenten, Typ restart; Agent arbeitet „pending“ ab). - Produktion: Button „🔄 Programm neustarten“ legt einen restart-Befehl für die aktive Maschine an. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -531,6 +531,26 @@ const collections = [
|
||||
{ field: 'date_updated', type: 'timestamp', meta: { interface: 'datetime', readonly: true, special: ['date-updated'] }, schema: {} },
|
||||
] },
|
||||
|
||||
// Logs & Fehler vom Produktions-Agenten und von AutoRecover (Plotter-Fehler).
|
||||
{ collection: 'agent_logs', meta: { icon: 'article', note: 'Logs & Fehlermeldungen vom Produktions-Agenten / AutoRecover.' }, fields: [
|
||||
m2o('machine', 'machines', { onDelete: 'SET NULL', note: 'Maschine (optional).' }),
|
||||
dropdown('level', ['info', 'warn', 'error'], { default: 'info' }),
|
||||
f('source', 'string', { interface: 'input', note: 'Quelle: agent | plotter | recover | restart.' }),
|
||||
f('message', 'text', { interface: 'input-multiline' }),
|
||||
{ field: 'date_created', type: 'timestamp', meta: { interface: 'datetime', readonly: true, special: ['date-created'] }, schema: {} },
|
||||
] },
|
||||
|
||||
// Befehle an den Agenten (z. B. Programm-Neustart). Der Agent pollt „pending".
|
||||
{ collection: 'agent_commands', meta: { icon: 'terminal', note: 'Befehle an den Agenten (Programm-Neustart). Der Agent arbeitet „pending" ab.' }, fields: [
|
||||
m2o('machine', 'machines', { onDelete: 'CASCADE', note: 'Zielmaschine/-agent.' }),
|
||||
dropdown('type', ['restart'], { default: 'restart' }),
|
||||
f('target', 'string', { interface: 'input', note: 'Optionaler Programmname/-befehl (überschreibt Agent-Config).' }),
|
||||
dropdown('status', ['pending', 'done', 'error'], { default: 'pending' }),
|
||||
f('result', 'text', { interface: 'input-multiline', note: 'Ergebnis/Fehler vom Agenten.' }),
|
||||
{ field: 'date_created', type: 'timestamp', meta: { interface: 'datetime', readonly: true, special: ['date-created'] }, schema: {} },
|
||||
{ field: 'date_updated', type: 'timestamp', meta: { interface: 'datetime', readonly: true, special: ['date-updated'] }, schema: {} },
|
||||
] },
|
||||
|
||||
{ collection: 'customer_offers', meta: { icon: 'local_offer', note: 'Kundenangebote: Aufschläge/Name-Zusatz je Kunde+Produkt (Kunde wählt im Konfigurator).' }, fields: [
|
||||
m2o('customer', 'directus_users', { onDelete: 'CASCADE' }),
|
||||
m2o('product', 'products', { onDelete: 'CASCADE' }),
|
||||
|
||||
Reference in New Issue
Block a user