n8n-editor-ui 1.66.0 → 1.68.0
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/{AuthView-31vu0x_3.js → AuthView-C7b2xzS9.js} +17 -19
- package/dist/assets/CanvasChat-DKeWqqZz.css +730 -0
- package/dist/assets/CanvasChat-QctJb8ta.js +4166 -0
- package/dist/assets/{CanvasControls-DkT1iClJ.js → CanvasControls-raoYims4.js} +1 -1
- package/dist/assets/{ChangePasswordView-DkhZAh4j.js → ChangePasswordView-BBju88Nm.js} +2 -2
- package/dist/assets/CollectionParameter-DNJAimAt.js +4 -0
- package/dist/assets/{CredentialsView-Du-lMwPW.js → CredentialsView-BfYXjOVw.js} +11 -10
- package/dist/assets/{ErrorView-CROJIl1H.js → ErrorView-BhPrjw7c.js} +1 -1
- package/dist/assets/{ExecutionsFilter-BecTg03r.css → ExecutionsTime-DVxRt-Pz.css} +6 -6
- package/dist/assets/{ExecutionsFilter-132FKb5o.js → ExecutionsTime.vue_vue_type_script_setup_true_lang-Ba-at9rw.js} +43 -43
- package/dist/assets/{ExecutionsView-B41cgHPD.js → ExecutionsView-Dcw07XZ-.js} +26 -31
- package/dist/assets/{ExecutionsView-Dfy6JMwb.css → ExecutionsView-DlxsqdiC.css} +44 -38
- package/dist/assets/{FileSaver.min-B3lWZPMp.js → FileSaver.min-CKlTVpWB.js} +1 -1
- package/dist/assets/FixedCollectionParameter-CkI6mCZG.js +334 -0
- package/dist/assets/{FixedCollectionParameter-fI2wTyfY.css → FixedCollectionParameter-DzOGMEdq.css} +10 -10
- package/dist/assets/{ForgotMyPasswordView-DKrE7dUn.js → ForgotMyPasswordView--eKPrTSW.js} +4 -3
- package/dist/assets/{MainHeader-CW31WCmm.js → MainHeader-Btek9DoL.js} +195 -118
- package/dist/assets/{MainHeader-Bc5G9_Uq.css → MainHeader-DJdd17Nh.css} +36 -11
- package/dist/assets/{MainSidebar-cNW0UJBC.css → MainSidebar-BRYJRpOA.css} +2 -2
- package/dist/assets/{MainSidebar-Dny90RtO.js → MainSidebar-CRjg4yDv.js} +7 -13
- package/dist/assets/{NodeCreation-BqSkxffS.js → NodeCreation-CDpNw3BL.js} +14 -11
- package/dist/assets/{NodeCreator-CoqcSKC-.js → NodeCreator-DPpQXLHf.js} +79 -65
- package/dist/assets/{NodeViewSwitcher-C1Gp-jKb.js → NodeViewSwitcher-CNfOOUof.js} +2891 -2905
- package/dist/assets/{NodeViewSwitcher-B8VPj4Rs.css → NodeViewSwitcher-DuVIKqpm.css} +185 -184
- package/dist/assets/{ProjectCardBadge-kHyKG50e.js → ProjectCardBadge-DzaTsr93.js} +1 -1
- package/dist/assets/{ResourceListHeader-DgE1VPUF.css → ProjectHeader-09VQWBZH.css} +5 -3
- package/dist/assets/ProjectHeader-wdvHJxbT.js +196 -0
- package/dist/assets/{ProjectSettings-BohhQ-z6.js → ProjectSettings-B6j0VJK5.js} +7 -36
- package/dist/assets/PushConnectionTracker.vue_vue_type_script_setup_true_lang-ByoMju5L.js +39 -0
- package/dist/assets/ResourcesListLayout-9Vpyt6Ec.js +662 -0
- package/dist/assets/{ResourcesListLayout-Bw99IFlO.css → ResourcesListLayout-CuA8O7do.css} +8 -8
- package/dist/assets/{RunDataJson-CUsbBWaI.js → RunDataJson-sPhT7c2h.js} +12 -12
- package/dist/assets/{RunDataJsonActions-Bnn0o9WH.js → RunDataJsonActions-DiMvLis_.js} +128 -159
- package/dist/assets/{RunDataSearch-BiygytJ8.js → RunDataSearch-CF_rpBKx.js} +2 -2
- package/dist/assets/RunDataTable-T52TXUHR.js +564 -0
- package/dist/assets/{SamlOnboarding-BXYS2fQg.js → SamlOnboarding-BCn53xtf.js} +2 -2
- package/dist/assets/SettingsApiView-DumvK072.js +227 -0
- package/dist/assets/{SettingsCommunityNodesView-BjakfOB1.js → SettingsCommunityNodesView-Db787Jar.js} +185 -195
- package/dist/assets/{SettingsExternalSecrets-BGIt9OQy.js → SettingsExternalSecrets-DKB2o2Dq.js} +3 -3
- package/dist/assets/{SettingsLdapView-DBY4YyYE.js → SettingsLdapView-BoKoCT5V.js} +3 -3
- package/dist/assets/SettingsLogStreamingView-BGX39Unz.js +500 -0
- package/dist/assets/{SettingsPersonalView-CgzznKXi.js → SettingsPersonalView-fTCeSJfu.js} +1 -1
- package/dist/assets/{SettingsSourceControl-DNWFyNrX.js → SettingsSourceControl-_G83P363.js} +3 -3
- package/dist/assets/{SettingsSso-B8oke872.js → SettingsSso-Bn48qAiX.js} +3 -3
- package/dist/assets/{SettingsUsageAndPlan-BUUYApK_.js → SettingsUsageAndPlan-DZkS0RP4.js} +4 -3
- package/dist/assets/{SettingsUsageAndPlan-P6SS2mWq.css → SettingsUsageAndPlan-vijI-va0.css} +3 -3
- package/dist/assets/{SettingsUsersView-DyuP8V6k.js → SettingsUsersView-BUh2iKEW.js} +4 -3
- package/dist/assets/{SettingsView-CD83Adan.js → SettingsView-D_S4x7XG.js} +2 -30
- package/dist/assets/{SetupView-C8XYMj2N.js → SetupView-BenKVU0l.js} +2 -2
- package/dist/assets/{SetupWorkflowCredentialsButton-u1qhjj5K.js → SetupWorkflowCredentialsButton-DKr9ZPLE.js} +1 -1
- package/dist/assets/{SetupWorkflowFromTemplateView-DdxqCGcl.js → SetupWorkflowFromTemplateView-Ce1R_CDh.js} +3 -3
- package/dist/assets/{SigninView-CGQ20O_c.js → SigninView-xl5aJqka.js} +4 -3
- package/dist/assets/{SignoutView-BZwBBglt.js → SignoutView-Bscz6u1Y.js} +1 -1
- package/dist/assets/{SignupView-BCT6dhhZ.js → SignupView-CZN8EhJV.js} +4 -3
- package/dist/assets/TemplateDetails-BAQ3vBNJ.js +179 -0
- package/dist/assets/TemplateList-DD7sqnpI.js +371 -0
- package/dist/assets/{TemplatesCollectionView-BxBSljqH.js → TemplatesCollectionView-CG3ZoY8i.js} +10 -10
- package/dist/assets/{TemplatesSearchView-kFcPH-ZH.js → TemplatesSearchView-22jrqI8X.js} +530 -577
- package/dist/assets/{TemplatesView-TPTpSdeD.js → TemplatesView-BZFc4hZ1.js} +32 -37
- package/dist/assets/{TemplatesWorkflowView-8NdGLWj7.js → TemplatesWorkflowView-DkXtdhUJ.js} +5 -5
- package/dist/assets/{VariablesView-CHXdt5-z.css → VariablesView-BPKo50HJ.css} +18 -18
- package/dist/assets/{VariablesView-C1NxBxBQ.js → VariablesView-DHu4ZoMN.js} +5 -5
- package/dist/assets/WorkerView-BfxdQiAc.js +148 -0
- package/dist/assets/WorkerView-Dm0b18Mh.css +22 -0
- package/dist/assets/{WorkflowActivator-CalsATsI.js → WorkflowActivator-CvdQVEtW.js} +2 -2
- package/dist/assets/{WorkflowExecutionsInfoAccordion-rUnvuY-5.js → WorkflowExecutionsInfoAccordion-D2GFnpq1.js} +1 -1
- package/dist/assets/{WorkflowExecutionsLandingPage-C4K7kfqv.js → WorkflowExecutionsLandingPage-D2bvAsxg.js} +2 -2
- package/dist/assets/{WorkflowExecutionsPreview-BO31AO7v.js → WorkflowExecutionsPreview-D6WBsbAG.js} +5 -5
- package/dist/assets/{WorkflowExecutionsView-B8x2-iOd.css → WorkflowExecutionsView-CZKkPKqJ.css} +9 -1
- package/dist/assets/{WorkflowExecutionsView-B-5zbx_n.js → WorkflowExecutionsView-DI6r5OvZ.js} +6 -6
- package/dist/assets/{WorkflowHistory-uvlFDwTJ.js → WorkflowHistory-Dc1f2Tsn.js} +5 -4
- package/dist/assets/{WorkflowOnboardingView-B869wGVb.js → WorkflowOnboardingView-DyxvWfZ7.js} +1 -1
- package/dist/assets/{WorkflowPreview-BlzWpiO1.js → WorkflowPreview-hC6wSe-Y.js} +1 -1
- package/dist/assets/{WorkflowsView-IdgMnIZY.js → WorkflowsView-SIDgO47b.js} +10 -10
- package/dist/assets/buttons.esm-BOkmSohe.js +477 -0
- package/dist/assets/{dateFormatter-BCrxaIdG.js → dateFormatter-BRi2wSZ-.js} +1 -1
- package/dist/assets/{index-QAq8Sa9R.js → index-40I5DMGP.js} +196843 -202970
- package/dist/assets/{index-DaeOVPzE.css → index-Dr3zFZlC.css} +136 -594
- package/dist/assets/{pushConnection.store-Cdssd0uJ.js → pushConnection.store-w_WxpOeH.js} +1 -1
- package/dist/assets/{templateActions-ClPy1BRa.js → templateActions-D4EHdA9n.js} +1 -1
- package/dist/assets/{useBugReporting-Bvr7bSQt.js → useBugReporting-CFOQlQpP.js} +1 -1
- package/dist/assets/{useExecutionDebugging-CwyVwJqO.js → useExecutionDebugging-LQQWXhPj.js} +3 -2
- package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-CYMqjryg.js → useExecutionHelpers-CXGl_HIp.js} +55 -55
- package/dist/assets/{useNodeViewVersionSwitcher-BPNKvsXw.js → useNodeViewVersionSwitcher-BLo5Qp-N.js} +1 -1
- package/dist/assets/{usePushConnection-DDXmzoG8.js → usePushConnection-B5ija5f5.js} +9 -10
- package/dist/assets/{RunDataAi-x30tU8-0.css → useRunWorkflow-DH7ZzA8t.css} +97 -57
- package/dist/assets/useRunWorkflow-MrEKURG4.js +3710 -0
- package/dist/assets/{useWorkflowActivate-DKPQP7qy.js → useWorkflowActivate-CKedJlgZ.js} +1 -1
- package/dist/index.html +3 -2
- package/index.html +1 -0
- package/package.json +1 -1
- package/vite.config.mts +1 -17
- package/dist/assets/CollectionParameter-BDKfoIMJ.js +0 -4
- package/dist/assets/FixedCollectionParameter-DXh-j7zB.js +0 -355
- package/dist/assets/ProjectTabs-D-87NPFl.js +0 -88
- package/dist/assets/ProjectTabs-DjoIePoM.css +0 -3
- package/dist/assets/PushConnectionTracker-Bhnghrmf.js +0 -38
- package/dist/assets/ResourceListHeader-Bs6GLg32.js +0 -66
- package/dist/assets/ResourcesListLayout-ByBNP70B.js +0 -800
- package/dist/assets/RunDataAi-CYTNyRq_.js +0 -1539
- package/dist/assets/RunDataTable--RIqj8DU.js +0 -608
- package/dist/assets/SettingsApiView-DoibCiLo.js +0 -255
- package/dist/assets/SettingsFakeDoorView-DpKZ4qWG.css +0 -14
- package/dist/assets/SettingsFakeDoorView-DwXDXgon.js +0 -44
- package/dist/assets/SettingsLogStreamingView-DHQWns6I.js +0 -519
- package/dist/assets/TemplateDetails-BsLVCpdi.js +0 -199
- package/dist/assets/TemplateList-Bn7ePHhc.js +0 -433
- package/dist/assets/WorkerView-Bj1cvzLg.js +0 -825
- package/dist/assets/WorkerView-C_d54L0W.css +0 -181
- package/dist/assets/cloud-B6bxVT9F.js +0 -37
|
@@ -1,825 +0,0 @@
|
|
|
1
|
-
import { _ as __unplugin_components_0 } from "./PushConnectionTracker-Bhnghrmf.js";
|
|
2
|
-
import { d as defineComponent, r as ref, c as openBlock, h as createElementBlock, j as createBaseVNode, i as createVNode, w as withCtx, q as renderSlot, n as normalizeClass, f as createCommentVNode, l as resolveComponent, _ as _export_sfc, e as createBlock, k as createTextVNode, t as toDisplayString, F as Fragment, z as renderList, d9 as useClipboard, a as useToast, g as useI18n, ci as shallowRef, o as onMounted, y as onBeforeUnmount, H as watch, co as toRaw, bt as h, bF as isProxy, iL as Chart$1, A as unref, p as computed, aB as sortByProperty, b as useRouter, a3 as useDocumentTitle, e0 as mapStores, K as useUIStore, Z as useRootStore, m as useSettingsStore } from "./index-QAq8Sa9R.js";
|
|
3
|
-
import { a as useOrchestrationStore, W as WORKER_HISTORY_LENGTH, u as usePushConnection } from "./usePushConnection-DDXmzoG8.js";
|
|
4
|
-
import { u as usePushConnectionStore } from "./pushConnection.store-Cdssd0uJ.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
|
-
function runningSince(started) {
|
|
96
|
-
let seconds = Math.floor(((/* @__PURE__ */ new Date()).getTime() - started.getTime()) / 1e3);
|
|
97
|
-
const hrs = Math.floor(seconds / 3600);
|
|
98
|
-
seconds -= hrs * 3600;
|
|
99
|
-
const mnts = Math.floor(seconds / 60);
|
|
100
|
-
seconds -= mnts * 60;
|
|
101
|
-
return `${hrs}h ${mnts}m ${Math.floor(seconds)}s`;
|
|
102
|
-
}
|
|
103
|
-
return (_ctx, _cache) => {
|
|
104
|
-
const _component_n8n_text = resolveComponent("n8n-text");
|
|
105
|
-
return openBlock(), createBlock(WorkerAccordion, {
|
|
106
|
-
icon: "tasks",
|
|
107
|
-
"icon-color": "black",
|
|
108
|
-
"initial-expanded": true
|
|
109
|
-
}, {
|
|
110
|
-
title: withCtx(() => [
|
|
111
|
-
createTextVNode(toDisplayString(_ctx.$locale.baseText("workerList.item.jobListTitle")) + " (" + toDisplayString(_ctx.items.length) + ") ", 1)
|
|
112
|
-
]),
|
|
113
|
-
content: withCtx(() => [
|
|
114
|
-
props.items.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
115
|
-
key: 0,
|
|
116
|
-
class: normalizeClass(_ctx.$style.accordionItems)
|
|
117
|
-
}, [
|
|
118
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(props.items, (item) => {
|
|
119
|
-
return openBlock(), createElementBlock("div", {
|
|
120
|
-
key: item.executionId,
|
|
121
|
-
class: normalizeClass(_ctx.$style.accordionItem)
|
|
122
|
-
}, [
|
|
123
|
-
createBaseVNode("a", {
|
|
124
|
-
href: "/workflow/" + item.workflowId + "/executions/" + item.executionId
|
|
125
|
-
}, " Execution " + toDisplayString(item.executionId) + " - " + toDisplayString(item.workflowName), 9, _hoisted_1$3),
|
|
126
|
-
createVNode(_component_n8n_text, {
|
|
127
|
-
color: "text-base",
|
|
128
|
-
size: "small",
|
|
129
|
-
align: "left"
|
|
130
|
-
}, {
|
|
131
|
-
default: withCtx(() => {
|
|
132
|
-
var _a;
|
|
133
|
-
return [
|
|
134
|
-
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)
|
|
135
|
-
];
|
|
136
|
-
}),
|
|
137
|
-
_: 2
|
|
138
|
-
}, 1024),
|
|
139
|
-
createBaseVNode("a", {
|
|
140
|
-
target: "_blank",
|
|
141
|
-
href: "/workflow/" + item.workflowId
|
|
142
|
-
}, " (Open workflow)", 8, _hoisted_2$1)
|
|
143
|
-
], 2);
|
|
144
|
-
}), 128))
|
|
145
|
-
], 2)) : (openBlock(), createElementBlock("div", {
|
|
146
|
-
key: 1,
|
|
147
|
-
class: normalizeClass(_ctx.$style.accordionItems)
|
|
148
|
-
}, [
|
|
149
|
-
createBaseVNode("span", {
|
|
150
|
-
class: normalizeClass(_ctx.$style.empty)
|
|
151
|
-
}, toDisplayString(_ctx.$locale.baseText("workerList.item.jobList.empty")), 3)
|
|
152
|
-
], 2))
|
|
153
|
-
]),
|
|
154
|
-
_: 1
|
|
155
|
-
});
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
const accordionItems$2 = "_accordionItems_kt5sk_1";
|
|
160
|
-
const accordionItem$2 = "_accordionItem_kt5sk_1";
|
|
161
|
-
const empty = "_empty_kt5sk_14";
|
|
162
|
-
const style0$5 = {
|
|
163
|
-
accordionItems: accordionItems$2,
|
|
164
|
-
accordionItem: accordionItem$2,
|
|
165
|
-
empty
|
|
166
|
-
};
|
|
167
|
-
const cssModules$5 = {
|
|
168
|
-
"$style": style0$5
|
|
169
|
-
};
|
|
170
|
-
const WorkerJobAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__cssModules", cssModules$5]]);
|
|
171
|
-
const _hoisted_1$2 = ["onClick"];
|
|
172
|
-
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
173
|
-
__name: "WorkerNetAccordion.ee",
|
|
174
|
-
props: {
|
|
175
|
-
items: {}
|
|
176
|
-
},
|
|
177
|
-
setup(__props) {
|
|
178
|
-
const props = __props;
|
|
179
|
-
const i18n = useI18n();
|
|
180
|
-
const clipboard = useClipboard();
|
|
181
|
-
const { showMessage } = useToast();
|
|
182
|
-
function onCopyToClipboard(content) {
|
|
183
|
-
try {
|
|
184
|
-
void clipboard.copy(content);
|
|
185
|
-
showMessage({
|
|
186
|
-
title: i18n.baseText("workerList.item.copyAddressToClipboard"),
|
|
187
|
-
type: "success"
|
|
188
|
-
});
|
|
189
|
-
} catch {
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
return (_ctx, _cache) => {
|
|
193
|
-
return openBlock(), createBlock(WorkerAccordion, {
|
|
194
|
-
icon: "tasks",
|
|
195
|
-
"icon-color": "black",
|
|
196
|
-
"initial-expanded": false
|
|
197
|
-
}, {
|
|
198
|
-
title: withCtx(() => [
|
|
199
|
-
createTextVNode(toDisplayString(_ctx.$locale.baseText("workerList.item.netListTitle")) + " (" + toDisplayString(_ctx.items.length) + ") ", 1)
|
|
200
|
-
]),
|
|
201
|
-
content: withCtx(() => [
|
|
202
|
-
props.items.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
203
|
-
key: 0,
|
|
204
|
-
class: normalizeClass(_ctx.$style.accordionItems)
|
|
205
|
-
}, [
|
|
206
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(props.items, (item) => {
|
|
207
|
-
return openBlock(), createElementBlock("div", {
|
|
208
|
-
key: item.address,
|
|
209
|
-
class: normalizeClass(_ctx.$style.accordionItem),
|
|
210
|
-
onClick: ($event) => onCopyToClipboard(item.address)
|
|
211
|
-
}, [
|
|
212
|
-
createTextVNode(toDisplayString(item.family) + ": ", 1),
|
|
213
|
-
createBaseVNode("span", {
|
|
214
|
-
class: normalizeClass(_ctx.$style.clickable)
|
|
215
|
-
}, toDisplayString(item.address), 3),
|
|
216
|
-
createTextVNode(" " + toDisplayString(item.internal ? "(internal)" : ""), 1)
|
|
217
|
-
], 10, _hoisted_1$2);
|
|
218
|
-
}), 128))
|
|
219
|
-
], 2)) : createCommentVNode("", true)
|
|
220
|
-
]),
|
|
221
|
-
_: 1
|
|
222
|
-
});
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
const accordionItems$1 = "_accordionItems_10xds_1";
|
|
227
|
-
const accordionItem$1 = "_accordionItem_10xds_1";
|
|
228
|
-
const clickable = "_clickable_10xds_15";
|
|
229
|
-
const style0$4 = {
|
|
230
|
-
accordionItems: accordionItems$1,
|
|
231
|
-
accordionItem: accordionItem$1,
|
|
232
|
-
clickable
|
|
233
|
-
};
|
|
234
|
-
const cssModules$4 = {
|
|
235
|
-
"$style": style0$4
|
|
236
|
-
};
|
|
237
|
-
const WorkerNetAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__cssModules", cssModules$4]]);
|
|
238
|
-
const CommonProps = {
|
|
239
|
-
data: {
|
|
240
|
-
type: Object,
|
|
241
|
-
required: true
|
|
242
|
-
},
|
|
243
|
-
options: {
|
|
244
|
-
type: Object,
|
|
245
|
-
default: () => ({})
|
|
246
|
-
},
|
|
247
|
-
plugins: {
|
|
248
|
-
type: Array,
|
|
249
|
-
default: () => []
|
|
250
|
-
},
|
|
251
|
-
datasetIdKey: {
|
|
252
|
-
type: String,
|
|
253
|
-
default: "label"
|
|
254
|
-
},
|
|
255
|
-
updateMode: {
|
|
256
|
-
type: String,
|
|
257
|
-
default: void 0
|
|
258
|
-
}
|
|
259
|
-
};
|
|
260
|
-
const Props = {
|
|
261
|
-
type: {
|
|
262
|
-
type: String,
|
|
263
|
-
required: true
|
|
264
|
-
},
|
|
265
|
-
...CommonProps
|
|
266
|
-
};
|
|
267
|
-
function toRawIfProxy(obj) {
|
|
268
|
-
return isProxy(obj) ? toRaw(obj) : obj;
|
|
269
|
-
}
|
|
270
|
-
function cloneProxy(obj) {
|
|
271
|
-
let src = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : obj;
|
|
272
|
-
return isProxy(src) ? new Proxy(obj, {}) : obj;
|
|
273
|
-
}
|
|
274
|
-
function setOptions(chart2, nextOptions) {
|
|
275
|
-
const options = chart2.options;
|
|
276
|
-
if (options && nextOptions) {
|
|
277
|
-
Object.assign(options, nextOptions);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
function setLabels(currentData, nextLabels) {
|
|
281
|
-
currentData.labels = nextLabels;
|
|
282
|
-
}
|
|
283
|
-
function setDatasets(currentData, nextDatasets, datasetIdKey) {
|
|
284
|
-
const addedDatasets = [];
|
|
285
|
-
currentData.datasets = nextDatasets.map((nextDataset) => {
|
|
286
|
-
const currentDataset = currentData.datasets.find((dataset) => dataset[datasetIdKey] === nextDataset[datasetIdKey]);
|
|
287
|
-
if (!currentDataset || !nextDataset.data || addedDatasets.includes(currentDataset)) {
|
|
288
|
-
return {
|
|
289
|
-
...nextDataset
|
|
290
|
-
};
|
|
291
|
-
}
|
|
292
|
-
addedDatasets.push(currentDataset);
|
|
293
|
-
Object.assign(currentDataset, nextDataset);
|
|
294
|
-
return currentDataset;
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
function cloneData(data, datasetIdKey) {
|
|
298
|
-
const nextData = {
|
|
299
|
-
labels: [],
|
|
300
|
-
datasets: []
|
|
301
|
-
};
|
|
302
|
-
setLabels(nextData, data.labels);
|
|
303
|
-
setDatasets(nextData, data.datasets, datasetIdKey);
|
|
304
|
-
return nextData;
|
|
305
|
-
}
|
|
306
|
-
const Chart = defineComponent({
|
|
307
|
-
props: Props,
|
|
308
|
-
setup(props, param) {
|
|
309
|
-
let { expose } = param;
|
|
310
|
-
const canvasRef = ref(null);
|
|
311
|
-
const chartRef = shallowRef(null);
|
|
312
|
-
expose({
|
|
313
|
-
chart: chartRef
|
|
314
|
-
});
|
|
315
|
-
const renderChart = () => {
|
|
316
|
-
if (!canvasRef.value) return;
|
|
317
|
-
const { type, data, options, plugins, datasetIdKey } = props;
|
|
318
|
-
const clonedData = cloneData(data, datasetIdKey);
|
|
319
|
-
const proxiedData = cloneProxy(clonedData, data);
|
|
320
|
-
chartRef.value = new Chart$1(canvasRef.value, {
|
|
321
|
-
type,
|
|
322
|
-
data: proxiedData,
|
|
323
|
-
options: {
|
|
324
|
-
...options
|
|
325
|
-
},
|
|
326
|
-
plugins
|
|
327
|
-
});
|
|
328
|
-
};
|
|
329
|
-
const destroyChart = () => {
|
|
330
|
-
const chart2 = toRaw(chartRef.value);
|
|
331
|
-
if (chart2) {
|
|
332
|
-
chart2.destroy();
|
|
333
|
-
chartRef.value = null;
|
|
334
|
-
}
|
|
335
|
-
};
|
|
336
|
-
const update = (chart2) => {
|
|
337
|
-
chart2.update(props.updateMode);
|
|
338
|
-
};
|
|
339
|
-
onMounted(renderChart);
|
|
340
|
-
onBeforeUnmount(destroyChart);
|
|
341
|
-
watch([
|
|
342
|
-
() => props.options,
|
|
343
|
-
() => props.data
|
|
344
|
-
], (param2, param1) => {
|
|
345
|
-
let [nextOptionsProxy, nextDataProxy] = param2, [prevOptionsProxy, prevDataProxy] = param1;
|
|
346
|
-
const chart2 = toRaw(chartRef.value);
|
|
347
|
-
if (!chart2) {
|
|
348
|
-
return;
|
|
349
|
-
}
|
|
350
|
-
let shouldUpdate = false;
|
|
351
|
-
if (nextOptionsProxy) {
|
|
352
|
-
const nextOptions = toRawIfProxy(nextOptionsProxy);
|
|
353
|
-
const prevOptions = toRawIfProxy(prevOptionsProxy);
|
|
354
|
-
if (nextOptions && nextOptions !== prevOptions) {
|
|
355
|
-
setOptions(chart2, nextOptions);
|
|
356
|
-
shouldUpdate = true;
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
if (nextDataProxy) {
|
|
360
|
-
const nextLabels = toRawIfProxy(nextDataProxy.labels);
|
|
361
|
-
const prevLabels = toRawIfProxy(prevDataProxy.labels);
|
|
362
|
-
const nextDatasets = toRawIfProxy(nextDataProxy.datasets);
|
|
363
|
-
const prevDatasets = toRawIfProxy(prevDataProxy.datasets);
|
|
364
|
-
if (nextLabels !== prevLabels) {
|
|
365
|
-
setLabels(chart2.config.data, nextLabels);
|
|
366
|
-
shouldUpdate = true;
|
|
367
|
-
}
|
|
368
|
-
if (nextDatasets && nextDatasets !== prevDatasets) {
|
|
369
|
-
setDatasets(chart2.config.data, nextDatasets, props.datasetIdKey);
|
|
370
|
-
shouldUpdate = true;
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
if (shouldUpdate) {
|
|
374
|
-
update(chart2);
|
|
375
|
-
}
|
|
376
|
-
}, {
|
|
377
|
-
deep: true
|
|
378
|
-
});
|
|
379
|
-
return () => {
|
|
380
|
-
return h("canvas", {
|
|
381
|
-
ref: canvasRef
|
|
382
|
-
});
|
|
383
|
-
};
|
|
384
|
-
}
|
|
385
|
-
});
|
|
386
|
-
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
387
|
-
__name: "WorkerChartsAccordion.ee",
|
|
388
|
-
props: {
|
|
389
|
-
workerId: {}
|
|
390
|
-
},
|
|
391
|
-
setup(__props) {
|
|
392
|
-
var _a, _b, _c;
|
|
393
|
-
const props = __props;
|
|
394
|
-
const blankDataSet = (label, color, prefill = 0) => ({
|
|
395
|
-
datasets: [
|
|
396
|
-
{
|
|
397
|
-
label,
|
|
398
|
-
backgroundColor: color,
|
|
399
|
-
data: prefill ? Array(Math.min(WORKER_HISTORY_LENGTH, prefill)).fill(0) : []
|
|
400
|
-
}
|
|
401
|
-
],
|
|
402
|
-
labels: Array(Math.min(WORKER_HISTORY_LENGTH, prefill)).fill("")
|
|
403
|
-
});
|
|
404
|
-
const orchestrationStore = useOrchestrationStore();
|
|
405
|
-
const chartRefJobs = ref(void 0);
|
|
406
|
-
const chartRefCPU = ref(void 0);
|
|
407
|
-
const chartRefMemory = ref(void 0);
|
|
408
|
-
const optionsBase = () => ({
|
|
409
|
-
responsive: true,
|
|
410
|
-
maintainAspectRatio: true,
|
|
411
|
-
scales: {
|
|
412
|
-
y: {
|
|
413
|
-
type: "linear",
|
|
414
|
-
display: true,
|
|
415
|
-
position: "left",
|
|
416
|
-
min: 0,
|
|
417
|
-
suggestedMax: 5
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
// uncomment to disable animation
|
|
421
|
-
// animation: {
|
|
422
|
-
// duration: 0,
|
|
423
|
-
// },
|
|
424
|
-
});
|
|
425
|
-
const optionsJobs = optionsBase();
|
|
426
|
-
const optionsCPU = optionsBase();
|
|
427
|
-
if ((_a = optionsCPU.scales) == null ? void 0 : _a.y) optionsCPU.scales.y.suggestedMax = 100;
|
|
428
|
-
const maxMemory = memAsGb((_b = orchestrationStore.workers[props.workerId]) == null ? void 0 : _b.totalMem) ?? 1;
|
|
429
|
-
const optionsMemory = optionsBase();
|
|
430
|
-
if ((_c = optionsMemory.scales) == null ? void 0 : _c.y) optionsMemory.scales.y.suggestedMax = maxMemory;
|
|
431
|
-
const dataJobs = ref(
|
|
432
|
-
blankDataSet("Job Count", "rgb(255, 111, 92)", WORKER_HISTORY_LENGTH)
|
|
433
|
-
);
|
|
434
|
-
const dataCPU = ref(
|
|
435
|
-
blankDataSet("Processor Usage", "rgb(19, 205, 103)", WORKER_HISTORY_LENGTH)
|
|
436
|
-
);
|
|
437
|
-
const dataMemory = ref(
|
|
438
|
-
blankDataSet("Memory Usage", "rgb(244, 216, 174)", WORKER_HISTORY_LENGTH)
|
|
439
|
-
);
|
|
440
|
-
orchestrationStore.$onAction(({ name, store }) => {
|
|
441
|
-
var _a2, _b2;
|
|
442
|
-
if (name === "updateWorkerStatus") {
|
|
443
|
-
const prefillCount = WORKER_HISTORY_LENGTH - (((_a2 = store.workersHistory[props.workerId]) == null ? void 0 : _a2.length) ?? 0);
|
|
444
|
-
const newDataJobs = blankDataSet("Job Count", "rgb(255, 111, 92)", prefillCount);
|
|
445
|
-
const newDataCPU = blankDataSet(
|
|
446
|
-
"Processor Usage",
|
|
447
|
-
"rgb(19, 205, 103)",
|
|
448
|
-
prefillCount
|
|
449
|
-
);
|
|
450
|
-
const newDataMemory = blankDataSet(
|
|
451
|
-
"Memory Usage",
|
|
452
|
-
"rgb(244, 216, 174)",
|
|
453
|
-
prefillCount
|
|
454
|
-
);
|
|
455
|
-
(_b2 = store.workersHistory[props.workerId]) == null ? void 0 : _b2.forEach((item) => {
|
|
456
|
-
var _a3;
|
|
457
|
-
newDataJobs.datasets[0].data.push(item.data.runningJobsSummary.length);
|
|
458
|
-
(_a3 = newDataJobs.labels) == null ? void 0 : _a3.push(new Date(item.timestamp).toLocaleTimeString());
|
|
459
|
-
newDataCPU.datasets[0].data.push(averageWorkerLoadFromLoads(item.data.loadAvg));
|
|
460
|
-
newDataCPU.labels = newDataJobs.labels;
|
|
461
|
-
newDataMemory.datasets[0].data.push(maxMemory - memAsGb(item.data.freeMem));
|
|
462
|
-
newDataMemory.labels = newDataJobs.labels;
|
|
463
|
-
});
|
|
464
|
-
dataJobs.value = newDataJobs;
|
|
465
|
-
dataCPU.value = newDataCPU;
|
|
466
|
-
dataMemory.value = newDataMemory;
|
|
467
|
-
}
|
|
468
|
-
});
|
|
469
|
-
return (_ctx, _cache) => {
|
|
470
|
-
return openBlock(), createBlock(WorkerAccordion, {
|
|
471
|
-
icon: "tasks",
|
|
472
|
-
"icon-color": "black",
|
|
473
|
-
"initial-expanded": false
|
|
474
|
-
}, {
|
|
475
|
-
title: withCtx(() => [
|
|
476
|
-
createTextVNode(toDisplayString(_ctx.$locale.baseText("workerList.item.chartsTitle")), 1)
|
|
477
|
-
]),
|
|
478
|
-
content: withCtx(() => [
|
|
479
|
-
createBaseVNode("div", {
|
|
480
|
-
class: normalizeClass(_ctx.$style.charts)
|
|
481
|
-
}, [
|
|
482
|
-
createVNode(unref(Chart), {
|
|
483
|
-
ref_key: "chartRefJobs",
|
|
484
|
-
ref: chartRefJobs,
|
|
485
|
-
type: "line",
|
|
486
|
-
data: dataJobs.value,
|
|
487
|
-
options: unref(optionsJobs),
|
|
488
|
-
class: normalizeClass(_ctx.$style.chart)
|
|
489
|
-
}, null, 8, ["data", "options", "class"]),
|
|
490
|
-
createVNode(unref(Chart), {
|
|
491
|
-
ref_key: "chartRefCPU",
|
|
492
|
-
ref: chartRefCPU,
|
|
493
|
-
type: "line",
|
|
494
|
-
data: dataCPU.value,
|
|
495
|
-
options: unref(optionsCPU),
|
|
496
|
-
class: normalizeClass(_ctx.$style.chart)
|
|
497
|
-
}, null, 8, ["data", "options", "class"]),
|
|
498
|
-
createVNode(unref(Chart), {
|
|
499
|
-
ref_key: "chartRefMemory",
|
|
500
|
-
ref: chartRefMemory,
|
|
501
|
-
type: "line",
|
|
502
|
-
data: dataMemory.value,
|
|
503
|
-
options: unref(optionsMemory),
|
|
504
|
-
class: normalizeClass(_ctx.$style.chart)
|
|
505
|
-
}, null, 8, ["data", "options", "class"])
|
|
506
|
-
], 2)
|
|
507
|
-
]),
|
|
508
|
-
_: 1
|
|
509
|
-
});
|
|
510
|
-
};
|
|
511
|
-
}
|
|
512
|
-
});
|
|
513
|
-
const accordionItems = "_accordionItems_2yo1p_1";
|
|
514
|
-
const accordionItem = "_accordionItem_2yo1p_1";
|
|
515
|
-
const charts = "_charts_2yo1p_14";
|
|
516
|
-
const chart = "_chart_2yo1p_14";
|
|
517
|
-
const style0$3 = {
|
|
518
|
-
accordionItems,
|
|
519
|
-
accordionItem,
|
|
520
|
-
charts,
|
|
521
|
-
chart
|
|
522
|
-
};
|
|
523
|
-
const cssModules$3 = {
|
|
524
|
-
"$style": style0$3
|
|
525
|
-
};
|
|
526
|
-
const WorkerChartsAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__cssModules", cssModules$3]]);
|
|
527
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
528
|
-
__name: "WorkerCard.ee",
|
|
529
|
-
props: {
|
|
530
|
-
workerId: {}
|
|
531
|
-
},
|
|
532
|
-
setup(__props) {
|
|
533
|
-
let interval;
|
|
534
|
-
const orchestrationStore = useOrchestrationStore();
|
|
535
|
-
const props = __props;
|
|
536
|
-
const secondsSinceLastUpdateString = ref("0");
|
|
537
|
-
const stale2 = ref(false);
|
|
538
|
-
const worker = computed(() => {
|
|
539
|
-
return orchestrationStore.getWorkerStatus(props.workerId);
|
|
540
|
-
});
|
|
541
|
-
const sortedWorkerInterfaces = computed(
|
|
542
|
-
() => {
|
|
543
|
-
var _a;
|
|
544
|
-
return sortByProperty("family", ((_a = worker.value) == null ? void 0 : _a.interfaces.slice()) ?? []);
|
|
545
|
-
}
|
|
546
|
-
);
|
|
547
|
-
function upTime(seconds) {
|
|
548
|
-
const days = Math.floor(seconds / (3600 * 24));
|
|
549
|
-
seconds -= days * 3600 * 24;
|
|
550
|
-
const hrs = Math.floor(seconds / 3600);
|
|
551
|
-
seconds -= hrs * 3600;
|
|
552
|
-
const mnts = Math.floor(seconds / 60);
|
|
553
|
-
seconds -= mnts * 60;
|
|
554
|
-
return `${days}d ${hrs}h ${mnts}m ${Math.floor(seconds)}s`;
|
|
555
|
-
}
|
|
556
|
-
onMounted(() => {
|
|
557
|
-
interval = setInterval(() => {
|
|
558
|
-
const lastUpdated = orchestrationStore.getWorkerLastUpdated(props.workerId);
|
|
559
|
-
if (!lastUpdated) {
|
|
560
|
-
return;
|
|
561
|
-
}
|
|
562
|
-
const secondsSinceLastUpdate = Math.ceil((Date.now() - lastUpdated) / 1e3);
|
|
563
|
-
stale2.value = secondsSinceLastUpdate > 10;
|
|
564
|
-
secondsSinceLastUpdateString.value = secondsSinceLastUpdate.toFixed(0);
|
|
565
|
-
}, 500);
|
|
566
|
-
});
|
|
567
|
-
onBeforeUnmount(() => {
|
|
568
|
-
clearInterval(interval);
|
|
569
|
-
});
|
|
570
|
-
return (_ctx, _cache) => {
|
|
571
|
-
const _component_n8n_heading = resolveComponent("n8n-heading");
|
|
572
|
-
const _component_n8n_text = resolveComponent("n8n-text");
|
|
573
|
-
const _component_n8n_card = resolveComponent("n8n-card");
|
|
574
|
-
return worker.value ? (openBlock(), createBlock(_component_n8n_card, {
|
|
575
|
-
key: 0,
|
|
576
|
-
class: normalizeClass(_ctx.$style.cardLink)
|
|
577
|
-
}, {
|
|
578
|
-
header: withCtx(() => [
|
|
579
|
-
createVNode(_component_n8n_heading, {
|
|
580
|
-
tag: "h2",
|
|
581
|
-
bold: "",
|
|
582
|
-
class: normalizeClass(stale2.value ? [_ctx.$style.cardHeading, _ctx.$style.stale] : [_ctx.$style.cardHeading]),
|
|
583
|
-
"data-test-id": "worker-card-name"
|
|
584
|
-
}, {
|
|
585
|
-
default: withCtx(() => [
|
|
586
|
-
createTextVNode(" Name: " + toDisplayString(worker.value.senderId) + " (" + toDisplayString(worker.value.hostname) + ") ", 1),
|
|
587
|
-
_cache[0] || (_cache[0] = createBaseVNode("br", null, null, -1)),
|
|
588
|
-
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)
|
|
589
|
-
]),
|
|
590
|
-
_: 1
|
|
591
|
-
}, 8, ["class"])
|
|
592
|
-
]),
|
|
593
|
-
append: withCtx(() => [
|
|
594
|
-
createBaseVNode("div", {
|
|
595
|
-
ref: "cardActions",
|
|
596
|
-
class: normalizeClass(_ctx.$style.cardActions)
|
|
597
|
-
}, null, 2)
|
|
598
|
-
]),
|
|
599
|
-
default: withCtx(() => [
|
|
600
|
-
createBaseVNode("div", {
|
|
601
|
-
class: normalizeClass(_ctx.$style.cardDescription)
|
|
602
|
-
}, [
|
|
603
|
-
createVNode(_component_n8n_text, {
|
|
604
|
-
color: "text-light",
|
|
605
|
-
size: "small",
|
|
606
|
-
class: normalizeClass(_ctx.$style.container)
|
|
607
|
-
}, {
|
|
608
|
-
default: withCtx(() => [
|
|
609
|
-
createBaseVNode("span", null, toDisplayString(_ctx.$locale.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),
|
|
610
|
-
createVNode(WorkerJobAccordion, {
|
|
611
|
-
items: worker.value.runningJobsSummary
|
|
612
|
-
}, null, 8, ["items"]),
|
|
613
|
-
createVNode(WorkerNetAccordion, { items: sortedWorkerInterfaces.value }, null, 8, ["items"]),
|
|
614
|
-
createVNode(WorkerChartsAccordion, {
|
|
615
|
-
"worker-id": worker.value.senderId
|
|
616
|
-
}, null, 8, ["worker-id"])
|
|
617
|
-
]),
|
|
618
|
-
_: 1
|
|
619
|
-
}, 8, ["class"])
|
|
620
|
-
], 2)
|
|
621
|
-
]),
|
|
622
|
-
_: 1
|
|
623
|
-
}, 8, ["class"])) : createCommentVNode("", true);
|
|
624
|
-
};
|
|
625
|
-
}
|
|
626
|
-
});
|
|
627
|
-
const container = "_container_s5el6_1";
|
|
628
|
-
const cardLink = "_cardLink_s5el6_5";
|
|
629
|
-
const cardHeading = "_cardHeading_s5el6_15";
|
|
630
|
-
const stale = "_stale_s5el6_21";
|
|
631
|
-
const cardDescription = "_cardDescription_s5el6_25";
|
|
632
|
-
const cardActions = "_cardActions_s5el6_32";
|
|
633
|
-
const style0$2 = {
|
|
634
|
-
container,
|
|
635
|
-
cardLink,
|
|
636
|
-
cardHeading,
|
|
637
|
-
stale,
|
|
638
|
-
cardDescription,
|
|
639
|
-
cardActions
|
|
640
|
-
};
|
|
641
|
-
const cssModules$2 = {
|
|
642
|
-
"$style": style0$2
|
|
643
|
-
};
|
|
644
|
-
const WorkerCard = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__cssModules", cssModules$2]]);
|
|
645
|
-
const _sfc_main$1 = defineComponent({
|
|
646
|
-
name: "WorkerList",
|
|
647
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/naming-convention
|
|
648
|
-
components: { PushConnectionTracker: __unplugin_components_0, WorkerCard },
|
|
649
|
-
props: {
|
|
650
|
-
autoRefreshEnabled: {
|
|
651
|
-
type: Boolean,
|
|
652
|
-
default: true
|
|
653
|
-
}
|
|
654
|
-
},
|
|
655
|
-
setup() {
|
|
656
|
-
const router = useRouter();
|
|
657
|
-
const i18n = useI18n();
|
|
658
|
-
const pushConnection = usePushConnection({ router });
|
|
659
|
-
return {
|
|
660
|
-
i18n,
|
|
661
|
-
pushConnection,
|
|
662
|
-
...useToast(),
|
|
663
|
-
documentTitle: useDocumentTitle()
|
|
664
|
-
};
|
|
665
|
-
},
|
|
666
|
-
computed: {
|
|
667
|
-
...mapStores(useRootStore, useUIStore, usePushConnectionStore, useOrchestrationStore),
|
|
668
|
-
combinedWorkers() {
|
|
669
|
-
const returnData = [];
|
|
670
|
-
for (const workerId in this.orchestrationManagerStore.workers) {
|
|
671
|
-
returnData.push(this.orchestrationManagerStore.workers[workerId]);
|
|
672
|
-
}
|
|
673
|
-
return returnData;
|
|
674
|
-
},
|
|
675
|
-
initialStatusReceived() {
|
|
676
|
-
return this.orchestrationManagerStore.initialStatusReceived;
|
|
677
|
-
},
|
|
678
|
-
workerIds() {
|
|
679
|
-
return Object.keys(this.orchestrationManagerStore.workers);
|
|
680
|
-
},
|
|
681
|
-
pageTitle() {
|
|
682
|
-
return this.i18n.baseText("workerList.pageTitle");
|
|
683
|
-
}
|
|
684
|
-
},
|
|
685
|
-
mounted() {
|
|
686
|
-
this.documentTitle.set(this.pageTitle);
|
|
687
|
-
this.$telemetry.track("User viewed worker view", {
|
|
688
|
-
instance_id: this.rootStore.instanceId
|
|
689
|
-
});
|
|
690
|
-
},
|
|
691
|
-
beforeMount() {
|
|
692
|
-
if (window.Cypress !== void 0) {
|
|
693
|
-
return;
|
|
694
|
-
}
|
|
695
|
-
this.pushConnection.initialize();
|
|
696
|
-
this.pushStore.pushConnect();
|
|
697
|
-
this.orchestrationManagerStore.startWorkerStatusPolling();
|
|
698
|
-
},
|
|
699
|
-
beforeUnmount() {
|
|
700
|
-
if (window.Cypress !== void 0) {
|
|
701
|
-
return;
|
|
702
|
-
}
|
|
703
|
-
this.orchestrationManagerStore.stopWorkerStatusPolling();
|
|
704
|
-
this.pushStore.pushDisconnect();
|
|
705
|
-
this.pushConnection.terminate();
|
|
706
|
-
},
|
|
707
|
-
methods: {
|
|
708
|
-
averageLoadAvg(loads) {
|
|
709
|
-
return (loads.reduce((prev, curr) => prev + curr, 0) / loads.length).toFixed(2);
|
|
710
|
-
},
|
|
711
|
-
getStatus(payload) {
|
|
712
|
-
if (payload.runningJobsSummary.length > 0) {
|
|
713
|
-
return "running";
|
|
714
|
-
} else {
|
|
715
|
-
return "success";
|
|
716
|
-
}
|
|
717
|
-
},
|
|
718
|
-
getRowClass(payload) {
|
|
719
|
-
return [this.$style.execRow, this.$style[this.getStatus(payload)]].join(" ");
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
});
|
|
723
|
-
const workerListHeader = "_workerListHeader_12j1s_1";
|
|
724
|
-
const card = "_card_12j1s_8";
|
|
725
|
-
const tableLoader = "_tableLoader_12j1s_12";
|
|
726
|
-
const style0$1 = {
|
|
727
|
-
workerListHeader,
|
|
728
|
-
card,
|
|
729
|
-
tableLoader
|
|
730
|
-
};
|
|
731
|
-
const _hoisted_1$1 = { key: 0 };
|
|
732
|
-
const _hoisted_2 = { key: 1 };
|
|
733
|
-
const _hoisted_3 = { key: 0 };
|
|
734
|
-
const _hoisted_4 = { key: 1 };
|
|
735
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
736
|
-
const _component_PushConnectionTracker = __unplugin_components_0;
|
|
737
|
-
const _component_n8n_heading = resolveComponent("n8n-heading");
|
|
738
|
-
const _component_n8n_spinner = resolveComponent("n8n-spinner");
|
|
739
|
-
const _component_WorkerCard = resolveComponent("WorkerCard");
|
|
740
|
-
return openBlock(), createElementBlock("div", null, [
|
|
741
|
-
createVNode(_component_PushConnectionTracker, { class: "actions" }),
|
|
742
|
-
createBaseVNode("div", {
|
|
743
|
-
class: normalizeClass(_ctx.$style.workerListHeader)
|
|
744
|
-
}, [
|
|
745
|
-
createVNode(_component_n8n_heading, {
|
|
746
|
-
tag: "h1",
|
|
747
|
-
size: "2xlarge"
|
|
748
|
-
}, {
|
|
749
|
-
default: withCtx(() => [
|
|
750
|
-
createTextVNode(toDisplayString(_ctx.pageTitle), 1)
|
|
751
|
-
]),
|
|
752
|
-
_: 1
|
|
753
|
-
})
|
|
754
|
-
], 2),
|
|
755
|
-
!_ctx.initialStatusReceived ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
756
|
-
createVNode(_component_n8n_spinner)
|
|
757
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
758
|
-
_ctx.workerIds.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_3, toDisplayString(_ctx.$locale.baseText("workerList.empty")), 1)) : (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
759
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.workerIds, (workerId) => {
|
|
760
|
-
return openBlock(), createElementBlock("div", {
|
|
761
|
-
key: workerId,
|
|
762
|
-
class: normalizeClass(_ctx.$style.card)
|
|
763
|
-
}, [
|
|
764
|
-
createVNode(_component_WorkerCard, {
|
|
765
|
-
"worker-id": workerId,
|
|
766
|
-
"data-test-id": "worker-card"
|
|
767
|
-
}, null, 8, ["worker-id"])
|
|
768
|
-
], 2);
|
|
769
|
-
}), 128))
|
|
770
|
-
]))
|
|
771
|
-
]))
|
|
772
|
-
]);
|
|
773
|
-
}
|
|
774
|
-
const cssModules$1 = {
|
|
775
|
-
"$style": style0$1
|
|
776
|
-
};
|
|
777
|
-
const WorkerList = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__cssModules", cssModules$1]]);
|
|
778
|
-
const _hoisted_1 = ["href"];
|
|
779
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
780
|
-
__name: "WorkerView",
|
|
781
|
-
setup(__props) {
|
|
782
|
-
const settingsStore = useSettingsStore();
|
|
783
|
-
const uiStore = useUIStore();
|
|
784
|
-
const goToUpgrade = () => {
|
|
785
|
-
void uiStore.goToUpgrade("worker-view", "upgrade-worker-view");
|
|
786
|
-
};
|
|
787
|
-
return (_ctx, _cache) => {
|
|
788
|
-
const _component_n8n_action_box = resolveComponent("n8n-action-box");
|
|
789
|
-
return unref(settingsStore).isQueueModeEnabled && unref(settingsStore).isWorkerViewAvailable ? (openBlock(), createBlock(WorkerList, {
|
|
790
|
-
key: 0,
|
|
791
|
-
"data-test-id": "worker-view-licensed"
|
|
792
|
-
})) : (openBlock(), createBlock(_component_n8n_action_box, {
|
|
793
|
-
key: 1,
|
|
794
|
-
"data-test-id": "worker-view-unlicensed",
|
|
795
|
-
class: normalizeClass(_ctx.$style.actionBox),
|
|
796
|
-
description: _ctx.$locale.baseText("workerList.actionBox.description"),
|
|
797
|
-
"button-text": _ctx.$locale.baseText("workerList.actionBox.buttonText"),
|
|
798
|
-
"onClick:button": goToUpgrade
|
|
799
|
-
}, {
|
|
800
|
-
heading: withCtx(() => [
|
|
801
|
-
createBaseVNode("span", null, toDisplayString(_ctx.$locale.baseText("workerList.actionBox.title")), 1)
|
|
802
|
-
]),
|
|
803
|
-
description: withCtx(() => [
|
|
804
|
-
createTextVNode(toDisplayString(_ctx.$locale.baseText("workerList.actionBox.description")) + " ", 1),
|
|
805
|
-
createBaseVNode("a", {
|
|
806
|
-
href: _ctx.$locale.baseText("workerList.docs.url"),
|
|
807
|
-
target: "_blank"
|
|
808
|
-
}, toDisplayString(_ctx.$locale.baseText("workerList.actionBox.description.link")), 9, _hoisted_1)
|
|
809
|
-
]),
|
|
810
|
-
_: 1
|
|
811
|
-
}, 8, ["class", "description", "button-text"]));
|
|
812
|
-
};
|
|
813
|
-
}
|
|
814
|
-
});
|
|
815
|
-
const actionBox = "_actionBox_13ul9_1";
|
|
816
|
-
const style0 = {
|
|
817
|
-
actionBox
|
|
818
|
-
};
|
|
819
|
-
const cssModules = {
|
|
820
|
-
"$style": style0
|
|
821
|
-
};
|
|
822
|
-
const WorkerView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
|
|
823
|
-
export {
|
|
824
|
-
WorkerView as default
|
|
825
|
-
};
|