n8n-editor-ui 1.69.1 → 1.69.2
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/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-WFxE66IL.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-DsSSKITh.js} +1 -1
- package/dist/assets/{AuthView-CwyYsaEp.js → AuthView-CjaKK4wD.js} +1 -1
- package/dist/assets/{CanvasChat-aNmHLHsk.js → CanvasChat-CgmojiIF.js} +3 -3
- package/dist/assets/{CanvasControls-B0XKV7Yl.js → CanvasControls-BnaxrDfG.js} +1 -1
- package/dist/assets/{ChangePasswordView-brXzO3ZA.js → ChangePasswordView-Awz7pSyQ.js} +2 -2
- package/dist/assets/CollectionParameter-t3Px_gCv.js +4 -0
- package/dist/assets/{CredentialsView-DmCI_BFM.js → CredentialsView-17Gej-4E.js} +5 -5
- package/dist/assets/{ErrorView-CgtXwolU.js → ErrorView-BruidBTG.js} +1 -1
- package/dist/assets/{ExecutionsTime.vue_vue_type_script_setup_true_lang-DzSjE1X1.js → ExecutionsTime.vue_vue_type_script_setup_true_lang-ii_x0ZKd.js} +2 -2
- package/dist/assets/{ExecutionsView-BQFG-zfV.js → ExecutionsView-Dju3u6ef.js} +6 -6
- package/dist/assets/{FileSaver.min-Dec4VlX4.js → FileSaver.min-BrVQYnoo.js} +1 -1
- package/dist/assets/{FixedCollectionParameter-UONn8WZJ.js → FixedCollectionParameter-Dqu_mA2o.js} +1 -1
- package/dist/assets/{ForgotMyPasswordView-9zRIxS-G.js → ForgotMyPasswordView-Cp4QmF_H.js} +2 -2
- package/dist/assets/{MainHeader-Bc9p2q6U.js → MainHeader-Bwaciykz.js} +8 -8
- package/dist/assets/{MainSidebar-DlEV1cKl.js → MainSidebar-BazHKbV7.js} +3 -3
- package/dist/assets/{NodeCreation-DT2fJ_vL.js → NodeCreation-ePvame-B.js} +4 -4
- package/dist/assets/{NodeCreator-D0GID8DN.js → NodeCreator-Cpur7Kbl.js} +11 -11
- package/dist/assets/{NodeViewSwitcher-CTbxFDX4.js → NodeViewSwitcher-CdRH7LXP.js} +18 -18
- package/dist/assets/{ProjectCardBadge-CP5T2Lcg.js → ProjectCardBadge-D8ubHLX_.js} +1 -1
- package/dist/assets/{ProjectHeader-oZWwGIoC.js → ProjectHeader-eYSO6YTI.js} +2 -2
- package/dist/assets/{ProjectSettings-DfDaR3aV.js → ProjectSettings-9ntb2OnF.js} +3 -3
- package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-D1E6Idg4.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-Dren_hOA.js} +1 -1
- package/dist/assets/{ResourcesListLayout-2lqLFJll.js → ResourcesListLayout-BiBawYsn.js} +1 -1
- package/dist/assets/{RunDataJson-xyWfNyKi.js → RunDataJson-CerASdyA.js} +12 -12
- package/dist/assets/{RunDataJsonActions-SLxe6h_C.js → RunDataJsonActions-eA-SIuvZ.js} +3 -3
- package/dist/assets/{RunDataSearch-CdLie2uo.js → RunDataSearch-BDpfiRTf.js} +1 -1
- package/dist/assets/{RunDataTable-D3iYKYbR.js → RunDataTable-BfI_0919.js} +2 -2
- package/dist/assets/{SamlOnboarding-CqbC519J.js → SamlOnboarding-Dq7iJ-7g.js} +2 -2
- package/dist/assets/{SettingsApiView-DqdLYzOz.js → SettingsApiView-WyMWubLE.js} +1 -1
- package/dist/assets/{SettingsCommunityNodesView-DND8OHjT.js → SettingsCommunityNodesView-CbvaPfcU.js} +3 -3
- package/dist/assets/{SettingsExternalSecrets-Cqr1K1PK.js → SettingsExternalSecrets-PXX4hiRu.js} +1 -1
- package/dist/assets/{SettingsLdapView-D1hHgVwD.js → SettingsLdapView-CpqTw4nn.js} +1 -1
- package/dist/assets/{SettingsLogStreamingView-XmQhXkP8.js → SettingsLogStreamingView-C1I36idU.js} +1 -1
- package/dist/assets/{SettingsPersonalView-CoZXNkp0.js → SettingsPersonalView-ooDMcvbk.js} +1 -1
- package/dist/assets/{SettingsSourceControl-BapEFaNC.js → SettingsSourceControl-lEmj3-Gb.js} +1 -1
- package/dist/assets/{SettingsSso-bibVg8kV.js → SettingsSso-CjGQZHRB.js} +1 -1
- package/dist/assets/{SettingsUsageAndPlan-9Am89x9n.js → SettingsUsageAndPlan-4qDjGm85.js} +1 -1
- package/dist/assets/{SettingsUsersView-PMEBNu_w.js → SettingsUsersView-BOPIUoZ-.js} +1 -1
- package/dist/assets/{SettingsView-C0FhNXC5.js → SettingsView-BIS2ozav.js} +1 -1
- package/dist/assets/{SetupView-2ldaQ0LW.js → SetupView-CAtPRjWC.js} +2 -2
- package/dist/assets/{SetupWorkflowCredentialsButton-BVwfvnTr.js → SetupWorkflowCredentialsButton-j83meqE9.js} +1 -1
- package/dist/assets/{SetupWorkflowFromTemplateView-BG-AhIrZ.js → SetupWorkflowFromTemplateView-BabFdM3f.js} +3 -3
- package/dist/assets/{SigninView-DF9tLSZu.js → SigninView-BJzONNAN.js} +2 -2
- package/dist/assets/{SignoutView-CmernPNn.js → SignoutView-CDEH1tJc.js} +1 -1
- package/dist/assets/{SignupView-Bu9MlpwT.js → SignupView-3nULDci3.js} +2 -2
- package/dist/assets/{TemplateDetails-TJ0yc1A9.js → TemplateDetails-BGjbXxkd.js} +1 -1
- package/dist/assets/{TemplateList-DNv_0Eyu.js → TemplateList-BK1qUSb6.js} +1 -1
- package/dist/assets/{TemplatesCollectionView-CntE56ke.js → TemplatesCollectionView-BTLcEbj1.js} +5 -5
- package/dist/assets/{TemplatesSearchView-CvjcFXUg.js → TemplatesSearchView-CJ1ukoqm.js} +3 -3
- package/dist/assets/{TemplatesView-YqT9aKyI.js → TemplatesView-C-ive7WR.js} +1 -1
- package/dist/assets/{TemplatesWorkflowView-CUFmfwQf.js → TemplatesWorkflowView-Dkw5ndaV.js} +5 -5
- package/dist/assets/{VariablesView-CmQdhIWP.js → VariablesView-D7nKr8tT.js} +2 -2
- package/dist/assets/WorkerView-CNAJ3EZX.js +791 -0
- package/dist/assets/WorkerView-C_d54L0W.css +181 -0
- package/dist/assets/{WorkflowActivator-CVDdqHMC.js → WorkflowActivator-O9hdqbvK.js} +2 -2
- package/dist/assets/{WorkflowExecutionsInfoAccordion-BoXSN3HK.js → WorkflowExecutionsInfoAccordion-C1G0o0wW.js} +1 -1
- package/dist/assets/{WorkflowExecutionsLandingPage-d6z9UgBQ.js → WorkflowExecutionsLandingPage-BMjNIsM1.js} +2 -2
- package/dist/assets/{WorkflowExecutionsPreview-BqiH-pqP.js → WorkflowExecutionsPreview-DGxSqpjo.js} +5 -5
- package/dist/assets/{WorkflowExecutionsView-oRW-4d0o.js → WorkflowExecutionsView-dJP6ReWV.js} +5 -5
- package/dist/assets/{WorkflowHistory-BTuLr3X9.js → WorkflowHistory-Zb4lcZk3.js} +3 -3
- package/dist/assets/{WorkflowOnboardingView-0O56AGqh.js → WorkflowOnboardingView-RurgeqCr.js} +1 -1
- package/dist/assets/{WorkflowPreview-0bx0ypgw.js → WorkflowPreview-CDuSZTC9.js} +1 -1
- package/dist/assets/{WorkflowsView-CuBv1-1Q.js → WorkflowsView-B2NsamHi.js} +7 -7
- package/dist/assets/{index-BIo0OZGX.js → index-DT2mIgKW.js} +94 -93
- package/dist/assets/{pushConnection.store-CabVI0Q4.js → pushConnection.store-B7eN6gh0.js} +1 -1
- package/dist/assets/{templateActions-CgLrOlVc.js → templateActions-7xXSSXqk.js} +1 -1
- package/dist/assets/{useBugReporting-CYGmNuQ3.js → useBugReporting-CUiZq-Ox.js} +1 -1
- package/dist/assets/{useExecutionDebugging-IGp543Mo.js → useExecutionDebugging-BSblqndL.js} +1 -1
- package/dist/assets/{useExecutionHelpers-cP7PTcvs.js → useExecutionHelpers-iK-bCWM-.js} +1 -1
- package/dist/assets/{useGlobalEntityCreation-DXZTxFMi.js → useGlobalEntityCreation-CUHY9Dd9.js} +1 -1
- package/dist/assets/{useNodeViewVersionSwitcher-Cyo5x7BB.js → useNodeViewVersionSwitcher-DkvFHFrT.js} +1 -1
- package/dist/assets/{usePushConnection-DKkZNdx4.js → usePushConnection-PWa1kbGu.js} +3 -2
- package/dist/assets/{useRunWorkflow-D18NuRU_.js → useRunWorkflow-CnMmvhVX.js} +2 -2
- package/dist/assets/{useWorkflowActivate-BC3Pdg08.js → useWorkflowActivate-BT__JYLm.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/CollectionParameter-P2Jb6DYK.js +0 -4
- package/dist/assets/WorkerView-BxNqbqFw.js +0 -149
- package/dist/assets/WorkerView-Dm0b18Mh.css +0 -22
|
@@ -0,0 +1,791 @@
|
|
|
1
|
+
import { _ as _sfc_main$7 } from "./PushConnectionTracker.vue_vue_type_script_setup_true_lang-Dren_hOA.js";
|
|
2
|
+
import { d as defineComponent, r as ref, m as resolveComponent, c as openBlock, h as createElementBlock, j as createBaseVNode, i as createVNode, w as withCtx, s as renderSlot, n as normalizeClass, f as createCommentVNode, _ as _export_sfc, e as createBlock, k as createTextVNode, t as toDisplayString, l as unref, F as Fragment, A as renderList, g as useI18n, a$ as useClipboard, a as useToast, cN as shallowRef, o as onMounted, x as onBeforeUnmount, H as watch, cT as toRaw, aq as h, ce as isProxy, j8 as Chart$1, q as computed, aH as sortByProperty, b as useRouter, a3 as useDocumentTitle, Z as useRootStore, aw as onBeforeMount, ak as useTelemetry, p as useSettingsStore, a5 as usePageRedirectionHelper } from "./index-DT2mIgKW.js";
|
|
3
|
+
import { a as useOrchestrationStore, W as WORKER_HISTORY_LENGTH, u as usePushConnection } from "./usePushConnection-PWa1kbGu.js";
|
|
4
|
+
import { u as usePushConnectionStore } from "./pushConnection.store-B7eN6gh0.js";
|
|
5
|
+
function averageWorkerLoadFromLoads(loads) {
|
|
6
|
+
return loads.reduce((prev, curr) => prev + curr, 0) / loads.length;
|
|
7
|
+
}
|
|
8
|
+
function averageWorkerLoadFromLoadsAsString(loads) {
|
|
9
|
+
return averageWorkerLoadFromLoads(loads).toFixed(2);
|
|
10
|
+
}
|
|
11
|
+
function memAsGb(mem) {
|
|
12
|
+
return mem / 1024 / 1024 / 1024;
|
|
13
|
+
}
|
|
14
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
15
|
+
__name: "WorkerAccordion.ee",
|
|
16
|
+
props: {
|
|
17
|
+
icon: { default: "tasks" },
|
|
18
|
+
iconColor: { default: "black" },
|
|
19
|
+
initialExpanded: { type: Boolean, default: true }
|
|
20
|
+
},
|
|
21
|
+
setup(__props) {
|
|
22
|
+
const props = __props;
|
|
23
|
+
const expanded2 = ref(props.initialExpanded);
|
|
24
|
+
function toggle() {
|
|
25
|
+
expanded2.value = !expanded2.value;
|
|
26
|
+
}
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
const _component_n8n_icon = resolveComponent("n8n-icon");
|
|
29
|
+
const _component_n8n_text = resolveComponent("n8n-text");
|
|
30
|
+
return openBlock(), createElementBlock("div", {
|
|
31
|
+
class: normalizeClass(["accordion", _ctx.$style.container])
|
|
32
|
+
}, [
|
|
33
|
+
createBaseVNode("div", {
|
|
34
|
+
class: normalizeClass({ [_ctx.$style.header]: true, [_ctx.$style.expanded]: expanded2.value }),
|
|
35
|
+
onClick: toggle
|
|
36
|
+
}, [
|
|
37
|
+
createVNode(_component_n8n_icon, {
|
|
38
|
+
icon: _ctx.icon,
|
|
39
|
+
color: _ctx.iconColor,
|
|
40
|
+
size: "small",
|
|
41
|
+
class: "mr-2xs"
|
|
42
|
+
}, null, 8, ["icon", "color"]),
|
|
43
|
+
createVNode(_component_n8n_text, {
|
|
44
|
+
class: normalizeClass(_ctx.$style.headerText),
|
|
45
|
+
color: "text-base",
|
|
46
|
+
size: "small",
|
|
47
|
+
align: "left",
|
|
48
|
+
bold: ""
|
|
49
|
+
}, {
|
|
50
|
+
default: withCtx(() => [
|
|
51
|
+
renderSlot(_ctx.$slots, "title")
|
|
52
|
+
]),
|
|
53
|
+
_: 3
|
|
54
|
+
}, 8, ["class"]),
|
|
55
|
+
createVNode(_component_n8n_icon, {
|
|
56
|
+
icon: expanded2.value ? "chevron-up" : "chevron-down",
|
|
57
|
+
bold: ""
|
|
58
|
+
}, null, 8, ["icon"])
|
|
59
|
+
], 2),
|
|
60
|
+
expanded2.value ? (openBlock(), createElementBlock("div", {
|
|
61
|
+
key: 0,
|
|
62
|
+
class: normalizeClass({ [_ctx.$style.description]: true, [_ctx.$style.collapsed]: !expanded2.value })
|
|
63
|
+
}, [
|
|
64
|
+
renderSlot(_ctx.$slots, "content")
|
|
65
|
+
], 2)) : createCommentVNode("", true)
|
|
66
|
+
], 2);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const container$1 = "_container_odamb_1";
|
|
71
|
+
const header = "_header_odamb_5";
|
|
72
|
+
const headerText = "_headerText_odamb_11";
|
|
73
|
+
const expanded = "_expanded_odamb_15";
|
|
74
|
+
const description = "_description_odamb_19";
|
|
75
|
+
const style0$6 = {
|
|
76
|
+
container: container$1,
|
|
77
|
+
header,
|
|
78
|
+
headerText,
|
|
79
|
+
expanded,
|
|
80
|
+
description
|
|
81
|
+
};
|
|
82
|
+
const cssModules$6 = {
|
|
83
|
+
"$style": style0$6
|
|
84
|
+
};
|
|
85
|
+
const WorkerAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__cssModules", cssModules$6]]);
|
|
86
|
+
const _hoisted_1$3 = ["href"];
|
|
87
|
+
const _hoisted_2$1 = ["href"];
|
|
88
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
89
|
+
__name: "WorkerJobAccordion.ee",
|
|
90
|
+
props: {
|
|
91
|
+
items: {}
|
|
92
|
+
},
|
|
93
|
+
setup(__props) {
|
|
94
|
+
const props = __props;
|
|
95
|
+
const i18n = useI18n();
|
|
96
|
+
function runningSince(started) {
|
|
97
|
+
let seconds = Math.floor(((/* @__PURE__ */ new Date()).getTime() - started.getTime()) / 1e3);
|
|
98
|
+
const hrs = Math.floor(seconds / 3600);
|
|
99
|
+
seconds -= hrs * 3600;
|
|
100
|
+
const mnts = Math.floor(seconds / 60);
|
|
101
|
+
seconds -= mnts * 60;
|
|
102
|
+
return `${hrs}h ${mnts}m ${Math.floor(seconds)}s`;
|
|
103
|
+
}
|
|
104
|
+
return (_ctx, _cache) => {
|
|
105
|
+
const _component_n8n_text = resolveComponent("n8n-text");
|
|
106
|
+
return openBlock(), createBlock(WorkerAccordion, {
|
|
107
|
+
icon: "tasks",
|
|
108
|
+
"icon-color": "black",
|
|
109
|
+
"initial-expanded": true
|
|
110
|
+
}, {
|
|
111
|
+
title: withCtx(() => [
|
|
112
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("workerList.item.jobListTitle")) + " (" + toDisplayString(_ctx.items.length) + ") ", 1)
|
|
113
|
+
]),
|
|
114
|
+
content: withCtx(() => [
|
|
115
|
+
props.items.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
116
|
+
key: 0,
|
|
117
|
+
class: normalizeClass(_ctx.$style.accordionItems)
|
|
118
|
+
}, [
|
|
119
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(props.items, (item) => {
|
|
120
|
+
return openBlock(), createElementBlock("div", {
|
|
121
|
+
key: item.executionId,
|
|
122
|
+
class: normalizeClass(_ctx.$style.accordionItem)
|
|
123
|
+
}, [
|
|
124
|
+
createBaseVNode("a", {
|
|
125
|
+
href: "/workflow/" + item.workflowId + "/executions/" + item.executionId
|
|
126
|
+
}, " Execution " + toDisplayString(item.executionId) + " - " + toDisplayString(item.workflowName), 9, _hoisted_1$3),
|
|
127
|
+
createVNode(_component_n8n_text, {
|
|
128
|
+
color: "text-base",
|
|
129
|
+
size: "small",
|
|
130
|
+
align: "left"
|
|
131
|
+
}, {
|
|
132
|
+
default: withCtx(() => {
|
|
133
|
+
var _a;
|
|
134
|
+
return [
|
|
135
|
+
createTextVNode(" | Started at: " + toDisplayString((_a = new Date(item.startedAt)) == null ? void 0 : _a.toLocaleTimeString()) + " | Running for " + toDisplayString(runningSince(new Date(item.startedAt))) + " " + toDisplayString(item.retryOf ? `| Retry of: ${item.retryOf}` : "") + " | ", 1)
|
|
136
|
+
];
|
|
137
|
+
}),
|
|
138
|
+
_: 2
|
|
139
|
+
}, 1024),
|
|
140
|
+
createBaseVNode("a", {
|
|
141
|
+
target: "_blank",
|
|
142
|
+
href: "/workflow/" + item.workflowId
|
|
143
|
+
}, " (Open workflow)", 8, _hoisted_2$1)
|
|
144
|
+
], 2);
|
|
145
|
+
}), 128))
|
|
146
|
+
], 2)) : (openBlock(), createElementBlock("div", {
|
|
147
|
+
key: 1,
|
|
148
|
+
class: normalizeClass(_ctx.$style.accordionItems)
|
|
149
|
+
}, [
|
|
150
|
+
createBaseVNode("span", {
|
|
151
|
+
class: normalizeClass(_ctx.$style.empty)
|
|
152
|
+
}, toDisplayString(unref(i18n).baseText("workerList.item.jobList.empty")), 3)
|
|
153
|
+
], 2))
|
|
154
|
+
]),
|
|
155
|
+
_: 1
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
const accordionItems$2 = "_accordionItems_kt5sk_1";
|
|
161
|
+
const accordionItem$2 = "_accordionItem_kt5sk_1";
|
|
162
|
+
const empty = "_empty_kt5sk_14";
|
|
163
|
+
const style0$5 = {
|
|
164
|
+
accordionItems: accordionItems$2,
|
|
165
|
+
accordionItem: accordionItem$2,
|
|
166
|
+
empty
|
|
167
|
+
};
|
|
168
|
+
const cssModules$5 = {
|
|
169
|
+
"$style": style0$5
|
|
170
|
+
};
|
|
171
|
+
const WorkerJobAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__cssModules", cssModules$5]]);
|
|
172
|
+
const _hoisted_1$2 = ["onClick"];
|
|
173
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
174
|
+
__name: "WorkerNetAccordion.ee",
|
|
175
|
+
props: {
|
|
176
|
+
items: {}
|
|
177
|
+
},
|
|
178
|
+
setup(__props) {
|
|
179
|
+
const props = __props;
|
|
180
|
+
const i18n = useI18n();
|
|
181
|
+
const clipboard = useClipboard();
|
|
182
|
+
const { showMessage } = useToast();
|
|
183
|
+
function onCopyToClipboard(content) {
|
|
184
|
+
try {
|
|
185
|
+
void clipboard.copy(content);
|
|
186
|
+
showMessage({
|
|
187
|
+
title: i18n.baseText("workerList.item.copyAddressToClipboard"),
|
|
188
|
+
type: "success"
|
|
189
|
+
});
|
|
190
|
+
} catch {
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return (_ctx, _cache) => {
|
|
194
|
+
return openBlock(), createBlock(WorkerAccordion, {
|
|
195
|
+
icon: "tasks",
|
|
196
|
+
"icon-color": "black",
|
|
197
|
+
"initial-expanded": false
|
|
198
|
+
}, {
|
|
199
|
+
title: withCtx(() => [
|
|
200
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("workerList.item.netListTitle")) + " (" + toDisplayString(_ctx.items.length) + ") ", 1)
|
|
201
|
+
]),
|
|
202
|
+
content: withCtx(() => [
|
|
203
|
+
props.items.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
204
|
+
key: 0,
|
|
205
|
+
class: normalizeClass(_ctx.$style.accordionItems)
|
|
206
|
+
}, [
|
|
207
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(props.items, (item) => {
|
|
208
|
+
return openBlock(), createElementBlock("div", {
|
|
209
|
+
key: item.address,
|
|
210
|
+
class: normalizeClass(_ctx.$style.accordionItem),
|
|
211
|
+
onClick: ($event) => onCopyToClipboard(item.address)
|
|
212
|
+
}, [
|
|
213
|
+
createTextVNode(toDisplayString(item.family) + ": ", 1),
|
|
214
|
+
createBaseVNode("span", {
|
|
215
|
+
class: normalizeClass(_ctx.$style.clickable)
|
|
216
|
+
}, toDisplayString(item.address), 3),
|
|
217
|
+
createTextVNode(" " + toDisplayString(item.internal ? "(internal)" : ""), 1)
|
|
218
|
+
], 10, _hoisted_1$2);
|
|
219
|
+
}), 128))
|
|
220
|
+
], 2)) : createCommentVNode("", true)
|
|
221
|
+
]),
|
|
222
|
+
_: 1
|
|
223
|
+
});
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
const accordionItems$1 = "_accordionItems_10xds_1";
|
|
228
|
+
const accordionItem$1 = "_accordionItem_10xds_1";
|
|
229
|
+
const clickable = "_clickable_10xds_15";
|
|
230
|
+
const style0$4 = {
|
|
231
|
+
accordionItems: accordionItems$1,
|
|
232
|
+
accordionItem: accordionItem$1,
|
|
233
|
+
clickable
|
|
234
|
+
};
|
|
235
|
+
const cssModules$4 = {
|
|
236
|
+
"$style": style0$4
|
|
237
|
+
};
|
|
238
|
+
const WorkerNetAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__cssModules", cssModules$4]]);
|
|
239
|
+
const CommonProps = {
|
|
240
|
+
data: {
|
|
241
|
+
type: Object,
|
|
242
|
+
required: true
|
|
243
|
+
},
|
|
244
|
+
options: {
|
|
245
|
+
type: Object,
|
|
246
|
+
default: () => ({})
|
|
247
|
+
},
|
|
248
|
+
plugins: {
|
|
249
|
+
type: Array,
|
|
250
|
+
default: () => []
|
|
251
|
+
},
|
|
252
|
+
datasetIdKey: {
|
|
253
|
+
type: String,
|
|
254
|
+
default: "label"
|
|
255
|
+
},
|
|
256
|
+
updateMode: {
|
|
257
|
+
type: String,
|
|
258
|
+
default: void 0
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
const Props = {
|
|
262
|
+
type: {
|
|
263
|
+
type: String,
|
|
264
|
+
required: true
|
|
265
|
+
},
|
|
266
|
+
...CommonProps
|
|
267
|
+
};
|
|
268
|
+
function toRawIfProxy(obj) {
|
|
269
|
+
return isProxy(obj) ? toRaw(obj) : obj;
|
|
270
|
+
}
|
|
271
|
+
function cloneProxy(obj) {
|
|
272
|
+
let src = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : obj;
|
|
273
|
+
return isProxy(src) ? new Proxy(obj, {}) : obj;
|
|
274
|
+
}
|
|
275
|
+
function setOptions(chart2, nextOptions) {
|
|
276
|
+
const options = chart2.options;
|
|
277
|
+
if (options && nextOptions) {
|
|
278
|
+
Object.assign(options, nextOptions);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
function setLabels(currentData, nextLabels) {
|
|
282
|
+
currentData.labels = nextLabels;
|
|
283
|
+
}
|
|
284
|
+
function setDatasets(currentData, nextDatasets, datasetIdKey) {
|
|
285
|
+
const addedDatasets = [];
|
|
286
|
+
currentData.datasets = nextDatasets.map((nextDataset) => {
|
|
287
|
+
const currentDataset = currentData.datasets.find((dataset) => dataset[datasetIdKey] === nextDataset[datasetIdKey]);
|
|
288
|
+
if (!currentDataset || !nextDataset.data || addedDatasets.includes(currentDataset)) {
|
|
289
|
+
return {
|
|
290
|
+
...nextDataset
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
addedDatasets.push(currentDataset);
|
|
294
|
+
Object.assign(currentDataset, nextDataset);
|
|
295
|
+
return currentDataset;
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
function cloneData(data, datasetIdKey) {
|
|
299
|
+
const nextData = {
|
|
300
|
+
labels: [],
|
|
301
|
+
datasets: []
|
|
302
|
+
};
|
|
303
|
+
setLabels(nextData, data.labels);
|
|
304
|
+
setDatasets(nextData, data.datasets, datasetIdKey);
|
|
305
|
+
return nextData;
|
|
306
|
+
}
|
|
307
|
+
const Chart = defineComponent({
|
|
308
|
+
props: Props,
|
|
309
|
+
setup(props, param) {
|
|
310
|
+
let { expose } = param;
|
|
311
|
+
const canvasRef = ref(null);
|
|
312
|
+
const chartRef = shallowRef(null);
|
|
313
|
+
expose({
|
|
314
|
+
chart: chartRef
|
|
315
|
+
});
|
|
316
|
+
const renderChart = () => {
|
|
317
|
+
if (!canvasRef.value) return;
|
|
318
|
+
const { type, data, options, plugins, datasetIdKey } = props;
|
|
319
|
+
const clonedData = cloneData(data, datasetIdKey);
|
|
320
|
+
const proxiedData = cloneProxy(clonedData, data);
|
|
321
|
+
chartRef.value = new Chart$1(canvasRef.value, {
|
|
322
|
+
type,
|
|
323
|
+
data: proxiedData,
|
|
324
|
+
options: {
|
|
325
|
+
...options
|
|
326
|
+
},
|
|
327
|
+
plugins
|
|
328
|
+
});
|
|
329
|
+
};
|
|
330
|
+
const destroyChart = () => {
|
|
331
|
+
const chart2 = toRaw(chartRef.value);
|
|
332
|
+
if (chart2) {
|
|
333
|
+
chart2.destroy();
|
|
334
|
+
chartRef.value = null;
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
const update = (chart2) => {
|
|
338
|
+
chart2.update(props.updateMode);
|
|
339
|
+
};
|
|
340
|
+
onMounted(renderChart);
|
|
341
|
+
onBeforeUnmount(destroyChart);
|
|
342
|
+
watch([
|
|
343
|
+
() => props.options,
|
|
344
|
+
() => props.data
|
|
345
|
+
], (param2, param1) => {
|
|
346
|
+
let [nextOptionsProxy, nextDataProxy] = param2, [prevOptionsProxy, prevDataProxy] = param1;
|
|
347
|
+
const chart2 = toRaw(chartRef.value);
|
|
348
|
+
if (!chart2) {
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
let shouldUpdate = false;
|
|
352
|
+
if (nextOptionsProxy) {
|
|
353
|
+
const nextOptions = toRawIfProxy(nextOptionsProxy);
|
|
354
|
+
const prevOptions = toRawIfProxy(prevOptionsProxy);
|
|
355
|
+
if (nextOptions && nextOptions !== prevOptions) {
|
|
356
|
+
setOptions(chart2, nextOptions);
|
|
357
|
+
shouldUpdate = true;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
if (nextDataProxy) {
|
|
361
|
+
const nextLabels = toRawIfProxy(nextDataProxy.labels);
|
|
362
|
+
const prevLabels = toRawIfProxy(prevDataProxy.labels);
|
|
363
|
+
const nextDatasets = toRawIfProxy(nextDataProxy.datasets);
|
|
364
|
+
const prevDatasets = toRawIfProxy(prevDataProxy.datasets);
|
|
365
|
+
if (nextLabels !== prevLabels) {
|
|
366
|
+
setLabels(chart2.config.data, nextLabels);
|
|
367
|
+
shouldUpdate = true;
|
|
368
|
+
}
|
|
369
|
+
if (nextDatasets && nextDatasets !== prevDatasets) {
|
|
370
|
+
setDatasets(chart2.config.data, nextDatasets, props.datasetIdKey);
|
|
371
|
+
shouldUpdate = true;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
if (shouldUpdate) {
|
|
375
|
+
update(chart2);
|
|
376
|
+
}
|
|
377
|
+
}, {
|
|
378
|
+
deep: true
|
|
379
|
+
});
|
|
380
|
+
return () => {
|
|
381
|
+
return h("canvas", {
|
|
382
|
+
ref: canvasRef
|
|
383
|
+
});
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
388
|
+
__name: "WorkerChartsAccordion.ee",
|
|
389
|
+
props: {
|
|
390
|
+
workerId: {}
|
|
391
|
+
},
|
|
392
|
+
setup(__props) {
|
|
393
|
+
var _a, _b, _c;
|
|
394
|
+
const props = __props;
|
|
395
|
+
const i18n = useI18n();
|
|
396
|
+
const blankDataSet = (label, color, prefill = 0) => ({
|
|
397
|
+
datasets: [
|
|
398
|
+
{
|
|
399
|
+
label,
|
|
400
|
+
backgroundColor: color,
|
|
401
|
+
data: prefill ? Array(Math.min(WORKER_HISTORY_LENGTH, prefill)).fill(0) : []
|
|
402
|
+
}
|
|
403
|
+
],
|
|
404
|
+
labels: Array(Math.min(WORKER_HISTORY_LENGTH, prefill)).fill("")
|
|
405
|
+
});
|
|
406
|
+
const orchestrationStore = useOrchestrationStore();
|
|
407
|
+
const chartRefJobs = ref(void 0);
|
|
408
|
+
const chartRefCPU = ref(void 0);
|
|
409
|
+
const chartRefMemory = ref(void 0);
|
|
410
|
+
const optionsBase = () => ({
|
|
411
|
+
responsive: true,
|
|
412
|
+
maintainAspectRatio: true,
|
|
413
|
+
scales: {
|
|
414
|
+
y: {
|
|
415
|
+
type: "linear",
|
|
416
|
+
display: true,
|
|
417
|
+
position: "left",
|
|
418
|
+
min: 0,
|
|
419
|
+
suggestedMax: 5
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
// uncomment to disable animation
|
|
423
|
+
// animation: {
|
|
424
|
+
// duration: 0,
|
|
425
|
+
// },
|
|
426
|
+
});
|
|
427
|
+
const optionsJobs = optionsBase();
|
|
428
|
+
const optionsCPU = optionsBase();
|
|
429
|
+
if ((_a = optionsCPU.scales) == null ? void 0 : _a.y) optionsCPU.scales.y.suggestedMax = 100;
|
|
430
|
+
const maxMemory = memAsGb((_b = orchestrationStore.workers[props.workerId]) == null ? void 0 : _b.totalMem) ?? 1;
|
|
431
|
+
const optionsMemory = optionsBase();
|
|
432
|
+
if ((_c = optionsMemory.scales) == null ? void 0 : _c.y) optionsMemory.scales.y.suggestedMax = maxMemory;
|
|
433
|
+
const dataJobs = ref(
|
|
434
|
+
blankDataSet("Job Count", "rgb(255, 111, 92)", WORKER_HISTORY_LENGTH)
|
|
435
|
+
);
|
|
436
|
+
const dataCPU = ref(
|
|
437
|
+
blankDataSet("Processor Usage", "rgb(19, 205, 103)", WORKER_HISTORY_LENGTH)
|
|
438
|
+
);
|
|
439
|
+
const dataMemory = ref(
|
|
440
|
+
blankDataSet("Memory Usage", "rgb(244, 216, 174)", WORKER_HISTORY_LENGTH)
|
|
441
|
+
);
|
|
442
|
+
orchestrationStore.$onAction(({ name, store }) => {
|
|
443
|
+
var _a2, _b2;
|
|
444
|
+
if (name === "updateWorkerStatus") {
|
|
445
|
+
const prefillCount = WORKER_HISTORY_LENGTH - (((_a2 = store.workersHistory[props.workerId]) == null ? void 0 : _a2.length) ?? 0);
|
|
446
|
+
const newDataJobs = blankDataSet("Job Count", "rgb(255, 111, 92)", prefillCount);
|
|
447
|
+
const newDataCPU = blankDataSet(
|
|
448
|
+
"Processor Usage",
|
|
449
|
+
"rgb(19, 205, 103)",
|
|
450
|
+
prefillCount
|
|
451
|
+
);
|
|
452
|
+
const newDataMemory = blankDataSet(
|
|
453
|
+
"Memory Usage",
|
|
454
|
+
"rgb(244, 216, 174)",
|
|
455
|
+
prefillCount
|
|
456
|
+
);
|
|
457
|
+
(_b2 = store.workersHistory[props.workerId]) == null ? void 0 : _b2.forEach((item) => {
|
|
458
|
+
var _a3;
|
|
459
|
+
newDataJobs.datasets[0].data.push(item.data.runningJobsSummary.length);
|
|
460
|
+
(_a3 = newDataJobs.labels) == null ? void 0 : _a3.push(new Date(item.timestamp).toLocaleTimeString());
|
|
461
|
+
newDataCPU.datasets[0].data.push(averageWorkerLoadFromLoads(item.data.loadAvg));
|
|
462
|
+
newDataCPU.labels = newDataJobs.labels;
|
|
463
|
+
newDataMemory.datasets[0].data.push(maxMemory - memAsGb(item.data.freeMem));
|
|
464
|
+
newDataMemory.labels = newDataJobs.labels;
|
|
465
|
+
});
|
|
466
|
+
dataJobs.value = newDataJobs;
|
|
467
|
+
dataCPU.value = newDataCPU;
|
|
468
|
+
dataMemory.value = newDataMemory;
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
return (_ctx, _cache) => {
|
|
472
|
+
return openBlock(), createBlock(WorkerAccordion, {
|
|
473
|
+
icon: "tasks",
|
|
474
|
+
"icon-color": "black",
|
|
475
|
+
"initial-expanded": false
|
|
476
|
+
}, {
|
|
477
|
+
title: withCtx(() => [
|
|
478
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("workerList.item.chartsTitle")), 1)
|
|
479
|
+
]),
|
|
480
|
+
content: withCtx(() => [
|
|
481
|
+
createBaseVNode("div", {
|
|
482
|
+
class: normalizeClass(_ctx.$style.charts)
|
|
483
|
+
}, [
|
|
484
|
+
createVNode(unref(Chart), {
|
|
485
|
+
ref_key: "chartRefJobs",
|
|
486
|
+
ref: chartRefJobs,
|
|
487
|
+
type: "line",
|
|
488
|
+
data: dataJobs.value,
|
|
489
|
+
options: unref(optionsJobs),
|
|
490
|
+
class: normalizeClass(_ctx.$style.chart)
|
|
491
|
+
}, null, 8, ["data", "options", "class"]),
|
|
492
|
+
createVNode(unref(Chart), {
|
|
493
|
+
ref_key: "chartRefCPU",
|
|
494
|
+
ref: chartRefCPU,
|
|
495
|
+
type: "line",
|
|
496
|
+
data: dataCPU.value,
|
|
497
|
+
options: unref(optionsCPU),
|
|
498
|
+
class: normalizeClass(_ctx.$style.chart)
|
|
499
|
+
}, null, 8, ["data", "options", "class"]),
|
|
500
|
+
createVNode(unref(Chart), {
|
|
501
|
+
ref_key: "chartRefMemory",
|
|
502
|
+
ref: chartRefMemory,
|
|
503
|
+
type: "line",
|
|
504
|
+
data: dataMemory.value,
|
|
505
|
+
options: unref(optionsMemory),
|
|
506
|
+
class: normalizeClass(_ctx.$style.chart)
|
|
507
|
+
}, null, 8, ["data", "options", "class"])
|
|
508
|
+
], 2)
|
|
509
|
+
]),
|
|
510
|
+
_: 1
|
|
511
|
+
});
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
const accordionItems = "_accordionItems_2yo1p_1";
|
|
516
|
+
const accordionItem = "_accordionItem_2yo1p_1";
|
|
517
|
+
const charts = "_charts_2yo1p_14";
|
|
518
|
+
const chart = "_chart_2yo1p_14";
|
|
519
|
+
const style0$3 = {
|
|
520
|
+
accordionItems,
|
|
521
|
+
accordionItem,
|
|
522
|
+
charts,
|
|
523
|
+
chart
|
|
524
|
+
};
|
|
525
|
+
const cssModules$3 = {
|
|
526
|
+
"$style": style0$3
|
|
527
|
+
};
|
|
528
|
+
const WorkerChartsAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__cssModules", cssModules$3]]);
|
|
529
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
530
|
+
__name: "WorkerCard.ee",
|
|
531
|
+
props: {
|
|
532
|
+
workerId: {}
|
|
533
|
+
},
|
|
534
|
+
setup(__props) {
|
|
535
|
+
let interval;
|
|
536
|
+
const orchestrationStore = useOrchestrationStore();
|
|
537
|
+
const i18n = useI18n();
|
|
538
|
+
const props = __props;
|
|
539
|
+
const secondsSinceLastUpdateString = ref("0");
|
|
540
|
+
const stale2 = ref(false);
|
|
541
|
+
const worker = computed(() => {
|
|
542
|
+
return orchestrationStore.getWorkerStatus(props.workerId);
|
|
543
|
+
});
|
|
544
|
+
const sortedWorkerInterfaces = computed(
|
|
545
|
+
() => {
|
|
546
|
+
var _a;
|
|
547
|
+
return sortByProperty("family", ((_a = worker.value) == null ? void 0 : _a.interfaces.slice()) ?? []);
|
|
548
|
+
}
|
|
549
|
+
);
|
|
550
|
+
function upTime(seconds) {
|
|
551
|
+
const days = Math.floor(seconds / (3600 * 24));
|
|
552
|
+
seconds -= days * 3600 * 24;
|
|
553
|
+
const hrs = Math.floor(seconds / 3600);
|
|
554
|
+
seconds -= hrs * 3600;
|
|
555
|
+
const mnts = Math.floor(seconds / 60);
|
|
556
|
+
seconds -= mnts * 60;
|
|
557
|
+
return `${days}d ${hrs}h ${mnts}m ${Math.floor(seconds)}s`;
|
|
558
|
+
}
|
|
559
|
+
onMounted(() => {
|
|
560
|
+
interval = setInterval(() => {
|
|
561
|
+
const lastUpdated = orchestrationStore.getWorkerLastUpdated(props.workerId);
|
|
562
|
+
if (!lastUpdated) {
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
565
|
+
const secondsSinceLastUpdate = Math.ceil((Date.now() - lastUpdated) / 1e3);
|
|
566
|
+
stale2.value = secondsSinceLastUpdate > 10;
|
|
567
|
+
secondsSinceLastUpdateString.value = secondsSinceLastUpdate.toFixed(0);
|
|
568
|
+
}, 500);
|
|
569
|
+
});
|
|
570
|
+
onBeforeUnmount(() => {
|
|
571
|
+
clearInterval(interval);
|
|
572
|
+
});
|
|
573
|
+
return (_ctx, _cache) => {
|
|
574
|
+
const _component_n8n_heading = resolveComponent("n8n-heading");
|
|
575
|
+
const _component_n8n_text = resolveComponent("n8n-text");
|
|
576
|
+
const _component_n8n_card = resolveComponent("n8n-card");
|
|
577
|
+
return worker.value ? (openBlock(), createBlock(_component_n8n_card, {
|
|
578
|
+
key: 0,
|
|
579
|
+
class: normalizeClass(_ctx.$style.cardLink)
|
|
580
|
+
}, {
|
|
581
|
+
header: withCtx(() => [
|
|
582
|
+
createVNode(_component_n8n_heading, {
|
|
583
|
+
tag: "h2",
|
|
584
|
+
bold: "",
|
|
585
|
+
class: normalizeClass(stale2.value ? [_ctx.$style.cardHeading, _ctx.$style.stale] : [_ctx.$style.cardHeading]),
|
|
586
|
+
"data-test-id": "worker-card-name"
|
|
587
|
+
}, {
|
|
588
|
+
default: withCtx(() => [
|
|
589
|
+
createTextVNode(" Name: " + toDisplayString(worker.value.senderId) + " (" + toDisplayString(worker.value.hostname) + ") ", 1),
|
|
590
|
+
_cache[0] || (_cache[0] = createBaseVNode("br", null, null, -1)),
|
|
591
|
+
createTextVNode(" Average Load: " + toDisplayString(unref(averageWorkerLoadFromLoadsAsString)(worker.value.loadAvg ?? [0])) + " | Free Memory: " + toDisplayString(unref(memAsGb)(worker.value.freeMem).toFixed(2)) + "GB / " + toDisplayString(unref(memAsGb)(worker.value.totalMem).toFixed(2)) + "GB " + toDisplayString(stale2.value ? " (stale)" : ""), 1)
|
|
592
|
+
]),
|
|
593
|
+
_: 1
|
|
594
|
+
}, 8, ["class"])
|
|
595
|
+
]),
|
|
596
|
+
append: withCtx(() => [
|
|
597
|
+
createBaseVNode("div", {
|
|
598
|
+
ref: "cardActions",
|
|
599
|
+
class: normalizeClass(_ctx.$style.cardActions)
|
|
600
|
+
}, null, 2)
|
|
601
|
+
]),
|
|
602
|
+
default: withCtx(() => [
|
|
603
|
+
createBaseVNode("div", {
|
|
604
|
+
class: normalizeClass(_ctx.$style.cardDescription)
|
|
605
|
+
}, [
|
|
606
|
+
createVNode(_component_n8n_text, {
|
|
607
|
+
color: "text-light",
|
|
608
|
+
size: "small",
|
|
609
|
+
class: normalizeClass(_ctx.$style.container)
|
|
610
|
+
}, {
|
|
611
|
+
default: withCtx(() => [
|
|
612
|
+
createBaseVNode("span", null, toDisplayString(unref(i18n).baseText("workerList.item.lastUpdated")) + " " + toDisplayString(secondsSinceLastUpdateString.value) + "s ago | n8n-Version: " + toDisplayString(worker.value.version) + " | Architecture: " + toDisplayString(worker.value.arch) + " ( " + toDisplayString(worker.value.platform) + ") | Uptime: " + toDisplayString(upTime(worker.value.uptime)), 1),
|
|
613
|
+
createVNode(WorkerJobAccordion, {
|
|
614
|
+
items: worker.value.runningJobsSummary
|
|
615
|
+
}, null, 8, ["items"]),
|
|
616
|
+
createVNode(WorkerNetAccordion, { items: sortedWorkerInterfaces.value }, null, 8, ["items"]),
|
|
617
|
+
createVNode(WorkerChartsAccordion, {
|
|
618
|
+
"worker-id": worker.value.senderId
|
|
619
|
+
}, null, 8, ["worker-id"])
|
|
620
|
+
]),
|
|
621
|
+
_: 1
|
|
622
|
+
}, 8, ["class"])
|
|
623
|
+
], 2)
|
|
624
|
+
]),
|
|
625
|
+
_: 1
|
|
626
|
+
}, 8, ["class"])) : createCommentVNode("", true);
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
});
|
|
630
|
+
const container = "_container_s5el6_1";
|
|
631
|
+
const cardLink = "_cardLink_s5el6_5";
|
|
632
|
+
const cardHeading = "_cardHeading_s5el6_15";
|
|
633
|
+
const stale = "_stale_s5el6_21";
|
|
634
|
+
const cardDescription = "_cardDescription_s5el6_25";
|
|
635
|
+
const cardActions = "_cardActions_s5el6_32";
|
|
636
|
+
const style0$2 = {
|
|
637
|
+
container,
|
|
638
|
+
cardLink,
|
|
639
|
+
cardHeading,
|
|
640
|
+
stale,
|
|
641
|
+
cardDescription,
|
|
642
|
+
cardActions
|
|
643
|
+
};
|
|
644
|
+
const cssModules$2 = {
|
|
645
|
+
"$style": style0$2
|
|
646
|
+
};
|
|
647
|
+
const WorkerCard = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__cssModules", cssModules$2]]);
|
|
648
|
+
const _hoisted_1$1 = { key: 0 };
|
|
649
|
+
const _hoisted_2 = { key: 1 };
|
|
650
|
+
const _hoisted_3 = { key: 0 };
|
|
651
|
+
const _hoisted_4 = { key: 1 };
|
|
652
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
653
|
+
__name: "WorkerList.ee",
|
|
654
|
+
props: {
|
|
655
|
+
autoRefreshEnabled: { type: Boolean, default: true }
|
|
656
|
+
},
|
|
657
|
+
setup(__props) {
|
|
658
|
+
const router = useRouter();
|
|
659
|
+
const i18n = useI18n();
|
|
660
|
+
const pushConnection = usePushConnection({ router });
|
|
661
|
+
const documentTitle = useDocumentTitle();
|
|
662
|
+
const telemetry = useTelemetry();
|
|
663
|
+
const orchestrationManagerStore = useOrchestrationStore();
|
|
664
|
+
const rootStore = useRootStore();
|
|
665
|
+
const pushStore = usePushConnectionStore();
|
|
666
|
+
const initialStatusReceived = computed(() => orchestrationManagerStore.initialStatusReceived);
|
|
667
|
+
const workerIds = computed(() => Object.keys(orchestrationManagerStore.workers));
|
|
668
|
+
const pageTitle = computed(() => i18n.baseText("workerList.pageTitle"));
|
|
669
|
+
onMounted(() => {
|
|
670
|
+
documentTitle.set(pageTitle.value);
|
|
671
|
+
telemetry.track("User viewed worker view", {
|
|
672
|
+
instance_id: rootStore.instanceId
|
|
673
|
+
});
|
|
674
|
+
});
|
|
675
|
+
onBeforeMount(() => {
|
|
676
|
+
if (window.Cypress !== void 0) {
|
|
677
|
+
return;
|
|
678
|
+
}
|
|
679
|
+
pushConnection.initialize();
|
|
680
|
+
pushStore.pushConnect();
|
|
681
|
+
orchestrationManagerStore.startWorkerStatusPolling();
|
|
682
|
+
});
|
|
683
|
+
onBeforeUnmount(() => {
|
|
684
|
+
if (window.Cypress !== void 0) {
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
687
|
+
orchestrationManagerStore.stopWorkerStatusPolling();
|
|
688
|
+
pushStore.pushDisconnect();
|
|
689
|
+
pushConnection.terminate();
|
|
690
|
+
});
|
|
691
|
+
return (_ctx, _cache) => {
|
|
692
|
+
const _component_PushConnectionTracker = _sfc_main$7;
|
|
693
|
+
const _component_n8n_heading = resolveComponent("n8n-heading");
|
|
694
|
+
const _component_n8n_spinner = resolveComponent("n8n-spinner");
|
|
695
|
+
return openBlock(), createElementBlock("div", null, [
|
|
696
|
+
createVNode(_component_PushConnectionTracker, { class: "actions" }),
|
|
697
|
+
createBaseVNode("div", {
|
|
698
|
+
class: normalizeClass(_ctx.$style.workerListHeader)
|
|
699
|
+
}, [
|
|
700
|
+
createVNode(_component_n8n_heading, {
|
|
701
|
+
tag: "h1",
|
|
702
|
+
size: "2xlarge"
|
|
703
|
+
}, {
|
|
704
|
+
default: withCtx(() => [
|
|
705
|
+
createTextVNode(toDisplayString(pageTitle.value), 1)
|
|
706
|
+
]),
|
|
707
|
+
_: 1
|
|
708
|
+
})
|
|
709
|
+
], 2),
|
|
710
|
+
!initialStatusReceived.value ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
711
|
+
createVNode(_component_n8n_spinner)
|
|
712
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
713
|
+
workerIds.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_3, toDisplayString(unref(i18n).baseText("workerList.empty")), 1)) : (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
714
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(workerIds.value, (workerId) => {
|
|
715
|
+
return openBlock(), createElementBlock("div", {
|
|
716
|
+
key: workerId,
|
|
717
|
+
class: normalizeClass(_ctx.$style.card)
|
|
718
|
+
}, [
|
|
719
|
+
createVNode(WorkerCard, {
|
|
720
|
+
"worker-id": workerId,
|
|
721
|
+
"data-test-id": "worker-card"
|
|
722
|
+
}, null, 8, ["worker-id"])
|
|
723
|
+
], 2);
|
|
724
|
+
}), 128))
|
|
725
|
+
]))
|
|
726
|
+
]))
|
|
727
|
+
]);
|
|
728
|
+
};
|
|
729
|
+
}
|
|
730
|
+
});
|
|
731
|
+
const workerListHeader = "_workerListHeader_12j1s_1";
|
|
732
|
+
const card = "_card_12j1s_8";
|
|
733
|
+
const tableLoader = "_tableLoader_12j1s_12";
|
|
734
|
+
const style0$1 = {
|
|
735
|
+
workerListHeader,
|
|
736
|
+
card,
|
|
737
|
+
tableLoader
|
|
738
|
+
};
|
|
739
|
+
const cssModules$1 = {
|
|
740
|
+
"$style": style0$1
|
|
741
|
+
};
|
|
742
|
+
const WorkerList = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
|
|
743
|
+
const _hoisted_1 = ["href"];
|
|
744
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
745
|
+
__name: "WorkerView",
|
|
746
|
+
setup(__props) {
|
|
747
|
+
const settingsStore = useSettingsStore();
|
|
748
|
+
const pageRedirectionHelper = usePageRedirectionHelper();
|
|
749
|
+
const i18n = useI18n();
|
|
750
|
+
const goToUpgrade = () => {
|
|
751
|
+
void pageRedirectionHelper.goToUpgrade("worker-view", "upgrade-worker-view");
|
|
752
|
+
};
|
|
753
|
+
return (_ctx, _cache) => {
|
|
754
|
+
const _component_n8n_action_box = resolveComponent("n8n-action-box");
|
|
755
|
+
return unref(settingsStore).isQueueModeEnabled && unref(settingsStore).isWorkerViewAvailable ? (openBlock(), createBlock(WorkerList, {
|
|
756
|
+
key: 0,
|
|
757
|
+
"data-test-id": "worker-view-licensed"
|
|
758
|
+
})) : (openBlock(), createBlock(_component_n8n_action_box, {
|
|
759
|
+
key: 1,
|
|
760
|
+
"data-test-id": "worker-view-unlicensed",
|
|
761
|
+
class: normalizeClass(_ctx.$style.actionBox),
|
|
762
|
+
description: unref(i18n).baseText("workerList.actionBox.description"),
|
|
763
|
+
"button-text": unref(i18n).baseText("workerList.actionBox.buttonText"),
|
|
764
|
+
"onClick:button": goToUpgrade
|
|
765
|
+
}, {
|
|
766
|
+
heading: withCtx(() => [
|
|
767
|
+
createBaseVNode("span", null, toDisplayString(unref(i18n).baseText("workerList.actionBox.title")), 1)
|
|
768
|
+
]),
|
|
769
|
+
description: withCtx(() => [
|
|
770
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("workerList.actionBox.description")) + " ", 1),
|
|
771
|
+
createBaseVNode("a", {
|
|
772
|
+
href: unref(i18n).baseText("workerList.docs.url"),
|
|
773
|
+
target: "_blank"
|
|
774
|
+
}, toDisplayString(unref(i18n).baseText("workerList.actionBox.description.link")), 9, _hoisted_1)
|
|
775
|
+
]),
|
|
776
|
+
_: 1
|
|
777
|
+
}, 8, ["class", "description", "button-text"]));
|
|
778
|
+
};
|
|
779
|
+
}
|
|
780
|
+
});
|
|
781
|
+
const actionBox = "_actionBox_13ul9_1";
|
|
782
|
+
const style0 = {
|
|
783
|
+
actionBox
|
|
784
|
+
};
|
|
785
|
+
const cssModules = {
|
|
786
|
+
"$style": style0
|
|
787
|
+
};
|
|
788
|
+
const WorkerView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
|
|
789
|
+
export {
|
|
790
|
+
WorkerView as default
|
|
791
|
+
};
|