@knoflows/engine 0.1.0-alpha.12 → 0.1.0-alpha.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/engine.js +81 -13
- package/package.json +3 -3
- package/static/assets/i18n/en.json +27 -3
- package/static/assets/i18n/es.json +27 -3
- package/static/chunk-7nUPxia9.js +1 -0
- package/static/chunk-B5OZfu7U.js +1 -0
- package/static/chunk-B6yhN6h_.js +1 -0
- package/static/chunk-B8xDFyOW.js +1 -0
- package/static/chunk-BCQYv6zO.js +1 -0
- package/static/{chunk-C3Ej8Ue9.js → chunk-BGD9WiFM.js} +1 -1
- package/static/{chunk-Dl9xoaKd.js → chunk-BRQzRdUy.js} +1 -1
- package/static/chunk-BT1tqKUa.js +1 -0
- package/static/chunk-BbMJvJVR.js +5 -0
- package/static/chunk-Bdf1gK_x.js +1 -0
- package/static/chunk-BgZJenki.js +1 -0
- package/static/chunk-BhOOhcFV.js +1 -0
- package/static/{chunk-C5T1qa5G.js → chunk-BphvnLVV.js} +1 -1
- package/static/chunk-C4ekQTdr.js +1 -0
- package/static/chunk-CMCOXbTF.js +1 -0
- package/static/chunk-CVunAaEq.js +1 -0
- package/static/chunk-CWPY-qdb.js +1 -0
- package/static/chunk-C_RmBwoX.js +1 -0
- package/static/{chunk-hEYSTlD1.js → chunk-CjitpVjI.js} +1 -1
- package/static/chunk-CkEV4Kdw.js +1 -0
- package/static/chunk-CmjHhm0_.js +1 -0
- package/static/chunk-Cprdc3WE.js +1 -0
- package/static/chunk-CsI-lLXP.js +1 -0
- package/static/chunk-D1s098WO.js +1 -0
- package/static/chunk-D5uYKhQI.js +1 -0
- package/static/chunk-DCwYXBAy.js +1 -0
- package/static/{chunk-BdrifDCS.js → chunk-DDsAcugC.js} +23 -23
- package/static/chunk-DWyVd0g2.js +1 -0
- package/static/chunk-Dn9gu9_q.js +1 -0
- package/static/chunk-Doaes0Yg.js +7 -0
- package/static/chunk-Dqf92YVW.js +1 -0
- package/static/chunk-Oq0qp-a6.js +1 -0
- package/static/chunk-PTPh9FQ2.js +1 -0
- package/static/chunk-PfPOHfb1.js +1 -0
- package/static/chunk-WIfL3i6D.js +1 -0
- package/static/{chunk-BAgwFLbm.js → chunk-ZTjXJrt4.js} +1 -1
- package/static/chunk-bbBn-iZU.js +1 -0
- package/static/chunk-gl_-d0La.js +1 -0
- package/static/chunk-hTFsYp4X.js +1 -0
- package/static/{chunk-Bc9kVhav.js → chunk-szOy8Im7.js} +1 -1
- package/static/index.html +2 -2
- package/static/main-OG6DVLH6.js +249 -0
- package/static/styles-4UB6RUIG.css +1 -0
- package/static/chunk--F2Y9kLC.js +0 -1
- package/static/chunk-A3t8CipM.js +0 -1
- package/static/chunk-BLSuZA6j.js +0 -1
- package/static/chunk-BkJuaRUH.js +0 -1
- package/static/chunk-BmP-Xct3.js +0 -1
- package/static/chunk-BqB1I-vg.js +0 -1
- package/static/chunk-BquoV7tV.js +0 -1
- package/static/chunk-CK-2DsDH.js +0 -1
- package/static/chunk-CKFZoQzp.js +0 -1
- package/static/chunk-CLNhyiRm.js +0 -1
- package/static/chunk-CN5_Adst.js +0 -1
- package/static/chunk-COSsVdG3.js +0 -1
- package/static/chunk-Cj-KtAk-.js +0 -1
- package/static/chunk-CrD5w72_.js +0 -1
- package/static/chunk-CxBYhrEj.js +0 -1
- package/static/chunk-D5Bqg3D5.js +0 -7
- package/static/chunk-DAfnL0eP.js +0 -1
- package/static/chunk-Dc3mv2RT.js +0 -1
- package/static/chunk-Dc7Nho4-.js +0 -1
- package/static/chunk-Df_jRm7U.js +0 -1
- package/static/chunk-DqECIHE5.js +0 -1
- package/static/chunk-Dtfc5XNc.js +0 -1
- package/static/chunk-DxtF2GQ1.js +0 -1
- package/static/chunk-KhdCYqqN.js +0 -1
- package/static/chunk-TkjFi8lV.js +0 -1
- package/static/chunk-UArWmYDU.js +0 -1
- package/static/chunk-WGWZEfc0.js +0 -1
- package/static/chunk-jg6TAN9F.js +0 -1
- package/static/chunk-mb666CWY.js +0 -1
- package/static/chunk-nXCKNQUo.js +0 -1
- package/static/chunk-ndsN8K7Q.js +0 -5
- package/static/chunk-tnTBlRRN.js +0 -1
- package/static/main-RRKPLQCF.js +0 -249
- package/static/styles-6MW3GE4V.css +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knoflows/engine",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"bin": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"test:cursor-agent": "tsx src/providers/agent/cursor-agent-provider.test.ts",
|
|
39
39
|
"test:preview-models": "tsx src/providers/agent/preview-models.test.ts",
|
|
40
40
|
"test:provider-status": "tsx src/providers/provider-status.test.ts",
|
|
41
|
-
"test:runner": "tsx src/git/worktree-paths.test.ts && tsx src/runner/extract.test.ts && tsx src/runner/test/resolve-view-subjects.test.ts && tsx src/runner/test/workflow-runner.agent-interaction.test.ts && tsx src/runner/test/workflow-runner.git-shell-provider.test.ts && tsx src/runner/test/workflow-runner.loop-subworkflow.test.ts && tsx src/runner/test/workflow-runner.batch-aggregate.test.ts && tsx src/runner/test/workflow-runner.agent-output-validation.test.ts && tsx src/runner/test/workflow-runner.extended-action.test.ts && tsx src/runner/test/workflow-runner.registry-dispatch.test.ts && tsx src/runner/test/workflow-runner.retry.test.ts && tsx src/runner/test/workflow-runner.cancel.test.ts && tsx src/runner/test/resolve-context-files.test.ts && tsx src/runner/test/workflow-runner.context-files.test.ts && tsx src/runner/test/workflow-runner.worktrees.test.ts && tsx src/runner/test/workflow-runner.extract.test.ts",
|
|
42
|
-
"test:api": "tsx src/api/test/api-test.ts && tsx src/api/test/boot-empty-secrets.test.ts && tsx src/api/test/providers-status.test.ts && tsx src/api/test/settings.test.ts && tsx src/api/test/preview-models.test.ts && tsx src/api/test/query-templates.test.ts && tsx src/api/test/extended-actions.test.ts && tsx src/api/test/view-binding-shortcuts.test.ts && tsx src/api/test/workflow-library.test.ts && tsx src/api/test/context-files.test.ts && tsx src/api/test/filesystem.test.ts && tsx src/api/test/local-repositories.test.ts",
|
|
41
|
+
"test:runner": "tsx src/git/worktree-paths.test.ts && tsx src/git/repo-fetch-lock.service.test.ts && tsx src/git/git.service.test.ts && tsx src/runner/extract.test.ts && tsx src/runner/test/resolve-view-subjects.test.ts && tsx src/runner/test/workflow-runner.agent-interaction.test.ts && tsx src/runner/test/workflow-runner.git-shell-provider.test.ts && tsx src/runner/test/workflow-runner.loop-subworkflow.test.ts && tsx src/runner/test/workflow-runner.batch-aggregate.test.ts && tsx src/runner/test/workflow-runner.agent-output-validation.test.ts && tsx src/runner/test/workflow-runner.extended-action.test.ts && tsx src/runner/test/workflow-runner.registry-dispatch.test.ts && tsx src/runner/test/workflow-runner.retry.test.ts && tsx src/runner/test/workflow-runner.cancel.test.ts && tsx src/runner/test/resolve-context-files.test.ts && tsx src/runner/test/workflow-runner.context-files.test.ts && tsx src/runner/test/workflow-runner.worktrees.test.ts && tsx src/runner/test/workflow-runner.extract.test.ts && tsx src/runner/test/agent-concurrency-gate.service.test.ts && tsx src/runner/test/workflow-runner.agent-concurrency.test.ts",
|
|
42
|
+
"test:api": "tsx src/api/test/api-test.ts && tsx src/api/test/boot-empty-secrets.test.ts && tsx src/api/test/providers-status.test.ts && tsx src/api/test/settings.test.ts && tsx src/api/test/preview-models.test.ts && tsx src/api/test/query-templates.test.ts && tsx src/api/test/extended-actions.test.ts && tsx src/api/test/view-binding-shortcuts.test.ts && tsx src/api/test/workflow-library.test.ts && tsx src/api/test/workflow-export-import.test.ts && tsx src/api/test/generate-workflow-instructions.test.ts && tsx src/api/test/context-files.test.ts && tsx src/api/test/filesystem.test.ts && tsx src/api/test/local-repositories.test.ts",
|
|
43
43
|
"test:workflows-ids": "tsx src/api/workflows/assign-missing-ids.test.ts",
|
|
44
44
|
"test:listen-port": "tsx src/listen-port.test.ts",
|
|
45
45
|
"test:spa-fallback": "tsx src/static/spa-fallback.test.ts"
|
|
@@ -156,6 +156,7 @@
|
|
|
156
156
|
"jobs.detail.workflowLoadFailed": "Failed to load workflow definition for this job",
|
|
157
157
|
"jobs.detail.workflowMissing": "Workflow definition is unavailable; step list cannot be shown.",
|
|
158
158
|
"jobs.detail.queued": "Queued — waiting for the first step to start.",
|
|
159
|
+
"jobs.detail.waitingForAgentSlot": "Waiting for an available agent slot",
|
|
159
160
|
"jobs.detail.jumpToCurrent": "Jump to current step",
|
|
160
161
|
"jobs.detail.retryWorkflow": "Retry entire workflow",
|
|
161
162
|
"jobs.detail.retryStep": "Retry this step",
|
|
@@ -185,6 +186,7 @@
|
|
|
185
186
|
"jobs.extract.continue": "Continue",
|
|
186
187
|
"jobs.extract.cancel": "Cancel",
|
|
187
188
|
"jobs.stepStatus.pending": "Pending",
|
|
189
|
+
"jobs.stepStatus.queued": "Queued",
|
|
188
190
|
"jobs.stepStatus.running": "Running",
|
|
189
191
|
"jobs.stepStatus.waiting_for_children": "Waiting for children",
|
|
190
192
|
"jobs.stepStatus.completed": "Completed",
|
|
@@ -207,12 +209,18 @@
|
|
|
207
209
|
"jobs.list.loadFailed": "Failed to load jobs",
|
|
208
210
|
"jobs.list.filterAll": "All",
|
|
209
211
|
"jobs.list.running": "Currently Running",
|
|
212
|
+
"jobs.list.queued": "Queued",
|
|
210
213
|
"jobs.list.history": "History",
|
|
211
214
|
"jobs.list.runningEmpty": "No jobs are running.",
|
|
215
|
+
"jobs.list.queuedEmpty": "No agent steps are waiting for a slot.",
|
|
212
216
|
"jobs.list.historyEmpty": "No jobs match these filters.",
|
|
217
|
+
"jobs.list.queuedAgent": "Agent instance",
|
|
218
|
+
"jobs.list.queuedWait": "Waiting",
|
|
213
219
|
"workflow-editor.titleNew": "New workflow",
|
|
214
|
-
"workflow-editor.titleEdit": "Edit workflow · {{
|
|
220
|
+
"workflow-editor.titleEdit": "Edit workflow · {{name}}",
|
|
215
221
|
"workflow-editor.backToWorkflows": "Back to workflows",
|
|
222
|
+
"workflow-editor.export": "Export",
|
|
223
|
+
"workflow-editor.exportFailed": "Failed to export workflow",
|
|
216
224
|
"workflow-editor.loading": "Loading…",
|
|
217
225
|
"workflow-editor.validation": "Validation",
|
|
218
226
|
"workflow-editor.basics": "Basics",
|
|
@@ -287,6 +295,8 @@
|
|
|
287
295
|
"step-list.availableParameters.noOutput": "No output fields",
|
|
288
296
|
"step-list.availableParameters.providerOpaque": "Result of {{action}} — inspect at runtime",
|
|
289
297
|
"step-list.availableParameters.interactionOpaque": "Shape depends on the questions asked",
|
|
298
|
+
"step-list.availableParameters.arrayOf": "Array of { {{fields}} }",
|
|
299
|
+
"step-list.availableParameters.subjectTypeUnion": "Actual fields depend on which subject type the bound View resolves to.",
|
|
290
300
|
"step-list.availableParameters.subWorkflowArray": "Array of { fanOutIndex, jobId, output }",
|
|
291
301
|
"step-list.availableParameters.noPrevious": "No previous steps",
|
|
292
302
|
"step-list.availableParameters.missingId": "Set an id to copy tokens",
|
|
@@ -434,6 +444,8 @@
|
|
|
434
444
|
"settings.model.fetch": "Fetch available models",
|
|
435
445
|
"settings.model.fetchFailed": "Could not fetch models",
|
|
436
446
|
"settings.model.hint": "Leave unset to use the provider's own default. Fetch after entering an API key.",
|
|
447
|
+
"settings.maxConcurrent.label": "Max concurrent steps",
|
|
448
|
+
"settings.maxConcurrent.hint": "How many agent steps this instance may run at once. Other instances are unaffected.",
|
|
437
449
|
"settings.restartRequired.message": "Some changes require restarting Knoflows to take effect",
|
|
438
450
|
"settings.saveSuccess": "Settings saved",
|
|
439
451
|
"settings.saveFailed": "Failed to save settings",
|
|
@@ -458,6 +470,18 @@
|
|
|
458
470
|
"workflows.list.column.steps": "Steps",
|
|
459
471
|
"workflows.list.column.actions": "Actions",
|
|
460
472
|
"workflows.list.loadFailed": "Failed to load workflows",
|
|
473
|
+
"workflows.list.export": "Export",
|
|
474
|
+
"workflows.list.import": "Import",
|
|
475
|
+
"workflows.list.importFailed": "Failed to import workflow",
|
|
476
|
+
"workflows.list.importInvalidJson": "This file is not valid JSON",
|
|
477
|
+
"workflows.list.importInvalidSchema": "This file is not a valid workflow definition",
|
|
478
|
+
"workflows.list.downloadInstructions": "Download Agent Instructions",
|
|
479
|
+
"workflows.list.exportFailed": "Failed to export workflow",
|
|
480
|
+
"workflows.list.instructionsFailed": "Failed to download agent instructions",
|
|
481
|
+
"workflows.import.conflictTitle": "Import conflict",
|
|
482
|
+
"workflows.import.conflictBody": "A workflow named '{{name}}' already exists",
|
|
483
|
+
"workflows.import.update": "Update",
|
|
484
|
+
"workflows.import.createNew": "Create New",
|
|
461
485
|
"workflow-library.title": "Workflow library",
|
|
462
486
|
"workflow-library.lede": "Copy an example into your workspace. Once added, it is yours to edit.",
|
|
463
487
|
"workflow-library.source.example": "Example",
|
|
@@ -484,7 +508,7 @@
|
|
|
484
508
|
"views.list.column.query": "Query",
|
|
485
509
|
"views.list.column.actions": "Actions",
|
|
486
510
|
"views.editor.titleNew": "New view",
|
|
487
|
-
"views.editor.titleEdit": "Edit view · {{
|
|
511
|
+
"views.editor.titleEdit": "Edit view · {{name}}",
|
|
488
512
|
"views.editor.backToList": "Back to views",
|
|
489
513
|
"views.editor.name": "Name",
|
|
490
514
|
"views.editor.workflow": "Workflow",
|
|
@@ -541,7 +565,7 @@
|
|
|
541
565
|
"shortcuts.list.runFailed": "Failed to start shortcut",
|
|
542
566
|
"shortcuts.list.deleteFailed": "Failed to delete shortcut",
|
|
543
567
|
"shortcuts.editor.titleNew": "New shortcut",
|
|
544
|
-
"shortcuts.editor.titleEdit": "Edit shortcut · {{
|
|
568
|
+
"shortcuts.editor.titleEdit": "Edit shortcut · {{name}}",
|
|
545
569
|
"shortcuts.editor.backToList": "Back to shortcuts",
|
|
546
570
|
"shortcuts.editor.name": "Name",
|
|
547
571
|
"shortcuts.editor.workflow": "Workflow",
|
|
@@ -156,6 +156,7 @@
|
|
|
156
156
|
"jobs.detail.workflowLoadFailed": "No se pudo cargar la definición del flujo para este trabajo",
|
|
157
157
|
"jobs.detail.workflowMissing": "La definición del flujo no está disponible; no se puede mostrar la lista de pasos.",
|
|
158
158
|
"jobs.detail.queued": "En cola — esperando que comience el primer paso.",
|
|
159
|
+
"jobs.detail.waitingForAgentSlot": "Esperando un hueco de agente disponible",
|
|
159
160
|
"jobs.detail.jumpToCurrent": "Ir al paso actual",
|
|
160
161
|
"jobs.detail.retryWorkflow": "Reintentar todo el flujo",
|
|
161
162
|
"jobs.detail.retryStep": "Reintentar este paso",
|
|
@@ -185,6 +186,7 @@
|
|
|
185
186
|
"jobs.extract.continue": "Continuar",
|
|
186
187
|
"jobs.extract.cancel": "Cancelar",
|
|
187
188
|
"jobs.stepStatus.pending": "Pendiente",
|
|
189
|
+
"jobs.stepStatus.queued": "En cola",
|
|
188
190
|
"jobs.stepStatus.running": "En ejecución",
|
|
189
191
|
"jobs.stepStatus.waiting_for_children": "Esperando hijos",
|
|
190
192
|
"jobs.stepStatus.completed": "Completado",
|
|
@@ -207,13 +209,19 @@
|
|
|
207
209
|
"jobs.list.loadFailed": "No se pudieron cargar los trabajos",
|
|
208
210
|
"jobs.list.filterAll": "Todos",
|
|
209
211
|
"jobs.list.running": "En ejecución",
|
|
212
|
+
"jobs.list.queued": "En cola",
|
|
210
213
|
"jobs.list.history": "Historial",
|
|
211
214
|
"jobs.list.runningEmpty": "No hay trabajos en ejecución.",
|
|
215
|
+
"jobs.list.queuedEmpty": "Ningún paso de agente está esperando un hueco.",
|
|
212
216
|
"jobs.list.historyEmpty": "Ningún trabajo coincide con estos filtros.",
|
|
217
|
+
"jobs.list.queuedAgent": "Instancia de agente",
|
|
218
|
+
"jobs.list.queuedWait": "Espera",
|
|
213
219
|
"workflow-editor.loading": "Cargando…",
|
|
214
220
|
"workflow-editor.titleNew": "Nuevo flujo",
|
|
215
|
-
"workflow-editor.titleEdit": "Editar flujo · {{
|
|
221
|
+
"workflow-editor.titleEdit": "Editar flujo · {{name}}",
|
|
216
222
|
"workflow-editor.backToWorkflows": "Volver a flujos",
|
|
223
|
+
"workflow-editor.export": "Exportar",
|
|
224
|
+
"workflow-editor.exportFailed": "No se pudo exportar el flujo",
|
|
217
225
|
"workflow-editor.validation": "Validación",
|
|
218
226
|
"workflow-editor.basics": "Básicos",
|
|
219
227
|
"workflow-editor.name": "name",
|
|
@@ -287,6 +295,8 @@
|
|
|
287
295
|
"step-list.availableParameters.noOutput": "Sin campos de salida",
|
|
288
296
|
"step-list.availableParameters.providerOpaque": "Resultado de {{action}} — inspeccionar en tiempo de ejecución",
|
|
289
297
|
"step-list.availableParameters.interactionOpaque": "La forma depende de las preguntas hechas",
|
|
298
|
+
"step-list.availableParameters.arrayOf": "Array de { {{fields}} }",
|
|
299
|
+
"step-list.availableParameters.subjectTypeUnion": "Los campos reales dependen del tipo de sujeto que resuelva la vista vinculada.",
|
|
290
300
|
"step-list.availableParameters.subWorkflowArray": "Array de { fanOutIndex, jobId, output }",
|
|
291
301
|
"step-list.availableParameters.noPrevious": "Ningún paso anterior",
|
|
292
302
|
"step-list.availableParameters.missingId": "Asigna un id para copiar tokens",
|
|
@@ -434,6 +444,8 @@
|
|
|
434
444
|
"settings.model.fetch": "Obtener modelos disponibles",
|
|
435
445
|
"settings.model.fetchFailed": "No se pudieron obtener los modelos",
|
|
436
446
|
"settings.model.hint": "Déjalo vacío para usar el predeterminado del proveedor. Obtén la lista después de introducir una clave de API.",
|
|
447
|
+
"settings.maxConcurrent.label": "Pasos simultáneos máximos",
|
|
448
|
+
"settings.maxConcurrent.hint": "Cuántos pasos de agente puede ejecutar esta instancia a la vez. Las demás instancias no se ven afectadas.",
|
|
437
449
|
"settings.restartRequired.message": "Algunos cambios requieren reiniciar Knoflows para aplicarse",
|
|
438
450
|
"settings.saveSuccess": "Ajustes guardados",
|
|
439
451
|
"settings.saveFailed": "No se pudieron guardar los ajustes",
|
|
@@ -458,6 +470,18 @@
|
|
|
458
470
|
"workflows.list.column.steps": "Pasos",
|
|
459
471
|
"workflows.list.column.actions": "Acciones",
|
|
460
472
|
"workflows.list.loadFailed": "No se pudieron cargar los flujos",
|
|
473
|
+
"workflows.list.export": "Exportar",
|
|
474
|
+
"workflows.list.import": "Importar",
|
|
475
|
+
"workflows.list.importFailed": "No se pudo importar el flujo",
|
|
476
|
+
"workflows.list.importInvalidJson": "Este archivo no es JSON válido",
|
|
477
|
+
"workflows.list.importInvalidSchema": "Este archivo no es una definición de flujo válida",
|
|
478
|
+
"workflows.list.downloadInstructions": "Descargar instrucciones para el agente",
|
|
479
|
+
"workflows.list.exportFailed": "No se pudo exportar el flujo",
|
|
480
|
+
"workflows.list.instructionsFailed": "No se pudieron descargar las instrucciones",
|
|
481
|
+
"workflows.import.conflictTitle": "Conflicto al importar",
|
|
482
|
+
"workflows.import.conflictBody": "Ya existe un flujo llamado '{{name}}'",
|
|
483
|
+
"workflows.import.update": "Actualizar",
|
|
484
|
+
"workflows.import.createNew": "Crear nuevo",
|
|
461
485
|
"workflow-library.title": "Biblioteca de flujos",
|
|
462
486
|
"workflow-library.lede": "Copia un ejemplo a tu espacio de trabajo. Una vez añadido, es tuyo para editarlo.",
|
|
463
487
|
"workflow-library.source.example": "Ejemplo",
|
|
@@ -484,7 +508,7 @@
|
|
|
484
508
|
"views.list.column.query": "Consulta",
|
|
485
509
|
"views.list.column.actions": "Acciones",
|
|
486
510
|
"views.editor.titleNew": "Nueva vista",
|
|
487
|
-
"views.editor.titleEdit": "Editar vista · {{
|
|
511
|
+
"views.editor.titleEdit": "Editar vista · {{name}}",
|
|
488
512
|
"views.editor.backToList": "Volver a vistas",
|
|
489
513
|
"views.editor.name": "Nombre",
|
|
490
514
|
"views.editor.workflow": "Flujo",
|
|
@@ -541,7 +565,7 @@
|
|
|
541
565
|
"shortcuts.list.runFailed": "No se pudo iniciar el atajo",
|
|
542
566
|
"shortcuts.list.deleteFailed": "No se pudo eliminar el atajo",
|
|
543
567
|
"shortcuts.editor.titleNew": "Nuevo atajo",
|
|
544
|
-
"shortcuts.editor.titleEdit": "Editar atajo · {{
|
|
568
|
+
"shortcuts.editor.titleEdit": "Editar atajo · {{name}}",
|
|
545
569
|
"shortcuts.editor.backToList": "Volver a atajos",
|
|
546
570
|
"shortcuts.editor.name": "Nombre",
|
|
547
571
|
"shortcuts.editor.workflow": "Flujo",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {b}from'./chunk-Dqf92YVW.js';import {B as Bt}from'./chunk-CMCOXbTF.js';import'./chunk-DWyVd0g2.js';import {L as Lt,u as ut,D as Di,m as mn}from'./chunk-CVunAaEq.js';import'./chunk-CjitpVjI.js';import {C,d,a as ae$1,V as Ve,b as at,q as qo,H as Hw,u as ue$1,s,r,n as n$1,Q as QE,M as Mi,o as o8,e as e8,T as T3,L as Ln,v as vd,c as Cc,f as r7,g as oM,E as E5,Y as Y5,K as Kt,h as _i,j as vw,R as Rw,k as Kc,l as gh,m as oE,p as bD,w as lh,N as ND,S as SD,x as gI,P as Ph,O as Ow,y as nl,z as ch,A as sE,B as _D,D as xD,F as VD,G as ah,I as xw,J as LD,U as Pu,W as Lu}from'./main-OG6DVLH6.js';import'./chunk-DCwYXBAy.js';var de=t=>["/jobs",t],ae=(t,a)=>a.id,pe=(t,a)=>a.jobId+a.stepExecutionId;function ue(t,a){t&1&&(_i(0,"p",6),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function ce(t,a){if(t&1&&(_i(0,"p",7),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.queuedError());}}function me(t,a){t&1&&(_i(0,"p",8),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),nl(" ",Ow(2,1,"jobs.list.queuedEmpty")," "));}function he(t,a){if(t&1&&(_i(0,"tr")(1,"td")(2,"a",26),vw(3),Kc()(),_i(4,"td",27),vw(5),Kc(),_i(6,"td",28),vw(7),Kc()()),t&2){let e=a.$implicit,s=VD(2);ah("data-testid","queued-row-"+e.jobId),gI(2),ch("routerLink",xw(6,de,e.jobId)),ah("data-testid","queued-job-link-"+e.jobId),gI(),nl(" ",e.jobId," "),gI(2),Ph(e.agentInstanceId),gI(2),Ph(s.queuedWaitLabel(e.enqueuedAt));}}function ge(t,a){if(t&1&&(_i(0,"table",9)(1,"thead")(2,"tr")(3,"th"),vw(4),Rw(5,"transloco"),Kc(),_i(6,"th"),vw(7),Rw(8,"transloco"),Kc(),_i(9,"th"),vw(10),Rw(11,"transloco"),Kc()()(),_i(12,"tbody"),ND(13,he,8,8,"tr",null,pe),Kc()()),t&2){let e=VD();gI(4),Ph(Ow(5,3,"jobs.table.column.id")),gI(3),Ph(Ow(8,5,"jobs.list.queuedAgent")),gI(3),Ph(Ow(11,7,"jobs.list.queuedWait")),gI(3),xD(e.queuedSteps());}}function fe(t,a){if(t&1&&lh(0,"nz-option",15),t&2){let e=a.$implicit;ch("nzValue",e.id)("nzLabel",e.name+" ("+e.id+")");}}function be(t,a){t&1&&(_i(0,"p",16),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function _e(t,a){if(t&1&&(_i(0,"p",17),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.runningError());}}function ye(t,a){t&1&&(_i(0,"p",18),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),nl(" ",Ow(2,1,"jobs.list.runningEmpty")," "));}function Ce(t,a){if(t&1&&lh(0,"app-job-status-table",19),t&2){let e=VD();ch("jobs",e.runningJobs());}}function xe(t,a){if(t&1&&(lh(0,"nz-option",15),Rw(1,"transloco"),Rw(2,"transloco")),t&2){let e=a.$implicit,s=VD();ch("nzValue",e)("nzLabel",e==="all"?Ow(1,2,"jobs.list.filterAll"):Ow(2,4,s.statusKey(e)));}}function Me(t,a){if(t&1&&lh(0,"nz-option",15),t&2){let e=a.$implicit;ch("nzValue",e.id)("nzLabel",e.name+" ("+e.id+")");}}function ve(t,a){t&1&&(_i(0,"p",23),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function Ie(t,a){if(t&1&&(_i(0,"p",24),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.historyError());}}function we(t,a){t&1&&(_i(0,"p",25),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),nl(" ",Ow(2,1,"jobs.list.historyEmpty")," "));}function Se(t,a){if(t&1){let e=LD();_i(0,"nz-pagination",30),gh("nzPageIndexChange",function(o){Pu(e);let h=VD(2);return Lu(h.setHistoryPage(o))}),Kc();}if(t&2){let e=VD(2);ch("nzPageIndex",e.historyPageIndex())("nzPageSize",e.pageSize)("nzTotal",e.historyTotal());}}function ze(t,a){if(t&1&&(lh(0,"app-job-status-table",19),bD(1,Se,1,3,"nz-pagination",29)),t&2){let e=VD();ch("jobs",e.historyJobs()),gI(),_D(e.historyTotal()>e.pageSize||e.historyPageIndex()>1?1:-1);}}var Ee=20,Le=50,Pe=3e3,le=["completed","failed","cancelled"],Ye=(()=>{class t{constructor(){this.jobsApi=C(d),this.workflowsApi=C(b),this.route=C(ae$1),this.transloco=C(Ve),this.destroyRef=C(at),this.pageSize=Ee,this.historyStatusOptions=["all",...le],this.runningJobs=qo([]),this.queuedSteps=qo([]),this.historyJobs=qo([]),this.workflows=qo([]),this.runningLoading=qo(true),this.queuedLoading=qo(true),this.historyLoading=qo(true),this.runningError=qo(null),this.queuedError=qo(null),this.historyError=qo(null),this.runningWorkflowId=qo(""),this.historyWorkflowId=qo(""),this.historyStatusFilter=qo("all"),this.showChildJobs=qo(false),this.historyPageIndex=qo(1),this.polling=qo(false),this.historyTotal=Hw(()=>{let e=(this.historyPageIndex()-1)*this.pageSize,s=this.historyJobs().length;return s<this.pageSize?e+s:e+s+1}),this.pollHandle=null,this.onVisibility=()=>{if(document.hidden){this.stopPolling();return}this.loadRunning({silent:true}),this.loadQueued({silent:true}),this.loadHistory({silent:true}),this.startPolling();},this.destroyRef.onDestroy(()=>{this.stopPolling(),document.removeEventListener("visibilitychange",this.onVisibility);}),this.loadWorkflows(),this.route.queryParamMap.pipe(ue$1(this.destroyRef)).subscribe(e=>{let s=e.get("status");s&&le.includes(s)?this.historyStatusFilter.set(s):this.historyStatusFilter.set("all"),this.historyPageIndex.set(1),this.loadRunning(),this.loadQueued(),this.loadHistory();}),document.addEventListener("visibilitychange",this.onVisibility),this.startPolling();}statusKey(e){return `jobs.status.${e}`}isPolling(){return this.polling()}setHistoryStatusFilter(e){this.historyStatusFilter.set(e),this.historyPageIndex.set(1),this.loadHistory();}setRunningWorkflowId(e){this.runningWorkflowId.set(e),this.loadRunning();}setHistoryWorkflowId(e){this.historyWorkflowId.set(e),this.historyPageIndex.set(1),this.loadHistory();}setShowChildJobs(e){this.showChildJobs.set(e),this.historyPageIndex.set(1),this.loadRunning(),this.loadHistory();}setHistoryPage(e){this.historyPageIndex.set(e),this.loadHistory();}loadWorkflows(){this.workflowsApi.list().pipe(ue$1(this.destroyRef)).subscribe({next:e=>{this.workflows.set(e);},error:()=>{this.workflows.set([]);}});}loadRunning(e={}){let s$1=this.runningWorkflowId();e.silent||(this.runningLoading.set(true),this.runningError.set(null)),this.jobsApi.list(s(r({terminal:false,topLevelOnly:!this.showChildJobs()},s$1?{workflowId:s$1}:{}),{limit:Le,offset:0})).pipe(ue$1(this.destroyRef)).subscribe({next:o=>{this.runningJobs.set(o),this.runningLoading.set(false);},error:o=>{this.runningLoading.set(false),!e.silent&&this.runningError.set(this.errorMessage(o,this.transloco.translate("jobs.list.loadFailed")));}});}queuedWaitLabel(e){let s=Date.now()-Date.parse(e),o=Number.isFinite(s)?Math.max(0,Math.floor(s/1e3)):0;if(o<60)return `${o}s`;let h=Math.floor(o/60);return h<60?`${h}m`:`${Math.floor(h/60)}h`}loadQueued(e={}){e.silent||(this.queuedLoading.set(true),this.queuedError.set(null)),this.jobsApi.listQueued().pipe(ue$1(this.destroyRef)).subscribe({next:s=>{this.queuedSteps.set(s),this.queuedLoading.set(false);},error:s=>{this.queuedLoading.set(false),!e.silent&&this.queuedError.set(this.errorMessage(s,this.transloco.translate("jobs.list.loadFailed")));}});}loadHistory(e={}){let s$1=this.historyStatusFilter(),o=this.historyWorkflowId();e.silent||(this.historyLoading.set(true),this.historyError.set(null)),this.jobsApi.list(s(r(r({terminal:true,topLevelOnly:!this.showChildJobs()},s$1==="all"?{}:{status:s$1}),o?{workflowId:o}:{}),{limit:this.pageSize,offset:(this.historyPageIndex()-1)*this.pageSize})).pipe(ue$1(this.destroyRef)).subscribe({next:h=>{this.historyJobs.set(h),this.historyLoading.set(false);},error:h=>{this.historyLoading.set(false),!e.silent&&this.historyError.set(this.errorMessage(h,this.transloco.translate("jobs.list.loadFailed")));}});}startPolling(){this.pollHandle!=null||document.hidden||(this.pollHandle=setInterval(()=>{this.loadRunning({silent:true}),this.loadQueued({silent:true}),this.loadHistory({silent:true});},Pe),this.polling.set(true));}stopPolling(){this.pollHandle!=null&&(clearInterval(this.pollHandle),this.pollHandle=null),this.polling.set(false);}errorMessage(e,s){return e instanceof n$1||e instanceof Error?e.message:s}static{this.\u0275fac=function(s){return new(s||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-job-list"]],decls:65,vars:40,consts:[["data-testid","jobs-list",1,"list-page"],[1,"header"],["nz-button","","nzType","primary","routerLink","/jobs/new","data-testid","start-job"],["nz-checkbox","","data-testid","show-child-jobs",1,"child-toggle",3,"ngModelChange","ngModel"],["data-testid","jobs-queued",1,"section"],[1,"section-header"],["data-testid","queued-loading"],["data-testid","queued-error",1,"error"],["data-testid","queued-empty",1,"section-empty"],["data-testid","jobs-queued-table",1,"queued-table"],["data-testid","jobs-running",1,"section"],[1,"filters"],[1,"field"],["data-testid","running-workflow-filter",3,"ngModelChange","ngModel"],["nzValue","",3,"nzLabel"],[3,"nzValue","nzLabel"],["data-testid","running-loading"],["data-testid","running-error",1,"error"],["data-testid","running-empty",1,"section-empty"],[3,"jobs"],["data-testid","jobs-history",1,"section","section-history"],["data-testid","history-status-filter",3,"ngModelChange","ngModel"],["data-testid","history-workflow-filter",3,"ngModelChange","ngModel"],["data-testid","history-loading"],["data-testid","history-error",1,"error"],["data-testid","history-empty",1,"section-empty"],[3,"routerLink"],["data-testid","queued-agent"],["data-testid","queued-wait"],["data-testid","jobs-pagination",3,"nzPageIndex","nzPageSize","nzTotal"],["data-testid","jobs-pagination",3,"nzPageIndexChange","nzPageIndex","nzPageSize","nzTotal"]],template:function(s,o){s&1&&(_i(0,"main",0)(1,"header",1)(2,"h1"),vw(3),Rw(4,"transloco"),Kc(),_i(5,"a",2),vw(6),Rw(7,"transloco"),Kc()(),_i(8,"label",3),gh("ngModelChange",function(b){return o.setShowChildJobs(b)}),vw(9),Rw(10,"transloco"),Kc(),oE(),_i(11,"section",4)(12,"header",5)(13,"h2"),vw(14),Rw(15,"transloco"),Kc()(),bD(16,ue,3,3,"p",6)(17,ce,2,1,"p",7)(18,me,3,3,"p",8)(19,ge,15,9,"table",9),Kc(),_i(20,"section",10)(21,"header",5)(22,"h2"),vw(23),Rw(24,"transloco"),Kc()(),_i(25,"div",11)(26,"div",12)(27,"span"),vw(28),Rw(29,"transloco"),Kc(),_i(30,"nz-select",13),gh("ngModelChange",function(b){return o.setRunningWorkflowId(b)}),lh(31,"nz-option",14),Rw(32,"transloco"),ND(33,fe,1,2,"nz-option",15,ae),Kc(),oE(),Kc()(),bD(35,be,3,3,"p",16)(36,_e,2,1,"p",17)(37,ye,3,3,"p",18)(38,Ce,1,1,"app-job-status-table",19),Kc(),_i(39,"section",20)(40,"header",5)(41,"h2"),vw(42),Rw(43,"transloco"),Kc()(),_i(44,"div",11)(45,"div",12)(46,"span"),vw(47),Rw(48,"transloco"),Kc(),_i(49,"nz-select",21),gh("ngModelChange",function(b){return o.setHistoryStatusFilter(b)}),ND(50,xe,3,6,"nz-option",15,SD),Kc(),oE(),Kc(),_i(52,"div",12)(53,"span"),vw(54),Rw(55,"transloco"),Kc(),_i(56,"nz-select",22),gh("ngModelChange",function(b){return o.setHistoryWorkflowId(b)}),lh(57,"nz-option",14),Rw(58,"transloco"),ND(59,Me,1,2,"nz-option",15,ae),Kc(),oE(),Kc()(),bD(61,ve,3,3,"p",23)(62,Ie,2,1,"p",24)(63,we,3,3,"p",25)(64,ze,2,2),Kc()()),s&2&&(gI(3),Ph(Ow(4,18,"jobs.list.title")),gI(3),nl(" ",Ow(7,20,"jobs.list.startButton")," "),gI(2),ch("ngModel",o.showChildJobs()),sE(),gI(),nl(" ",Ow(10,22,"jobs.list.showChildJobs")," "),gI(5),Ph(Ow(15,24,"jobs.list.queued")),gI(2),_D(o.queuedLoading()?16:o.queuedError()?17:o.queuedSteps().length===0?18:19),gI(7),Ph(Ow(24,26,"jobs.list.running")),gI(5),Ph(Ow(29,28,"jobs.list.filterByWorkflow")),gI(2),ch("ngModel",o.runningWorkflowId()),sE(),gI(),ch("nzLabel",Ow(32,30,"jobs.list.filterAll")),gI(2),xD(o.workflows()),gI(2),_D(o.runningLoading()?35:o.runningError()?36:o.runningJobs().length===0?37:38),gI(7),Ph(Ow(43,32,"jobs.list.history")),gI(5),Ph(Ow(48,34,"jobs.list.filterByStatus")),gI(2),ch("ngModel",o.historyStatusFilter()),sE(),gI(),xD(o.historyStatusOptions),gI(4),Ph(Ow(55,36,"jobs.list.filterByWorkflow")),gI(2),ch("ngModel",o.historyWorkflowId()),sE(),gI(),ch("nzLabel",Ow(58,38,"jobs.list.filterAll")),gI(2),xD(o.workflows()),gI(2),_D(o.historyLoading()?61:o.historyError()?62:o.historyJobs().length===0?63:64));},dependencies:[Mi,o8,e8,T3,Ln,vd,Cc,r7,Lt,ut,Di,mn,oM,E5,Y5,Bt,Kt],styles:[".list-page[_ngcontent-%COMP%]{padding:1.25rem 1.5rem 3rem;display:flex;flex-direction:column;gap:1rem}.header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0}.child-toggle[_ngcontent-%COMP%]{align-self:flex-start}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.section-history[_ngcontent-%COMP%]{padding-top:1.25rem;border-top:1px solid #e7e5e4}.section-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.1rem}.filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1rem 1.25rem;align-items:flex-end}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;min-width:12rem;max-width:18rem}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.section-empty[_ngcontent-%COMP%]{margin:0;color:#57534e}.queued-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.queued-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .queued-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{text-align:left;padding:.5rem .75rem .5rem 0;border-bottom:1px solid #e7e5e4}.queued-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e;font-weight:600}.error[_ngcontent-%COMP%]{color:#9f1239}"]});}}return t})();export{Ee as JOB_LIST_PAGE_SIZE,Le as JOB_RUNNING_LIMIT,Pe as JOB_RUNNING_POLL_MS,Ye as JobListComponent,le as TERMINAL_JOB_STATUSES};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {ar as YE,as as uu,C,av as _r,a_ as B1,b as at$1,b1 as za,bO as A,ay as a3,cA as ji,du as bt$1,q as qo,H as Hw,a2 as $0,aJ as Z0,aA as Ie,b4 as Uw,aB as m1,b3 as ya,aX as de,an as Se,cV as mt,b6 as P8,dv as Me,u as ue,$ as rd,bE as Gl,bb as ga,ba as M9,bx as XE,aK as Sw,bf as R1,bg as rD,bh as R4,l as gh,G as ah,bi as cw,a5 as Mh,b5 as W0,bA as Er,a3 as B0,r,b7 as y9,am as Ml,b2 as W3,ca as f9,b9 as Kf,Q as QE,aE as pt,aF as Se$1,v as vd,c as Cc,f as r7,a1 as w7,bc as es,bd as BD,p as bD,aR as nh,be as Lw,B as _D,aM as wo,bl as Eh,bk as GD,dw as J5,dx as p3,dy as zl,dz as e7,ao as k4,e as e8,dA as W0$1,dB as rr,aI as ly,aZ as Y0,N as ND,a7 as MD,D as xD,aL as Bt$1,aN as Ih,aO as qD,aP as WD,bm as U0,F as VD,ai as zD,z as ch,h as _i,k as Kc,x as gI,bq as $D,J as LD,U as Pu,W as Lu,m as oE,A as sE,cz as Bh,dC as Tw,j as vw,P as Ph,w as lh,I as xw,dD as Cw,y as nl}from'./main-OG6DVLH6.js';var nt=new A("");var ht=["otpInput"];function gt(t,o){if(t&1){let e=LD();_i(0,"input",2,0),gh("input",function(i){let r=Pu(e).$index,l=VD();return Lu(l.onInput(r,i))})("focus",function(i){Pu(e);let r=VD();return Lu(r.onFocus(i))})("keydown",function(i){let r=Pu(e).$index,l=VD();return Lu(l.onKeyDown(r,i))})("paste",function(i){let r=Pu(e).$index,l=VD();return Lu(l.onPaste(r,i))}),Kc(),oE();}if(t&2){let e=o.$implicit,n=VD();ch("nzSize",n.nzSize)("formControl",e)("nzStatus",n.nzStatus),sE();}}var _t=[[["","nzInputAddonBefore",""]],[["","nzInputAddonAfter",""]],[["","nzInputSearchEnterButton",""]],[["","nzInputPrefix",""]],[["","nzInputSuffix",""]],[["","nzInputClearIcon",""]],[["","nz-input",""]]],vt=["[nzInputAddonBefore]","[nzInputAddonAfter]","[nzInputSearchEnterButton]","[nzInputPrefix]","[nzInputSuffix]","[nzInputClearIcon]","[nz-input]"],Ct=t=>({$implicit:t});function zt(t,o){}function bt(t,o){if(t&1&&nh(0,zt,0,0,"ng-template",4),t&2){VD();let e=zD(4);ch("ngTemplateOutlet",e);}}function yt(t,o){}function Nt(t,o){if(t&1&&nh(0,yt,0,0,"ng-template",4),t&2){VD();let e=zD(8);ch("ngTemplateOutlet",e);}}function Dt(t,o){}function xt(t,o){if(t&1&&nh(0,Dt,0,0,"ng-template",4),t&2){VD();let e=zD(10);ch("ngTemplateOutlet",e);}}function Mt(t,o){if(t&1&&vw(0),t&2){let e=VD(3);Ph(e.nzAddonBefore());}}function St(t,o){t&1&&(_i(0,"span",6),$D(1,0,null,Mt,1,1),Kc());}function It(t,o){}function wt(t,o){if(t&1&&nh(0,It,0,0,"ng-template",4),t&2){VD(2);let e=zD(6);ch("ngTemplateOutlet",e);}}function At(t,o){}function Et(t,o){if(t&1&&nh(0,At,0,0,"ng-template",4),t&2){VD(2);let e=zD(10);ch("ngTemplateOutlet",e);}}function Tt(t,o){if(t&1&&vw(0),t&2){VD(2);let e=Cw(0);nl(" ",e," ");}}function Ft(t,o){t&1&&lh(0,"nz-icon",9);}function Vt(t,o){if(t&1&&bD(0,Tt,1,1)(1,Ft,1,0,"nz-icon",9),t&2){VD();let e=Cw(0);_D(e&&typeof e=="string"?0:1);}}function Rt(t,o){if(t&1){let e=LD();Bh(0),_i(1,"button",8),gh("click",function(i){Pu(e);let r=VD(3);return Lu(r.inputSearchDir.search(i))}),$D(2,2,null,Vt,2,1),Kc();}if(t&2){let e=VD(3),n=Tw(e.inputSearchDir.nzEnterButton()),i=e.inputSearchEnterButton()??n!==false;gI(),ch("nzType",i?"primary":"default")("nzSize",e.size())("nzLoading",e.inputSearchDir.nzLoading());}}function kt(t,o){if(t&1&&vw(0),t&2){let e=VD(3);Ph(e.nzAddonAfter());}}function Pt(t,o){if(t&1&&(_i(0,"span",6),bD(1,Rt,4,4,"button",7),$D(2,1,null,kt,1,1),Kc()),t&2){let e=VD(2);gI(),_D(e.inputSearchDir?1:-1);}}function Ot(t,o){if(t&1&&(_i(0,"span",5),bD(1,St,3,0,"span",6),bD(2,wt,1,1,null,4)(3,Et,1,1,null,4),bD(4,Pt,4,1,"span",6),Kc()),t&2){let e=VD();gI(),_D(e.hasAddonBefore()?1:-1),gI(),_D(e.hasAffix()?2:3),gI(2),_D(e.hasAddonAfter()?4:-1);}}function Bt(t,o){}function Wt(t,o){if(t&1&&(_i(0,"span"),nh(1,Bt,0,0,"ng-template",4),Kc()),t&2){let e=VD(),n=zD(8);cw(e.affixWrapperClass()),gI(),ch("ngTemplateOutlet",n);}}function Lt(t,o){if(t&1&&vw(0),t&2){let e=VD(3);Ph(e.nzPrefix());}}function jt(t,o){t&1&&(_i(0,"span",10),$D(1,3,null,Lt,1,1),Kc());}function $t(t,o){}function qt(t,o){t&1&&lh(0,"nz-icon",17);}function Ut(t,o){if(t&1){let e=LD();_i(0,"span",16),gh("click",function(i){Pu(e);let r=VD(3);return r.clear(),Lu(r.inputSearchDir?.search(i,"clear"))}),$D(1,5,null,qt,1,0),Kc();}if(t&2){let e=VD(3);Mh("ant-input-clear-icon-has-suffix",e.nzSuffix()||e.suffix()||e.hasFeedback()||e.inputPasswordDir?.nzVisibilityToggle())("ant-input-clear-icon-hidden",!e.inputDir().value()||e.disabled()||e.readOnly());}}function Ht(t,o){if(t&1&&(_i(0,"span",13),vw(1),Kc()),t&2){let e=VD(3);gI(),Ph(e.dataCount());}}function Gt(t,o){}function Qt(t,o){if(t&1&&nh(0,Gt,0,0,"ng-template",19),t&2){let e=VD(4);ch("ngTemplateOutlet",o)("ngTemplateOutletContext",xw(2,Ct,e.inputPasswordDir.nzVisible()));}}function Zt(t,o){if(t&1&&lh(0,"nz-icon",20),t&2){let e=VD(4);ch("nzType",e.inputPasswordDir.nzVisible()?"eye":"eye-invisible");}}function Kt(t,o){if(t&1){let e=LD();_i(0,"span",18),gh("click",function(){Pu(e);let i=VD(3);return Lu(i.inputPasswordDir.toggleVisible())}),bD(1,Qt,1,4,null,19)(2,Zt,1,1,"nz-icon",20),Kc();}if(t&2){let e,n=VD(3);gI(),_D((e=n.inputPasswordIconTmpl())?1:2,e);}}function Xt(t,o){if(t&1&&vw(0),t&2){let e=VD(3);Ph(e.nzSuffix());}}function Yt(t,o){if(t&1&&lh(0,"nz-form-item-feedback-icon",15),t&2){let e=VD(3);ch("status",e.status());}}function Jt(t,o){if(t&1&&(_i(0,"span",11),bD(1,Ut,3,4,"span",12),bD(2,Ht,2,1,"span",13),bD(3,Kt,3,1,"span",14),$D(4,4,null,Xt,1,1),bD(6,Yt,1,1,"nz-form-item-feedback-icon",15),Kc()),t&2){let e=VD(2);gI(),_D(e.nzAllowClear()?1:-1),gI(),_D(e.nzShowCount()?2:-1),gI(),_D(e.inputPasswordDir&&e.inputPasswordDir.nzVisibilityToggle()?3:-1),gI(3),_D(e.hasFeedback()&&e.status()?6:-1);}}function en(t,o){if(t&1&&(bD(0,jt,3,0,"span",10),nh(1,$t,0,0,"ng-template",4),bD(2,Jt,7,4,"span",11)),t&2){let e=VD(),n=zD(10);_D(e.hasPrefix()?0:-1),gI(),ch("ngTemplateOutlet",n),gI(),_D(e.hasSuffix()?2:-1);}}function tn(t,o){t&1&&$D(0,6);}var it=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputAddonBefore",""]]})}return t})(),rt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputAddonAfter",""]]})}return t})(),ot=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputPrefix",""]]})}return t})(),at=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputSuffix",""]]})}return t})(),lt=(()=>{class t{nzVisibilityToggle=$0(true);nzVisible=U0(false);toggleVisible(){this.nzVisible.update(e=>!e);}static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["nz-input-password"]],hostAttrs:[1,"ant-input-password"],inputs:{nzVisibilityToggle:[1,"nzVisibilityToggle"],nzVisible:[1,"nzVisible"]},outputs:{nzVisible:"nzVisibleChange"},exportAs:["nzInputPassword"]})}return t})(),st=(()=>{class t{static ngTemplateContextGuard(e,n){return true}static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputPasswordIcon",""]]})}return t})(),dt=new A(""),ct=new A(""),nn="ant-input",z=(()=>{class t{elementRef=C(_r);compactSize=C(B1,{optional:true});destroyRef=C(at$1);nzFormStatusService=C(za,{optional:true});inputWrapper=C(dt,{host:true,optional:true});focusMonitor=C(a3);hostView=C(ji);inputPasswordDir=C(lt,{host:true,optional:true});inputSearchDir=C(ct,{host:true,optional:true});formField=C(nt,{self:true,optional:true});ngControl=C(bt$1,{self:true,optional:true});nativeValue=qo(this.elementRef.nativeElement.value);value=Hw(()=>this.formField?String(this.formField.state().value()??""):this.nativeValue());nzVariant=$0();nzSize=$0("default");nzStatus=$0("");disabled=$0(false,{transform:Z0});readonly=$0(false,{transform:Z0});controlDisabled=qo(false);finalDisabled=Hw(()=>this.formField?this.formField.state().disabled():this.ngControl?this.controlDisabled():this.disabled());dir=C(Ie).valueSignal;size=Uw(this.nzSize);formSize=C(m1,{optional:true});formVariant=C(ya,{optional:true});status=this.nzFormStatusService?de(this.nzFormStatusService.formStatusChanges.pipe(Se(e=>e.status)),{initialValue:""}):this.nzStatus;hasFeedback=de(this.nzFormStatusService?.formStatusChanges.pipe(Se(e=>e.hasFeedback))??mt,{initialValue:false});classes=Hw(()=>P8(nn,this.status(),this.hasFeedback()));type=Hw(()=>this.inputPasswordDir?this.inputPasswordDir.nzVisible()?"text":"password":this.inputSearchDir?"search":this.elementRef.nativeElement.getAttribute("type")||"text");focused=qo(false);finalSize=Hw(()=>this.formSize?.()?this.formSize():this.compactSize?this.compactSize():this.size());finalVariant=Hw(()=>this.nzVariant()||this.formVariant?.()||"outlined");feedbackRef=null;disabled$=Me(this.finalDisabled);constructor(){this.destroyRef.onDestroy(()=>{this.focusMonitor.stopMonitoring(this.elementRef);}),this.focusMonitor.monitor(this.elementRef,false).pipe(ue()).subscribe(e=>this.focused.set(!!e)),rd(()=>{this.renderFeedbackIcon();});}ngOnInit(){this.ngControl?.statusChanges?.pipe(Gl(null),ue(this.destroyRef)).subscribe(()=>{this.controlDisabled.set(!!this.ngControl.disabled);}),this.ngControl?.valueChanges?.pipe(Gl(this.ngControl?.control?.value),ue(this.destroyRef)).subscribe(e=>{this.nativeValue.set(e??"");});}onInput(e){this.nativeValue.set(e.target.value);}renderFeedbackIcon(){if(!this.status()||!this.hasFeedback()||this.inputWrapper){this.hostView.clear(),this.feedbackRef=null;return}this.feedbackRef=this.feedbackRef||this.hostView.createComponent(ga),this.feedbackRef.location.nativeElement.classList.add("ant-input-suffix"),this.feedbackRef.setInput("status",this.status());}focus(e){M9(this.elementRef.nativeElement,e);}blur(){this.elementRef.nativeElement.blur();}static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["input","nz-input",""],["textarea","nz-input",""]],hostAttrs:[1,"ant-input"],hostVars:23,hostBindings:function(n,i){n&1&&gh("input",function(l){return i.onInput(l)}),n&2&&(ah("type",i.type())("disabled",i.finalDisabled()||null)("readonly",i.readonly()||null),cw(i.classes()),Mh("ant-input-disabled",i.finalDisabled())("ant-input-outlined",i.finalVariant()==="outlined")("ant-input-borderless",i.finalVariant()==="borderless")("ant-input-filled",i.finalVariant()==="filled")("ant-input-underlined",i.finalVariant()==="underlined")("ant-input-lg",i.finalSize()==="large")("ant-input-sm",i.finalSize()==="small")("ant-input-rtl",i.dir()==="rtl")("ant-input-focused",i.focused()));},inputs:{nzVariant:[1,"nzVariant"],nzSize:[1,"nzSize"],nzStatus:[1,"nzStatus"],disabled:[1,"disabled"],readonly:[1,"readonly"]},exportAs:["nzInput"],features:[Sw([{provide:R1,useValue:"input"}]),rD([R4])]})}return t})(),rn=(()=>{class t{formBuilder=C(J5);destroyRef=C(at$1);otpInputs;nzLength=6;nzSize="default";disabled=false;nzStatus="";nzFormatter=e=>e;nzMask=null;otpArray;internalValue=[];onChangeCallback;onTouched=()=>{};constructor(){this.createFormArray();}ngOnChanges(e){e.nzLength?.currentValue&&this.createFormArray(),e.disabled&&this.setDisabledState(this.disabled);}onInput(e,n){let i=n.target,r=this.otpInputs.toArray()[e+1];i.value&&r?r.nativeElement.focus():r||this.selectInputBox(e);}onFocus(e){e.target.select();}onKeyDown(e,n){let i=this.otpInputs.toArray()[e-1];n.keyCode===8?(n.preventDefault(),this.internalValue[e]="",this.otpArray.at(e).setValue("",{emitEvent:false}),i&&this.selectInputBox(e-1),this.emitValue()):n.keyCode===37?(n.preventDefault(),this.selectInputBox(e-1)):n.keyCode===39&&(n.preventDefault(),this.selectInputBox(e+1));}writeValue(e){if(!e){this.otpArray.reset();return}let n=e.split("");this.internalValue=n,n.forEach((i,r)=>{let l=this.nzFormatter(i),G=this.nzMask?this.nzMask:l;this.otpArray.at(r).setValue(G,{emitEvent:false});});}registerOnChange(e){this.onChangeCallback=e;}registerOnTouched(e){this.onTouched=e;}setDisabledState(e){e?this.otpArray.disable():this.otpArray.enable();}onPaste(e,n){let i=n.clipboardData?.getData("text")||"";if(!i)return;let r=e;for(let l of i.split(""))if(r<this.nzLength){let G=this.nzFormatter(l);this.internalValue[r]=l;let pt=this.nzMask?this.nzMask:G;this.otpArray.at(r).setValue(pt,{emitEvent:false}),r++;}else break;n.preventDefault(),this.selectInputBox(r),this.emitValue();}createFormArray(){this.otpArray=this.formBuilder.array([]),this.internalValue=new Array(this.nzLength).fill("");for(let e=0;e<this.nzLength;e++){let n=this.formBuilder.nonNullable.control("",[p3.required]);n.valueChanges.pipe(zl(i=>{let r=this.nzFormatter(i);this.internalValue[e]=r,n.setValue(this.nzMask??r,{emitEvent:false}),this.emitValue();}),ue(this.destroyRef)).subscribe(),this.otpArray.push(n);}}emitValue(){let e=this.internalValue.join("");this.onChangeCallback&&this.onChangeCallback(e);}selectInputBox(e){let n=this.otpInputs.toArray();e<=0&&(e=0),e>=n.length&&(e=n.length-1),n[e].nativeElement.select();}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=QE({type:t,selectors:[["nz-input-otp"]],viewQuery:function(n,i){if(n&1&&Ih(ht,5),n&2){let r;qD(r=WD())&&(i.otpInputs=r);}},hostAttrs:[1,"ant-otp"],inputs:{nzLength:[2,"nzLength","nzLength",Y0],nzSize:"nzSize",disabled:[2,"disabled","disabled",Z0],nzStatus:"nzStatus",nzFormatter:"nzFormatter",nzMask:"nzMask"},exportAs:["nzInputOtp"],features:[Sw([{provide:Bt$1,useExisting:wo(()=>t),multi:true}]),ly],decls:2,vars:0,consts:[["otpInput",""],["nz-input","","type","text","maxlength","1","size","1",1,"ant-otp-input",3,"nzSize","formControl","nzStatus"],["nz-input","","type","text","maxlength","1","size","1",1,"ant-otp-input",3,"input","focus","keydown","paste","nzSize","formControl","nzStatus"]],template:function(n,i){n&1&&ND(0,gt,2,3,"input",1,MD),n&2&&xD(i.otpArray.controls);},dependencies:[z,e7,k4,e8,W0$1,rr],encapsulation:2})}return t})(),on=(()=>{class t{inputDir=W0.required(z);inputRef=W0.required(z,{read:_r});nzEnterButton=$0(false);nzLoading=$0(false,{transform:Z0});nzSearch=B0();size=Hw(()=>this.inputDir().nzSize());search(e,n="input"){this.nzLoading()||this.nzSearch.emit({value:this.inputRef().nativeElement.value,event:e,source:n});}onEnter(e){e.target===this.inputRef().nativeElement&&this.search(e);}static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["nz-input-search"]],contentQueries:function(n,i,r){n&1&&Eh(r,i.inputDir,z,5)(r,i.inputRef,z,5,_r),n&2&&GD(2);},hostAttrs:[1,"ant-input-search"],hostVars:6,hostBindings:function(n,i){n&1&&gh("keydown.enter",function(l){return i.onEnter(l)}),n&2&&Mh("ant-input-search-large",i.size()==="large")("ant-input-search-small",i.size()==="small")("ant-input-search-with-button",i.nzEnterButton()!==false);},inputs:{nzEnterButton:[1,"nzEnterButton"],nzLoading:[1,"nzLoading"]},outputs:{nzSearch:"nzSearch"},exportAs:["nzInputSearch"],features:[Sw([{provide:ct,useExisting:wo(()=>t)}])]})}return t})(),ut=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputSearchEnterButton",""]]})}return t})(),an=(()=>{class t{focusMonitor=C(a3);inputPasswordDir=C(lt,{self:true,optional:true});inputSearchDir=C(on,{self:true,optional:true});inputRef=W0.required(z,{read:_r});inputDir=W0.required(z);prefix=W0(ot);suffix=W0(at);addonBefore=W0(it);addonAfter=W0(rt);inputPasswordIconTmpl=W0(st,{read:Er});inputSearchEnterButton=W0(ut);nzAllowClear=$0(false,{transform:Z0});nzPrefix=$0();nzSuffix=$0();nzAddonBefore=$0();nzAddonAfter=$0();nzShowCount=$0(false,{transform:Z0});nzCount=$0();nzClear=B0();size=Hw(()=>this.inputDir().nzSize());variant=Hw(()=>this.inputDir().nzVariant());disabled=Hw(()=>this.inputDir().finalDisabled());readOnly=Hw(()=>this.inputDir().readonly());status=Hw(()=>this.inputDir().status());hasFeedback=Hw(()=>this.inputDir().hasFeedback());hasPrefix=Hw(()=>!!this.nzPrefix()||!!this.prefix());hasSuffix=Hw(()=>!!this.nzSuffix()||!!this.suffix()||this.nzAllowClear()||this.hasFeedback()||this.nzShowCount()||this.inputPasswordDir);hasAffix=Hw(()=>this.hasPrefix()||this.hasSuffix());hasAddonBefore=Hw(()=>!!this.nzAddonBefore()||!!this.addonBefore());hasAddonAfter=Hw(()=>!!this.nzAddonAfter()||!!this.addonAfter()||!!this.inputSearchDir);hasAddon=Hw(()=>this.hasAddonBefore()||this.hasAddonAfter());compactSize=C(B1,{optional:true});dir=C(Ie).valueSignal;focused=qo(false);isTextarea=Hw(()=>this.inputRef().nativeElement instanceof HTMLTextAreaElement);finalSize=Hw(()=>this.compactSize?this.compactSize():this.size());class=Hw(()=>this.hasAddon()?this.groupWrapperClass():this.hasAffix()?this.affixWrapperClass():null);affixWrapperClass=Hw(()=>r(r({"ant-input-affix-wrapper":true,"ant-input-affix-wrapper-lg":this.finalSize()==="large","ant-input-affix-wrapper-sm":this.finalSize()==="small","ant-input-affix-wrapper-disabled":this.disabled(),"ant-input-affix-wrapper-readonly":this.readOnly(),"ant-input-affix-wrapper-focused":this.focused(),"ant-input-affix-wrapper-rtl":this.dir()==="rtl"},P8("ant-input-affix-wrapper",this.status(),this.hasFeedback())),y9("ant-input-affix-wrapper",this.variant())));groupWrapperClass=Hw(()=>r(r({"ant-input-group-wrapper":true,"ant-input-group-wrapper-sm":this.finalSize()==="small","ant-input-group-wrapper-lg":this.finalSize()==="large","ant-input-group-wrapper-rtl":this.dir()==="rtl"},P8("ant-input-group-wrapper",this.status(),this.hasFeedback())),y9("ant-input-group-wrapper",this.variant())));inputValue=de(Me(this.inputDir).pipe(Ml(e=>{let n=e.ngControl;return n?(n.valueChanges??mt).pipe(Gl(n.value)):mt})));formattedValue=Hw(()=>{let e=this.nzCount(),n=this.inputValue(),i=e?.max??0,r=W3(n)?String(n):"",l=r;return e?.exceedFormatter&&(l=e.exceedFormatter(r,{max:i})),l});computedCount=Hw(()=>{let e=this.nzCount(),n=this.formattedValue(),i=n.length;return e?.strategy&&(i=e.strategy(n)),i});dataCount=Hw(()=>{let e=this.nzCount(),n=this.computedCount(),i=e?.max;return `${n}${i?`/${i}`:""}`});isOutOfRange=Hw(()=>{let n=this.nzCount()?.max;return f9(n)?this.computedCount()>n:false});constructor(){let e=C(at$1);Kf(()=>{let n=this.inputRef();this.focusMonitor.monitor(n).pipe(ue(e)).subscribe(i=>{this.focused.set(!!i);}),e.onDestroy(()=>{this.focusMonitor.stopMonitoring(n);});}),rd(()=>{if(this.nzCount()){let n=this.inputValue(),i=this.formattedValue();W3(n)&&i!==n&&this.inputDir().ngControl?.control?.setValue(i);}});}clear(){this.inputDir().ngControl?.control?.setValue(""),this.nzClear.emit();}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=QE({type:t,selectors:[["nz-input-wrapper"],["nz-input-password"],["nz-input-search"]],contentQueries:function(n,i,r){n&1&&Eh(r,i.inputRef,z,5,_r)(r,i.inputDir,z,5)(r,i.prefix,ot,5)(r,i.suffix,at,5)(r,i.addonBefore,it,5)(r,i.addonAfter,rt,5)(r,i.inputPasswordIconTmpl,st,5,Er)(r,i.inputSearchEnterButton,ut,5),n&2&&GD(8);},hostVars:8,hostBindings:function(n,i){n&2&&(cw(i.class()),Mh("ant-input-disabled",i.disabled())("ant-input-out-of-range",i.nzShowCount()&&i.isOutOfRange())("ant-input-affix-wrapper-textarea-with-clear-btn",i.nzAllowClear()&&i.isTextarea()));},inputs:{nzAllowClear:[1,"nzAllowClear"],nzPrefix:[1,"nzPrefix"],nzSuffix:[1,"nzSuffix"],nzAddonBefore:[1,"nzAddonBefore"],nzAddonAfter:[1,"nzAddonAfter"],nzShowCount:[1,"nzShowCount"],nzCount:[1,"nzCount"]},outputs:{nzClear:"nzClear"},exportAs:["nzInputWrapper"],features:[Sw([{provide:R1,useValue:"input"},{provide:dt,useExisting:wo(()=>t)}]),rD([R4])],ngContentSelectors:vt,decls:11,vars:1,consts:[["inputWithAddonInner",""],["inputWithAffix",""],["inputWithAffixInner",""],["input",""],[3,"ngTemplateOutlet"],[1,"ant-input-wrapper","ant-input-group"],[1,"ant-input-group-addon"],["nz-button","","type","button",1,"ant-input-search-button",3,"nzType","nzSize","nzLoading"],["nz-button","","type","button",1,"ant-input-search-button",3,"click","nzType","nzSize","nzLoading"],["nzType","search","nzTheme","outline"],[1,"ant-input-prefix"],[1,"ant-input-suffix"],["role","button","tabindex","-1",1,"ant-input-clear-icon",3,"ant-input-clear-icon-has-suffix","ant-input-clear-icon-hidden"],[1,"ant-input-show-count-suffix"],["role","button","tabindex","-1",1,"ant-input-password-icon"],[3,"status"],["role","button","tabindex","-1",1,"ant-input-clear-icon",3,"click"],["nzType","close-circle","nzTheme","fill"],["role","button","tabindex","-1",1,"ant-input-password-icon",3,"click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["nzTheme","outline",3,"nzType"]],template:function(n,i){n&1&&(BD(_t),bD(0,bt,1,1,null,4)(1,Nt,1,1,null,4)(2,xt,1,1,null,4),nh(3,Ot,5,3,"ng-template",null,0,Lw)(5,Wt,2,3,"ng-template",null,1,Lw)(7,en,3,3,"ng-template",null,2,Lw)(9,tn,1,0,"ng-template",null,3,Lw)),n&2&&_D(i.hasAddon()?0:i.hasAffix()?1:2);},dependencies:[pt,Se$1,vd,Cc,r7,w7,ga,es],encapsulation:2})}return t})();var ai=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=YE({type:t});static \u0275inj=uu({imports:[an,rn]})}return t})();export{ai as a,at as b,it as i,ot as o,rt as r,z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {q as qo,H as Hw,a8 as m,i as ie}from'./main-OG6DVLH6.js';var f=(()=>{class e{connect(t){let n=new URLSearchParams;t?.jobId&&n.set("jobId",t.jobId),t?.batchId&&n.set("batchId",t.batchId);let r=n.toString(),p=`${m.apiBaseUrl}/events${r?`?${r}`:""}`,a=qo([]),b=Hw(()=>{let o=a();return o.length>0?o[o.length-1]:void 0}),s=new EventSource(p);return s.onmessage=o=>{let c;try{c=JSON.parse(o.data);}catch(d){return}a.update(d=>[...d,c]);},{events:a.asReadonly(),latest:b,close:()=>{s.onmessage=null,s.close();}}}static{this.\u0275fac=function(n){return new(n||e)};}static{this.\u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"});}}return e})();export{f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {w as we}from'./chunk-BCQYv6zO.js';import {_ as _n}from'./chunk-D1s098WO.js';import {C,ak as u,d,X as Ie,V as Ve,b as at,q as qo,H as Hw,u as ue,a9 as Ng,n as n$1,Q as QE,M as Mi,L as Ln,v as vd,c as Cc,f as r7,K as Kt,h as _i,j as vw,R as Rw,k as Kc,p as bD,x as gI,P as Ph,O as Ow,y as nl,B as _D,F as VD,J as LD,l as gh,z as ch,U as Pu,W as Lu}from'./main-OG6DVLH6.js';import {b}from'./chunk-Dqf92YVW.js';import'./chunk-CVunAaEq.js';import'./chunk-CjitpVjI.js';function q(i,b){i&1&&(_i(0,"p",3),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function G(i,b){if(i&1&&(_i(0,"p",4),vw(1),Kc()),i&2){let t=VD();gI(),Ph(t.loadError());}}function H(i,b){if(i&1&&(_i(0,"p",5),vw(1),Kc()),i&2){let t=VD(2);gI(),Ph(t.actionError());}}function K(i,b){i&1&&(_i(0,"section",6)(1,"p"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"a",8),vw(5),Rw(6,"transloco"),Kc()()),i&2&&(gI(2),Ph(Ow(3,2,"shortcuts.list.emptyState")),gI(3),nl(" ",Ow(6,4,"shortcuts.list.emptyCreateButton")," "));}function Q(i,b){if(i&1){let t=LD();_i(0,"app-runnable-items-table",9),gh("rowAction",function(e){Pu(t);let c=VD(2);return Lu(c.onRowAction(e))}),Kc();}if(i&2){let t=VD(2);ch("rows",t.rows())("selectable",false)("showRowAction",true);}}function X(i,b){if(i&1&&(bD(0,H,2,1,"p",5),bD(1,K,7,6,"section",6)(2,Q,1,3,"app-runnable-items-table",7)),i&2){let t=VD();_D(t.actionError()?0:-1),gI(),_D(t.shortcuts().length===0?1:2);}}var ht=(()=>{class i{constructor(){this.shortcutsApi=C(u),this.workflowsApi=C(b),this.jobsApi=C(d),this.router=C(Ie),this.transloco=C(Ve),this.destroyRef=C(at),this.shortcuts=qo([]),this.workflows=qo([]),this.jobsById=qo({}),this.loading=qo(true),this.loadError=qo(null),this.actionError=qo(null),this.rows=Hw(()=>{let t=this.jobsById(),o=this.workflows();return this.shortcuts().map(e=>({id:e.id,primaryLabel:e.name,subtitle:o.find(c=>c.id===e.workflowId)?.name,latestJob:e.lastJobId?t[e.lastJobId]??null:null}))}),this.load();}onRowAction(t){let o=this.shortcuts().find(e=>e.id===t);o&&(this.actionError.set(null),this.jobsApi.start({workflowId:o.workflowId,inputValues:o.inputValues}).pipe(ue(this.destroyRef)).subscribe({next:e=>{this.shortcutsApi.update(o.id,{lastJobId:e.id}).pipe(ue(this.destroyRef)).subscribe({next:c=>{this.shortcuts.update(W=>W.map(C=>C.id===c.id?c:C)),this.router.navigate(["/jobs",e.id]);},error:()=>{this.router.navigate(["/jobs",e.id]);}});},error:e=>{this.actionError.set(this.errorMessage(e,this.transloco.translate("shortcuts.list.runFailed")));}}));}deleteShortcut(t){this.actionError.set(null),this.shortcutsApi.delete(t).pipe(ue(this.destroyRef)).subscribe({next:()=>{this.shortcuts.update(o=>o.filter(e=>e.id!==t));},error:o=>{this.actionError.set(this.errorMessage(o,this.transloco.translate("shortcuts.list.deleteFailed")));}});}load(){this.loading.set(true),this.loadError.set(null),Ng({shortcuts:this.shortcutsApi.list(),workflows:this.workflowsApi.list()}).pipe(ue(this.destroyRef)).subscribe({next:({shortcuts:t,workflows:o})=>{this.shortcuts.set(t),this.workflows.set(o),this.loading.set(false),this.loadLatestJobs(t);},error:t=>{this.loading.set(false),this.loadError.set(this.errorMessage(t,this.transloco.translate("shortcuts.list.loadFailed")));}});}loadLatestJobs(t){let o=t.map(e=>e.lastJobId).filter(e=>e!=null);if(o.length===0){this.jobsById.set({});return}Ng(Object.fromEntries(o.map(e=>[e,this.jobsApi.get(e)]))).pipe(ue(this.destroyRef)).subscribe({next:e=>this.jobsById.set(e),error:()=>this.jobsById.set({})});}errorMessage(t,o){return t instanceof n$1||t instanceof Error?t.message:o}static{this.\u0275fac=function(o){return new(o||i)};}static{this.\u0275cmp=QE({type:i,selectors:[["app-shortcut-list"]],decls:11,vars:7,consts:[["data-testid","shortcuts-list",1,"list-page"],[1,"header"],["nz-button","","nzType","primary","routerLink","/shortcuts/new","data-testid","create-shortcut"],["data-testid","loading"],["data-testid","load-error",1,"error"],["data-testid","action-error",1,"error"],["data-testid","empty-state",1,"empty"],[3,"rows","selectable","showRowAction"],["nz-button","","nzType","primary","routerLink","/shortcuts/new","data-testid","empty-create"],[3,"rowAction","rows","selectable","showRowAction"]],template:function(o,e){o&1&&(_i(0,"main",0)(1,"header",1)(2,"h1"),vw(3),Rw(4,"transloco"),Kc(),_i(5,"a",2),vw(6),Rw(7,"transloco"),Kc()(),bD(8,q,3,3,"p",3)(9,G,2,1,"p",4)(10,X,3,2),Kc()),o&2&&(gI(3),Ph(Ow(4,3,"shortcuts.list.title")),gI(3),nl(" ",Ow(7,5,"shortcuts.list.createButton")," "),gI(2),_D(e.loading()?8:e.loadError()?9:10));},dependencies:[Mi,Ln,vd,Cc,r7,_n,we,Kt],styles:[".list-page[_ngcontent-%COMP%]{padding:1.25rem 1.5rem 3rem;display:flex;flex-direction:column;gap:1rem}.header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.empty[_ngcontent-%COMP%]{text-align:center;padding:2.5rem 1rem;border:1px dashed #d6d3d1;background:#fff9}.empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 1rem;color:#57534e}.error[_ngcontent-%COMP%]{color:#9f1239}"]});}}return i})();export{ht as ShortcutListComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {p as pc,a as as,d as dc,K as Kl,U as Ul,c as cc,J as Ji,l as ls,e as es}from'./chunk-CVunAaEq.js';import {a2 as $0,a3 as B0,q as qo,H as Hw,Q as QE,M as Mi,L as Ln,v as vd,c as Cc,f as r7,a1 as w7,K as Kt,h as _i,p as bD,j as vw,R as Rw,k as Kc,N as ND,x as gI,B as _D,z as ch,P as Ph,O as Ow,D as xD,J as LD,l as gh,F as VD,y as nl,a4 as Pw,I as xw,G as ah,U as Pu,W as Lu}from'./main-OG6DVLH6.js';var Q=t=>({count:t}),U=t=>["/jobs",t],X=(t,c)=>c.id;function Y(t,c){if(t&1){let e=LD();_i(0,"div",1)(1,"button",4),gh("click",function(){Pu(e);let o=VD();return Lu(o.emitBulk())}),vw(2),Rw(3,"transloco"),Kc()();}if(t&2){let e=VD();gI(),ch("disabled",e.checkedCount()===0),gI(),nl(" ",Pw(3,2,"runnableTable.runSelected",xw(5,Q,e.checkedCount()))," ");}}function Z(t,c){if(t&1){let e=LD();_i(0,"th",5),gh("nzCheckedChange",function(o){Pu(e);let s=VD();return Lu(s.onAllChecked(o))}),Kc();}if(t&2){let e=VD();ch("nzChecked",e.allChecked())("nzIndeterminate",e.someChecked());}}function ee(t,c){t&1&&(_i(0,"th"),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"runnableTable.column.actions")));}function te(t,c){if(t&1){let e=LD();_i(0,"td",12),gh("nzCheckedChange",function(o){Pu(e);let s=VD().$implicit,H=VD();return Lu(H.onItemChecked(s.id,o))}),Kc();}if(t&2){let e=VD().$implicit,n=VD();ch("nzChecked",n.checkedIds().has(e.id)),ah("data-testid","check-"+e.id);}}function ne(t,c){if(t&1&&(_i(0,"span",9),vw(1),Kc()),t&2){let e=VD().$implicit;ah("data-testid","subtitle-"+e.id),gI(),Ph(e.subtitle);}}function ie(t,c){if(t&1&&(_i(0,"a",10),vw(1),Rw(2,"transloco"),Kc()),t&2){let e=c,n=VD().$implicit,o=VD();ch("routerLink",xw(5,U,e.id)),ah("data-testid","latest-"+n.id),gI(),nl(" ",Ow(2,3,o.statusKey(e.status))," ");}}function oe(t,c){if(t&1&&(_i(0,"span",11),vw(1),Rw(2,"transloco"),Kc()),t&2){let e=VD().$implicit;ah("data-testid","latest-"+e.id),gI(),Ph(Ow(2,2,"runnableTable.neverRun"));}}function ae(t,c){if(t&1){let e=LD();_i(0,"td")(1,"button",13),gh("click",function(){Pu(e);let o=VD().$implicit,s=VD();return Lu(s.emitRow(o.id))}),vw(2),Rw(3,"transloco"),Kc()();}if(t&2){let e=VD().$implicit;gI(),ah("data-testid","run-"+e.id),gI(),nl(" ",Ow(3,2,"runnableTable.run")," ");}}function le(t,c){if(t&1&&(_i(0,"tr"),bD(1,te,1,2,"td",6),_i(2,"td")(3,"div",7)(4,"span",8),vw(5),Kc(),bD(6,ne,2,2,"span",9),Kc()(),_i(7,"td"),bD(8,ie,3,7,"a",10)(9,oe,3,4,"span",11),Kc(),bD(10,ae,4,4,"td"),Kc()),t&2){let e,n=c.$implicit,o=VD();ah("data-testid","row-"+n.id),gI(),_D(o.selectable()?1:-1),gI(3),ah("data-testid","label-"+n.id),gI(),Ph(n.primaryLabel),gI(),_D(n.subtitle?6:-1),gI(2),_D((e=n.latestJob)?8:9,e),gI(2),_D(o.showRowAction()?10:-1);}}var we=(()=>{class t{constructor(){this.rows=$0([]),this.selectable=$0(false),this.showRowAction=$0(true),this.rowAction=B0(),this.bulkAction=B0(),this.checkedIds=qo(new Set),this.checkedCount=Hw(()=>this.checkedIds().size),this.allChecked=Hw(()=>{let e=this.rows();return e.length>0&&e.every(n=>this.checkedIds().has(n.id))}),this.someChecked=Hw(()=>{let e=this.checkedCount();return e>0&&e<this.rows().length});}onItemChecked(e,n){this.checkedIds.update(o=>{let s=new Set(o);return n?s.add(e):s.delete(e),s});}onAllChecked(e){this.checkedIds.set(e?new Set(this.rows().map(n=>n.id)):new Set);}emitBulk(){this.bulkAction.emit([...this.checkedIds()]);}emitRow(e){this.rowAction.emit(e);}statusKey(e){return `jobs.status.${e}`}static{this.\u0275fac=function(n){return new(n||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-runnable-items-table"]],inputs:{rows:[1,"rows"],selectable:[1,"selectable"],showRowAction:[1,"showRowAction"]},outputs:{rowAction:"rowAction",bulkAction:"bulkAction"},decls:16,vars:12,consts:[["data-testid","runnable-items-table",1,"runnable-table"],["data-testid","bulk-bar",1,"bulk-bar"],[3,"nzData","nzFrontPagination","nzShowPagination"],["data-testid","select-all",3,"nzChecked","nzIndeterminate"],["nz-button","","type","button","data-testid","run-selected",3,"click","disabled"],["data-testid","select-all",3,"nzCheckedChange","nzChecked","nzIndeterminate"],[3,"nzChecked"],[1,"item"],[1,"primary"],[1,"subtitle"],[3,"routerLink"],[1,"never"],[3,"nzCheckedChange","nzChecked"],["nz-button","","nzType","link","type","button",3,"click"]],template:function(n,o){n&1&&(_i(0,"div",0),bD(1,Y,4,7,"div",1),_i(2,"nz-table",2)(3,"thead")(4,"tr"),bD(5,Z,1,2,"th",3),_i(6,"th"),vw(7),Rw(8,"transloco"),Kc(),_i(9,"th"),vw(10),Rw(11,"transloco"),Kc(),bD(12,ee,3,3,"th"),Kc()(),_i(13,"tbody"),ND(14,le,11,7,"tr",null,X),Kc()()()),n&2&&(gI(),_D(o.selectable()?1:-1),gI(),ch("nzData",o.rows())("nzFrontPagination",false)("nzShowPagination",false),gI(3),_D(o.selectable()?5:-1),gI(2),Ph(Ow(8,8,"runnableTable.column.item")),gI(3),Ph(Ow(11,10,"runnableTable.column.latestRun")),gI(2),_D(o.showRowAction()?12:-1),gI(2),xD(o.rows()));},dependencies:[Mi,Ln,vd,Cc,r7,w7,pc,as,dc,Kl,Ul,cc,Ji,ls,es,Kt],styles:[".runnable-table[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.bulk-bar[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.15rem}.primary[_ngcontent-%COMP%]{font-weight:600}.subtitle[_ngcontent-%COMP%]{color:#78716c;font-size:.85rem}.never[_ngcontent-%COMP%]{color:#78716c}[_nghost-%COMP%] .ant-table-tbody>tr>td{white-space:normal;vertical-align:top}"]});}}return t})();export{we as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {Q as QE,K as Kt,
|
|
1
|
+
import {Q as QE,K as Kt,aU as Jc,j as vw,R as Rw,aV as Xc,x as gI,P as Ph,O as Ow}from'./main-OG6DVLH6.js';var x=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)};}static{this.\u0275cmp=QE({type:e,selectors:[["app-preferences-manage"]],decls:9,vars:6,consts:[["data-testid","preferences-manage",1,"list-page"],[1,"header"],[1,"lede"]],template:function(t,l){t&1&&(Jc(0,"main",0)(1,"header",1)(2,"div")(3,"h1"),vw(4),Rw(5,"transloco"),Xc(),Jc(6,"p",2),vw(7),Rw(8,"transloco"),Xc()()()()),t&2&&(gI(4),Ph(Ow(5,2,"manage.preferences.title")),gI(3),Ph(Ow(8,4,"manage.preferences.body")));},dependencies:[Kt],styles:[".list-page[_ngcontent-%COMP%]{padding:1.25rem 1.5rem 3rem;display:flex;flex-direction:column;gap:1rem}.lede[_ngcontent-%COMP%]{margin:.25rem 0 0;color:#57534e}"]});}}return e})();export{x as PreferencesManageComponent};
|