@fluidgrids/fe-sdk 0.0.0-stage → 2026.1203.7
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/README.md +564 -2
- package/dist/ActivityOptionsFields-C2u-hY2U.js +142 -0
- package/dist/AiStudioPage-B_hNTj-_.js +1137 -0
- package/dist/ApprovalInboxPage-ClITra3n.js +1312 -0
- package/dist/ChoiceSelect-LkK-uS9J.js +65 -0
- package/dist/ConfirmActionDialog-DHWTDRbp.js +31 -0
- package/dist/ConnectionFormDialog-C0kDgcrZ.js +153 -0
- package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
- package/dist/DataSinkDashboardPage-b4ezeqa6.js +278 -0
- package/dist/DataTablesPage-C1d9YGHz.js +5575 -0
- package/dist/DateTimeField-B1qR4ruo.js +51 -0
- package/dist/Disclosure-BNKij7-v.js +45 -0
- package/dist/ElementLibraryPage-8jNO6YmE.js +2256 -0
- package/dist/ElementLibrarySequenceDocument-B-W8SPzn.js +3979 -0
- package/dist/EnsureThemeProvider-BvlNjAd0.js +24 -0
- package/dist/EntityTagBadge-1OlP6p0c.js +25 -0
- package/dist/EntityTagPicker-BBrU5cE0.js +137 -0
- package/dist/ExecuteStepDocument-B4j1mdRT.js +189 -0
- package/dist/ExecutionDetailDocument-D6QuM-kp.js +875 -0
- package/dist/ExecutionDetailPage-D4CBtFdo.js +12217 -0
- package/dist/ExecutionDetailPage-DvQ667OE.d.ts +10 -0
- package/dist/ExecutionStatusBadge-BsDVor9t.js +221 -0
- package/dist/ExecutionsListDocument-Dan7ZiqB.js +459 -0
- package/dist/ExecutionsListPage-B3XT8ITL.js +4307 -0
- package/dist/FailureTriagePanel-DOJMaJ0n.js +1285 -0
- package/dist/FileDownloadUrlDocument-CVOYKcL5.js +92 -0
- package/dist/FluidGridsDocsLink-bX0Hnhxr.js +66 -0
- package/dist/FluidGridsMark-CE2blT7K.js +74 -0
- package/dist/HeldLoadRegion-BtTxbvOW.js +34 -0
- package/dist/HistoryPage-BLoRpJ1R.d.ts +6 -0
- package/dist/HistoryPage-BSBISXoj.js +2835 -0
- package/dist/Icon-BtQ0HXLh.js +160 -0
- package/dist/InsightsPage-D7ybj8N9.js +11245 -0
- package/dist/IsolationSetting-vy911E8b.js +1153 -0
- package/dist/LibraryParts-DOeNgR8A.js +413 -0
- package/dist/ManagedAiPolicyAuthority-BxwJ3ptd.js +40 -0
- package/dist/ManagedAiPolicyAuthority-DM3t3wNr.d.ts +18 -0
- package/dist/ManagedAiPolicyAuthorityContext-CNkxIOZ1.js +10 -0
- package/dist/McpTriggerServers-BCPCAOWB.js +459 -0
- package/dist/MissingNodesInstallModal-rO_SEDrC.js +224 -0
- package/dist/NavigationV2Provider-DCDt35eG.js +17 -0
- package/dist/NodeSchemaIntrospectionDocument-C1vAIcHd.js +95 -0
- package/dist/NodesPage-DEbnz9iU.d.ts +6 -0
- package/dist/NodesPage-O7KeeKtd.js +653 -0
- package/dist/OfflineIcon-TwMKYWjA.js +207 -0
- package/dist/OpenTemplateAsCodeButton-BhWJWIF3.js +94 -0
- package/dist/PaidTemplateConfirm-_G3ag6S4.js +28 -0
- package/dist/PublishCustomNodeAction-CIySbK4c.js +134 -0
- package/dist/RecordTaskDialog-BkpCDvhR.js +2078 -0
- package/dist/RunActionsMenu-DodOgIQm.js +59 -0
- package/dist/RunnerStatusPill-C1v967iq.js +24 -0
- package/dist/RunnersPage-dB0RSdY_.js +1929 -0
- package/dist/SandboxRuntimeExhaustedNotice-BFOIF93C.js +120 -0
- package/dist/SchedulesPage-DPWr1yvf.js +1607 -0
- package/dist/SearchBox-BGtYjvfs.js +49 -0
- package/dist/SequenceEditor-CFiHeHkR.js +497 -0
- package/dist/SettingsPage-0CQBNPZV.js +8695 -0
- package/dist/StewardPages-DAJhepen.js +47 -0
- package/dist/StewardRunImportPanel-Kva2DO0u.js +2844 -0
- package/dist/StoreTemplateCardCompact-CHn5kP7A.js +2166 -0
- package/dist/TagFilterSelect-CyA8QrS7.js +42 -0
- package/dist/TaskQueuesPage-DdnDCyat.js +3571 -0
- package/dist/TechnicalDetails-B0Oi4aZw.js +19 -0
- package/dist/TemplateConfigurationModal-CdvCYJLM.js +332 -0
- package/dist/TemplateDetailPanel-CbiKciuB.js +222 -0
- package/dist/TemplatePreview-cx7-NOeG.js +868 -0
- package/dist/TemplatesPage-BG3H-6v6.d.ts +10 -0
- package/dist/TemplatesPage-BVQpGYIV.js +3251 -0
- package/dist/TerminateExecutionDocument-B_HKNVrN.js +581 -0
- package/dist/TranslationBridge-Bd4aJKMs.d.ts +11 -0
- package/dist/TranslationBridge-Da-TPgQm.js +68 -0
- package/dist/TriggerWorkflowDocument-D9Km2Vv2.js +460 -0
- package/dist/UiSequencePickerSequenceDocument-BSYnSDV7.js +607 -0
- package/dist/UiStepScreenshot-Qh4QMyUp.js +146 -0
- package/dist/UsageTimeSeriesDocument-DcInx9-z.js +177 -0
- package/dist/VariablesPage-ChfGuW22.js +2243 -0
- package/dist/VersionDiffDialog-Bd2AeUwf.js +1702 -0
- package/dist/VersionLifecycleBar-BBeWVtz-.js +143 -0
- package/dist/WebhookDeliveriesPage-D66bua0j.js +1563 -0
- package/dist/WorkflowBuilder-B6wQD1TK.js +539 -0
- package/dist/WorkflowBuilder-DR4ku8Tr.js +1611 -0
- package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
- package/dist/WorkflowEmbed-BXfFGy0i.js +708 -0
- package/dist/WorkflowEmbed-Cbqe1s1z.d.ts +6 -0
- package/dist/WorkflowPinnedDataDocument-BODT5omd.js +782 -0
- package/dist/WorkflowProposalCard-BruukdeF.js +96 -0
- package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
- package/dist/WorkflowSearchRedirect-C7zJ2MKH.js +40 -0
- package/dist/WorkflowSettingsDrawer-MVU1BKfY.d.ts +18 -0
- package/dist/WorkflowSettingsDrawer-gazs97WR.js +196 -0
- package/dist/WorkflowShareDialog-e8jJtLjU.js +469 -0
- package/dist/WorkflowVersionsDocument-DRVOp8Uj.js +3213 -0
- package/dist/WorkflowsList--hR2_8gf.js +4593 -0
- package/dist/WorkflowsList-CcNDQge5.d.ts +6 -0
- package/dist/WorkflowsListPageDocument-CnzcQm_o.js +934 -0
- package/dist/addonCatalog-CbZS4deh.js +58 -0
- package/dist/addonCatalog-sjlonAmR.d.ts +15 -0
- package/dist/addons.d.ts +3 -0
- package/dist/addons.js +4 -0
- package/dist/agent-form-Bfvm32j1.js +83 -0
- package/dist/agent-tools.d.ts +3 -0
- package/dist/agent-tools.js +5 -0
- package/dist/agentTools-CyL7DLOF.js +320 -0
- package/dist/ai-usage-BrxDgvdR.js +240 -0
- package/dist/aiCreditsBridge-BuE92tKo.js +49 -0
- package/dist/api-BKq-nIOZ.js +2286 -0
- package/dist/api-Ol7I8NxE.js +8289 -0
- package/dist/apollo-type-policies.d.ts +11 -0
- package/dist/apollo-type-policies.js +64 -0
- package/dist/askAboutBridge-ByYsQams.js +106 -0
- package/dist/askQuestions-Cmx7VnMm.js +742 -0
- package/dist/assert-rules-lfYEMc99.js +318 -0
- package/dist/assistant.d.ts +94 -0
- package/dist/assistant.js +99 -0
- package/dist/attach-node-helpers-HDKQOtrD.js +32 -0
- package/dist/badge-CXfPhoMH.js +26 -0
- package/dist/basil.generated-BK-EHbwN.js +10 -0
- package/dist/browser-steps-DMpS5TyB.js +533 -0
- package/dist/builderTimings-pvGnK1m-.js +510 -0
- package/dist/button-DG7y_FVJ.js +48 -0
- package/dist/canvasNoteTools-BxuP_AYO.js +137 -0
- package/dist/card-Bomy_1UG.js +44 -0
- package/dist/catalogGrid-BOrfMgi-.js +41 -0
- package/dist/channel-CPyQ1NR1.js +212 -0
- package/dist/chips-CvNrYJZa.js +27 -0
- package/dist/client-holder-C0M5Cfwl.js +68 -0
- package/dist/cn-QqidFIgr.js +10 -0
- package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
- package/dist/code-editor-field-x_JrY8KR.js +113 -0
- package/dist/codec-client-DPuD6mw7.js +515 -0
- package/dist/conditionBuilder-DwfEF0Q-.js +1144 -0
- package/dist/config-DO68jw5k.js +322 -0
- package/dist/constants-DgbVc24O.d.ts +296 -0
- package/dist/constants-DlRnHBfQ.js +217 -0
- package/dist/convert-browser-action-pfecelF7.js +347 -0
- package/dist/convert-dialog-B_o22NiJ.js +382 -0
- package/dist/create-workflow-first-Azg3JUdX.js +120 -0
- package/dist/definition-canvas-Bsda-rDT.js +31 -0
- package/dist/dialog-BVd152GS.js +94 -0
- package/dist/durable-nodes-BXyYCLxT.js +91 -0
- package/dist/duration-CDb7-mT_.js +33 -0
- package/dist/edge-mapper-wEAdGVU2.js +4477 -0
- package/dist/element-library-DkSlg_VE.js +727 -0
- package/dist/entities-I_0kio3q.js +38 -0
- package/dist/error-advice-QLr5NCm7.js +65 -0
- package/dist/errors-ClKb5sEt.js +188 -0
- package/dist/executions.d.ts +3 -0
- package/dist/executions.js +5 -0
- package/dist/feature-flags-B2qetXKd.js +385 -0
- package/dist/field-label-DPZRmE_B.js +153 -0
- package/dist/firstWorkflow-C_h0KMB2.js +133 -0
- package/dist/flags.d.ts +3 -0
- package/dist/flags.js +4 -0
- package/dist/flow-builder-DIvLOhz0.js +28038 -0
- package/dist/flow-store-holder-CUN7Terz.js +52 -0
- package/dist/fluent.generated-CA_e6-4l.js +14 -0
- package/dist/fluidgridsEvents-bbEQbwU6.js +175 -0
- package/dist/fluidgridsTheme-DUhvOgoy.js +297 -0
- package/dist/global-client-BQPuFrFa.js +433 -0
- package/dist/global-operations-BG6YgxrM.js +136 -0
- package/dist/graphql-types-UTYtujY9.js +21358 -0
- package/dist/history.d.ts +3 -0
- package/dist/history.js +4 -0
- package/dist/index-AoJAa5vU.d.ts +164958 -0
- package/dist/index-DEMT3iAM.d.ts +120 -0
- package/dist/index-ROZzNGyY.d.ts +76 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +8123 -0
- package/dist/ion.generated-mbajjcAg.js +10 -0
- package/dist/label-Lzb8ZXf_.js +29 -0
- package/dist/labels-rXd9gYQz.js +1236 -0
- package/dist/liveCanvas-D5ytXDp8.js +103 -0
- package/dist/logos.generated-X6_0kjVR.js +21 -0
- package/dist/logs-panel-Cw0DkG0l.js +468 -0
- package/dist/lucide.generated-B6NVd3GT.js +29 -0
- package/dist/marksStore-a9oIMMot.js +175 -0
- package/dist/mcp-trigger-D0nRdvq5.js +307 -0
- package/dist/mdi.generated-D1BV74d6.js +292 -0
- package/dist/menus-CU3hDGYl.js +160 -0
- package/dist/mynaui.generated-DMWr5cXz.js +66 -0
- package/dist/navigation-v2.d.ts +3 -0
- package/dist/navigation-v2.js +5 -0
- package/dist/node-detail-view-Cgm5H1P-.js +1372 -0
- package/dist/node-editor-tab-body-CZ0fVuVP.js +187 -0
- package/dist/node-operation-selection-CdV3KI_V.js +3534 -0
- package/dist/node-registry-refresh-s3okf83X.js +27 -0
- package/dist/node-role-TMbnkmeP.js +132 -0
- package/dist/node-type-icon-BZa8n4iG.js +33 -0
- package/dist/nodes.d.ts +3 -0
- package/dist/nodes.js +4 -0
- package/dist/notesKey-5EaREBGA.js +12 -0
- package/dist/observability.d.ts +3 -0
- package/dist/observability.js +5 -0
- package/dist/offset-pages-zghoClB3.js +55 -0
- package/dist/operations-BBmT9ToP.js +663 -0
- package/dist/operations-WxRJWeqO.js +3133 -0
- package/dist/output-files-Ba8bu5lv.js +196 -0
- package/dist/page-operation-DrWuhd6Y.js +129 -0
- package/dist/page-twins.d.ts +13 -0
- package/dist/page-twins.js +186 -0
- package/dist/pageControlSpecs-DZJ9K37m.js +134 -0
- package/dist/pageControlsBridge-0pX9s-3k.js +54 -0
- package/dist/pageControlsBridge-DAuT3w7L.d.ts +36 -0
- package/dist/panels-PfBBAToE.js +346 -0
- package/dist/parts-B7fBcw-B.js +346 -0
- package/dist/popover-Dms9Vz3j.js +3389 -0
- package/dist/preloadable-lazy-Pp47mqQ9.js +65 -0
- package/dist/proactive.d.ts +66 -0
- package/dist/proactive.js +237 -0
- package/dist/quick-config-panel-DFd77xho.js +451 -0
- package/dist/quota-DeA_CJ2e.js +175 -0
- package/dist/quota.d.ts +3 -0
- package/dist/quota.js +4 -0
- package/dist/read-only-context-Dt9N9SIG.js +18 -0
- package/dist/relative-time-Dxt8ZIIu.js +55 -0
- package/dist/results-CwK_yDxK.js +325 -0
- package/dist/rolldown-runtime-hDbaFkMy.js +18 -0
- package/dist/route-data.d.ts +12 -0
- package/dist/route-data.js +69 -0
- package/dist/route-match-C-0_EnAt.d.ts +5 -0
- package/dist/route-match-DMkUICYV.js +41 -0
- package/dist/route-preload-C4DlGoCd.js +120 -0
- package/dist/run-display-UjLAoYqQ.js +81 -0
- package/dist/run-history-arGiHzGU.js +285 -0
- package/dist/run-list-links-DJn4Mf1T.js +98 -0
- package/dist/run-mode-USmM0-Uo.js +82 -0
- package/dist/run-parity-CWXqEJqM.js +144 -0
- package/dist/runsQuota-B6SyTbne.js +100 -0
- package/dist/runsQuota-DsniKiSg.d.ts +20 -0
- package/dist/safe-expression-Cw7-SCsm.js +1251 -0
- package/dist/save-status-store-C7nEYpfb.js +631 -0
- package/dist/schedule-panel-B4GYXzXQ.js +13774 -0
- package/dist/schedule-rules-ggVKRkBH.js +358 -0
- package/dist/secrets-Re_wSiE3.js +153 -0
- package/dist/settings.d.ts +4 -0
- package/dist/settings.js +6 -0
- package/dist/shared-DAWGGMSM.js +177 -0
- package/dist/sidebar-node-editor-6eSSgCzc.js +178 -0
- package/dist/solar.generated-CGYuUQAC.js +10 -0
- package/dist/stableTabbedDialog-BBhrfXGe.js +20 -0
- package/dist/start-url-CT6Yz96K.js +24 -0
- package/dist/status-CessxGpm.js +55 -0
- package/dist/store-icon-OctYp5zP.js +155 -0
- package/dist/styles-WGmTnZ2n.js +26 -0
- package/dist/styles.css +139 -0
- package/dist/svg-spinners.generated-CIPT7IhM.js +10 -0
- package/dist/template-code-CzN6JWNV.js +191 -0
- package/dist/template-graph-DLF9dygU.js +20 -0
- package/dist/template-preview-DcIIKOOL.js +32 -0
- package/dist/template-price-CdUHZRMF.js +40 -0
- package/dist/templates.d.ts +3 -0
- package/dist/templates.js +5 -0
- package/dist/theme-provider-CntfC4_i.js +23 -0
- package/dist/transient-DgZfhDfN.js +57 -0
- package/dist/typed-calls-C5tO03wq.js +26 -0
- package/dist/ui-script-By74Guk3.js +1094 -0
- package/dist/ui-script-editor-CqPu2bCN.js +2447 -0
- package/dist/ui-step-fix-8uM2_Hft.js +67 -0
- package/dist/ui-step-fix-store-CcO1FdRx.js +19 -0
- package/dist/ui-step-run-context-o7bLE6KP.js +46 -0
- package/dist/ui-target-editor-D2JhB_lD.js +673 -0
- package/dist/uiMarkTools-CSznnO1i.js +1054 -0
- package/dist/upgradePrompt-BAFBKKW5.js +72 -0
- package/dist/use-bare-node-registry-O6mKJO_n.js +11498 -0
- package/dist/use-browser-available-hj8wc3Kb.js +241 -0
- package/dist/use-edge-mapper-schemas-Bonofxow.js +496 -0
- package/dist/use-extension-bridge-B9ZreOkQ.js +608 -0
- package/dist/use-mobile-BTqCUjzS.js +27 -0
- package/dist/use-sdk-query-C697xZVv.js +116 -0
- package/dist/use-workflow-code-editor-CFoRFrZ5.js +753 -0
- package/dist/useActionParam-B2tU2BlY.js +85 -0
- package/dist/useAgentTokenStream-Bko_J0d0.js +4217 -0
- package/dist/useBrowserClients-3v95-gSh.js +103 -0
- package/dist/useCodeWorkflowInsights-w0tz9Ap_.js +600 -0
- package/dist/useConnections-DsgEJs05.js +439 -0
- package/dist/useDebouncedValue-BFekcv6n.js +18 -0
- package/dist/useDurableParity-8fnMZmBc.js +1787 -0
- package/dist/useEntityTags-D0spL6Ut.js +460 -0
- package/dist/useExecutions-2u5nGJJk.js +681 -0
- package/dist/useFluidGridsAnalytics-VM8lAi2x.js +238 -0
- package/dist/useGlobalStoreClient-BTdhkA2I.js +24 -0
- package/dist/useHumanRequests-zlYDp3l1.js +221 -0
- package/dist/useNavigationV2-C2WeqN7d.js +29 -0
- package/dist/useNavigationV2-DANUmg12.d.ts +9 -0
- package/dist/useObservability-BRlQ0tOA.js +285 -0
- package/dist/useRequestedProposal-B7uPXfZB.js +51 -0
- package/dist/useRunHistory-CXCMUPyf.js +2759 -0
- package/dist/useRunLive-D0JvVZT2.js +1060 -0
- package/dist/useRunnerList-Dbi59i1K.js +446 -0
- package/dist/useRunners-URUc5quU.js +173 -0
- package/dist/useRunsPage-DG656UCK.js +2709 -0
- package/dist/useVariables-BIelxcWr.js +463 -0
- package/dist/useVersionHistoryData-CTjqVw7l.js +292 -0
- package/dist/useWorkflowCodeExport-pqxyLHD1.js +522 -0
- package/dist/useWorkflowListExport-hcZNvTaB.js +232 -0
- package/dist/useWorkflowOrganization-CpBbOrs7.js +1772 -0
- package/dist/useWorkflowProposal-BH0VdNMA.js +3280 -0
- package/dist/useWorkflows-Cvg-Z_IE.js +1606 -0
- package/dist/utils-fvBb5qOD.js +89 -0
- package/dist/webhook-deliveries-AvQujaZy.js +99 -0
- package/dist/workflow-builder-CJygVkVv.d.ts +2 -0
- package/dist/workflow-builder.d.ts +3 -0
- package/dist/workflow-builder.js +8 -0
- package/dist/workflow-code-transfer-Bsy0JKAZ.js +323 -0
- package/dist/workflow-embed.d.ts +3 -0
- package/dist/workflow-embed.js +4 -0
- package/dist/workflow-git-sync--K9ZsPDC.js +263 -0
- package/dist/workflow-host.d.ts +6 -0
- package/dist/workflow-host.js +11 -0
- package/dist/workflow-pages-D-7ByLTB.d.ts +68 -0
- package/dist/workflow-pages.d.ts +3 -0
- package/dist/workflow-pages.js +115 -0
- package/dist/workflow-preview-canvas-CO8yzdE3.js +848 -0
- package/dist/workflow-preview.d.ts +65 -0
- package/dist/workflow-preview.js +4 -0
- package/dist/workflow-route.d.ts +33 -0
- package/dist/workflow-route.js +4 -0
- package/dist/workflow-save-state-D0l-DkLf.js +767 -0
- package/dist/workflow-transfer-CQnQC-ke.js +104 -0
- package/dist/workflowRouteData-BkfVOc-O.js +169 -0
- package/dist/workflows-list.d.ts +10 -0
- package/dist/workflows-list.js +5 -0
- package/package.json +320 -4
|
@@ -0,0 +1,1607 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-hDbaFkMy.js";
|
|
3
|
+
import { t as Icon } from "./Icon-BtQ0HXLh.js";
|
|
4
|
+
import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
|
|
5
|
+
import { s as useFluidGridsPermission, t as FLUIDGRIDS_PERMISSIONS } from "./constants-DlRnHBfQ.js";
|
|
6
|
+
import { n as builderPathOf } from "./create-workflow-first-Azg3JUdX.js";
|
|
7
|
+
import { n as describeCron } from "./schedule-rules-ggVKRkBH.js";
|
|
8
|
+
import { n as getFluidGridsClient } from "./client-holder-C0M5Cfwl.js";
|
|
9
|
+
import { s as throwIfResultError } from "./errors-ClKb5sEt.js";
|
|
10
|
+
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
11
|
+
import { Link } from "react-router";
|
|
12
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Background, Controls, Handle, MarkerType, Position, ReactFlow } from "@xyflow/react";
|
|
14
|
+
import "@xyflow/react/dist/style.css";
|
|
15
|
+
import { toast } from "sonner";
|
|
16
|
+
import { Badge, Button, Card, CardContent, CardHeader, Input, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Switch, Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@burdenoff/fe-libs/ui";
|
|
17
|
+
|
|
18
|
+
// src/generated/documents/wspace/SetWorkflowScheduleEnabledDocument.ts
|
|
19
|
+
const SetWorkflowScheduleEnabledDocument = {
|
|
20
|
+
"kind": "Document",
|
|
21
|
+
"definitions": [{
|
|
22
|
+
"kind": "OperationDefinition",
|
|
23
|
+
"operation": "mutation",
|
|
24
|
+
"name": {
|
|
25
|
+
"kind": "Name",
|
|
26
|
+
"value": "SetWorkflowScheduleEnabled"
|
|
27
|
+
},
|
|
28
|
+
"variableDefinitions": [{
|
|
29
|
+
"kind": "VariableDefinition",
|
|
30
|
+
"variable": {
|
|
31
|
+
"kind": "Variable",
|
|
32
|
+
"name": {
|
|
33
|
+
"kind": "Name",
|
|
34
|
+
"value": "jobId"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"type": {
|
|
38
|
+
"kind": "NonNullType",
|
|
39
|
+
"type": {
|
|
40
|
+
"kind": "NamedType",
|
|
41
|
+
"name": {
|
|
42
|
+
"kind": "Name",
|
|
43
|
+
"value": "ID"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"directives": []
|
|
48
|
+
}, {
|
|
49
|
+
"kind": "VariableDefinition",
|
|
50
|
+
"variable": {
|
|
51
|
+
"kind": "Variable",
|
|
52
|
+
"name": {
|
|
53
|
+
"kind": "Name",
|
|
54
|
+
"value": "enabled"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"type": {
|
|
58
|
+
"kind": "NonNullType",
|
|
59
|
+
"type": {
|
|
60
|
+
"kind": "NamedType",
|
|
61
|
+
"name": {
|
|
62
|
+
"kind": "Name",
|
|
63
|
+
"value": "Boolean"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"directives": []
|
|
68
|
+
}],
|
|
69
|
+
"directives": [],
|
|
70
|
+
"selectionSet": {
|
|
71
|
+
"kind": "SelectionSet",
|
|
72
|
+
"selections": [{
|
|
73
|
+
"kind": "Field",
|
|
74
|
+
"name": {
|
|
75
|
+
"kind": "Name",
|
|
76
|
+
"value": "updateWorkflowScheduledJob"
|
|
77
|
+
},
|
|
78
|
+
"arguments": [{
|
|
79
|
+
"kind": "Argument",
|
|
80
|
+
"name": {
|
|
81
|
+
"kind": "Name",
|
|
82
|
+
"value": "jobId"
|
|
83
|
+
},
|
|
84
|
+
"value": {
|
|
85
|
+
"kind": "Variable",
|
|
86
|
+
"name": {
|
|
87
|
+
"kind": "Name",
|
|
88
|
+
"value": "jobId"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}, {
|
|
92
|
+
"kind": "Argument",
|
|
93
|
+
"name": {
|
|
94
|
+
"kind": "Name",
|
|
95
|
+
"value": "input"
|
|
96
|
+
},
|
|
97
|
+
"value": {
|
|
98
|
+
"kind": "ObjectValue",
|
|
99
|
+
"fields": [{
|
|
100
|
+
"kind": "ObjectField",
|
|
101
|
+
"name": {
|
|
102
|
+
"kind": "Name",
|
|
103
|
+
"value": "enabled"
|
|
104
|
+
},
|
|
105
|
+
"value": {
|
|
106
|
+
"kind": "Variable",
|
|
107
|
+
"name": {
|
|
108
|
+
"kind": "Name",
|
|
109
|
+
"value": "enabled"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}]
|
|
113
|
+
}
|
|
114
|
+
}],
|
|
115
|
+
"directives": [],
|
|
116
|
+
"selectionSet": {
|
|
117
|
+
"kind": "SelectionSet",
|
|
118
|
+
"selections": [
|
|
119
|
+
{
|
|
120
|
+
"kind": "Field",
|
|
121
|
+
"name": {
|
|
122
|
+
"kind": "Name",
|
|
123
|
+
"value": "success"
|
|
124
|
+
},
|
|
125
|
+
"arguments": [],
|
|
126
|
+
"directives": []
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"kind": "Field",
|
|
130
|
+
"name": {
|
|
131
|
+
"kind": "Name",
|
|
132
|
+
"value": "message"
|
|
133
|
+
},
|
|
134
|
+
"arguments": [],
|
|
135
|
+
"directives": []
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"kind": "Field",
|
|
139
|
+
"name": {
|
|
140
|
+
"kind": "Name",
|
|
141
|
+
"value": "job"
|
|
142
|
+
},
|
|
143
|
+
"arguments": [],
|
|
144
|
+
"directives": [],
|
|
145
|
+
"selectionSet": {
|
|
146
|
+
"kind": "SelectionSet",
|
|
147
|
+
"selections": [
|
|
148
|
+
{
|
|
149
|
+
"kind": "Field",
|
|
150
|
+
"name": {
|
|
151
|
+
"kind": "Name",
|
|
152
|
+
"value": "id"
|
|
153
|
+
},
|
|
154
|
+
"arguments": [],
|
|
155
|
+
"directives": []
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"kind": "Field",
|
|
159
|
+
"name": {
|
|
160
|
+
"kind": "Name",
|
|
161
|
+
"value": "enabled"
|
|
162
|
+
},
|
|
163
|
+
"arguments": [],
|
|
164
|
+
"directives": []
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"kind": "Field",
|
|
168
|
+
"name": {
|
|
169
|
+
"kind": "Name",
|
|
170
|
+
"value": "status"
|
|
171
|
+
},
|
|
172
|
+
"arguments": [],
|
|
173
|
+
"directives": []
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"kind": "Field",
|
|
177
|
+
"name": {
|
|
178
|
+
"kind": "Name",
|
|
179
|
+
"value": "nextRun"
|
|
180
|
+
},
|
|
181
|
+
"arguments": [],
|
|
182
|
+
"directives": []
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
}]
|
|
190
|
+
}
|
|
191
|
+
}]
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
// src/generated/documents/wspace/WorkflowScheduleOverviewDocument.ts
|
|
195
|
+
const WorkflowScheduleOverviewDocument = {
|
|
196
|
+
"kind": "Document",
|
|
197
|
+
"definitions": [{
|
|
198
|
+
"kind": "OperationDefinition",
|
|
199
|
+
"operation": "query",
|
|
200
|
+
"name": {
|
|
201
|
+
"kind": "Name",
|
|
202
|
+
"value": "WorkflowScheduleOverview"
|
|
203
|
+
},
|
|
204
|
+
"variableDefinitions": [{
|
|
205
|
+
"kind": "VariableDefinition",
|
|
206
|
+
"variable": {
|
|
207
|
+
"kind": "Variable",
|
|
208
|
+
"name": {
|
|
209
|
+
"kind": "Name",
|
|
210
|
+
"value": "windowHours"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"type": {
|
|
214
|
+
"kind": "NamedType",
|
|
215
|
+
"name": {
|
|
216
|
+
"kind": "Name",
|
|
217
|
+
"value": "Int"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"directives": []
|
|
221
|
+
}],
|
|
222
|
+
"directives": [],
|
|
223
|
+
"selectionSet": {
|
|
224
|
+
"kind": "SelectionSet",
|
|
225
|
+
"selections": [{
|
|
226
|
+
"kind": "Field",
|
|
227
|
+
"name": {
|
|
228
|
+
"kind": "Name",
|
|
229
|
+
"value": "workflowScheduleOverview"
|
|
230
|
+
},
|
|
231
|
+
"arguments": [{
|
|
232
|
+
"kind": "Argument",
|
|
233
|
+
"name": {
|
|
234
|
+
"kind": "Name",
|
|
235
|
+
"value": "windowHours"
|
|
236
|
+
},
|
|
237
|
+
"value": {
|
|
238
|
+
"kind": "Variable",
|
|
239
|
+
"name": {
|
|
240
|
+
"kind": "Name",
|
|
241
|
+
"value": "windowHours"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}],
|
|
245
|
+
"directives": [],
|
|
246
|
+
"selectionSet": {
|
|
247
|
+
"kind": "SelectionSet",
|
|
248
|
+
"selections": [
|
|
249
|
+
{
|
|
250
|
+
"kind": "Field",
|
|
251
|
+
"name": {
|
|
252
|
+
"kind": "Name",
|
|
253
|
+
"value": "windowStart"
|
|
254
|
+
},
|
|
255
|
+
"arguments": [],
|
|
256
|
+
"directives": []
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"kind": "Field",
|
|
260
|
+
"name": {
|
|
261
|
+
"kind": "Name",
|
|
262
|
+
"value": "windowEnd"
|
|
263
|
+
},
|
|
264
|
+
"arguments": [],
|
|
265
|
+
"directives": []
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"kind": "Field",
|
|
269
|
+
"name": {
|
|
270
|
+
"kind": "Name",
|
|
271
|
+
"value": "windowHours"
|
|
272
|
+
},
|
|
273
|
+
"arguments": [],
|
|
274
|
+
"directives": []
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"kind": "Field",
|
|
278
|
+
"name": {
|
|
279
|
+
"kind": "Name",
|
|
280
|
+
"value": "schedulesTruncated"
|
|
281
|
+
},
|
|
282
|
+
"arguments": [],
|
|
283
|
+
"directives": []
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"kind": "Field",
|
|
287
|
+
"name": {
|
|
288
|
+
"kind": "Name",
|
|
289
|
+
"value": "upcomingTruncated"
|
|
290
|
+
},
|
|
291
|
+
"arguments": [],
|
|
292
|
+
"directives": []
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"kind": "Field",
|
|
296
|
+
"name": {
|
|
297
|
+
"kind": "Name",
|
|
298
|
+
"value": "schedules"
|
|
299
|
+
},
|
|
300
|
+
"arguments": [],
|
|
301
|
+
"directives": [],
|
|
302
|
+
"selectionSet": {
|
|
303
|
+
"kind": "SelectionSet",
|
|
304
|
+
"selections": [
|
|
305
|
+
{
|
|
306
|
+
"kind": "Field",
|
|
307
|
+
"name": {
|
|
308
|
+
"kind": "Name",
|
|
309
|
+
"value": "workflowName"
|
|
310
|
+
},
|
|
311
|
+
"arguments": [],
|
|
312
|
+
"directives": []
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"kind": "Field",
|
|
316
|
+
"name": {
|
|
317
|
+
"kind": "Name",
|
|
318
|
+
"value": "workflowVersion"
|
|
319
|
+
},
|
|
320
|
+
"arguments": [],
|
|
321
|
+
"directives": []
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"kind": "Field",
|
|
325
|
+
"name": {
|
|
326
|
+
"kind": "Name",
|
|
327
|
+
"value": "workflowStatus"
|
|
328
|
+
},
|
|
329
|
+
"arguments": [],
|
|
330
|
+
"directives": []
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"kind": "Field",
|
|
334
|
+
"name": {
|
|
335
|
+
"kind": "Name",
|
|
336
|
+
"value": "workflowActive"
|
|
337
|
+
},
|
|
338
|
+
"arguments": [],
|
|
339
|
+
"directives": []
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"kind": "Field",
|
|
343
|
+
"name": {
|
|
344
|
+
"kind": "Name",
|
|
345
|
+
"value": "triggerNodeId"
|
|
346
|
+
},
|
|
347
|
+
"arguments": [],
|
|
348
|
+
"directives": []
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"kind": "Field",
|
|
352
|
+
"name": {
|
|
353
|
+
"kind": "Name",
|
|
354
|
+
"value": "lastRunStatus"
|
|
355
|
+
},
|
|
356
|
+
"arguments": [],
|
|
357
|
+
"directives": []
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"kind": "Field",
|
|
361
|
+
"name": {
|
|
362
|
+
"kind": "Name",
|
|
363
|
+
"value": "upcomingCount"
|
|
364
|
+
},
|
|
365
|
+
"arguments": [],
|
|
366
|
+
"directives": []
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"kind": "Field",
|
|
370
|
+
"name": {
|
|
371
|
+
"kind": "Name",
|
|
372
|
+
"value": "upcomingTruncated"
|
|
373
|
+
},
|
|
374
|
+
"arguments": [],
|
|
375
|
+
"directives": []
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"kind": "Field",
|
|
379
|
+
"name": {
|
|
380
|
+
"kind": "Name",
|
|
381
|
+
"value": "job"
|
|
382
|
+
},
|
|
383
|
+
"arguments": [],
|
|
384
|
+
"directives": [],
|
|
385
|
+
"selectionSet": {
|
|
386
|
+
"kind": "SelectionSet",
|
|
387
|
+
"selections": [
|
|
388
|
+
{
|
|
389
|
+
"kind": "Field",
|
|
390
|
+
"name": {
|
|
391
|
+
"kind": "Name",
|
|
392
|
+
"value": "id"
|
|
393
|
+
},
|
|
394
|
+
"arguments": [],
|
|
395
|
+
"directives": []
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"kind": "Field",
|
|
399
|
+
"name": {
|
|
400
|
+
"kind": "Name",
|
|
401
|
+
"value": "name"
|
|
402
|
+
},
|
|
403
|
+
"arguments": [],
|
|
404
|
+
"directives": []
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"kind": "Field",
|
|
408
|
+
"name": {
|
|
409
|
+
"kind": "Name",
|
|
410
|
+
"value": "workflowKey"
|
|
411
|
+
},
|
|
412
|
+
"arguments": [],
|
|
413
|
+
"directives": []
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"kind": "Field",
|
|
417
|
+
"name": {
|
|
418
|
+
"kind": "Name",
|
|
419
|
+
"value": "version"
|
|
420
|
+
},
|
|
421
|
+
"arguments": [],
|
|
422
|
+
"directives": []
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"kind": "Field",
|
|
426
|
+
"name": {
|
|
427
|
+
"kind": "Name",
|
|
428
|
+
"value": "schedule"
|
|
429
|
+
},
|
|
430
|
+
"arguments": [],
|
|
431
|
+
"directives": []
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"kind": "Field",
|
|
435
|
+
"name": {
|
|
436
|
+
"kind": "Name",
|
|
437
|
+
"value": "scheduleType"
|
|
438
|
+
},
|
|
439
|
+
"arguments": [],
|
|
440
|
+
"directives": []
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"kind": "Field",
|
|
444
|
+
"name": {
|
|
445
|
+
"kind": "Name",
|
|
446
|
+
"value": "rrule"
|
|
447
|
+
},
|
|
448
|
+
"arguments": [],
|
|
449
|
+
"directives": []
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
"kind": "Field",
|
|
453
|
+
"name": {
|
|
454
|
+
"kind": "Name",
|
|
455
|
+
"value": "timezone"
|
|
456
|
+
},
|
|
457
|
+
"arguments": [],
|
|
458
|
+
"directives": []
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"kind": "Field",
|
|
462
|
+
"name": {
|
|
463
|
+
"kind": "Name",
|
|
464
|
+
"value": "enabled"
|
|
465
|
+
},
|
|
466
|
+
"arguments": [],
|
|
467
|
+
"directives": []
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"kind": "Field",
|
|
471
|
+
"name": {
|
|
472
|
+
"kind": "Name",
|
|
473
|
+
"value": "status"
|
|
474
|
+
},
|
|
475
|
+
"arguments": [],
|
|
476
|
+
"directives": []
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"kind": "Field",
|
|
480
|
+
"name": {
|
|
481
|
+
"kind": "Name",
|
|
482
|
+
"value": "lastRun"
|
|
483
|
+
},
|
|
484
|
+
"arguments": [],
|
|
485
|
+
"directives": []
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"kind": "Field",
|
|
489
|
+
"name": {
|
|
490
|
+
"kind": "Name",
|
|
491
|
+
"value": "nextRun"
|
|
492
|
+
},
|
|
493
|
+
"arguments": [],
|
|
494
|
+
"directives": []
|
|
495
|
+
}
|
|
496
|
+
]
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
]
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"kind": "Field",
|
|
504
|
+
"name": {
|
|
505
|
+
"kind": "Name",
|
|
506
|
+
"value": "upcoming"
|
|
507
|
+
},
|
|
508
|
+
"arguments": [],
|
|
509
|
+
"directives": [],
|
|
510
|
+
"selectionSet": {
|
|
511
|
+
"kind": "SelectionSet",
|
|
512
|
+
"selections": [
|
|
513
|
+
{
|
|
514
|
+
"kind": "Field",
|
|
515
|
+
"name": {
|
|
516
|
+
"kind": "Name",
|
|
517
|
+
"value": "scheduledJobId"
|
|
518
|
+
},
|
|
519
|
+
"arguments": [],
|
|
520
|
+
"directives": []
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"kind": "Field",
|
|
524
|
+
"name": {
|
|
525
|
+
"kind": "Name",
|
|
526
|
+
"value": "scheduleName"
|
|
527
|
+
},
|
|
528
|
+
"arguments": [],
|
|
529
|
+
"directives": []
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"kind": "Field",
|
|
533
|
+
"name": {
|
|
534
|
+
"kind": "Name",
|
|
535
|
+
"value": "workflowKey"
|
|
536
|
+
},
|
|
537
|
+
"arguments": [],
|
|
538
|
+
"directives": []
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"kind": "Field",
|
|
542
|
+
"name": {
|
|
543
|
+
"kind": "Name",
|
|
544
|
+
"value": "workflowName"
|
|
545
|
+
},
|
|
546
|
+
"arguments": [],
|
|
547
|
+
"directives": []
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
"kind": "Field",
|
|
551
|
+
"name": {
|
|
552
|
+
"kind": "Name",
|
|
553
|
+
"value": "at"
|
|
554
|
+
},
|
|
555
|
+
"arguments": [],
|
|
556
|
+
"directives": []
|
|
557
|
+
}
|
|
558
|
+
]
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"kind": "Field",
|
|
563
|
+
"name": {
|
|
564
|
+
"kind": "Name",
|
|
565
|
+
"value": "dependencies"
|
|
566
|
+
},
|
|
567
|
+
"arguments": [],
|
|
568
|
+
"directives": [],
|
|
569
|
+
"selectionSet": {
|
|
570
|
+
"kind": "SelectionSet",
|
|
571
|
+
"selections": [{
|
|
572
|
+
"kind": "Field",
|
|
573
|
+
"name": {
|
|
574
|
+
"kind": "Name",
|
|
575
|
+
"value": "nodes"
|
|
576
|
+
},
|
|
577
|
+
"arguments": [],
|
|
578
|
+
"directives": [],
|
|
579
|
+
"selectionSet": {
|
|
580
|
+
"kind": "SelectionSet",
|
|
581
|
+
"selections": [
|
|
582
|
+
{
|
|
583
|
+
"kind": "Field",
|
|
584
|
+
"name": {
|
|
585
|
+
"kind": "Name",
|
|
586
|
+
"value": "workflowKey"
|
|
587
|
+
},
|
|
588
|
+
"arguments": [],
|
|
589
|
+
"directives": []
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
"kind": "Field",
|
|
593
|
+
"name": {
|
|
594
|
+
"kind": "Name",
|
|
595
|
+
"value": "name"
|
|
596
|
+
},
|
|
597
|
+
"arguments": [],
|
|
598
|
+
"directives": []
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"kind": "Field",
|
|
602
|
+
"name": {
|
|
603
|
+
"kind": "Name",
|
|
604
|
+
"value": "active"
|
|
605
|
+
},
|
|
606
|
+
"arguments": [],
|
|
607
|
+
"directives": []
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"kind": "Field",
|
|
611
|
+
"name": {
|
|
612
|
+
"kind": "Name",
|
|
613
|
+
"value": "scheduled"
|
|
614
|
+
},
|
|
615
|
+
"arguments": [],
|
|
616
|
+
"directives": []
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"kind": "Field",
|
|
620
|
+
"name": {
|
|
621
|
+
"kind": "Name",
|
|
622
|
+
"value": "watchesAllWorkflows"
|
|
623
|
+
},
|
|
624
|
+
"arguments": [],
|
|
625
|
+
"directives": []
|
|
626
|
+
}
|
|
627
|
+
]
|
|
628
|
+
}
|
|
629
|
+
}, {
|
|
630
|
+
"kind": "Field",
|
|
631
|
+
"name": {
|
|
632
|
+
"kind": "Name",
|
|
633
|
+
"value": "edges"
|
|
634
|
+
},
|
|
635
|
+
"arguments": [],
|
|
636
|
+
"directives": [],
|
|
637
|
+
"selectionSet": {
|
|
638
|
+
"kind": "SelectionSet",
|
|
639
|
+
"selections": [
|
|
640
|
+
{
|
|
641
|
+
"kind": "Field",
|
|
642
|
+
"name": {
|
|
643
|
+
"kind": "Name",
|
|
644
|
+
"value": "fromWorkflowKey"
|
|
645
|
+
},
|
|
646
|
+
"arguments": [],
|
|
647
|
+
"directives": []
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"kind": "Field",
|
|
651
|
+
"name": {
|
|
652
|
+
"kind": "Name",
|
|
653
|
+
"value": "toWorkflowKey"
|
|
654
|
+
},
|
|
655
|
+
"arguments": [],
|
|
656
|
+
"directives": []
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"kind": "Field",
|
|
660
|
+
"name": {
|
|
661
|
+
"kind": "Name",
|
|
662
|
+
"value": "kind"
|
|
663
|
+
},
|
|
664
|
+
"arguments": [],
|
|
665
|
+
"directives": []
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
"kind": "Field",
|
|
669
|
+
"name": {
|
|
670
|
+
"kind": "Name",
|
|
671
|
+
"value": "onStatuses"
|
|
672
|
+
},
|
|
673
|
+
"arguments": [],
|
|
674
|
+
"directives": []
|
|
675
|
+
}
|
|
676
|
+
]
|
|
677
|
+
}
|
|
678
|
+
}]
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
"kind": "Field",
|
|
683
|
+
"name": {
|
|
684
|
+
"kind": "Name",
|
|
685
|
+
"value": "conflicts"
|
|
686
|
+
},
|
|
687
|
+
"arguments": [],
|
|
688
|
+
"directives": [],
|
|
689
|
+
"selectionSet": {
|
|
690
|
+
"kind": "SelectionSet",
|
|
691
|
+
"selections": [
|
|
692
|
+
{
|
|
693
|
+
"kind": "Field",
|
|
694
|
+
"name": {
|
|
695
|
+
"kind": "Name",
|
|
696
|
+
"value": "at"
|
|
697
|
+
},
|
|
698
|
+
"arguments": [],
|
|
699
|
+
"directives": []
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"kind": "Field",
|
|
703
|
+
"name": {
|
|
704
|
+
"kind": "Name",
|
|
705
|
+
"value": "scheduledJobIds"
|
|
706
|
+
},
|
|
707
|
+
"arguments": [],
|
|
708
|
+
"directives": []
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"kind": "Field",
|
|
712
|
+
"name": {
|
|
713
|
+
"kind": "Name",
|
|
714
|
+
"value": "workflowKeys"
|
|
715
|
+
},
|
|
716
|
+
"arguments": [],
|
|
717
|
+
"directives": []
|
|
718
|
+
}
|
|
719
|
+
]
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
]
|
|
723
|
+
}
|
|
724
|
+
}]
|
|
725
|
+
}
|
|
726
|
+
}]
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
// src/modules/schedules/lib/schedules.ts
|
|
730
|
+
/**
|
|
731
|
+
* Schedules page helpers (BOFF-4073): plain functions over the
|
|
732
|
+
* `workflowScheduleOverview` payload, kept free of React so they can be unit
|
|
733
|
+
* tested on their own.
|
|
734
|
+
*
|
|
735
|
+
* The service does the scheduling maths (cron and RRULE expansion, conflict
|
|
736
|
+
* detection, dependency edges); this module only filters, groups and lays the
|
|
737
|
+
* result out for the page.
|
|
738
|
+
*/
|
|
739
|
+
/** Look-ahead windows the page offers, in hours. */
|
|
740
|
+
const SCHEDULE_WINDOW_OPTIONS = [
|
|
741
|
+
6,
|
|
742
|
+
12,
|
|
743
|
+
24,
|
|
744
|
+
48,
|
|
745
|
+
168
|
|
746
|
+
];
|
|
747
|
+
function scheduleStateOf(entry) {
|
|
748
|
+
if (!entry.job.enabled || entry.job.status === "PAUSED") return "paused";
|
|
749
|
+
return entry.workflowActive ? "active" : "inactive-workflow";
|
|
750
|
+
}
|
|
751
|
+
/** True when the rule is an RFC 5545 recurrence rule rather than cron. */
|
|
752
|
+
function isRruleSchedule(job) {
|
|
753
|
+
return (job.scheduleType ?? "CRON").toUpperCase() === "RRULE";
|
|
754
|
+
}
|
|
755
|
+
/** The rule as written: the cron expression, or the RRULE text. */
|
|
756
|
+
function scheduleExpressionOf(job) {
|
|
757
|
+
return isRruleSchedule(job) ? (job.rrule ?? "").trim() : job.schedule.trim();
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* Human-readable text for the rule ("Every 15 minutes"), or null when it
|
|
761
|
+
* cannot be described (an RRULE, or a cron expression cronstrue rejects).
|
|
762
|
+
*/
|
|
763
|
+
function describeScheduleRule(job) {
|
|
764
|
+
if (isRruleSchedule(job)) return null;
|
|
765
|
+
const expression = job.schedule.trim();
|
|
766
|
+
return expression ? describeCron(expression) : null;
|
|
767
|
+
}
|
|
768
|
+
/** Case-insensitive match on schedule name, workflow name/key and rule. */
|
|
769
|
+
function filterSchedules(entries, search, state) {
|
|
770
|
+
const needle = search.trim().toLowerCase();
|
|
771
|
+
return entries.filter((entry) => {
|
|
772
|
+
const firing = scheduleStateOf(entry) !== "paused";
|
|
773
|
+
if (state === "enabled" && !firing) return false;
|
|
774
|
+
if (state === "disabled" && firing) return false;
|
|
775
|
+
if (!needle) return true;
|
|
776
|
+
return [
|
|
777
|
+
entry.job.name,
|
|
778
|
+
entry.workflowName ?? "",
|
|
779
|
+
entry.job.workflowKey,
|
|
780
|
+
scheduleExpressionOf(entry.job),
|
|
781
|
+
entry.job.timezone ?? ""
|
|
782
|
+
].some((text) => text.toLowerCase().includes(needle));
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* Upcoming executions grouped into one bucket per hour of the window, empty
|
|
787
|
+
* hours included, so the timeline keeps an even scale.
|
|
788
|
+
*/
|
|
789
|
+
function timelineBuckets(upcoming, windowStart, windowHours) {
|
|
790
|
+
const startMs = Date.parse(windowStart);
|
|
791
|
+
if (!Number.isFinite(startMs) || windowHours <= 0) return [];
|
|
792
|
+
const hour = 36e5;
|
|
793
|
+
const first = Math.floor(startMs / hour) * hour;
|
|
794
|
+
const count = Math.ceil((startMs + windowHours * hour - first) / hour);
|
|
795
|
+
const buckets = Array.from({ length: count }, (_, index) => ({
|
|
796
|
+
start: first + index * hour,
|
|
797
|
+
runs: []
|
|
798
|
+
}));
|
|
799
|
+
for (const run of upcoming) {
|
|
800
|
+
const at = Date.parse(run.at);
|
|
801
|
+
if (!Number.isFinite(at)) continue;
|
|
802
|
+
const bucket = buckets[Math.floor((at - first) / hour)];
|
|
803
|
+
if (bucket) bucket.runs.push(run);
|
|
804
|
+
}
|
|
805
|
+
return buckets;
|
|
806
|
+
}
|
|
807
|
+
/** The schedule names a conflict names, in the order of its ids. */
|
|
808
|
+
function conflictScheduleNames(scheduledJobIds, entries) {
|
|
809
|
+
const names = new Map(entries.map((entry) => [entry.job.id, entry.job.name]));
|
|
810
|
+
return scheduledJobIds.map((id) => names.get(id) ?? id);
|
|
811
|
+
}
|
|
812
|
+
/** The time from `now` until `at`, rounded up to the minute. */
|
|
813
|
+
function countdownTo(at, now = Date.now()) {
|
|
814
|
+
const ms = Date.parse(at) - now;
|
|
815
|
+
if (!Number.isFinite(ms) || ms <= 0) return { kind: "now" };
|
|
816
|
+
const minutes = Math.ceil(ms / 6e4);
|
|
817
|
+
if (minutes < 60) return {
|
|
818
|
+
kind: "minutes",
|
|
819
|
+
minutes
|
|
820
|
+
};
|
|
821
|
+
const hours = Math.floor(minutes / 60);
|
|
822
|
+
if (hours < 48) return {
|
|
823
|
+
kind: "hours",
|
|
824
|
+
hours,
|
|
825
|
+
minutes: minutes % 60
|
|
826
|
+
};
|
|
827
|
+
return {
|
|
828
|
+
kind: "days",
|
|
829
|
+
days: Math.round(hours / 24)
|
|
830
|
+
};
|
|
831
|
+
}
|
|
832
|
+
/** Spacing of the dependency graph layout, in canvas pixels. */
|
|
833
|
+
const GRAPH_COLUMN_WIDTH = 288;
|
|
834
|
+
const GRAPH_ROW_HEIGHT = 116;
|
|
835
|
+
/**
|
|
836
|
+
* Left-to-right layered layout: a workflow sits one column right of the
|
|
837
|
+
* furthest workflow that starts it. Cycles (A calls B, B's completion starts
|
|
838
|
+
* A) are cut at the first edge that closes them, so every node still gets a
|
|
839
|
+
* finite column. Within a column, nodes keep the input order.
|
|
840
|
+
*/
|
|
841
|
+
function layoutDependencyGraph(nodes, edges) {
|
|
842
|
+
const keys = nodes.map((node) => node.workflowKey);
|
|
843
|
+
const known = new Set(keys);
|
|
844
|
+
const parents = /* @__PURE__ */ new Map();
|
|
845
|
+
for (const edge of edges) {
|
|
846
|
+
if (!known.has(edge.fromWorkflowKey) || !known.has(edge.toWorkflowKey)) continue;
|
|
847
|
+
if (edge.fromWorkflowKey === edge.toWorkflowKey) continue;
|
|
848
|
+
const list = parents.get(edge.toWorkflowKey) ?? [];
|
|
849
|
+
list.push(edge.fromWorkflowKey);
|
|
850
|
+
parents.set(edge.toWorkflowKey, list);
|
|
851
|
+
}
|
|
852
|
+
const depth = /* @__PURE__ */ new Map();
|
|
853
|
+
const visiting = /* @__PURE__ */ new Set();
|
|
854
|
+
const depthOf = (key) => {
|
|
855
|
+
const cached = depth.get(key);
|
|
856
|
+
if (cached !== void 0) return cached;
|
|
857
|
+
if (visiting.has(key)) return -1;
|
|
858
|
+
visiting.add(key);
|
|
859
|
+
let value = 0;
|
|
860
|
+
for (const parent of parents.get(key) ?? []) value = Math.max(value, depthOf(parent) + 1);
|
|
861
|
+
visiting.delete(key);
|
|
862
|
+
depth.set(key, value);
|
|
863
|
+
return value;
|
|
864
|
+
};
|
|
865
|
+
const rows = /* @__PURE__ */ new Map();
|
|
866
|
+
const positions = /* @__PURE__ */ new Map();
|
|
867
|
+
for (const key of keys) {
|
|
868
|
+
const column = depthOf(key);
|
|
869
|
+
const row = rows.get(column) ?? 0;
|
|
870
|
+
rows.set(column, row + 1);
|
|
871
|
+
positions.set(key, {
|
|
872
|
+
x: column * 288,
|
|
873
|
+
y: row * 116
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
return positions;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
// src/modules/schedules/hooks/useScheduleOverview.ts
|
|
880
|
+
/**
|
|
881
|
+
* Scheduler operations overview (BOFF-4073): the workspace's schedules, the
|
|
882
|
+
* executions due in the chosen window, the workflow dependency graph and the
|
|
883
|
+
* minutes at which several schedules start together, from
|
|
884
|
+
* `workflowScheduleOverview` on wspace-workflow-svc.
|
|
885
|
+
*
|
|
886
|
+
* Enabling or disabling a schedule goes through `updateWorkflowScheduledJob`,
|
|
887
|
+
* which also pauses or resumes the job on wspace-scheduler-svc; the overview
|
|
888
|
+
* is then read again so the timeline and conflicts reflect the change.
|
|
889
|
+
*/
|
|
890
|
+
/** Re-read the overview this often while the page is open. */
|
|
891
|
+
const SCHEDULE_OVERVIEW_REFRESH_MS = 6e4;
|
|
892
|
+
function messageOf(error) {
|
|
893
|
+
return error instanceof Error ? error.message : String(error);
|
|
894
|
+
}
|
|
895
|
+
async function fetchScheduleOverview(windowHours) {
|
|
896
|
+
return throwIfResultError(await getFluidGridsClient().query({
|
|
897
|
+
query: WorkflowScheduleOverviewDocument,
|
|
898
|
+
variables: { windowHours },
|
|
899
|
+
fetchPolicy: "network-only"
|
|
900
|
+
})).data?.workflowScheduleOverview ?? null;
|
|
901
|
+
}
|
|
902
|
+
/** Switch one schedule on or off. Resolves with the service's refusal message, or null. */
|
|
903
|
+
async function setScheduleEnabled(jobId, enabled) {
|
|
904
|
+
const response = throwIfResultError(await getFluidGridsClient().mutate({
|
|
905
|
+
mutation: SetWorkflowScheduleEnabledDocument,
|
|
906
|
+
variables: {
|
|
907
|
+
jobId,
|
|
908
|
+
enabled
|
|
909
|
+
}
|
|
910
|
+
})).data?.updateWorkflowScheduledJob;
|
|
911
|
+
if (!response) return "No response from the workflow service";
|
|
912
|
+
return response.success ? null : response.message || "Update refused";
|
|
913
|
+
}
|
|
914
|
+
function useScheduleOverview(windowHours) {
|
|
915
|
+
const [overview, setOverview] = useState(null);
|
|
916
|
+
const [loading, setLoading] = useState(true);
|
|
917
|
+
const [error, setError] = useState(null);
|
|
918
|
+
const [pendingId, setPendingId] = useState(null);
|
|
919
|
+
const generation = useRef(0);
|
|
920
|
+
const refetch = useCallback(async () => {
|
|
921
|
+
const mine = ++generation.current;
|
|
922
|
+
setLoading(true);
|
|
923
|
+
try {
|
|
924
|
+
const next = await fetchScheduleOverview(windowHours);
|
|
925
|
+
if (mine !== generation.current) return;
|
|
926
|
+
setOverview(next);
|
|
927
|
+
setError(null);
|
|
928
|
+
} catch (err) {
|
|
929
|
+
if (mine !== generation.current) return;
|
|
930
|
+
setError(messageOf(err));
|
|
931
|
+
} finally {
|
|
932
|
+
if (mine === generation.current) setLoading(false);
|
|
933
|
+
}
|
|
934
|
+
}, [windowHours]);
|
|
935
|
+
useEffect(() => {
|
|
936
|
+
refetch();
|
|
937
|
+
const timer = setInterval(() => void refetch(), SCHEDULE_OVERVIEW_REFRESH_MS);
|
|
938
|
+
return () => clearInterval(timer);
|
|
939
|
+
}, [refetch]);
|
|
940
|
+
return {
|
|
941
|
+
overview,
|
|
942
|
+
loading,
|
|
943
|
+
error,
|
|
944
|
+
pendingId,
|
|
945
|
+
refetch,
|
|
946
|
+
toggle: useCallback(async (jobId, enabled) => {
|
|
947
|
+
setPendingId(jobId);
|
|
948
|
+
try {
|
|
949
|
+
const refusal = await setScheduleEnabled(jobId, enabled);
|
|
950
|
+
if (refusal) {
|
|
951
|
+
setError(refusal);
|
|
952
|
+
return false;
|
|
953
|
+
}
|
|
954
|
+
await refetch();
|
|
955
|
+
return true;
|
|
956
|
+
} catch (err) {
|
|
957
|
+
setError(messageOf(err));
|
|
958
|
+
return false;
|
|
959
|
+
} finally {
|
|
960
|
+
setPendingId(null);
|
|
961
|
+
}
|
|
962
|
+
}, [refetch])
|
|
963
|
+
};
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
// src/modules/schedules/components/ScheduleDependencyGraph.tsx
|
|
967
|
+
/**
|
|
968
|
+
* Read-only dependency graph of the Schedules page (BOFF-4073): which workflow
|
|
969
|
+
* starts which, through a Subworkflow node (SUBWORKFLOW), a "Workflow
|
|
970
|
+
* completed" trigger (ON_COMPLETION) or the Error Workflow setting (ON_ERROR).
|
|
971
|
+
* Scheduled workflows are marked, so the chain a schedule sets off is visible.
|
|
972
|
+
*/
|
|
973
|
+
const nodeTypes = { workflow: memo(function WorkflowNode({ data }) {
|
|
974
|
+
const tr = useTr();
|
|
975
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
976
|
+
className: "overflow-hidden rounded-md border border-border bg-card px-3 py-2 text-left shadow-sm",
|
|
977
|
+
style: {
|
|
978
|
+
width: 224,
|
|
979
|
+
height: 84
|
|
980
|
+
},
|
|
981
|
+
"data-testid": "schedule-graph-node",
|
|
982
|
+
"data-workflow-key": data.workflowKey,
|
|
983
|
+
children: [
|
|
984
|
+
/* @__PURE__ */ jsx(Handle, {
|
|
985
|
+
type: "target",
|
|
986
|
+
position: Position.Left,
|
|
987
|
+
isConnectable: false
|
|
988
|
+
}),
|
|
989
|
+
/* @__PURE__ */ jsx("div", {
|
|
990
|
+
className: "truncate text-sm font-medium text-text-primary",
|
|
991
|
+
children: data.label
|
|
992
|
+
}),
|
|
993
|
+
/* @__PURE__ */ jsx("div", {
|
|
994
|
+
className: "truncate font-mono text-[11px] text-text-secondary",
|
|
995
|
+
children: data.workflowKey
|
|
996
|
+
}),
|
|
997
|
+
/* @__PURE__ */ jsxs("div", {
|
|
998
|
+
className: "mt-1 flex flex-nowrap gap-1 overflow-hidden",
|
|
999
|
+
children: [
|
|
1000
|
+
data.scheduled && /* @__PURE__ */ jsx(Badge, {
|
|
1001
|
+
variant: "secondary",
|
|
1002
|
+
className: "text-[10px]",
|
|
1003
|
+
children: tr("fluidgrids.schedules.graph.scheduled", "Scheduled")
|
|
1004
|
+
}),
|
|
1005
|
+
!data.active && /* @__PURE__ */ jsx(Badge, {
|
|
1006
|
+
variant: "outline",
|
|
1007
|
+
className: "text-[10px]",
|
|
1008
|
+
children: tr("fluidgrids.schedules.graph.inactive", "Not active")
|
|
1009
|
+
}),
|
|
1010
|
+
data.watchesAllWorkflows && /* @__PURE__ */ jsx(Badge, {
|
|
1011
|
+
variant: "outline",
|
|
1012
|
+
className: "truncate text-[10px]",
|
|
1013
|
+
children: tr("fluidgrids.schedules.graph.watchesAll", "Runs after any workflow")
|
|
1014
|
+
})
|
|
1015
|
+
]
|
|
1016
|
+
}),
|
|
1017
|
+
/* @__PURE__ */ jsx(Handle, {
|
|
1018
|
+
type: "source",
|
|
1019
|
+
position: Position.Right,
|
|
1020
|
+
isConnectable: false
|
|
1021
|
+
})
|
|
1022
|
+
]
|
|
1023
|
+
});
|
|
1024
|
+
}) };
|
|
1025
|
+
function ScheduleDependencyGraph({ nodes, edges }) {
|
|
1026
|
+
const tr = useTr();
|
|
1027
|
+
const kindLabel = useMemo(() => ({
|
|
1028
|
+
SUBWORKFLOW: tr("fluidgrids.schedules.graph.kind.subworkflow", "calls"),
|
|
1029
|
+
ON_COMPLETION: tr("fluidgrids.schedules.graph.kind.onCompletion", "on completion"),
|
|
1030
|
+
ON_ERROR: tr("fluidgrids.schedules.graph.kind.onError", "on failure")
|
|
1031
|
+
}), [tr]);
|
|
1032
|
+
const flow = useMemo(() => {
|
|
1033
|
+
const positions = layoutDependencyGraph(nodes, edges);
|
|
1034
|
+
return {
|
|
1035
|
+
flowNodes: nodes.map((node) => ({
|
|
1036
|
+
id: node.workflowKey,
|
|
1037
|
+
type: "workflow",
|
|
1038
|
+
position: positions.get(node.workflowKey) ?? {
|
|
1039
|
+
x: 0,
|
|
1040
|
+
y: 0
|
|
1041
|
+
},
|
|
1042
|
+
draggable: false,
|
|
1043
|
+
connectable: false,
|
|
1044
|
+
data: {
|
|
1045
|
+
label: node.name || node.workflowKey,
|
|
1046
|
+
workflowKey: node.workflowKey,
|
|
1047
|
+
active: node.active,
|
|
1048
|
+
scheduled: node.scheduled,
|
|
1049
|
+
watchesAllWorkflows: node.watchesAllWorkflows
|
|
1050
|
+
}
|
|
1051
|
+
})),
|
|
1052
|
+
flowEdges: edges.map((edge) => {
|
|
1053
|
+
const statuses = edge.onStatuses.length ? ` (${edge.onStatuses.join(", ")})` : "";
|
|
1054
|
+
return {
|
|
1055
|
+
id: `${edge.kind}:${edge.fromWorkflowKey}->${edge.toWorkflowKey}`,
|
|
1056
|
+
source: edge.fromWorkflowKey,
|
|
1057
|
+
target: edge.toWorkflowKey,
|
|
1058
|
+
label: `${kindLabel[edge.kind] ?? edge.kind}${edge.kind === "ON_COMPLETION" ? statuses : ""}`,
|
|
1059
|
+
animated: edge.kind === "SUBWORKFLOW",
|
|
1060
|
+
markerEnd: { type: MarkerType.ArrowClosed }
|
|
1061
|
+
};
|
|
1062
|
+
})
|
|
1063
|
+
};
|
|
1064
|
+
}, [
|
|
1065
|
+
nodes,
|
|
1066
|
+
edges,
|
|
1067
|
+
kindLabel
|
|
1068
|
+
]);
|
|
1069
|
+
if (nodes.length === 0) return /* @__PURE__ */ jsx("p", {
|
|
1070
|
+
className: "py-8 text-center text-sm text-text-secondary",
|
|
1071
|
+
"data-testid": "schedule-graph-empty",
|
|
1072
|
+
children: tr("fluidgrids.schedules.graph.empty", "No scheduled workflows or workflow-to-workflow triggers yet.")
|
|
1073
|
+
});
|
|
1074
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1075
|
+
className: "h-80 w-full overflow-hidden rounded-md border border-border",
|
|
1076
|
+
"data-testid": "schedule-graph",
|
|
1077
|
+
children: /* @__PURE__ */ jsxs(ReactFlow, {
|
|
1078
|
+
nodes: flow.flowNodes,
|
|
1079
|
+
edges: flow.flowEdges,
|
|
1080
|
+
nodeTypes,
|
|
1081
|
+
nodesDraggable: false,
|
|
1082
|
+
nodesConnectable: false,
|
|
1083
|
+
elementsSelectable: false,
|
|
1084
|
+
edgesFocusable: false,
|
|
1085
|
+
fitView: true,
|
|
1086
|
+
fitViewOptions: { padding: .2 },
|
|
1087
|
+
proOptions: { hideAttribution: true },
|
|
1088
|
+
minZoom: .2,
|
|
1089
|
+
children: [/* @__PURE__ */ jsx(Background, {}), /* @__PURE__ */ jsx(Controls, { showInteractive: false })]
|
|
1090
|
+
})
|
|
1091
|
+
});
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
// src/modules/schedules/pages/SchedulesPage.tsx
|
|
1095
|
+
/**
|
|
1096
|
+
* Schedules (BOFF-4073) — the scheduler operations view of a workspace.
|
|
1097
|
+
*
|
|
1098
|
+
* - Upcoming executions: one bar per hour of the chosen window (default the
|
|
1099
|
+
* next 12 hours) and the next runs in order, with a countdown.
|
|
1100
|
+
* - Schedule table: every Schedule Trigger rule and manual scheduled job with
|
|
1101
|
+
* its rule (and plain-English reading), timezone, last and next run and an
|
|
1102
|
+
* enabled switch; searchable and filterable. Names open the workflow.
|
|
1103
|
+
* - Dependency graph: which workflow starts which (Subworkflow calls,
|
|
1104
|
+
* "Workflow completed" triggers, Error Workflow settings).
|
|
1105
|
+
* - Start-time conflicts: minutes at which several schedules fire together
|
|
1106
|
+
* and compete for the workspace's run concurrency.
|
|
1107
|
+
*
|
|
1108
|
+
* All scheduling maths runs on wspace-workflow-svc (`workflowScheduleOverview`);
|
|
1109
|
+
* this page renders it and toggles schedules through
|
|
1110
|
+
* `updateWorkflowScheduledJob`.
|
|
1111
|
+
*/
|
|
1112
|
+
var SchedulesPage_exports = /* @__PURE__ */ __exportAll({ SchedulesPage: () => SchedulesPage });
|
|
1113
|
+
/** Next runs listed under the timeline. */
|
|
1114
|
+
const NEXT_RUNS_LISTED = 8;
|
|
1115
|
+
function formatDateTime(iso) {
|
|
1116
|
+
if (!iso) return "—";
|
|
1117
|
+
const date = new Date(iso);
|
|
1118
|
+
return Number.isNaN(date.getTime()) ? "—" : date.toLocaleString(void 0, {
|
|
1119
|
+
month: "short",
|
|
1120
|
+
day: "numeric",
|
|
1121
|
+
hour: "2-digit",
|
|
1122
|
+
minute: "2-digit"
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
function formatHour(ms) {
|
|
1126
|
+
return new Date(ms).toLocaleTimeString(void 0, {
|
|
1127
|
+
hour: "2-digit",
|
|
1128
|
+
minute: "2-digit"
|
|
1129
|
+
});
|
|
1130
|
+
}
|
|
1131
|
+
function countdownText(tr, at) {
|
|
1132
|
+
const countdown = countdownTo(at);
|
|
1133
|
+
switch (countdown.kind) {
|
|
1134
|
+
case "now": return tr("fluidgrids.schedules.countdown.now", "now");
|
|
1135
|
+
case "minutes": return tr("fluidgrids.schedules.countdown.minutes", "in {{minutes}} min", { minutes: countdown.minutes });
|
|
1136
|
+
case "hours": return countdown.minutes ? tr("fluidgrids.schedules.countdown.hoursMinutes", "in {{hours}} h {{minutes}} min", {
|
|
1137
|
+
hours: countdown.hours,
|
|
1138
|
+
minutes: countdown.minutes
|
|
1139
|
+
}) : tr("fluidgrids.schedules.countdown.hours", "in {{hours}} h", { hours: countdown.hours });
|
|
1140
|
+
case "days": return tr("fluidgrids.schedules.countdown.days", "in {{days}} d", { days: countdown.days });
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
function workflowPath(workflowKey, version) {
|
|
1144
|
+
return version ? builderPathOf({
|
|
1145
|
+
workflowKey,
|
|
1146
|
+
version
|
|
1147
|
+
}) : `../resolve/${encodeURIComponent(workflowKey)}`;
|
|
1148
|
+
}
|
|
1149
|
+
function StateBadge({ state }) {
|
|
1150
|
+
const tr = useTr();
|
|
1151
|
+
if (state === "active") return /* @__PURE__ */ jsx(Badge, {
|
|
1152
|
+
className: "border-status-success-border bg-status-success-bg-subtle text-status-success-text",
|
|
1153
|
+
children: tr("fluidgrids.schedules.state.active", "Active")
|
|
1154
|
+
});
|
|
1155
|
+
if (state === "inactive-workflow") return /* @__PURE__ */ jsx(Badge, {
|
|
1156
|
+
className: "border-status-warning-border bg-status-warning-bg-subtle text-status-warning-text",
|
|
1157
|
+
title: tr("fluidgrids.schedules.state.inactiveWorkflowHint", "The workflow has no active version, so this schedule does not fire. Activate the workflow to start it."),
|
|
1158
|
+
children: tr("fluidgrids.schedules.state.inactiveWorkflow", "Workflow inactive")
|
|
1159
|
+
});
|
|
1160
|
+
return /* @__PURE__ */ jsx(Badge, {
|
|
1161
|
+
variant: "outline",
|
|
1162
|
+
children: tr("fluidgrids.schedules.state.paused", "Paused")
|
|
1163
|
+
});
|
|
1164
|
+
}
|
|
1165
|
+
function Metric({ label, value, testId, tone }) {
|
|
1166
|
+
return /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, {
|
|
1167
|
+
className: "p-4",
|
|
1168
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1169
|
+
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
1170
|
+
children: label
|
|
1171
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1172
|
+
className: `mt-1 text-2xl font-semibold ${tone === "warning" && value > 0 ? "text-status-warning-text" : "text-text-primary"}`,
|
|
1173
|
+
"data-testid": testId,
|
|
1174
|
+
children: value
|
|
1175
|
+
})]
|
|
1176
|
+
}) });
|
|
1177
|
+
}
|
|
1178
|
+
function UpcomingTimeline({ upcoming, windowStart, windowHours, truncated }) {
|
|
1179
|
+
const tr = useTr();
|
|
1180
|
+
const buckets = useMemo(() => timelineBuckets(upcoming, windowStart, windowHours), [
|
|
1181
|
+
upcoming,
|
|
1182
|
+
windowStart,
|
|
1183
|
+
windowHours
|
|
1184
|
+
]);
|
|
1185
|
+
const peak = Math.max(1, ...buckets.map((bucket) => bucket.runs.length));
|
|
1186
|
+
const labelEvery = Math.max(1, Math.ceil(buckets.length / 12));
|
|
1187
|
+
return /* @__PURE__ */ jsxs(Card, {
|
|
1188
|
+
"data-testid": "schedules-timeline",
|
|
1189
|
+
children: [/* @__PURE__ */ jsxs(CardHeader, {
|
|
1190
|
+
className: "pb-2",
|
|
1191
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
1192
|
+
className: "text-base font-semibold text-text-primary",
|
|
1193
|
+
children: tr("fluidgrids.schedules.timeline.title", "Upcoming executions (next {{hours}} hours)", { hours: windowHours })
|
|
1194
|
+
}), truncated && /* @__PURE__ */ jsx("p", {
|
|
1195
|
+
className: "text-xs text-status-warning-text",
|
|
1196
|
+
children: tr("fluidgrids.schedules.timeline.truncated", "More executions are due than are shown; the busiest schedules are capped.")
|
|
1197
|
+
})]
|
|
1198
|
+
}), /* @__PURE__ */ jsxs(CardContent, {
|
|
1199
|
+
className: "space-y-4",
|
|
1200
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1201
|
+
className: "flex h-28 items-end gap-0.5",
|
|
1202
|
+
role: "img",
|
|
1203
|
+
"aria-label": tr("fluidgrids.schedules.timeline.chartLabel", "{{count}} executions in the next {{hours}} hours", {
|
|
1204
|
+
count: upcoming.length,
|
|
1205
|
+
hours: windowHours
|
|
1206
|
+
}),
|
|
1207
|
+
children: buckets.map((bucket, index) => /* @__PURE__ */ jsxs("div", {
|
|
1208
|
+
className: "flex min-w-0 flex-1 flex-col items-center justify-end gap-1",
|
|
1209
|
+
title: `${formatHour(bucket.start)} · ${bucket.runs.length}`,
|
|
1210
|
+
"data-testid": "schedules-timeline-bucket",
|
|
1211
|
+
"data-count": bucket.runs.length,
|
|
1212
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1213
|
+
className: `w-full rounded-t-sm ${bucket.runs.length ? "bg-primary" : "bg-muted"}`,
|
|
1214
|
+
style: { height: `${bucket.runs.length ? Math.max(8, bucket.runs.length / peak * 88) : 2}px` }
|
|
1215
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1216
|
+
className: "h-3 text-[10px] leading-3 text-text-secondary",
|
|
1217
|
+
children: index % labelEvery === 0 ? formatHour(bucket.start) : ""
|
|
1218
|
+
})]
|
|
1219
|
+
}, bucket.start))
|
|
1220
|
+
}), upcoming.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
1221
|
+
className: "text-sm text-text-secondary",
|
|
1222
|
+
"data-testid": "schedules-upcoming-empty",
|
|
1223
|
+
children: tr("fluidgrids.schedules.timeline.empty", "Nothing is scheduled to run in this window.")
|
|
1224
|
+
}) : /* @__PURE__ */ jsx("ul", {
|
|
1225
|
+
className: "divide-y divide-border",
|
|
1226
|
+
"data-testid": "schedules-upcoming",
|
|
1227
|
+
children: upcoming.slice(0, NEXT_RUNS_LISTED).map((run) => /* @__PURE__ */ jsxs("li", {
|
|
1228
|
+
className: "flex items-center justify-between gap-3 py-2 text-sm",
|
|
1229
|
+
"data-testid": "schedules-upcoming-run",
|
|
1230
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1231
|
+
className: "min-w-0",
|
|
1232
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1233
|
+
className: "truncate font-medium text-text-primary",
|
|
1234
|
+
children: run.scheduleName
|
|
1235
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1236
|
+
className: "truncate text-xs text-text-secondary",
|
|
1237
|
+
children: run.workflowName || run.workflowKey
|
|
1238
|
+
})]
|
|
1239
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1240
|
+
className: "shrink-0 text-right",
|
|
1241
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1242
|
+
className: "text-text-primary",
|
|
1243
|
+
children: formatDateTime(run.at)
|
|
1244
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1245
|
+
className: "text-xs text-text-secondary",
|
|
1246
|
+
children: countdownText(tr, run.at)
|
|
1247
|
+
})]
|
|
1248
|
+
})]
|
|
1249
|
+
}, `${run.scheduledJobId}-${run.at}`))
|
|
1250
|
+
})]
|
|
1251
|
+
})]
|
|
1252
|
+
});
|
|
1253
|
+
}
|
|
1254
|
+
function ScheduleRow({ entry, canUpdate, pending, onToggle }) {
|
|
1255
|
+
const tr = useTr();
|
|
1256
|
+
const { job } = entry;
|
|
1257
|
+
const human = describeScheduleRule(job);
|
|
1258
|
+
const expression = scheduleExpressionOf(job);
|
|
1259
|
+
const state = scheduleStateOf(entry);
|
|
1260
|
+
return /* @__PURE__ */ jsxs(TableRow, {
|
|
1261
|
+
"data-testid": "schedule-row",
|
|
1262
|
+
"data-schedule-id": job.id,
|
|
1263
|
+
children: [
|
|
1264
|
+
/* @__PURE__ */ jsxs(TableCell, { children: [
|
|
1265
|
+
/* @__PURE__ */ jsx("div", {
|
|
1266
|
+
className: "font-medium text-text-primary",
|
|
1267
|
+
children: job.name
|
|
1268
|
+
}),
|
|
1269
|
+
/* @__PURE__ */ jsx(Link, {
|
|
1270
|
+
to: workflowPath(job.workflowKey, entry.workflowVersion),
|
|
1271
|
+
className: "text-xs text-primary hover:underline",
|
|
1272
|
+
"data-testid": "schedule-workflow-link",
|
|
1273
|
+
children: entry.workflowName || job.workflowKey
|
|
1274
|
+
}),
|
|
1275
|
+
entry.triggerNodeId && /* @__PURE__ */ jsxs("span", {
|
|
1276
|
+
className: "ml-1 text-xs text-text-secondary",
|
|
1277
|
+
children: [
|
|
1278
|
+
"·",
|
|
1279
|
+
" ",
|
|
1280
|
+
tr("fluidgrids.schedules.table.triggerNode", "node {{id}}", { id: entry.triggerNodeId })
|
|
1281
|
+
]
|
|
1282
|
+
})
|
|
1283
|
+
] }),
|
|
1284
|
+
/* @__PURE__ */ jsxs(TableCell, { children: [/* @__PURE__ */ jsx("code", {
|
|
1285
|
+
className: "rounded bg-muted px-1 font-mono text-xs text-text-primary",
|
|
1286
|
+
children: expression || "—"
|
|
1287
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1288
|
+
className: "mt-0.5 text-xs text-text-secondary",
|
|
1289
|
+
children: human ?? (job.scheduleType === "RRULE" ? tr("fluidgrids.schedules.table.rrule", "Recurrence rule") : "")
|
|
1290
|
+
})] }),
|
|
1291
|
+
/* @__PURE__ */ jsx(TableCell, {
|
|
1292
|
+
className: "text-sm text-text-secondary",
|
|
1293
|
+
children: job.timezone || "UTC"
|
|
1294
|
+
}),
|
|
1295
|
+
/* @__PURE__ */ jsxs(TableCell, {
|
|
1296
|
+
className: "text-sm text-text-secondary",
|
|
1297
|
+
children: [/* @__PURE__ */ jsx("div", { children: formatDateTime(job.lastRun) }), entry.lastRunStatus && /* @__PURE__ */ jsx(Badge, {
|
|
1298
|
+
variant: "outline",
|
|
1299
|
+
className: "mt-0.5 text-[10px]",
|
|
1300
|
+
children: entry.lastRunStatus
|
|
1301
|
+
})]
|
|
1302
|
+
}),
|
|
1303
|
+
/* @__PURE__ */ jsx(TableCell, {
|
|
1304
|
+
className: "text-sm text-text-secondary",
|
|
1305
|
+
children: state === "paused" ? "—" : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", { children: formatDateTime(job.nextRun) }), job.nextRun && /* @__PURE__ */ jsx("div", {
|
|
1306
|
+
className: "text-xs",
|
|
1307
|
+
children: countdownText(tr, job.nextRun)
|
|
1308
|
+
})] })
|
|
1309
|
+
}),
|
|
1310
|
+
/* @__PURE__ */ jsx(TableCell, {
|
|
1311
|
+
className: "text-sm text-text-secondary",
|
|
1312
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
1313
|
+
"data-testid": "schedule-upcoming-count",
|
|
1314
|
+
children: [entry.upcomingCount, entry.upcomingTruncated ? "+" : ""]
|
|
1315
|
+
})
|
|
1316
|
+
}),
|
|
1317
|
+
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(StateBadge, { state }) }),
|
|
1318
|
+
/* @__PURE__ */ jsx(TableCell, {
|
|
1319
|
+
className: "text-right",
|
|
1320
|
+
children: /* @__PURE__ */ jsx(Switch, {
|
|
1321
|
+
checked: job.enabled,
|
|
1322
|
+
disabled: !canUpdate || pending,
|
|
1323
|
+
onCheckedChange: (checked) => onToggle(entry, checked),
|
|
1324
|
+
"aria-label": tr("fluidgrids.schedules.table.toggleLabel", "Enable {{name}}", { name: job.name }),
|
|
1325
|
+
title: canUpdate ? void 0 : tr("fluidgrids.schedules.table.toggleDenied", "You don't have permission to change schedules"),
|
|
1326
|
+
"data-testid": "schedule-enabled-toggle"
|
|
1327
|
+
})
|
|
1328
|
+
})
|
|
1329
|
+
]
|
|
1330
|
+
});
|
|
1331
|
+
}
|
|
1332
|
+
function SchedulesToolbar({ windowHours, onWindowChange, loading, onRefresh }) {
|
|
1333
|
+
const tr = useTr();
|
|
1334
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1335
|
+
className: "flex items-center gap-2",
|
|
1336
|
+
children: [/* @__PURE__ */ jsxs(Select, {
|
|
1337
|
+
value: String(windowHours),
|
|
1338
|
+
onValueChange: (value) => onWindowChange(Number(value)),
|
|
1339
|
+
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
1340
|
+
className: "w-40",
|
|
1341
|
+
"data-testid": "schedules-window",
|
|
1342
|
+
"aria-label": tr("fluidgrids.schedules.window", "Look-ahead window"),
|
|
1343
|
+
children: /* @__PURE__ */ jsx(SelectValue, {})
|
|
1344
|
+
}), /* @__PURE__ */ jsx(SelectContent, { children: SCHEDULE_WINDOW_OPTIONS.map((hours) => /* @__PURE__ */ jsx(SelectItem, {
|
|
1345
|
+
value: String(hours),
|
|
1346
|
+
children: hours >= 48 ? tr("fluidgrids.schedules.windowDays", "Next {{days}} days", { days: hours / 24 }) : tr("fluidgrids.schedules.windowHours", "Next {{hours}} hours", { hours })
|
|
1347
|
+
}, hours)) })]
|
|
1348
|
+
}), /* @__PURE__ */ jsxs(Button, {
|
|
1349
|
+
variant: "outline",
|
|
1350
|
+
size: "sm",
|
|
1351
|
+
onClick: onRefresh,
|
|
1352
|
+
disabled: loading,
|
|
1353
|
+
"data-testid": "schedules-refresh",
|
|
1354
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
1355
|
+
icon: "lucide:refresh-cw",
|
|
1356
|
+
className: `mr-1 h-4 w-4 ${loading ? "motion-safe:animate-spin" : ""}`
|
|
1357
|
+
}), tr("fluidgrids.schedules.refresh", "Refresh")]
|
|
1358
|
+
})]
|
|
1359
|
+
});
|
|
1360
|
+
}
|
|
1361
|
+
function ScheduleMetrics({ overview, schedules }) {
|
|
1362
|
+
const tr = useTr();
|
|
1363
|
+
const activeCount = useMemo(() => schedules.filter((entry) => scheduleStateOf(entry) === "active").length, [schedules]);
|
|
1364
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1365
|
+
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
1366
|
+
children: [
|
|
1367
|
+
/* @__PURE__ */ jsx(Metric, {
|
|
1368
|
+
label: tr("fluidgrids.schedules.metric.schedules", "Schedules"),
|
|
1369
|
+
value: schedules.length,
|
|
1370
|
+
testId: "schedules-metric-total"
|
|
1371
|
+
}),
|
|
1372
|
+
/* @__PURE__ */ jsx(Metric, {
|
|
1373
|
+
label: tr("fluidgrids.schedules.metric.active", "Firing"),
|
|
1374
|
+
value: activeCount,
|
|
1375
|
+
testId: "schedules-metric-active"
|
|
1376
|
+
}),
|
|
1377
|
+
/* @__PURE__ */ jsx(Metric, {
|
|
1378
|
+
label: tr("fluidgrids.schedules.metric.upcoming", "Runs in window"),
|
|
1379
|
+
value: overview.upcoming.length,
|
|
1380
|
+
testId: "schedules-metric-upcoming"
|
|
1381
|
+
}),
|
|
1382
|
+
/* @__PURE__ */ jsx(Metric, {
|
|
1383
|
+
label: tr("fluidgrids.schedules.metric.conflicts", "Conflicts"),
|
|
1384
|
+
value: overview.conflicts.length,
|
|
1385
|
+
testId: "schedules-metric-conflicts",
|
|
1386
|
+
tone: "warning"
|
|
1387
|
+
})
|
|
1388
|
+
]
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
function ScheduleTableCard({ schedules, truncated, canUpdate, pendingId, onToggle }) {
|
|
1392
|
+
const tr = useTr();
|
|
1393
|
+
const [search, setSearch] = useState("");
|
|
1394
|
+
const [stateFilter, setStateFilter] = useState("all");
|
|
1395
|
+
const visible = useMemo(() => filterSchedules(schedules, search, stateFilter), [
|
|
1396
|
+
schedules,
|
|
1397
|
+
search,
|
|
1398
|
+
stateFilter
|
|
1399
|
+
]);
|
|
1400
|
+
return /* @__PURE__ */ jsxs(Card, {
|
|
1401
|
+
"data-testid": "schedules-table",
|
|
1402
|
+
children: [/* @__PURE__ */ jsxs(CardHeader, {
|
|
1403
|
+
className: "flex flex-col gap-3 pb-2 sm:flex-row sm:items-center sm:justify-between",
|
|
1404
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
1405
|
+
className: "text-base font-semibold text-text-primary",
|
|
1406
|
+
children: tr("fluidgrids.schedules.table.title", "All schedules")
|
|
1407
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1408
|
+
className: "flex flex-wrap items-center gap-2",
|
|
1409
|
+
children: [/* @__PURE__ */ jsx(Input, {
|
|
1410
|
+
value: search,
|
|
1411
|
+
onChange: (event) => setSearch(event.target.value),
|
|
1412
|
+
placeholder: tr("fluidgrids.schedules.table.search", "Search name, workflow or rule"),
|
|
1413
|
+
className: "w-64",
|
|
1414
|
+
"data-testid": "schedules-search"
|
|
1415
|
+
}), /* @__PURE__ */ jsxs(Select, {
|
|
1416
|
+
value: stateFilter,
|
|
1417
|
+
onValueChange: (value) => setStateFilter(value),
|
|
1418
|
+
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
1419
|
+
className: "w-36",
|
|
1420
|
+
"data-testid": "schedules-state-filter",
|
|
1421
|
+
"aria-label": tr("fluidgrids.schedules.table.stateFilter", "Filter by state"),
|
|
1422
|
+
children: /* @__PURE__ */ jsx(SelectValue, {})
|
|
1423
|
+
}), /* @__PURE__ */ jsxs(SelectContent, { children: [
|
|
1424
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
1425
|
+
value: "all",
|
|
1426
|
+
children: tr("fluidgrids.schedules.table.filterAll", "All")
|
|
1427
|
+
}),
|
|
1428
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
1429
|
+
value: "enabled",
|
|
1430
|
+
children: tr("fluidgrids.schedules.table.filterEnabled", "Enabled")
|
|
1431
|
+
}),
|
|
1432
|
+
/* @__PURE__ */ jsx(SelectItem, {
|
|
1433
|
+
value: "disabled",
|
|
1434
|
+
children: tr("fluidgrids.schedules.table.filterDisabled", "Paused")
|
|
1435
|
+
})
|
|
1436
|
+
] })]
|
|
1437
|
+
})]
|
|
1438
|
+
})]
|
|
1439
|
+
}), /* @__PURE__ */ jsxs(CardContent, {
|
|
1440
|
+
className: "overflow-x-auto p-0",
|
|
1441
|
+
children: [/* @__PURE__ */ jsxs(Table, { children: [/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
1442
|
+
/* @__PURE__ */ jsx(TableHead, { children: tr("fluidgrids.schedules.table.name", "Schedule") }),
|
|
1443
|
+
/* @__PURE__ */ jsx(TableHead, { children: tr("fluidgrids.schedules.table.rule", "Rule") }),
|
|
1444
|
+
/* @__PURE__ */ jsx(TableHead, { children: tr("fluidgrids.schedules.table.timezone", "Timezone") }),
|
|
1445
|
+
/* @__PURE__ */ jsx(TableHead, { children: tr("fluidgrids.schedules.table.lastRun", "Last run") }),
|
|
1446
|
+
/* @__PURE__ */ jsx(TableHead, { children: tr("fluidgrids.schedules.table.nextRun", "Next run") }),
|
|
1447
|
+
/* @__PURE__ */ jsx(TableHead, { children: tr("fluidgrids.schedules.table.inWindow", "In window") }),
|
|
1448
|
+
/* @__PURE__ */ jsx(TableHead, { children: tr("fluidgrids.schedules.table.state", "State") }),
|
|
1449
|
+
/* @__PURE__ */ jsx(TableHead, {
|
|
1450
|
+
className: "text-right",
|
|
1451
|
+
children: tr("fluidgrids.schedules.table.enabled", "Enabled")
|
|
1452
|
+
})
|
|
1453
|
+
] }) }), /* @__PURE__ */ jsxs(TableBody, { children: [visible.map((entry) => /* @__PURE__ */ jsx(ScheduleRow, {
|
|
1454
|
+
entry,
|
|
1455
|
+
canUpdate,
|
|
1456
|
+
pending: pendingId === entry.job.id,
|
|
1457
|
+
onToggle
|
|
1458
|
+
}, entry.job.id)), visible.length === 0 && /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, {
|
|
1459
|
+
colSpan: 8,
|
|
1460
|
+
className: "py-10 text-center text-sm text-text-secondary",
|
|
1461
|
+
"data-testid": "schedules-table-empty",
|
|
1462
|
+
children: schedules.length === 0 ? tr("fluidgrids.schedules.table.none", "No schedules yet. Add a Schedule Trigger to a workflow and activate it.") : tr("fluidgrids.schedules.table.noMatch", "No schedule matches the search.")
|
|
1463
|
+
}) })] })] }), truncated ? /* @__PURE__ */ jsx("p", {
|
|
1464
|
+
className: "border-t border-border-default px-4 py-2 text-xs text-text-secondary",
|
|
1465
|
+
"data-testid": "schedules-table-truncated",
|
|
1466
|
+
children: tr("fluidgrids.schedules.table.truncated", "This workspace has more schedules than the page lists; the oldest ones are shown.")
|
|
1467
|
+
}) : null]
|
|
1468
|
+
})]
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1471
|
+
function DependenciesCard({ dependencies }) {
|
|
1472
|
+
const tr = useTr();
|
|
1473
|
+
return /* @__PURE__ */ jsxs(Card, {
|
|
1474
|
+
className: "xl:col-span-2",
|
|
1475
|
+
"data-testid": "schedules-dependencies",
|
|
1476
|
+
children: [/* @__PURE__ */ jsxs(CardHeader, {
|
|
1477
|
+
className: "pb-2",
|
|
1478
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
1479
|
+
className: "text-base font-semibold text-text-primary",
|
|
1480
|
+
children: tr("fluidgrids.schedules.graph.title", "Dependency graph")
|
|
1481
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
1482
|
+
className: "text-xs text-text-secondary",
|
|
1483
|
+
children: tr("fluidgrids.schedules.graph.subtitle", "Arrows point from a workflow to the workflow it starts: a Subworkflow call, a Workflow completed trigger or the Error Workflow setting.")
|
|
1484
|
+
})]
|
|
1485
|
+
}), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(ScheduleDependencyGraph, {
|
|
1486
|
+
nodes: dependencies.nodes,
|
|
1487
|
+
edges: dependencies.edges
|
|
1488
|
+
}) })]
|
|
1489
|
+
});
|
|
1490
|
+
}
|
|
1491
|
+
function ConflictsCard({ conflicts, schedules }) {
|
|
1492
|
+
const tr = useTr();
|
|
1493
|
+
return /* @__PURE__ */ jsxs(Card, {
|
|
1494
|
+
"data-testid": "schedules-conflicts",
|
|
1495
|
+
children: [/* @__PURE__ */ jsxs(CardHeader, {
|
|
1496
|
+
className: "pb-2",
|
|
1497
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
1498
|
+
className: "text-base font-semibold text-text-primary",
|
|
1499
|
+
children: tr("fluidgrids.schedules.conflicts.title", "Start-time conflicts")
|
|
1500
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
1501
|
+
className: "text-xs text-text-secondary",
|
|
1502
|
+
children: tr("fluidgrids.schedules.conflicts.subtitle", "Minutes at which several schedules start together and share the workspace's run limit. Stagger them to spread the load.")
|
|
1503
|
+
})]
|
|
1504
|
+
}), /* @__PURE__ */ jsx(CardContent, { children: conflicts.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
1505
|
+
className: "text-sm text-text-secondary",
|
|
1506
|
+
"data-testid": "schedules-conflicts-empty",
|
|
1507
|
+
children: tr("fluidgrids.schedules.conflicts.none", "No two schedules start at the same minute in this window.")
|
|
1508
|
+
}) : /* @__PURE__ */ jsx("ul", {
|
|
1509
|
+
className: "max-h-80 space-y-2 overflow-y-auto",
|
|
1510
|
+
children: conflicts.map((conflict) => /* @__PURE__ */ jsxs("li", {
|
|
1511
|
+
className: "rounded-md border border-status-warning-border bg-status-warning-bg-subtle p-2 text-sm",
|
|
1512
|
+
"data-testid": "schedules-conflict",
|
|
1513
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1514
|
+
className: "font-medium text-status-warning-text",
|
|
1515
|
+
children: [
|
|
1516
|
+
formatDateTime(conflict.at),
|
|
1517
|
+
" ·",
|
|
1518
|
+
" ",
|
|
1519
|
+
tr("fluidgrids.schedules.conflicts.count", "{{count}} schedules", { count: conflict.scheduledJobIds.length })
|
|
1520
|
+
]
|
|
1521
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1522
|
+
className: "text-xs text-text-secondary",
|
|
1523
|
+
children: conflictScheduleNames(conflict.scheduledJobIds, schedules).join(", ")
|
|
1524
|
+
})]
|
|
1525
|
+
}, conflict.at))
|
|
1526
|
+
}) })]
|
|
1527
|
+
});
|
|
1528
|
+
}
|
|
1529
|
+
function SchedulesLoading() {
|
|
1530
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1531
|
+
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
1532
|
+
role: "status",
|
|
1533
|
+
"aria-busy": "true",
|
|
1534
|
+
children: [
|
|
1535
|
+
0,
|
|
1536
|
+
1,
|
|
1537
|
+
2,
|
|
1538
|
+
3
|
|
1539
|
+
].map((i) => /* @__PURE__ */ jsx("div", { className: "h-20 rounded-md bg-muted/60 motion-safe:animate-pulse" }, i))
|
|
1540
|
+
});
|
|
1541
|
+
}
|
|
1542
|
+
function SchedulesPage() {
|
|
1543
|
+
const tr = useTr();
|
|
1544
|
+
const [windowHours, setWindowHours] = useState(12);
|
|
1545
|
+
const { overview, loading, error, pendingId, refetch, toggle } = useScheduleOverview(windowHours);
|
|
1546
|
+
const { allowed: canUpdate } = useFluidGridsPermission(FLUIDGRIDS_PERMISSIONS.SCHEDULED_JOB_UPDATE);
|
|
1547
|
+
const schedules = useMemo(() => overview?.schedules ?? [], [overview]);
|
|
1548
|
+
const handleToggle = useCallback(async (entry, enabled) => {
|
|
1549
|
+
if (await toggle(entry.job.id, enabled)) toast.success(enabled ? tr("fluidgrids.schedules.toast.enabled", "Schedule enabled") : tr("fluidgrids.schedules.toast.disabled", "Schedule paused"));
|
|
1550
|
+
else toast.error(tr("fluidgrids.schedules.toast.toggleFailed", "Could not update the schedule"));
|
|
1551
|
+
}, [toggle, tr]);
|
|
1552
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1553
|
+
className: "space-y-6 p-6",
|
|
1554
|
+
"data-testid": "schedules-page",
|
|
1555
|
+
children: [
|
|
1556
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1557
|
+
className: "flex flex-wrap items-start justify-between gap-4",
|
|
1558
|
+
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h1", {
|
|
1559
|
+
className: "text-2xl font-semibold text-text-primary",
|
|
1560
|
+
children: tr("fluidgrids.schedules.title", "Schedules")
|
|
1561
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
1562
|
+
className: "mt-1 max-w-2xl text-sm text-text-secondary",
|
|
1563
|
+
children: tr("fluidgrids.schedules.subtitle", "Every schedule in this workspace, what runs next, which workflows start each other, and when schedules collide.")
|
|
1564
|
+
})] }), /* @__PURE__ */ jsx(SchedulesToolbar, {
|
|
1565
|
+
windowHours,
|
|
1566
|
+
onWindowChange: setWindowHours,
|
|
1567
|
+
loading,
|
|
1568
|
+
onRefresh: () => void refetch()
|
|
1569
|
+
})]
|
|
1570
|
+
}),
|
|
1571
|
+
error && /* @__PURE__ */ jsx("div", {
|
|
1572
|
+
className: "rounded-md border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
|
|
1573
|
+
"data-testid": "schedules-error",
|
|
1574
|
+
children: error
|
|
1575
|
+
}),
|
|
1576
|
+
!overview && loading ? /* @__PURE__ */ jsx(SchedulesLoading, {}) : null,
|
|
1577
|
+
overview ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1578
|
+
/* @__PURE__ */ jsx(ScheduleMetrics, {
|
|
1579
|
+
overview,
|
|
1580
|
+
schedules
|
|
1581
|
+
}),
|
|
1582
|
+
/* @__PURE__ */ jsx(UpcomingTimeline, {
|
|
1583
|
+
upcoming: overview.upcoming,
|
|
1584
|
+
windowStart: overview.windowStart,
|
|
1585
|
+
windowHours: overview.windowHours,
|
|
1586
|
+
truncated: overview.upcomingTruncated
|
|
1587
|
+
}),
|
|
1588
|
+
/* @__PURE__ */ jsx(ScheduleTableCard, {
|
|
1589
|
+
schedules,
|
|
1590
|
+
truncated: overview.schedulesTruncated,
|
|
1591
|
+
canUpdate,
|
|
1592
|
+
pendingId,
|
|
1593
|
+
onToggle: handleToggle
|
|
1594
|
+
}),
|
|
1595
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1596
|
+
className: "grid grid-cols-1 gap-6 xl:grid-cols-3",
|
|
1597
|
+
children: [/* @__PURE__ */ jsx(DependenciesCard, { dependencies: overview.dependencies }), /* @__PURE__ */ jsx(ConflictsCard, {
|
|
1598
|
+
conflicts: overview.conflicts,
|
|
1599
|
+
schedules
|
|
1600
|
+
})]
|
|
1601
|
+
})
|
|
1602
|
+
] }) : null
|
|
1603
|
+
]
|
|
1604
|
+
});
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
export { WorkflowScheduleOverviewDocument as a, useScheduleOverview as i, SchedulesPage_exports as n, SetWorkflowScheduleEnabledDocument as o, ScheduleDependencyGraph as r, SchedulesPage as t };
|