Tarefas executáveis, broadcast global para agendamentos e dashboard persistente
- Tarefas agora são templates executáveis com botão play e seleção de agente - Dropdown de tarefas salvas no modal de execução para reutilização rápida - Broadcast global no manager para execuções agendadas via cron aparecerem no terminal - Dashboard atividade recente agora consulta executionsStore persistente - Suporte a exibição de pipelines e agentes na atividade recente
This commit is contained in:
@@ -294,12 +294,34 @@ const AgentsUI = {
|
||||
const instructionsEl = document.getElementById('execute-instructions');
|
||||
if (instructionsEl) instructionsEl.value = '';
|
||||
|
||||
AgentsUI._loadSavedTasks();
|
||||
|
||||
Modal.open('execute-modal-overlay');
|
||||
} catch (err) {
|
||||
Toast.error(`Erro ao abrir modal de execução: ${err.message}`);
|
||||
}
|
||||
},
|
||||
|
||||
async _loadSavedTasks() {
|
||||
const savedTaskSelect = document.getElementById('execute-saved-task');
|
||||
if (!savedTaskSelect) return;
|
||||
|
||||
try {
|
||||
const tasks = await API.tasks.list();
|
||||
savedTaskSelect.innerHTML = '<option value="">Digitar manualmente...</option>' +
|
||||
tasks.map((t) => {
|
||||
const label = t.category ? `[${t.category.toUpperCase()}] ${t.name}` : t.name;
|
||||
return `<option value="${t.id}">${label}</option>`;
|
||||
}).join('');
|
||||
AgentsUI._savedTasksCache = tasks;
|
||||
} catch {
|
||||
savedTaskSelect.innerHTML = '<option value="">Digitar manualmente...</option>';
|
||||
AgentsUI._savedTasksCache = [];
|
||||
}
|
||||
},
|
||||
|
||||
_savedTasksCache: [],
|
||||
|
||||
async export(agentId) {
|
||||
try {
|
||||
const data = await API.agents.export(agentId);
|
||||
|
||||
Reference in New Issue
Block a user