@orchestrator-ui/orchestrator-ui-components 1.24.0 → 1.26.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/.turbo/turbo-build.log +4 -4
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-test.log +7 -7
- package/CHANGELOG.md +24 -0
- package/dist/index.d.ts +16 -13
- package/dist/index.js +1600 -1520
- package/package.json +1 -1
- package/src/components/WfoBadges/WfoWebsocketStatusBadge/WfoWebsocketStatusBadge.tsx +1 -1
- package/src/components/WfoForms/formFields/utils.spec.ts +24 -6
- package/src/components/WfoKeyValueTable/styles.ts +0 -1
- package/src/components/WfoSettingsModal/WfoSettingsModal.tsx +28 -22
- package/src/components/WfoSubscription/WfoInUseByRelations.tsx +1 -1
- package/src/components/WfoSubscription/WfoRelatedSubscriptions.tsx +2 -1
- package/src/components/WfoSubscription/WfoSubscriptionDetailTree.tsx +4 -24
- package/src/components/WfoSubscription/WfoSubscriptionProductBlock/WfoProductBlockKeyValueRow.tsx +2 -3
- package/src/components/WfoSubscription/WfoSubscriptionProductBlock/WfoSubscriptionProductBlock.tsx +93 -36
- package/src/components/WfoSubscription/WfoSubscriptionProductBlock/styles.ts +16 -10
- package/src/components/WfoTable/WfoTableSettingsModal/WfoTableSettingsModal.tsx +5 -2
- package/src/components/WfoTable/WfoTableWithFilter/WfoTableWithFilter.tsx +4 -4
- package/src/components/WfoTree/treeUtils.spec.ts +20 -4
- package/src/components/WfoWorkflowSteps/WfoStep/WfoStepForm.tsx +20 -6
- package/src/messages/en-GB.json +5 -1
- package/src/messages/nl-NL.json +5 -1
- package/src/pages/processes/WfoProcessDetailPage.tsx +23 -70
- package/src/pages/processes/WfoStartProcessPage.tsx +30 -3
- package/src/rtk/api.ts +2 -2
- package/src/rtk/endpoints/processDetail.ts +15 -4
- package/src/rtk/endpoints/processList.ts +1 -1
- package/src/rtk/endpoints/streamMessages.ts +25 -10
- package/src/rtk/endpoints/subscriptionDetail.ts +4 -1
- package/src/types/types.ts +1 -1
- package/src/utils/date.ts +3 -1
package/dist/index.js
CHANGED
|
@@ -34664,20 +34664,20 @@ var StepStatus = /* @__PURE__ */ ((StepStatus2) => {
|
|
|
34664
34664
|
StepStatus2["COMPLETE"] = "complete";
|
|
34665
34665
|
return StepStatus2;
|
|
34666
34666
|
})(StepStatus || {});
|
|
34667
|
-
var ProcessStatus = /* @__PURE__ */ ((
|
|
34668
|
-
|
|
34669
|
-
|
|
34670
|
-
|
|
34671
|
-
|
|
34672
|
-
|
|
34673
|
-
|
|
34674
|
-
|
|
34675
|
-
|
|
34676
|
-
|
|
34677
|
-
|
|
34678
|
-
|
|
34679
|
-
|
|
34680
|
-
return
|
|
34667
|
+
var ProcessStatus = /* @__PURE__ */ ((ProcessStatus2) => {
|
|
34668
|
+
ProcessStatus2["CREATE"] = "create";
|
|
34669
|
+
ProcessStatus2["CREATED"] = "created";
|
|
34670
|
+
ProcessStatus2["RUNNING"] = "running";
|
|
34671
|
+
ProcessStatus2["SUSPENDED"] = "suspended";
|
|
34672
|
+
ProcessStatus2["WAITING"] = "waiting";
|
|
34673
|
+
ProcessStatus2["AWAITING_CALLBACK"] = "awaiting_callback";
|
|
34674
|
+
ProcessStatus2["ABORTED"] = "aborted";
|
|
34675
|
+
ProcessStatus2["FAILED"] = "failed";
|
|
34676
|
+
ProcessStatus2["RESUMED"] = "resumed";
|
|
34677
|
+
ProcessStatus2["API_UNAVAILABLE"] = "api_unavailable";
|
|
34678
|
+
ProcessStatus2["INCONSISTENT_DATA"] = "inconsistent_data";
|
|
34679
|
+
ProcessStatus2["COMPLETED"] = "completed";
|
|
34680
|
+
return ProcessStatus2;
|
|
34681
34681
|
})(ProcessStatus || {});
|
|
34682
34682
|
var ProcessDoneStatuses = [
|
|
34683
34683
|
"completed" /* COMPLETED */,
|
|
@@ -40399,7 +40399,7 @@ var BaseQueryTypes = /* @__PURE__ */ ((BaseQueryTypes2) => {
|
|
|
40399
40399
|
var CacheTags = /* @__PURE__ */ ((CacheTags2) => {
|
|
40400
40400
|
CacheTags2["engineStatus"] = "engineStatus";
|
|
40401
40401
|
CacheTags2["cacheNames"] = "cacheNames";
|
|
40402
|
-
CacheTags2["
|
|
40402
|
+
CacheTags2["processes"] = "processes";
|
|
40403
40403
|
CacheTags2["processListSummary"] = "processListSummary";
|
|
40404
40404
|
CacheTags2["subscription"] = "subscription";
|
|
40405
40405
|
CacheTags2["subscriptionList"] = "subscriptionList";
|
|
@@ -40473,7 +40473,7 @@ var orchestratorApi = createApi2({
|
|
|
40473
40473
|
tagTypes: [
|
|
40474
40474
|
"engineStatus" /* engineStatus */,
|
|
40475
40475
|
"cacheNames" /* cacheNames */,
|
|
40476
|
-
"
|
|
40476
|
+
"processes" /* processes */,
|
|
40477
40477
|
"processListSummary" /* processListSummary */,
|
|
40478
40478
|
"subscriptionList" /* subscriptionList */,
|
|
40479
40479
|
"subscription" /* subscription */,
|
|
@@ -41255,7 +41255,7 @@ var processApi = orchestratorApi.injectEndpoints({
|
|
|
41255
41255
|
pageInfo: ((_a = response.processes) == null ? void 0 : _a.pageInfo) || {}
|
|
41256
41256
|
};
|
|
41257
41257
|
},
|
|
41258
|
-
providesTags: ["
|
|
41258
|
+
providesTags: ["processes" /* processes */]
|
|
41259
41259
|
})
|
|
41260
41260
|
})
|
|
41261
41261
|
});
|
|
@@ -41723,16 +41723,20 @@ var streamMessagesApi = orchestratorApi.injectEndpoints({
|
|
|
41723
41723
|
clearInterval(pingInterval);
|
|
41724
41724
|
updateCachedData(() => false);
|
|
41725
41725
|
};
|
|
41726
|
-
const invalidateTag = (
|
|
41727
|
-
|
|
41728
|
-
|
|
41729
|
-
|
|
41730
|
-
|
|
41731
|
-
|
|
41726
|
+
const invalidateTag = (cacheTag, id) => {
|
|
41727
|
+
if (validCacheTags.includes(cacheTag)) {
|
|
41728
|
+
const cacheTags = [cacheTag];
|
|
41729
|
+
if (id) {
|
|
41730
|
+
cacheTags.push({
|
|
41731
|
+
type: cacheTag,
|
|
41732
|
+
id
|
|
41733
|
+
});
|
|
41734
|
+
}
|
|
41735
|
+
const cacheInvalidationAction = orchestratorApi.util.invalidateTags(cacheTags);
|
|
41732
41736
|
dispatch(cacheInvalidationAction);
|
|
41733
41737
|
} else {
|
|
41734
41738
|
console.error(
|
|
41735
|
-
`Trying to invalidate a cache entry with an unknown tag: ${
|
|
41739
|
+
`Trying to invalidate a cache entry with an unknown tag: ${cacheTag}`
|
|
41736
41740
|
);
|
|
41737
41741
|
}
|
|
41738
41742
|
};
|
|
@@ -41741,8 +41745,10 @@ var streamMessagesApi = orchestratorApi.injectEndpoints({
|
|
|
41741
41745
|
const messageValue = message.value;
|
|
41742
41746
|
if (typeof messageValue === "string") {
|
|
41743
41747
|
invalidateTag(messageValue);
|
|
41744
|
-
} else if (Array.isArray(messageValue)) {
|
|
41745
|
-
|
|
41748
|
+
} else if (Array.isArray(messageValue) && messageValue.length === 2) {
|
|
41749
|
+
const [tag, id] = messageValue;
|
|
41750
|
+
const cacheTag = tag;
|
|
41751
|
+
invalidateTag(cacheTag, id);
|
|
41746
41752
|
} else {
|
|
41747
41753
|
console.error(
|
|
41748
41754
|
"invalid message value type",
|
|
@@ -41833,7 +41839,10 @@ var subscriptionDetailQuery = `
|
|
|
41833
41839
|
}
|
|
41834
41840
|
productBlockInstances {
|
|
41835
41841
|
id
|
|
41836
|
-
|
|
41842
|
+
subscription {
|
|
41843
|
+
subscriptionId
|
|
41844
|
+
description
|
|
41845
|
+
}
|
|
41837
41846
|
parent
|
|
41838
41847
|
productBlockInstanceValues
|
|
41839
41848
|
subscriptionInstanceId
|
|
@@ -44460,7 +44469,6 @@ var getStyles2 = ({ theme }) => {
|
|
|
44460
44469
|
borderBottomLeftRadius: radius
|
|
44461
44470
|
});
|
|
44462
44471
|
const valueColumnStyle = css3({
|
|
44463
|
-
padding,
|
|
44464
44472
|
borderTopRightRadius: radius,
|
|
44465
44473
|
borderBottomRightRadius: radius,
|
|
44466
44474
|
display: "flex",
|
|
@@ -44656,7 +44664,7 @@ var WfoWebsocketStatusBadge = () => {
|
|
|
44656
44664
|
WfoHeaderBadge,
|
|
44657
44665
|
{
|
|
44658
44666
|
textColor: theme.colors.shadow,
|
|
44659
|
-
iconType: () => websocketConnected ? /* @__PURE__ */ jsx59(WfoBoltFill, { color: theme.colors.success }) : /* @__PURE__ */ jsx59(WfoBoltSlashFill, { color:
|
|
44667
|
+
iconType: () => websocketConnected ? /* @__PURE__ */ jsx59(WfoBoltFill, { color: theme.colors.success }) : /* @__PURE__ */ jsx59(WfoBoltSlashFill, { color: theme.colors.warning }),
|
|
44660
44668
|
css: websocketConnected ? connectedStyle : disconnectedStyle,
|
|
44661
44669
|
onClick: () => {
|
|
44662
44670
|
if (!websocketConnected) {
|
|
@@ -45526,6 +45534,7 @@ var WfoInformationModal = ({
|
|
|
45526
45534
|
};
|
|
45527
45535
|
|
|
45528
45536
|
// src/components/WfoSettingsModal/WfoSettingsModal.tsx
|
|
45537
|
+
import { useTranslations as useTranslations12 } from "next-intl";
|
|
45529
45538
|
import {
|
|
45530
45539
|
EuiButton as EuiButton4,
|
|
45531
45540
|
EuiButtonEmpty,
|
|
@@ -45544,15 +45553,18 @@ var WfoSettingsModal = ({
|
|
|
45544
45553
|
onResetToDefaults,
|
|
45545
45554
|
onUpdateTableConfig,
|
|
45546
45555
|
children
|
|
45547
|
-
}) =>
|
|
45548
|
-
|
|
45549
|
-
/* @__PURE__ */
|
|
45550
|
-
|
|
45551
|
-
|
|
45552
|
-
/* @__PURE__ */ jsx70(
|
|
45553
|
-
/* @__PURE__ */ jsx70(
|
|
45554
|
-
|
|
45555
|
-
|
|
45556
|
+
}) => {
|
|
45557
|
+
const t = useTranslations12("main");
|
|
45558
|
+
return /* @__PURE__ */ jsxs50(EuiModal3, { onClose, maxWidth: 400, children: [
|
|
45559
|
+
/* @__PURE__ */ jsx70(EuiModalHeader3, { children: /* @__PURE__ */ jsx70(EuiModalHeaderTitle3, { size: "xs", children: title }) }),
|
|
45560
|
+
/* @__PURE__ */ jsx70(EuiSpacer5, { size: "s" }),
|
|
45561
|
+
/* @__PURE__ */ jsx70(EuiModalBody3, { children }),
|
|
45562
|
+
/* @__PURE__ */ jsx70(EuiModalFooter3, { children: /* @__PURE__ */ jsxs50(EuiFlexGroup, { justifyContent: "spaceBetween", children: [
|
|
45563
|
+
/* @__PURE__ */ jsx70(EuiButtonEmpty, { onClick: onResetToDefaults, flush: "left", children: t("resetToDefault") }),
|
|
45564
|
+
/* @__PURE__ */ jsx70(EuiButton4, { onClick: onUpdateTableConfig, fill: true, children: t("savePreferences") })
|
|
45565
|
+
] }) })
|
|
45566
|
+
] });
|
|
45567
|
+
};
|
|
45556
45568
|
|
|
45557
45569
|
// src/components/WfoSettingsModal/WfoSubmitModal.tsx
|
|
45558
45570
|
import {
|
|
@@ -45738,7 +45750,7 @@ var SubscriptionKeyValueBlock = ({
|
|
|
45738
45750
|
|
|
45739
45751
|
// src/components/WfoSubscription/WfoInSyncField.tsx
|
|
45740
45752
|
import { useContext as useContext4 } from "react";
|
|
45741
|
-
import { useTranslations as
|
|
45753
|
+
import { useTranslations as useTranslations13 } from "next-intl";
|
|
45742
45754
|
import Link2 from "next/link";
|
|
45743
45755
|
import { EuiButton as EuiButton6 } from "@elastic/eui";
|
|
45744
45756
|
|
|
@@ -45766,7 +45778,7 @@ var WfoInsyncIcon = ({ inSync }) => {
|
|
|
45766
45778
|
// src/components/WfoSubscription/WfoInSyncField.tsx
|
|
45767
45779
|
import { Fragment as Fragment9, jsx as jsx74, jsxs as jsxs53 } from "@emotion/react/jsx-runtime";
|
|
45768
45780
|
var WfoInSyncField = ({ subscriptionDetail }) => {
|
|
45769
|
-
const t =
|
|
45781
|
+
const t = useTranslations13("subscriptions.detail");
|
|
45770
45782
|
const { theme } = useOrchestratorTheme();
|
|
45771
45783
|
const inSync = subscriptionDetail.insync;
|
|
45772
45784
|
const lastTaskRunDate = getLatestTaskDate(
|
|
@@ -45833,7 +45845,7 @@ var WfoInSyncField = ({ subscriptionDetail }) => {
|
|
|
45833
45845
|
};
|
|
45834
45846
|
|
|
45835
45847
|
// src/components/WfoSubscription/WfoProcessesTimeline.tsx
|
|
45836
|
-
import { useTranslations as
|
|
45848
|
+
import { useTranslations as useTranslations14 } from "next-intl";
|
|
45837
45849
|
import { EuiComment, EuiCommentList, EuiSpacer as EuiSpacer8, EuiText as EuiText4 } from "@elastic/eui";
|
|
45838
45850
|
|
|
45839
45851
|
// src/components/WfoLoading/WfoLoading.tsx
|
|
@@ -45912,7 +45924,7 @@ var getStyles5 = ({ theme }) => {
|
|
|
45912
45924
|
// src/components/WfoSubscription/WfoProcessesTimeline.tsx
|
|
45913
45925
|
import { Fragment as Fragment10, jsx as jsx77, jsxs as jsxs54 } from "@emotion/react/jsx-runtime";
|
|
45914
45926
|
var WfoProcessCard = ({ subscriptionDetailProcess }) => {
|
|
45915
|
-
const t =
|
|
45927
|
+
const t = useTranslations14("subscriptions.detail.processDetail");
|
|
45916
45928
|
const {
|
|
45917
45929
|
tableStyle,
|
|
45918
45930
|
contentCellStyle,
|
|
@@ -46013,7 +46025,7 @@ var WfoProcessesTimeline = ({
|
|
|
46013
46025
|
|
|
46014
46026
|
// src/components/WfoSubscription/WfoRelatedSubscriptions.tsx
|
|
46015
46027
|
import { useState as useState10 } from "react";
|
|
46016
|
-
import { useTranslations as
|
|
46028
|
+
import { useTranslations as useTranslations15 } from "next-intl";
|
|
46017
46029
|
import Link3 from "next/link";
|
|
46018
46030
|
import { EuiFlexGroup as EuiFlexGroup4, EuiFlexItem as EuiFlexItem3, EuiSpacer as EuiSpacer9, EuiSwitch } from "@elastic/eui";
|
|
46019
46031
|
import { Fragment as Fragment11, jsx as jsx78, jsxs as jsxs55 } from "@emotion/react/jsx-runtime";
|
|
@@ -46022,7 +46034,7 @@ var WfoRelatedSubscriptions = ({
|
|
|
46022
46034
|
}) => {
|
|
46023
46035
|
var _a, _b, _c;
|
|
46024
46036
|
const [hideTerminatedSubscriptions, setHideTerminatedSubscriptions] = useState10(true);
|
|
46025
|
-
const t =
|
|
46037
|
+
const t = useTranslations15("subscriptions.detail");
|
|
46026
46038
|
const { theme } = useOrchestratorTheme();
|
|
46027
46039
|
const terminatedSubscriptionsFilter = {
|
|
46028
46040
|
field: "status",
|
|
@@ -46059,7 +46071,7 @@ var WfoRelatedSubscriptions = ({
|
|
|
46059
46071
|
Link3,
|
|
46060
46072
|
{
|
|
46061
46073
|
target: "_blank",
|
|
46062
|
-
href:
|
|
46074
|
+
href: `${PATH_SUBSCRIPTIONS}/${record.subscriptionId}`,
|
|
46063
46075
|
children: value
|
|
46064
46076
|
}
|
|
46065
46077
|
),
|
|
@@ -46165,11 +46177,11 @@ import {
|
|
|
46165
46177
|
} from "@elastic/eui";
|
|
46166
46178
|
|
|
46167
46179
|
// src/components/WfoBadges/WfoSubscriptionSyncStatusBadge/WfoSubscriptionSyncStatusBadge.tsx
|
|
46168
|
-
import { useTranslations as
|
|
46180
|
+
import { useTranslations as useTranslations16 } from "next-intl";
|
|
46169
46181
|
import { jsx as jsx79 } from "@emotion/react/jsx-runtime";
|
|
46170
46182
|
var WfoSubscriptionSyncStatusBadge = ({ insync }) => {
|
|
46171
46183
|
const { theme, toSecondaryColor } = useOrchestratorTheme();
|
|
46172
|
-
const t =
|
|
46184
|
+
const t = useTranslations16("common");
|
|
46173
46185
|
const getBadgePropertiesFromStatus = (insync2) => {
|
|
46174
46186
|
const { danger, dangerText, success, successText } = theme.colors;
|
|
46175
46187
|
if (insync2) {
|
|
@@ -46191,11 +46203,11 @@ var WfoSubscriptionSyncStatusBadge = ({ insync }) => {
|
|
|
46191
46203
|
};
|
|
46192
46204
|
|
|
46193
46205
|
// src/components/WfoError/WfoError.tsx
|
|
46194
|
-
import { useTranslations as
|
|
46206
|
+
import { useTranslations as useTranslations17 } from "next-intl";
|
|
46195
46207
|
import { EuiFlexGroup as EuiFlexGroup5 } from "@elastic/eui";
|
|
46196
46208
|
import { jsx as jsx80, jsxs as jsxs56 } from "@emotion/react/jsx-runtime";
|
|
46197
46209
|
var WfoError = () => {
|
|
46198
|
-
const t =
|
|
46210
|
+
const t = useTranslations17("common");
|
|
46199
46211
|
const { theme } = useOrchestratorTheme();
|
|
46200
46212
|
return /* @__PURE__ */ jsxs56(EuiFlexGroup5, { direction: "row", alignItems: "center", gutterSize: "s", children: [
|
|
46201
46213
|
/* @__PURE__ */ jsx80(WfoXCircleFill, { color: theme.colors.danger }),
|
|
@@ -46340,7 +46352,7 @@ var WfoSubscription = ({ subscriptionId }) => {
|
|
|
46340
46352
|
|
|
46341
46353
|
// src/components/WfoSubscription/WfoSubscriptionActions.tsx
|
|
46342
46354
|
import { useState as useState11 } from "react";
|
|
46343
|
-
import { useTranslations as
|
|
46355
|
+
import { useTranslations as useTranslations18 } from "next-intl";
|
|
46344
46356
|
import Link4 from "next/link";
|
|
46345
46357
|
import { useRouter as useRouter5 } from "next/router";
|
|
46346
46358
|
import {
|
|
@@ -46375,7 +46387,7 @@ var WfoSubscriptionActions = ({
|
|
|
46375
46387
|
}) => {
|
|
46376
46388
|
const { theme } = useOrchestratorTheme();
|
|
46377
46389
|
const router = useRouter5();
|
|
46378
|
-
const t =
|
|
46390
|
+
const t = useTranslations18("subscriptions.detail.actions");
|
|
46379
46391
|
const [isPopoverOpen, setPopover] = useState11(false);
|
|
46380
46392
|
const { data: subscriptionActions } = useGetSubscriptionActionsQuery({
|
|
46381
46393
|
subscriptionId
|
|
@@ -46512,7 +46524,7 @@ var WfoSubscriptionActions = ({
|
|
|
46512
46524
|
|
|
46513
46525
|
// src/components/WfoSubscription/WfoSubscriptionProductBlock/WfoSubscriptionProductBlock.tsx
|
|
46514
46526
|
import { useState as useState12 } from "react";
|
|
46515
|
-
import { useTranslations as
|
|
46527
|
+
import { useTranslations as useTranslations20 } from "next-intl";
|
|
46516
46528
|
import {
|
|
46517
46529
|
EuiBadge as EuiBadge2,
|
|
46518
46530
|
EuiButtonEmpty as EuiButtonEmpty3,
|
|
@@ -46525,13 +46537,13 @@ import {
|
|
|
46525
46537
|
} from "@elastic/eui";
|
|
46526
46538
|
|
|
46527
46539
|
// src/components/WfoSubscription/WfoInUseByRelations.tsx
|
|
46528
|
-
import { useTranslations as
|
|
46540
|
+
import { useTranslations as useTranslations19 } from "next-intl";
|
|
46529
46541
|
import Link5 from "next/link";
|
|
46530
46542
|
import { Fragment as Fragment14, jsx as jsx84 } from "@emotion/react/jsx-runtime";
|
|
46531
46543
|
var WfoInUseByRelations = ({
|
|
46532
46544
|
inUseByRelations
|
|
46533
46545
|
}) => {
|
|
46534
|
-
const t =
|
|
46546
|
+
const t = useTranslations19("subscriptions.detail");
|
|
46535
46547
|
const { inUseByRelationDetailsStyle } = useWithOrchestratorTheme(getStyles5);
|
|
46536
46548
|
const subscriptionIds = inUseByRelations.map((relation) => relation.subscription_id).join("|");
|
|
46537
46549
|
const { data, isLoading, isError: isError2 } = useGetInUseByRelationDetailsQuery({
|
|
@@ -46560,7 +46572,7 @@ var WfoInUseByRelations = ({
|
|
|
46560
46572
|
value: /* @__PURE__ */ jsx84(
|
|
46561
46573
|
Link5,
|
|
46562
46574
|
{
|
|
46563
|
-
href:
|
|
46575
|
+
href: `${PATH_SUBSCRIPTIONS}/${inUseByRelationDetails.subscriptionId}`,
|
|
46564
46576
|
target: "_blank",
|
|
46565
46577
|
children: inUseByRelationDetails.description
|
|
46566
46578
|
}
|
|
@@ -46606,31 +46618,36 @@ var getStyles6 = (wfoTheme) => {
|
|
|
46606
46618
|
border: `dashed 1px ${theme.colors.lightShade}`
|
|
46607
46619
|
});
|
|
46608
46620
|
const rowStyle = css10({
|
|
46621
|
+
display: "flex",
|
|
46622
|
+
flexDirection: "row",
|
|
46623
|
+
alignItems: "flex-start",
|
|
46624
|
+
padding: `${theme.base / 2}px 0`,
|
|
46609
46625
|
borderBottom: `solid 1px ${theme.colors.lightShade}`,
|
|
46610
46626
|
"&:first-child": {
|
|
46611
46627
|
borderTop: `solid 1px ${theme.colors.lightShade}`
|
|
46612
46628
|
}
|
|
46613
46629
|
});
|
|
46614
46630
|
const leftColumnStyle = css10({
|
|
46615
|
-
verticalAlign: "top",
|
|
46616
46631
|
width: 250,
|
|
46617
|
-
|
|
46618
|
-
paddingTop:
|
|
46619
|
-
paddingBottom: 10
|
|
46632
|
+
flexShrink: 0,
|
|
46633
|
+
paddingTop: `${theme.base / 4}px`
|
|
46620
46634
|
});
|
|
46621
|
-
const
|
|
46622
|
-
|
|
46623
|
-
|
|
46624
|
-
|
|
46625
|
-
|
|
46635
|
+
const leftColumnStyleWithAlignSelf = css10({
|
|
46636
|
+
width: 250,
|
|
46637
|
+
flexShrink: 0,
|
|
46638
|
+
alignSelf: "center"
|
|
46639
|
+
});
|
|
46640
|
+
const outsideSubscriptionIdTextStyle = css10({
|
|
46641
|
+
padding: `${theme.size.xs}px 0`
|
|
46626
46642
|
});
|
|
46627
46643
|
return {
|
|
46628
46644
|
iconStyle,
|
|
46629
46645
|
panelStyle,
|
|
46630
46646
|
leftColumnStyle,
|
|
46631
|
-
|
|
46647
|
+
leftColumnStyleWithAlignSelf,
|
|
46632
46648
|
rowStyle,
|
|
46633
|
-
panelStyleOutsideCurrentSubscription
|
|
46649
|
+
panelStyleOutsideCurrentSubscription,
|
|
46650
|
+
outsideSubscriptionIdTextStyle
|
|
46634
46651
|
};
|
|
46635
46652
|
};
|
|
46636
46653
|
|
|
@@ -46638,24 +46655,30 @@ var getStyles6 = (wfoTheme) => {
|
|
|
46638
46655
|
import { Fragment as Fragment15, jsx as jsx85, jsxs as jsxs59 } from "@emotion/react/jsx-runtime";
|
|
46639
46656
|
var HIDDEN_KEYS = ["title", "name", "label"];
|
|
46640
46657
|
var WfoSubscriptionProductBlock = ({
|
|
46641
|
-
|
|
46642
|
-
|
|
46643
|
-
productBlockInstanceValues,
|
|
46644
|
-
inUseByRelations,
|
|
46645
|
-
isOutsideCurrentSubscription = false
|
|
46658
|
+
productBlock,
|
|
46659
|
+
subscriptionId
|
|
46646
46660
|
}) => {
|
|
46647
|
-
const t =
|
|
46661
|
+
const t = useTranslations20("subscriptions.detail");
|
|
46648
46662
|
const { theme } = useOrchestratorTheme();
|
|
46649
46663
|
const {
|
|
46650
46664
|
iconStyle,
|
|
46651
46665
|
panelStyle,
|
|
46652
46666
|
panelStyleOutsideCurrentSubscription,
|
|
46653
46667
|
leftColumnStyle,
|
|
46654
|
-
|
|
46668
|
+
leftColumnStyleWithAlignSelf,
|
|
46669
|
+
outsideSubscriptionIdTextStyle,
|
|
46655
46670
|
rowStyle
|
|
46656
46671
|
} = useWithOrchestratorTheme(getStyles6);
|
|
46657
46672
|
const [showDetails, setShowDetails] = useState12(false);
|
|
46673
|
+
const ownerSubscriptionId = productBlock.subscription.subscriptionId;
|
|
46674
|
+
const isOutsideCurrentSubscription = ownerSubscriptionId !== subscriptionId;
|
|
46675
|
+
const inUseByRelations = productBlock.inUseByRelations.filter(
|
|
46676
|
+
(inUseByRelation) => inUseByRelation.subscription_id !== subscriptionId
|
|
46677
|
+
);
|
|
46658
46678
|
const showProductBlockValues = !isOutsideCurrentSubscription || showDetails;
|
|
46679
|
+
const isEmpty2 = (value) => {
|
|
46680
|
+
return value === null || value === void 0 || value === "";
|
|
46681
|
+
};
|
|
46659
46682
|
return /* @__PURE__ */ jsxs59(Fragment15, { children: [
|
|
46660
46683
|
/* @__PURE__ */ jsx85(EuiSpacer11, { size: "m" }),
|
|
46661
46684
|
/* @__PURE__ */ jsxs59(
|
|
@@ -46675,10 +46698,10 @@ var WfoSubscriptionProductBlock = ({
|
|
|
46675
46698
|
) }) }),
|
|
46676
46699
|
/* @__PURE__ */ jsxs59(EuiFlexItem6, { children: [
|
|
46677
46700
|
/* @__PURE__ */ jsx85(EuiText6, { grow: true, children: /* @__PURE__ */ jsx85("h3", { children: getProductBlockTitle(
|
|
46678
|
-
productBlockInstanceValues
|
|
46701
|
+
productBlock.productBlockInstanceValues
|
|
46679
46702
|
) }) }),
|
|
46680
46703
|
/* @__PURE__ */ jsx85(EuiText6, { size: "s", children: getFieldFromProductBlockInstanceValues(
|
|
46681
|
-
productBlockInstanceValues,
|
|
46704
|
+
productBlock.productBlockInstanceValues,
|
|
46682
46705
|
"name"
|
|
46683
46706
|
) })
|
|
46684
46707
|
] }),
|
|
@@ -46695,28 +46718,48 @@ var WfoSubscriptionProductBlock = ({
|
|
|
46695
46718
|
/* @__PURE__ */ jsx85(EuiSpacer11, { size: "m" }),
|
|
46696
46719
|
/* @__PURE__ */ jsx85("table", { width: "100%", children: /* @__PURE__ */ jsxs59("tbody", { children: [
|
|
46697
46720
|
isOutsideCurrentSubscription && /* @__PURE__ */ jsxs59("tr", { css: rowStyle, children: [
|
|
46698
|
-
/* @__PURE__ */ jsx85("td", { css:
|
|
46699
|
-
/* @__PURE__ */ jsx85("td", {
|
|
46700
|
-
|
|
46721
|
+
/* @__PURE__ */ jsx85("td", { css: leftColumnStyleWithAlignSelf, children: /* @__PURE__ */ jsx85("b", { children: t("ownerSubscriptionId") }) }),
|
|
46722
|
+
/* @__PURE__ */ jsx85("td", { children: /* @__PURE__ */ jsx85(
|
|
46723
|
+
WfoValueCell,
|
|
46701
46724
|
{
|
|
46702
|
-
|
|
46703
|
-
|
|
46704
|
-
|
|
46725
|
+
value: /* @__PURE__ */ jsxs59(Fragment15, { children: [
|
|
46726
|
+
/* @__PURE__ */ jsx85(
|
|
46727
|
+
"a",
|
|
46728
|
+
{
|
|
46729
|
+
href: `${PATH_SUBSCRIPTIONS}/${ownerSubscriptionId}`,
|
|
46730
|
+
target: "_blank",
|
|
46731
|
+
children: productBlock.subscription.description
|
|
46732
|
+
}
|
|
46733
|
+
),
|
|
46734
|
+
/* @__PURE__ */ jsx85(
|
|
46735
|
+
EuiText6,
|
|
46736
|
+
{
|
|
46737
|
+
css: outsideSubscriptionIdTextStyle,
|
|
46738
|
+
children: "-"
|
|
46739
|
+
}
|
|
46740
|
+
),
|
|
46741
|
+
getFirstUuidPart(
|
|
46742
|
+
ownerSubscriptionId
|
|
46743
|
+
)
|
|
46744
|
+
] }),
|
|
46745
|
+
textToCopy: ownerSubscriptionId,
|
|
46746
|
+
rowNumber: -1,
|
|
46747
|
+
enableCopyIcon: true
|
|
46705
46748
|
}
|
|
46706
46749
|
) })
|
|
46707
46750
|
] }, -1),
|
|
46708
46751
|
showDetails && /* @__PURE__ */ jsxs59(Fragment15, { children: [
|
|
46709
46752
|
/* @__PURE__ */ jsxs59("tr", { css: rowStyle, children: [
|
|
46710
46753
|
/* @__PURE__ */ jsx85("td", { css: leftColumnStyle, children: /* @__PURE__ */ jsx85("b", { children: t("subscriptionInstanceId") }) }),
|
|
46711
|
-
/* @__PURE__ */ jsx85("td", {
|
|
46754
|
+
/* @__PURE__ */ jsx85("td", { children: productBlock.subscriptionInstanceId })
|
|
46712
46755
|
] }, -2),
|
|
46713
46756
|
!isOutsideCurrentSubscription && /* @__PURE__ */ jsxs59("tr", { css: rowStyle, children: [
|
|
46714
46757
|
/* @__PURE__ */ jsx85("td", { css: leftColumnStyle, children: /* @__PURE__ */ jsx85("b", { children: t("ownerSubscriptionId") }) }),
|
|
46715
|
-
/* @__PURE__ */ jsx85("td", {
|
|
46758
|
+
/* @__PURE__ */ jsx85("td", { children: /* @__PURE__ */ jsx85(Fragment15, { children: /* @__PURE__ */ jsx85(EuiBadge2, { children: t("self") }) }) })
|
|
46716
46759
|
] }, -3),
|
|
46717
46760
|
/* @__PURE__ */ jsxs59("tr", { css: rowStyle, children: [
|
|
46718
46761
|
/* @__PURE__ */ jsx85("td", { css: leftColumnStyle, children: /* @__PURE__ */ jsx85("b", { children: t("inUseByRelations") }) }),
|
|
46719
|
-
/* @__PURE__ */ jsx85("td", {
|
|
46762
|
+
/* @__PURE__ */ jsx85("td", { children: inUseByRelations.length === 0 && "None" || /* @__PURE__ */ jsx85(
|
|
46720
46763
|
WfoInUseByRelations,
|
|
46721
46764
|
{
|
|
46722
46765
|
inUseByRelations
|
|
@@ -46724,17 +46767,33 @@ var WfoSubscriptionProductBlock = ({
|
|
|
46724
46767
|
) })
|
|
46725
46768
|
] }, -4)
|
|
46726
46769
|
] }),
|
|
46727
|
-
showProductBlockValues && productBlockInstanceValues.filter(
|
|
46770
|
+
showProductBlockValues && productBlock.productBlockInstanceValues.filter(
|
|
46728
46771
|
(productBlockInstanceValue) => !HIDDEN_KEYS.includes(
|
|
46729
46772
|
productBlockInstanceValue.field
|
|
46730
46773
|
)
|
|
46731
|
-
).
|
|
46732
|
-
|
|
46733
|
-
|
|
46734
|
-
|
|
46735
|
-
|
|
46736
|
-
|
|
46737
|
-
|
|
46774
|
+
).sort(
|
|
46775
|
+
({ field: fieldNameA }, { field: fieldNameB }) => {
|
|
46776
|
+
if (fieldNameA < fieldNameB) {
|
|
46777
|
+
return -1;
|
|
46778
|
+
}
|
|
46779
|
+
if (fieldNameA > fieldNameB) {
|
|
46780
|
+
return 1;
|
|
46781
|
+
}
|
|
46782
|
+
return 0;
|
|
46783
|
+
}
|
|
46784
|
+
).map((productBlockInstanceValue, index) => {
|
|
46785
|
+
if (productBlockInstanceValue && !isEmpty2(
|
|
46786
|
+
productBlockInstanceValue.value
|
|
46787
|
+
)) {
|
|
46788
|
+
return /* @__PURE__ */ jsx85(
|
|
46789
|
+
WfoProductBlockKeyValueRow,
|
|
46790
|
+
{
|
|
46791
|
+
fieldValue: productBlockInstanceValue
|
|
46792
|
+
},
|
|
46793
|
+
index
|
|
46794
|
+
);
|
|
46795
|
+
}
|
|
46796
|
+
})
|
|
46738
46797
|
] }) })
|
|
46739
46798
|
]
|
|
46740
46799
|
}
|
|
@@ -46747,7 +46806,7 @@ import { EuiBadge as EuiBadge3 } from "@elastic/eui";
|
|
|
46747
46806
|
import { Fragment as Fragment16, jsx as jsx86, jsxs as jsxs60 } from "@emotion/react/jsx-runtime";
|
|
46748
46807
|
var WfoProductBlockKeyValueRow = ({ fieldValue }) => {
|
|
46749
46808
|
var _a;
|
|
46750
|
-
const { leftColumnStyle,
|
|
46809
|
+
const { leftColumnStyle, rowStyle } = useWithOrchestratorTheme(getStyles6);
|
|
46751
46810
|
const { getOverriddenValue } = useSubscriptionDetailValueOverride();
|
|
46752
46811
|
const { field, value } = fieldValue;
|
|
46753
46812
|
const WfoProductBlockValue = ({
|
|
@@ -46755,13 +46814,13 @@ var WfoProductBlockKeyValueRow = ({ fieldValue }) => {
|
|
|
46755
46814
|
}) => typeof value2 === "boolean" ? /* @__PURE__ */ jsx86(EuiBadge3, { children: value2.toString() }) : /* @__PURE__ */ jsx86(Fragment16, { children: value2 });
|
|
46756
46815
|
return /* @__PURE__ */ jsxs60("tr", { css: rowStyle, children: [
|
|
46757
46816
|
/* @__PURE__ */ jsx86("td", { css: leftColumnStyle, children: /* @__PURE__ */ jsx86("b", { children: camelToHuman(field) }) }),
|
|
46758
|
-
/* @__PURE__ */ jsx86("td", {
|
|
46817
|
+
/* @__PURE__ */ jsx86("td", { children: (_a = getOverriddenValue(fieldValue)) != null ? _a : /* @__PURE__ */ jsx86(WfoProductBlockValue, { value }) })
|
|
46759
46818
|
] });
|
|
46760
46819
|
};
|
|
46761
46820
|
|
|
46762
46821
|
// src/components/WfoSubscription/WfoSubscriptionDetailTree.tsx
|
|
46763
46822
|
import React19, { useState as useState13 } from "react";
|
|
46764
|
-
import { useTranslations as
|
|
46823
|
+
import { useTranslations as useTranslations22 } from "next-intl";
|
|
46765
46824
|
import { EuiCallOut, EuiFlexGroup as EuiFlexGroup10, EuiFlexItem as EuiFlexItem8, EuiText as EuiText7 } from "@elastic/eui";
|
|
46766
46825
|
|
|
46767
46826
|
// src/utils/getTokenName.ts
|
|
@@ -46788,7 +46847,7 @@ import { EuiListGroup } from "@elastic/eui";
|
|
|
46788
46847
|
|
|
46789
46848
|
// src/components/WfoTree/WfoTreeNode.tsx
|
|
46790
46849
|
import React16 from "react";
|
|
46791
|
-
import { useTranslations as
|
|
46850
|
+
import { useTranslations as useTranslations21 } from "next-intl";
|
|
46792
46851
|
import {
|
|
46793
46852
|
EuiFlexGroup as EuiFlexGroup9,
|
|
46794
46853
|
EuiFlexItem as EuiFlexItem7,
|
|
@@ -46832,7 +46891,7 @@ var WfoTreeNode = ({
|
|
|
46832
46891
|
treeContainerStyle,
|
|
46833
46892
|
treeItemOtherSubscriptionStyle
|
|
46834
46893
|
} = useWithOrchestratorTheme(getStyles7);
|
|
46835
|
-
const t =
|
|
46894
|
+
const t = useTranslations21("common");
|
|
46836
46895
|
const {
|
|
46837
46896
|
expandedIds,
|
|
46838
46897
|
collapseNode,
|
|
@@ -46942,7 +47001,7 @@ var WfoSubscriptionDetailTree = ({
|
|
|
46942
47001
|
productBlockInstances,
|
|
46943
47002
|
subscriptionId
|
|
46944
47003
|
}) => {
|
|
46945
|
-
const t =
|
|
47004
|
+
const t = useTranslations22("subscriptions.detail");
|
|
46946
47005
|
const [, setSelectedTreeNode] = useState13(-1);
|
|
46947
47006
|
const { selectedIds, expandAll, collapseAll, resetSelection, selectAll } = React19.useContext(TreeContext);
|
|
46948
47007
|
let tree = null;
|
|
@@ -46955,7 +47014,7 @@ var WfoSubscriptionDetailTree = ({
|
|
|
46955
47014
|
callback: () => {
|
|
46956
47015
|
},
|
|
46957
47016
|
children: [],
|
|
46958
|
-
isOutsideCurrentSubscription: productBlockInstance.
|
|
47017
|
+
isOutsideCurrentSubscription: productBlockInstance.subscription.subscriptionId !== subscriptionId
|
|
46959
47018
|
});
|
|
46960
47019
|
if (shallowCopy2.parent === null) {
|
|
46961
47020
|
shallowCopy2.label = getProductBlockTitle(
|
|
@@ -47039,18 +47098,11 @@ var WfoSubscriptionDetailTree = ({
|
|
|
47039
47098
|
),
|
|
47040
47099
|
selectedIds.length !== 0 && selectedIds.map((id, index) => {
|
|
47041
47100
|
const block = idToNodeMap[selectedIds[index]];
|
|
47042
|
-
const inUseByRelationsWithoutCurrentSubscription = block.inUseByRelations.filter(
|
|
47043
|
-
(inUseByRelation) => inUseByRelation.subscription_id !== subscriptionId
|
|
47044
|
-
);
|
|
47045
47101
|
return /* @__PURE__ */ jsx90(
|
|
47046
47102
|
WfoSubscriptionProductBlock,
|
|
47047
47103
|
{
|
|
47048
|
-
|
|
47049
|
-
|
|
47050
|
-
productBlockInstanceValues: block.productBlockInstanceValues,
|
|
47051
|
-
inUseByRelations: inUseByRelationsWithoutCurrentSubscription,
|
|
47052
|
-
isOutsideCurrentSubscription: block.isOutsideCurrentSubscription,
|
|
47053
|
-
id
|
|
47104
|
+
subscriptionId,
|
|
47105
|
+
productBlock: block
|
|
47054
47106
|
},
|
|
47055
47107
|
index
|
|
47056
47108
|
);
|
|
@@ -47060,7 +47112,7 @@ var WfoSubscriptionDetailTree = ({
|
|
|
47060
47112
|
};
|
|
47061
47113
|
|
|
47062
47114
|
// src/components/WfoSubscription/WfoSubscriptionGeneral.tsx
|
|
47063
|
-
import { useTranslations as
|
|
47115
|
+
import { useTranslations as useTranslations23 } from "next-intl";
|
|
47064
47116
|
import { EuiFlexGrid, EuiFlexItem as EuiFlexItem9 } from "@elastic/eui";
|
|
47065
47117
|
|
|
47066
47118
|
// src/components/WfoSubscription/WfoCustomerDescriptionsField.tsx
|
|
@@ -47114,7 +47166,7 @@ import { jsx as jsx92 } from "@emotion/react/jsx-runtime";
|
|
|
47114
47166
|
var WfoSubscriptionGeneral = ({
|
|
47115
47167
|
subscriptionDetail
|
|
47116
47168
|
}) => {
|
|
47117
|
-
const t =
|
|
47169
|
+
const t = useTranslations23("subscriptions.detail");
|
|
47118
47170
|
const { overrideSections } = useSubscriptionDetailGeneralSectionConfigurationOverride();
|
|
47119
47171
|
const hasCustomerDescriptions = subscriptionDetail.customerDescriptions.length > 0;
|
|
47120
47172
|
const getSubscriptionDetailBlockData = () => {
|
|
@@ -47427,6 +47479,7 @@ var WfoDataGridTable = ({
|
|
|
47427
47479
|
|
|
47428
47480
|
// src/components/WfoTable/WfoTableSettingsModal/WfoTableSettingsModal.tsx
|
|
47429
47481
|
import { useState as useState15 } from "react";
|
|
47482
|
+
import { useTranslations as useTranslations24 } from "next-intl";
|
|
47430
47483
|
import {
|
|
47431
47484
|
EuiForm,
|
|
47432
47485
|
EuiFormRow as EuiFormRow2,
|
|
@@ -47462,6 +47515,7 @@ var TableSettingsModal = ({
|
|
|
47462
47515
|
onResetToDefaults,
|
|
47463
47516
|
onClose
|
|
47464
47517
|
}) => {
|
|
47518
|
+
const t = useTranslations24("main");
|
|
47465
47519
|
const { formRowStyle, selectFieldStyle } = useWithOrchestratorTheme(
|
|
47466
47520
|
getWfoTableSettingsModalStyles
|
|
47467
47521
|
);
|
|
@@ -47484,7 +47538,7 @@ var TableSettingsModal = ({
|
|
|
47484
47538
|
return /* @__PURE__ */ jsx94(
|
|
47485
47539
|
WfoSettingsModal,
|
|
47486
47540
|
{
|
|
47487
|
-
title: "
|
|
47541
|
+
title: t("tableSettings"),
|
|
47488
47542
|
onClose,
|
|
47489
47543
|
onResetToDefaults,
|
|
47490
47544
|
onUpdateTableConfig: () => onUpdateTableConfig({
|
|
@@ -47521,7 +47575,7 @@ var TableSettingsModal = ({
|
|
|
47521
47575
|
{
|
|
47522
47576
|
css: formRowStyle,
|
|
47523
47577
|
hasEmptyLabelSpace: true,
|
|
47524
|
-
label: "
|
|
47578
|
+
label: t("numberOfRows"),
|
|
47525
47579
|
display: "columnCompressed",
|
|
47526
47580
|
children: /* @__PURE__ */ jsx94(
|
|
47527
47581
|
EuiSelect,
|
|
@@ -47616,7 +47670,7 @@ var getQueryStringHandler = (setDataDisplayParam) => (queryString) => {
|
|
|
47616
47670
|
};
|
|
47617
47671
|
|
|
47618
47672
|
// src/components/WfoTable/WfoBasicTable/WfoBasicTable.tsx
|
|
47619
|
-
import { useTranslations as
|
|
47673
|
+
import { useTranslations as useTranslations25 } from "next-intl";
|
|
47620
47674
|
import { EuiBasicTable } from "@elastic/eui";
|
|
47621
47675
|
|
|
47622
47676
|
// src/components/WfoTable/WfoBasicTable/styles.ts
|
|
@@ -47738,7 +47792,7 @@ var WfoBasicTable = ({
|
|
|
47738
47792
|
const { basicTableStyle } = useWithOrchestratorTheme(
|
|
47739
47793
|
getWfoBasicTableStyles
|
|
47740
47794
|
);
|
|
47741
|
-
const t =
|
|
47795
|
+
const t = useTranslations25("common");
|
|
47742
47796
|
const statusColorColumn = {
|
|
47743
47797
|
statusColorField: {
|
|
47744
47798
|
field: WFO_STATUS_COLOR_FIELD,
|
|
@@ -47846,7 +47900,7 @@ var WfoSortDirectionIcon = ({
|
|
|
47846
47900
|
|
|
47847
47901
|
// src/components/WfoTable/WfoBasicTable/WfoTableHeaderCell.tsx
|
|
47848
47902
|
import { useState as useState16 } from "react";
|
|
47849
|
-
import { useTranslations as
|
|
47903
|
+
import { useTranslations as useTranslations26 } from "next-intl";
|
|
47850
47904
|
import {
|
|
47851
47905
|
EuiFieldSearch as EuiFieldSearch2,
|
|
47852
47906
|
EuiHorizontalRule as EuiHorizontalRule2,
|
|
@@ -47940,7 +47994,7 @@ var WfoTableHeaderCell = ({
|
|
|
47940
47994
|
headerCellPopoverContentStyle,
|
|
47941
47995
|
getHeaderCellButtonStyle
|
|
47942
47996
|
} = useWithOrchestratorTheme(getWfoBasicTableStyles);
|
|
47943
|
-
const t =
|
|
47997
|
+
const t = useTranslations26("common");
|
|
47944
47998
|
const isSortable = !!onSetSortOrder;
|
|
47945
47999
|
const isFilterable = !!onSearch;
|
|
47946
48000
|
const shouldShowPopover = isSortable || isFilterable;
|
|
@@ -48021,7 +48075,7 @@ var WfoStatusColorField = ({ color }) => {
|
|
|
48021
48075
|
|
|
48022
48076
|
// src/components/WfoTable/WfoTableWithFilter/WfoTableWithFilter.tsx
|
|
48023
48077
|
import { useEffect as useEffect7, useState as useState17 } from "react";
|
|
48024
|
-
import { useTranslations as
|
|
48078
|
+
import { useTranslations as useTranslations27 } from "next-intl";
|
|
48025
48079
|
import {
|
|
48026
48080
|
EuiButton as EuiButton8,
|
|
48027
48081
|
EuiButtonIcon as EuiButtonIcon3,
|
|
@@ -48088,12 +48142,11 @@ var WfoTableWithFilter = ({
|
|
|
48088
48142
|
}) => {
|
|
48089
48143
|
var _a, _b;
|
|
48090
48144
|
const { theme } = useOrchestratorTheme();
|
|
48091
|
-
const defaultPageSize = pagination.pageSize;
|
|
48092
48145
|
const [hiddenColumns, setHiddenColumns] = useState17(defaultHiddenColumns);
|
|
48093
48146
|
const [showSettingsModal, setShowSettingsModal] = useState17(false);
|
|
48094
48147
|
const [selectedDataForDetailModal, setSelectedDataForDetailModal] = useState17(void 0);
|
|
48095
48148
|
const [showSearchModal, setShowSearchModal] = useState17(false);
|
|
48096
|
-
const t =
|
|
48149
|
+
const t = useTranslations27("common");
|
|
48097
48150
|
useEffect7(() => {
|
|
48098
48151
|
if (defaultHiddenColumns) {
|
|
48099
48152
|
setHiddenColumns(defaultHiddenColumns);
|
|
@@ -48153,12 +48206,14 @@ var WfoTableWithFilter = ({
|
|
|
48153
48206
|
});
|
|
48154
48207
|
};
|
|
48155
48208
|
const handleResetToDefaults = () => {
|
|
48156
|
-
|
|
48209
|
+
var _a2;
|
|
48210
|
+
const defaultTableConfig = getDefaultTableConfig(localStorageKey);
|
|
48211
|
+
setHiddenColumns(defaultTableConfig.hiddenColumns);
|
|
48157
48212
|
setShowSettingsModal(false);
|
|
48158
48213
|
clearTableConfigFromLocalStorage(localStorageKey);
|
|
48159
48214
|
onUpdatePage({
|
|
48160
48215
|
index: 0,
|
|
48161
|
-
size:
|
|
48216
|
+
size: (_a2 = defaultTableConfig.selectedPageSize) != null ? _a2 : DEFAULT_PAGE_SIZE
|
|
48162
48217
|
});
|
|
48163
48218
|
};
|
|
48164
48219
|
const onCriteriaChange = (criterion) => {
|
|
@@ -48562,7 +48617,7 @@ var import_cloneDeep2 = __toESM(require_cloneDeep(), 1);
|
|
|
48562
48617
|
var import_get4 = __toESM(require_get(), 1);
|
|
48563
48618
|
import { useContext as useContext5, useState as useState26 } from "react";
|
|
48564
48619
|
import invariant from "invariant";
|
|
48565
|
-
import { useTranslations as
|
|
48620
|
+
import { useTranslations as useTranslations41 } from "next-intl";
|
|
48566
48621
|
import { filterDOMProps as filterDOMProps27, joinName as joinName10 } from "uniforms";
|
|
48567
48622
|
import { JSONSchemaBridge } from "uniforms-bridge-json-schema";
|
|
48568
48623
|
import { AutoField as AutoField6, AutoForm } from "uniforms-unstyled";
|
|
@@ -48577,7 +48632,7 @@ import { AutoField as AutoField5 } from "uniforms-unstyled";
|
|
|
48577
48632
|
|
|
48578
48633
|
// src/components/WfoForms/formFields/AcceptField.tsx
|
|
48579
48634
|
import { useReducer } from "react";
|
|
48580
|
-
import { useTranslations as
|
|
48635
|
+
import { useTranslations as useTranslations28 } from "next-intl";
|
|
48581
48636
|
import { connectField, filterDOMProps } from "uniforms";
|
|
48582
48637
|
import { EuiCheckbox, EuiFlexItem as EuiFlexItem12, EuiText as EuiText10 } from "@elastic/eui";
|
|
48583
48638
|
|
|
@@ -48631,7 +48686,7 @@ function Accept(_a) {
|
|
|
48631
48686
|
"errorMessage",
|
|
48632
48687
|
"data"
|
|
48633
48688
|
]);
|
|
48634
|
-
const t =
|
|
48689
|
+
const t = useTranslations28();
|
|
48635
48690
|
const { acceptFieldStyle } = useWithOrchestratorTheme(getStyles11);
|
|
48636
48691
|
const legacy = !data;
|
|
48637
48692
|
const i18nBaseKey = data ? `pydanticForms.backendTranslations.${name}_accept` : "pydanticForms.backendTranslations";
|
|
@@ -48972,7 +49027,7 @@ var LabelField = connectField5(Label, { kind: "leaf" });
|
|
|
48972
49027
|
|
|
48973
49028
|
// src/components/WfoForms/formFields/ListAddField.tsx
|
|
48974
49029
|
var import_cloneDeep = __toESM(require_cloneDeep(), 1);
|
|
48975
|
-
import { useTranslations as
|
|
49030
|
+
import { useTranslations as useTranslations29 } from "next-intl";
|
|
48976
49031
|
import { connectField as connectField6, filterDOMProps as filterDOMProps6, joinName, useField } from "uniforms";
|
|
48977
49032
|
import { EuiIcon as EuiIcon3, EuiText as EuiText12 } from "@elastic/eui";
|
|
48978
49033
|
import { jsx as jsx113, jsxs as jsxs70 } from "@emotion/react/jsx-runtime";
|
|
@@ -48993,7 +49048,7 @@ function ListAdd(_a) {
|
|
|
48993
49048
|
"outerList"
|
|
48994
49049
|
]);
|
|
48995
49050
|
const { theme } = useOrchestratorTheme();
|
|
48996
|
-
const t =
|
|
49051
|
+
const t = useTranslations29("pydanticForms.backendTranslations");
|
|
48997
49052
|
const nameParts = joinName(null, name);
|
|
48998
49053
|
const parentName = joinName(nameParts.slice(0, -1));
|
|
48999
49054
|
const parent = useField(parentName, { initialCount }, { absoluteName: true })[0];
|
|
@@ -49034,7 +49089,7 @@ var ListAddField = connectField6(ListAdd, {
|
|
|
49034
49089
|
});
|
|
49035
49090
|
|
|
49036
49091
|
// src/components/WfoForms/formFields/ListDelField.tsx
|
|
49037
|
-
import { useTranslations as
|
|
49092
|
+
import { useTranslations as useTranslations30 } from "next-intl";
|
|
49038
49093
|
import { connectField as connectField7, filterDOMProps as filterDOMProps7, joinName as joinName2, useField as useField2 } from "uniforms";
|
|
49039
49094
|
import { EuiIcon as EuiIcon4, EuiText as EuiText13 } from "@elastic/eui";
|
|
49040
49095
|
import { jsx as jsx114, jsxs as jsxs71 } from "@emotion/react/jsx-runtime";
|
|
@@ -49053,7 +49108,7 @@ function ListDel(_a) {
|
|
|
49053
49108
|
"outerList"
|
|
49054
49109
|
]);
|
|
49055
49110
|
const { theme } = useOrchestratorTheme();
|
|
49056
|
-
const t =
|
|
49111
|
+
const t = useTranslations30("pydanticForms.backendTranslations");
|
|
49057
49112
|
const nameParts = joinName2(null, name);
|
|
49058
49113
|
const nameIndex = +nameParts[nameParts.length - 1];
|
|
49059
49114
|
const parentName = joinName2(nameParts.slice(0, -1));
|
|
@@ -49303,7 +49358,7 @@ import { joinName as joinName5, useField as useField5, useForm as useForm4 } fro
|
|
|
49303
49358
|
// src/components/WfoForms/formFields/SelectField/SelectField.tsx
|
|
49304
49359
|
var import_lodash2 = __toESM(require_lodash(), 1);
|
|
49305
49360
|
import ReactSelect from "react-select";
|
|
49306
|
-
import { useTranslations as
|
|
49361
|
+
import { useTranslations as useTranslations31 } from "next-intl";
|
|
49307
49362
|
import { joinName as joinName4, useField as useField4, useForm as useForm3 } from "uniforms";
|
|
49308
49363
|
import { EuiFormRow as EuiFormRow5, EuiText as EuiText15 } from "@elastic/eui";
|
|
49309
49364
|
|
|
@@ -49380,7 +49435,7 @@ function UnconnectedSelectField(_a) {
|
|
|
49380
49435
|
"showInlineError",
|
|
49381
49436
|
"errorMessage"
|
|
49382
49437
|
]);
|
|
49383
|
-
const t =
|
|
49438
|
+
const t = useTranslations31("pydanticForms");
|
|
49384
49439
|
const nameArray = joinName4(null, name);
|
|
49385
49440
|
let parentName = joinName4(nameArray.slice(0, -1));
|
|
49386
49441
|
if (parentName === "") {
|
|
@@ -49931,7 +49986,7 @@ var DateField = connectField15(Date2, { kind: "leaf" });
|
|
|
49931
49986
|
|
|
49932
49987
|
// src/components/WfoForms/formFields/LocationCodeField.tsx
|
|
49933
49988
|
import { useEffect as useEffect8, useState as useState18 } from "react";
|
|
49934
|
-
import { useTranslations as
|
|
49989
|
+
import { useTranslations as useTranslations32 } from "next-intl";
|
|
49935
49990
|
import { connectField as connectField16, filterDOMProps as filterDOMProps16 } from "uniforms";
|
|
49936
49991
|
|
|
49937
49992
|
// src/rtk/endpoints/formFields.ts
|
|
@@ -50044,7 +50099,7 @@ import { jsx as jsx126 } from "@emotion/react/jsx-runtime";
|
|
|
50044
50099
|
filterDOMProps16.register("locationCodes");
|
|
50045
50100
|
function LocationCode(_a) {
|
|
50046
50101
|
var _b = _a, { locationCodes } = _b, props = __objRest(_b, ["locationCodes"]);
|
|
50047
|
-
const t =
|
|
50102
|
+
const t = useTranslations32("pydanticForms");
|
|
50048
50103
|
const [codes, setCodes] = useState18(locationCodes != null ? locationCodes : []);
|
|
50049
50104
|
const { data, error } = useLocationCodesQuery();
|
|
50050
50105
|
useEffect8(() => {
|
|
@@ -50226,7 +50281,7 @@ var ContactPersonAutocomplete = ({
|
|
|
50226
50281
|
var import_lodash5 = __toESM(require_lodash(), 1);
|
|
50227
50282
|
var import_get = __toESM(require_get(), 1);
|
|
50228
50283
|
import React27, { useEffect as useEffect10, useState as useState19 } from "react";
|
|
50229
|
-
import { useTranslations as
|
|
50284
|
+
import { useTranslations as useTranslations33 } from "next-intl";
|
|
50230
50285
|
import {
|
|
50231
50286
|
connectField as connectField17,
|
|
50232
50287
|
filterDOMProps as filterDOMProps17,
|
|
@@ -50286,7 +50341,7 @@ function ContactPersonName(_a) {
|
|
|
50286
50341
|
const { formFieldBaseStyle } = useWithOrchestratorTheme(
|
|
50287
50342
|
getFormFieldsBaseStyle
|
|
50288
50343
|
);
|
|
50289
|
-
const t =
|
|
50344
|
+
const t = useTranslations33("pydanticForms");
|
|
50290
50345
|
const { model, onChange: formOnChange, schema } = useForm6();
|
|
50291
50346
|
const contactsPersonFieldNameArray = joinName6(null, name).slice(0, -1);
|
|
50292
50347
|
const emailFieldName = joinName6(contactsPersonFieldNameArray, "email");
|
|
@@ -50426,7 +50481,7 @@ var ContactPersonNameField = connectField17(ContactPersonName, {
|
|
|
50426
50481
|
// src/components/WfoForms/formFields/deprecated/ImsNodeIdField.tsx
|
|
50427
50482
|
var import_lodash6 = __toESM(require_lodash(), 1);
|
|
50428
50483
|
import { useEffect as useEffect11, useState as useState20 } from "react";
|
|
50429
|
-
import { useTranslations as
|
|
50484
|
+
import { useTranslations as useTranslations34 } from "next-intl";
|
|
50430
50485
|
import { connectField as connectField18, filterDOMProps as filterDOMProps18 } from "uniforms";
|
|
50431
50486
|
import { jsx as jsx129 } from "@emotion/react/jsx-runtime";
|
|
50432
50487
|
filterDOMProps18.register("locationCode", "status", "unsubscribedOnly");
|
|
@@ -50445,7 +50500,7 @@ function ImsNodeId(_a) {
|
|
|
50445
50500
|
"unsubscribedOnly"
|
|
50446
50501
|
]);
|
|
50447
50502
|
var _a2;
|
|
50448
|
-
const t =
|
|
50503
|
+
const t = useTranslations34("pydanticForms");
|
|
50449
50504
|
const [nodes, setNodes] = useState20([]);
|
|
50450
50505
|
const { data, isLoading, error } = useImsNodesQuery(
|
|
50451
50506
|
{
|
|
@@ -50486,7 +50541,7 @@ var ImsNodeIdField = connectField18(ImsNodeId, { kind: "leaf" });
|
|
|
50486
50541
|
// src/components/WfoForms/formFields/deprecated/ImsPortIdField.tsx
|
|
50487
50542
|
import { useCallback as useCallback3, useEffect as useEffect12, useState as useState21 } from "react";
|
|
50488
50543
|
import ReactSelect2 from "react-select";
|
|
50489
|
-
import { useTranslations as
|
|
50544
|
+
import { useTranslations as useTranslations35 } from "next-intl";
|
|
50490
50545
|
import { connectField as connectField19, filterDOMProps as filterDOMProps19 } from "uniforms";
|
|
50491
50546
|
import { EuiFlexItem as EuiFlexItem16, EuiFormRow as EuiFormRow12, EuiText as EuiText22 } from "@elastic/eui";
|
|
50492
50547
|
|
|
@@ -50561,7 +50616,7 @@ function ImsPortId(_a) {
|
|
|
50561
50616
|
nodeSubscriptionId
|
|
50562
50617
|
);
|
|
50563
50618
|
const [ports, setPorts] = useState21([]);
|
|
50564
|
-
const t =
|
|
50619
|
+
const t = useTranslations35("pydanticForms");
|
|
50565
50620
|
const { reactSelectInnerComponentStyles } = useWithOrchestratorTheme(getSelectFieldStyles);
|
|
50566
50621
|
const {
|
|
50567
50622
|
data: freePorts,
|
|
@@ -50669,7 +50724,7 @@ var ImsPortIdField = connectField19(ImsPortId, { kind: "leaf" });
|
|
|
50669
50724
|
|
|
50670
50725
|
// src/components/WfoForms/formFields/deprecated/IpNetworkField.tsx
|
|
50671
50726
|
import { useState as useState24 } from "react";
|
|
50672
|
-
import { useTranslations as
|
|
50727
|
+
import { useTranslations as useTranslations36 } from "next-intl";
|
|
50673
50728
|
import { connectField as connectField20, filterDOMProps as filterDOMProps20 } from "uniforms";
|
|
50674
50729
|
import { EuiCallOut as EuiCallOut2, EuiFormRow as EuiFormRow14, EuiText as EuiText24 } from "@elastic/eui";
|
|
50675
50730
|
|
|
@@ -51178,7 +51233,7 @@ function IpNetwork(_a) {
|
|
|
51178
51233
|
]);
|
|
51179
51234
|
var _a2, _b2;
|
|
51180
51235
|
const { formRowStyle } = useWithOrchestratorTheme(getCommonFormFieldStyles);
|
|
51181
|
-
const t =
|
|
51236
|
+
const t = useTranslations36("pydanticForms");
|
|
51182
51237
|
const [selectedPrefix, setSelectedPrefix] = useState24(
|
|
51183
51238
|
void 0
|
|
51184
51239
|
);
|
|
@@ -51456,7 +51511,7 @@ var TimestampField = connectField21(Timestamp, { kind: "leaf" });
|
|
|
51456
51511
|
// src/components/WfoForms/formFields/deprecated/VlanField.tsx
|
|
51457
51512
|
var import_get2 = __toESM(require_get(), 1);
|
|
51458
51513
|
import { useEffect as useEffect15, useState as useState25 } from "react";
|
|
51459
|
-
import { useTranslations as
|
|
51514
|
+
import { useTranslations as useTranslations37 } from "next-intl";
|
|
51460
51515
|
import { connectField as connectField22, filterDOMProps as filterDOMProps22, joinName as joinName7, useForm as useForm7 } from "uniforms";
|
|
51461
51516
|
import { EuiFieldText as EuiFieldText4, EuiFormRow as EuiFormRow16, EuiText as EuiText26 } from "@elastic/eui";
|
|
51462
51517
|
|
|
@@ -51556,7 +51611,7 @@ function Vlan(_a) {
|
|
|
51556
51611
|
"subscriptionFieldName",
|
|
51557
51612
|
"nsiVlansOnly"
|
|
51558
51613
|
]);
|
|
51559
|
-
const t =
|
|
51614
|
+
const t = useTranslations37("pydanticForms");
|
|
51560
51615
|
const { model, schema } = useForm7();
|
|
51561
51616
|
const initialValue = schema.getInitialValue(name, {});
|
|
51562
51617
|
const nameArray = joinName7(null, name);
|
|
@@ -51748,7 +51803,7 @@ function Nest(_a) {
|
|
|
51748
51803
|
var NestField = connectField23(Nest);
|
|
51749
51804
|
|
|
51750
51805
|
// src/components/WfoForms/formFields/OptGroupField.tsx
|
|
51751
|
-
import { useTranslations as
|
|
51806
|
+
import { useTranslations as useTranslations38 } from "next-intl";
|
|
51752
51807
|
import { connectField as connectField24, filterDOMProps as filterDOMProps24, useField as useField7 } from "uniforms";
|
|
51753
51808
|
import { AutoField as AutoField4 } from "uniforms-unstyled";
|
|
51754
51809
|
import { EuiDescribedFormGroup as EuiDescribedFormGroup2, EuiFlexItem as EuiFlexItem20, EuiFormRow as EuiFormRow17 } from "@elastic/eui";
|
|
@@ -51768,7 +51823,7 @@ function OptGroup(_a) {
|
|
|
51768
51823
|
"readOnly",
|
|
51769
51824
|
"className"
|
|
51770
51825
|
]);
|
|
51771
|
-
const t =
|
|
51826
|
+
const t = useTranslations38("pydanticForms.backendTranslations");
|
|
51772
51827
|
const enabled = useField7("enabled", {})[0].value;
|
|
51773
51828
|
return /* @__PURE__ */ jsx137(
|
|
51774
51829
|
EuiDescribedFormGroup2,
|
|
@@ -51796,7 +51851,7 @@ var OptGroupField = connectField24(OptGroup);
|
|
|
51796
51851
|
// src/components/WfoForms/formFields/SubscriptionField.tsx
|
|
51797
51852
|
var import_get3 = __toESM(require_get(), 1);
|
|
51798
51853
|
import ReactSelect5 from "react-select";
|
|
51799
|
-
import { useTranslations as
|
|
51854
|
+
import { useTranslations as useTranslations39 } from "next-intl";
|
|
51800
51855
|
import {
|
|
51801
51856
|
connectField as connectField25,
|
|
51802
51857
|
filterDOMProps as filterDOMProps25,
|
|
@@ -51931,7 +51986,7 @@ function SubscriptionFieldDefinition(_a) {
|
|
|
51931
51986
|
"tags",
|
|
51932
51987
|
"statuses"
|
|
51933
51988
|
]);
|
|
51934
|
-
const t =
|
|
51989
|
+
const t = useTranslations39("pydanticForms");
|
|
51935
51990
|
const { reactSelectInnerComponentStyles } = useWithOrchestratorTheme(getSelectFieldStyles);
|
|
51936
51991
|
const { refetch, subscriptions, isFetching } = useGetSubscriptionDropdownOptions(tags, statuses);
|
|
51937
51992
|
const nameArray = joinName9(null, name);
|
|
@@ -52204,12 +52259,12 @@ function Summary(_a) {
|
|
|
52204
52259
|
var SummaryField = connectField26(Summary, { kind: "leaf" });
|
|
52205
52260
|
|
|
52206
52261
|
// src/components/WfoForms/formFields/CustomerField.tsx
|
|
52207
|
-
import { useTranslations as
|
|
52262
|
+
import { useTranslations as useTranslations40 } from "next-intl";
|
|
52208
52263
|
import { connectField as connectField27 } from "uniforms";
|
|
52209
52264
|
import { jsx as jsx140 } from "@emotion/react/jsx-runtime";
|
|
52210
52265
|
function Customer2(_a) {
|
|
52211
52266
|
var props = __objRest(_a, []);
|
|
52212
|
-
const t =
|
|
52267
|
+
const t = useTranslations40("pydanticForms");
|
|
52213
52268
|
const { data: customers, isLoading } = useGetCustomersQuery();
|
|
52214
52269
|
const uuidCustomerNameMap = /* @__PURE__ */ new Map();
|
|
52215
52270
|
if (!isLoading && customers) {
|
|
@@ -52641,7 +52696,7 @@ function WfoUserInputForm({
|
|
|
52641
52696
|
isResuming = false
|
|
52642
52697
|
}) {
|
|
52643
52698
|
var _a, _b, _c;
|
|
52644
|
-
const t =
|
|
52699
|
+
const t = useTranslations41("pydanticForms.userInputForm");
|
|
52645
52700
|
const { theme } = useOrchestratorTheme();
|
|
52646
52701
|
const { showConfirmDialog } = useContext5(ConfirmationDialogContext);
|
|
52647
52702
|
const [processing, setProcessing] = useState26(false);
|
|
@@ -52789,7 +52844,7 @@ function WfoUserInputForm({
|
|
|
52789
52844
|
prefilledForm,
|
|
52790
52845
|
() => {
|
|
52791
52846
|
},
|
|
52792
|
-
|
|
52847
|
+
useTranslations41()
|
|
52793
52848
|
);
|
|
52794
52849
|
const AutoFieldProvider = AutoField6.componentDetectorContext.Provider;
|
|
52795
52850
|
const buttonsFromSchema = ((_a = prefilledForm.properties) == null ? void 0 : _a.buttons) && ((_b = prefilledForm.properties) == null ? void 0 : _b.buttons) !== true && ((_c = prefilledForm.properties) == null ? void 0 : _c.buttons.default) || {
|
|
@@ -53010,10 +53065,10 @@ var WfoDateTime = ({ dateOrIsoString }) => {
|
|
|
53010
53065
|
};
|
|
53011
53066
|
|
|
53012
53067
|
// src/components/WfoAuth/WfoPageUnauthorized.tsx
|
|
53013
|
-
import { useTranslations as
|
|
53068
|
+
import { useTranslations as useTranslations42 } from "next-intl";
|
|
53014
53069
|
import { jsx as jsx146 } from "@emotion/react/jsx-runtime";
|
|
53015
53070
|
var WfoPageUnauthorized = () => {
|
|
53016
|
-
const t =
|
|
53071
|
+
const t = useTranslations42("common");
|
|
53017
53072
|
return /* @__PURE__ */ jsx146("p", { children: t("unauthorizedPage") });
|
|
53018
53073
|
};
|
|
53019
53074
|
|
|
@@ -53117,16 +53172,16 @@ var WfoDropdownButton = ({
|
|
|
53117
53172
|
};
|
|
53118
53173
|
|
|
53119
53174
|
// src/components/WfoProcessList/WfoProcessesList.tsx
|
|
53120
|
-
import { useTranslations as
|
|
53175
|
+
import { useTranslations as useTranslations61 } from "next-intl";
|
|
53121
53176
|
import Link9 from "next/link";
|
|
53122
53177
|
|
|
53123
53178
|
// src/pages/metadata/WfoProductBlocksPage.tsx
|
|
53124
53179
|
import { useEffect as useEffect18, useState as useState30 } from "react";
|
|
53125
|
-
import { useTranslations as
|
|
53180
|
+
import { useTranslations as useTranslations44 } from "next-intl";
|
|
53126
53181
|
import { EuiBadgeGroup as EuiBadgeGroup3 } from "@elastic/eui";
|
|
53127
53182
|
|
|
53128
53183
|
// src/pages/metadata/WfoMetadataPageLayout.tsx
|
|
53129
|
-
import { useTranslations as
|
|
53184
|
+
import { useTranslations as useTranslations43 } from "next-intl";
|
|
53130
53185
|
import { useRouter as useRouter7 } from "next/router";
|
|
53131
53186
|
import { EuiPageHeader, EuiSpacer as EuiSpacer14, EuiTab as EuiTab2, EuiTabs as EuiTabs2 } from "@elastic/eui";
|
|
53132
53187
|
import { Fragment as Fragment30, jsx as jsx151, jsxs as jsxs86 } from "@emotion/react/jsx-runtime";
|
|
@@ -53162,7 +53217,7 @@ var WfoMetadataPageLayout = ({
|
|
|
53162
53217
|
tabs = metaDataTabs
|
|
53163
53218
|
}) => {
|
|
53164
53219
|
const router = useRouter7();
|
|
53165
|
-
const t =
|
|
53220
|
+
const t = useTranslations43("metadata");
|
|
53166
53221
|
const currentPath = router.pathname;
|
|
53167
53222
|
return /* @__PURE__ */ jsxs86(Fragment30, { children: [
|
|
53168
53223
|
/* @__PURE__ */ jsx151(EuiSpacer14, {}),
|
|
@@ -53195,8 +53250,8 @@ var PRODUCT_BLOCK_FIELD_RESOURCE_TYPES = "resourceTypes";
|
|
|
53195
53250
|
var PRODUCT_BLOCK_FIELD_PRODUCT_BLOCKS = "dependsOn";
|
|
53196
53251
|
var WfoProductBlocksPage = () => {
|
|
53197
53252
|
var _a, _b, _c;
|
|
53198
|
-
const t =
|
|
53199
|
-
const tError =
|
|
53253
|
+
const t = useTranslations44("metadata.productBlocks");
|
|
53254
|
+
const tError = useTranslations44("errors");
|
|
53200
53255
|
const { showToastMessage } = useShowToastMessage();
|
|
53201
53256
|
const [tableDefaults, setTableDefaults] = useState30();
|
|
53202
53257
|
const getStoredTableConfig = useStoredTableConfig(
|
|
@@ -53372,7 +53427,7 @@ var WfoProductBlocksPage = () => {
|
|
|
53372
53427
|
|
|
53373
53428
|
// src/pages/metadata/WfoResourceTypesPage.tsx
|
|
53374
53429
|
import { useEffect as useEffect19, useState as useState31 } from "react";
|
|
53375
|
-
import { useTranslations as
|
|
53430
|
+
import { useTranslations as useTranslations45 } from "next-intl";
|
|
53376
53431
|
import { EuiBadgeGroup as EuiBadgeGroup4 } from "@elastic/eui";
|
|
53377
53432
|
import { Fragment as Fragment32, jsx as jsx153 } from "@emotion/react/jsx-runtime";
|
|
53378
53433
|
var RESOURCE_TYPE_FIELD_ID = "resourceTypeId";
|
|
@@ -53381,8 +53436,8 @@ var RESOURCE_TYPE_FIELD_DESCRIPTION = "description";
|
|
|
53381
53436
|
var RESOURCE_TYPE_FIELD_PRODUCT_BLOCKS = "productBlocks";
|
|
53382
53437
|
var WfoResourceTypesPage = () => {
|
|
53383
53438
|
var _a, _b;
|
|
53384
|
-
const t =
|
|
53385
|
-
const tError =
|
|
53439
|
+
const t = useTranslations45("metadata.resourceTypes");
|
|
53440
|
+
const tError = useTranslations45("errors");
|
|
53386
53441
|
const { showToastMessage } = useShowToastMessage();
|
|
53387
53442
|
const [tableDefaults, setTableDefaults] = useState31();
|
|
53388
53443
|
const getStoredTableConfig = useStoredTableConfig(
|
|
@@ -53519,7 +53574,7 @@ var WfoResourceTypesPage = () => {
|
|
|
53519
53574
|
|
|
53520
53575
|
// src/pages/metadata/WfoProductsPage.tsx
|
|
53521
53576
|
import { useEffect as useEffect20, useState as useState32 } from "react";
|
|
53522
|
-
import { useTranslations as
|
|
53577
|
+
import { useTranslations as useTranslations46 } from "next-intl";
|
|
53523
53578
|
import { Fragment as Fragment33, jsx as jsx154 } from "@emotion/react/jsx-runtime";
|
|
53524
53579
|
var PRODUCT_FIELD_PRODUCT_ID = "productId";
|
|
53525
53580
|
var PRODUCT_FIELD_NAME = "name";
|
|
@@ -53532,8 +53587,8 @@ var PRODUCT_FIELD_FIXED_INPUTS = "fixedInputs";
|
|
|
53532
53587
|
var PRODUCT_FIELD_CREATED_AT = "createdAt";
|
|
53533
53588
|
var WfoProductsPage = () => {
|
|
53534
53589
|
var _a, _b, _c, _d;
|
|
53535
|
-
const t =
|
|
53536
|
-
const tError =
|
|
53590
|
+
const t = useTranslations46("metadata.products");
|
|
53591
|
+
const tError = useTranslations46("errors");
|
|
53537
53592
|
const { showToastMessage } = useShowToastMessage();
|
|
53538
53593
|
const [tableDefaults, setTableDefaults] = useState32();
|
|
53539
53594
|
const getStoredTableConfig = useStoredTableConfig(
|
|
@@ -53717,7 +53772,7 @@ var WfoProductsPage = () => {
|
|
|
53717
53772
|
|
|
53718
53773
|
// src/pages/metadata/WfoWorkflowsPage.tsx
|
|
53719
53774
|
import { useEffect as useEffect21, useState as useState33 } from "react";
|
|
53720
|
-
import { useTranslations as
|
|
53775
|
+
import { useTranslations as useTranslations47 } from "next-intl";
|
|
53721
53776
|
import { EuiBadgeGroup as EuiBadgeGroup5 } from "@elastic/eui";
|
|
53722
53777
|
|
|
53723
53778
|
// src/pages/metadata/workflowListObjectMapper.ts
|
|
@@ -53752,8 +53807,8 @@ var graphQlWorkflowListMapper = ({
|
|
|
53752
53807
|
import { Fragment as Fragment34, jsx as jsx155 } from "@emotion/react/jsx-runtime";
|
|
53753
53808
|
var WfoWorkflowsPage = () => {
|
|
53754
53809
|
var _a, _b;
|
|
53755
|
-
const t =
|
|
53756
|
-
const tError =
|
|
53810
|
+
const t = useTranslations47("metadata.workflows");
|
|
53811
|
+
const tError = useTranslations47("errors");
|
|
53757
53812
|
const { showToastMessage } = useShowToastMessage();
|
|
53758
53813
|
const [tableDefaults, setTableDefaults] = useState33();
|
|
53759
53814
|
const getStoredTableConfig = useStoredTableConfig(
|
|
@@ -53904,7 +53959,7 @@ var WfoWorkflowsPage = () => {
|
|
|
53904
53959
|
|
|
53905
53960
|
// src/pages/metadata/WfoTasksPage.tsx
|
|
53906
53961
|
import { useEffect as useEffect22, useState as useState34 } from "react";
|
|
53907
|
-
import { useTranslations as
|
|
53962
|
+
import { useTranslations as useTranslations48 } from "next-intl";
|
|
53908
53963
|
import { EuiBadgeGroup as EuiBadgeGroup6 } from "@elastic/eui";
|
|
53909
53964
|
|
|
53910
53965
|
// src/pages/metadata/taskListObjectMapper.ts
|
|
@@ -53939,8 +53994,8 @@ var graphQlTaskListMapper = ({
|
|
|
53939
53994
|
import { Fragment as Fragment35, jsx as jsx156 } from "@emotion/react/jsx-runtime";
|
|
53940
53995
|
var WfoTasksPage = () => {
|
|
53941
53996
|
var _a, _b;
|
|
53942
|
-
const t =
|
|
53943
|
-
const tError =
|
|
53997
|
+
const t = useTranslations48("metadata.tasks");
|
|
53998
|
+
const tError = useTranslations48("errors");
|
|
53944
53999
|
const { showToastMessage } = useShowToastMessage();
|
|
53945
54000
|
const [tableDefaults, setTableDefaults] = useState34();
|
|
53946
54001
|
const getStoredTableConfig = useStoredTableConfig(
|
|
@@ -54136,7 +54191,7 @@ var WfoProcessListSubscriptionsCell = ({
|
|
|
54136
54191
|
};
|
|
54137
54192
|
|
|
54138
54193
|
// src/pages/processes/WfoProcessDetailPage.tsx
|
|
54139
|
-
import {
|
|
54194
|
+
import { useRef as useRef6 } from "react";
|
|
54140
54195
|
|
|
54141
54196
|
// src/rtk/endpoints/processDetail.ts
|
|
54142
54197
|
import { signOut as signOut3 } from "next-auth/react";
|
|
@@ -54195,6 +54250,17 @@ var processDetailApi = orchestratorApi.injectEndpoints({
|
|
|
54195
54250
|
return {
|
|
54196
54251
|
processes
|
|
54197
54252
|
};
|
|
54253
|
+
},
|
|
54254
|
+
providesTags: (result, error, queryArguments) => {
|
|
54255
|
+
if (!error && result) {
|
|
54256
|
+
return [
|
|
54257
|
+
{
|
|
54258
|
+
type: "processes" /* processes */,
|
|
54259
|
+
id: queryArguments.processId
|
|
54260
|
+
}
|
|
54261
|
+
];
|
|
54262
|
+
}
|
|
54263
|
+
return [];
|
|
54198
54264
|
}
|
|
54199
54265
|
}),
|
|
54200
54266
|
getRawProcessDetail: builder.query({
|
|
@@ -54218,7 +54284,7 @@ var processDetailApi = orchestratorApi.injectEndpoints({
|
|
|
54218
54284
|
extraOptions: {
|
|
54219
54285
|
baseQueryType: "fetch" /* fetch */
|
|
54220
54286
|
},
|
|
54221
|
-
invalidatesTags: ["
|
|
54287
|
+
invalidatesTags: ["processes" /* processes */]
|
|
54222
54288
|
}),
|
|
54223
54289
|
retryProcess: builder.mutation({
|
|
54224
54290
|
query: ({ processId }) => ({
|
|
@@ -54233,7 +54299,7 @@ var processDetailApi = orchestratorApi.injectEndpoints({
|
|
|
54233
54299
|
extraOptions: {
|
|
54234
54300
|
baseQueryType: "fetch" /* fetch */
|
|
54235
54301
|
},
|
|
54236
|
-
invalidatesTags: ["
|
|
54302
|
+
invalidatesTags: ["processes" /* processes */]
|
|
54237
54303
|
}),
|
|
54238
54304
|
deleteProcess: builder.mutation({
|
|
54239
54305
|
query: ({ processId }) => ({
|
|
@@ -54244,7 +54310,7 @@ var processDetailApi = orchestratorApi.injectEndpoints({
|
|
|
54244
54310
|
extraOptions: {
|
|
54245
54311
|
baseQueryType: "fetch" /* fetch */
|
|
54246
54312
|
},
|
|
54247
|
-
invalidatesTags: ["
|
|
54313
|
+
invalidatesTags: ["processes" /* processes */]
|
|
54248
54314
|
}),
|
|
54249
54315
|
abortProcess: builder.mutation({
|
|
54250
54316
|
query: ({ processId }) => ({
|
|
@@ -54255,7 +54321,7 @@ var processDetailApi = orchestratorApi.injectEndpoints({
|
|
|
54255
54321
|
extraOptions: {
|
|
54256
54322
|
baseQueryType: "fetch" /* fetch */
|
|
54257
54323
|
},
|
|
54258
|
-
invalidatesTags: ["
|
|
54324
|
+
invalidatesTags: ["processes" /* processes */]
|
|
54259
54325
|
})
|
|
54260
54326
|
})
|
|
54261
54327
|
});
|
|
@@ -54268,1403 +54334,1386 @@ var {
|
|
|
54268
54334
|
useAbortProcessMutation
|
|
54269
54335
|
} = processDetailApi;
|
|
54270
54336
|
|
|
54271
|
-
// src/
|
|
54272
|
-
import
|
|
54273
|
-
import { useTranslations as
|
|
54274
|
-
import {
|
|
54275
|
-
|
|
54276
|
-
|
|
54277
|
-
|
|
54337
|
+
// src/pages/processes/WfoProcessDetail.tsx
|
|
54338
|
+
import { useContext as useContext7 } from "react";
|
|
54339
|
+
import { useTranslations as useTranslations49 } from "next-intl";
|
|
54340
|
+
import { useRouter as useRouter8 } from "next/router";
|
|
54341
|
+
import {
|
|
54342
|
+
EuiButton as EuiButton11,
|
|
54343
|
+
EuiFlexGroup as EuiFlexGroup17,
|
|
54344
|
+
EuiFlexItem as EuiFlexItem23,
|
|
54345
|
+
EuiPageHeader as EuiPageHeader2,
|
|
54346
|
+
EuiPanel as EuiPanel4,
|
|
54347
|
+
EuiSpacer as EuiSpacer15,
|
|
54348
|
+
EuiText as EuiText30
|
|
54349
|
+
} from "@elastic/eui";
|
|
54278
54350
|
|
|
54279
|
-
// src/
|
|
54280
|
-
|
|
54281
|
-
var
|
|
54282
|
-
|
|
54283
|
-
|
|
54284
|
-
|
|
54285
|
-
|
|
54286
|
-
|
|
54287
|
-
|
|
54288
|
-
|
|
54289
|
-
|
|
54290
|
-
|
|
54291
|
-
|
|
54292
|
-
|
|
54293
|
-
|
|
54294
|
-
|
|
54295
|
-
|
|
54296
|
-
|
|
54297
|
-
|
|
54298
|
-
|
|
54299
|
-
|
|
54300
|
-
|
|
54301
|
-
|
|
54302
|
-
|
|
54303
|
-
|
|
54304
|
-
|
|
54305
|
-
|
|
54306
|
-
|
|
54307
|
-
|
|
54308
|
-
|
|
54309
|
-
|
|
54310
|
-
|
|
54311
|
-
|
|
54312
|
-
|
|
54313
|
-
const stepListOptionsContainerStyle = css27({
|
|
54314
|
-
flexGrow: 0
|
|
54315
|
-
});
|
|
54316
|
-
const stepStateIcon = {
|
|
54317
|
-
height: "40px",
|
|
54318
|
-
width: "40px",
|
|
54319
|
-
alignItems: "center",
|
|
54320
|
-
display: "flex",
|
|
54321
|
-
justifyContent: "center",
|
|
54322
|
-
borderRadius: "24px"
|
|
54323
|
-
};
|
|
54324
|
-
const stepDurationStyle = {
|
|
54325
|
-
fontSize: theme.size.m,
|
|
54326
|
-
color: theme.colors.disabled,
|
|
54327
|
-
fontWeight: theme.font.weight.semiBold
|
|
54328
|
-
};
|
|
54329
|
-
const stepStateSuccessIconStyle = css27(__spreadProps(__spreadValues({}, stepStateIcon), {
|
|
54330
|
-
backgroundColor: toSecondaryColor(theme.colors.primary)
|
|
54331
|
-
}));
|
|
54332
|
-
const stepStateSuspendIconStyle = css27(__spreadProps(__spreadValues({}, stepStateIcon), {
|
|
54333
|
-
backgroundColor: toSecondaryColor(theme.colors.warning)
|
|
54334
|
-
}));
|
|
54335
|
-
const stepStatePendingIconStyle = css27(__spreadProps(__spreadValues({}, stepStateIcon), {
|
|
54336
|
-
backgroundColor: toSecondaryColor(theme.colors.darkShade)
|
|
54337
|
-
}));
|
|
54338
|
-
const stepStateFailedIconStyle = css27(__spreadProps(__spreadValues({}, stepStateIcon), {
|
|
54339
|
-
backgroundColor: toSecondaryColor(theme.colors.danger)
|
|
54340
|
-
}));
|
|
54341
|
-
const stepHeaderRightStyle = css27({
|
|
54342
|
-
alignItems: "center"
|
|
54343
|
-
});
|
|
54344
|
-
const stepEmailContainerStyle = css27({
|
|
54345
|
-
paddingLeft: 24,
|
|
54346
|
-
width: 600,
|
|
54347
|
-
marginTop: 0
|
|
54348
|
-
});
|
|
54349
|
-
const getStepHeaderStyle = (isClickable) => css27({
|
|
54350
|
-
gap: 0,
|
|
54351
|
-
alignItems: "center",
|
|
54352
|
-
cursor: isClickable ? "pointer" : "default"
|
|
54353
|
-
});
|
|
54354
|
-
const getStepToggleExpandStyle = (isVisible) => css27({
|
|
54355
|
-
marginRight: theme.base / 2,
|
|
54356
|
-
visibility: isVisible ? "visible" : "hidden"
|
|
54357
|
-
});
|
|
54358
|
-
return {
|
|
54359
|
-
stepDurationStyle,
|
|
54360
|
-
stepEmailContainerStyle,
|
|
54361
|
-
stepHeaderRightStyle,
|
|
54362
|
-
stepListContentAnchorStyle,
|
|
54363
|
-
stepListContentBoldTextStyle,
|
|
54364
|
-
stepListContentStyle,
|
|
54365
|
-
stepListHeaderStyle,
|
|
54366
|
-
stepListOptionsContainerStyle,
|
|
54367
|
-
stepRowStyle,
|
|
54368
|
-
stepSpacerStyle,
|
|
54369
|
-
stepStateFailedIconStyle,
|
|
54370
|
-
stepStatePendingIconStyle,
|
|
54371
|
-
stepStateSuccessIconStyle,
|
|
54372
|
-
stepStateSuspendIconStyle,
|
|
54373
|
-
getStepHeaderStyle,
|
|
54374
|
-
getStepToggleExpandStyle
|
|
54351
|
+
// src/pages/processes/timelineUtils.ts
|
|
54352
|
+
var getMostAccurateTimelineStatus = (statusPreviousStep, statusCurrentStep) => statusCurrentStep !== "pending" /* PENDING */ ? statusCurrentStep : statusPreviousStep;
|
|
54353
|
+
var isNonRetryableState = (status) => {
|
|
54354
|
+
return status === "complete" /* COMPLETE */ || status === "success" /* SUCCESS */ || status === "skipped" /* SKIPPED */;
|
|
54355
|
+
};
|
|
54356
|
+
var isFailedStep = (step) => step.status === "failed" /* FAILED */;
|
|
54357
|
+
var stepsShouldBeMerged = (previousStep, currentStep) => !isNonRetryableState(previousStep.status) && previousStep.name === currentStep.name;
|
|
54358
|
+
var convertStepsToGroupedSteps = (steps) => steps.reduce(
|
|
54359
|
+
(previousGroupedSteps, currentStep, index, allSteps) => {
|
|
54360
|
+
const previousGroupedStep = previousGroupedSteps.slice(-1)[0];
|
|
54361
|
+
if (index > 0 && stepsShouldBeMerged(allSteps[index - 1], currentStep)) {
|
|
54362
|
+
const allGroupedStepsExceptLast = previousGroupedSteps.slice(
|
|
54363
|
+
0,
|
|
54364
|
+
-1
|
|
54365
|
+
);
|
|
54366
|
+
const updatedLastGroupedStep = {
|
|
54367
|
+
steps: [...previousGroupedStep.steps, currentStep]
|
|
54368
|
+
};
|
|
54369
|
+
return [...allGroupedStepsExceptLast, updatedLastGroupedStep];
|
|
54370
|
+
}
|
|
54371
|
+
return [
|
|
54372
|
+
...previousGroupedSteps,
|
|
54373
|
+
{
|
|
54374
|
+
steps: [currentStep]
|
|
54375
|
+
}
|
|
54376
|
+
];
|
|
54377
|
+
},
|
|
54378
|
+
[]
|
|
54379
|
+
);
|
|
54380
|
+
var mapStepToTimelineItem = (processDetailStep) => {
|
|
54381
|
+
return {
|
|
54382
|
+
id: processDetailStep.stepId,
|
|
54383
|
+
processStepStatus: processDetailStep.status,
|
|
54384
|
+
stepDetail: processDetailStep.name
|
|
54375
54385
|
};
|
|
54376
54386
|
};
|
|
54377
|
-
|
|
54378
|
-
|
|
54379
|
-
|
|
54380
|
-
var SubIcon = ({ stepStatus, color = "" }) => {
|
|
54381
|
-
switch (stepStatus) {
|
|
54382
|
-
case "suspend" /* SUSPEND */:
|
|
54383
|
-
return /* @__PURE__ */ jsx158(WfoMinusCircleFill, { color });
|
|
54384
|
-
case "failed" /* FAILED */:
|
|
54385
|
-
return /* @__PURE__ */ jsx158(WfoXCircleFill, { color });
|
|
54386
|
-
default:
|
|
54387
|
-
return /* @__PURE__ */ jsx158(WfoCheckmarkCircleFill, { color });
|
|
54387
|
+
var mapGroupedStepToTimelineItem = (groupedStep) => {
|
|
54388
|
+
if (groupedStep.steps.length === 1) {
|
|
54389
|
+
return mapStepToTimelineItem(groupedStep.steps[0]);
|
|
54388
54390
|
}
|
|
54391
|
+
return groupedStep.steps.reduce(
|
|
54392
|
+
(previousTimelineItem, currentStep) => {
|
|
54393
|
+
var _a;
|
|
54394
|
+
return __spreadProps(__spreadValues({}, previousTimelineItem), {
|
|
54395
|
+
id: (_a = currentStep.stepId) != null ? _a : previousTimelineItem.id,
|
|
54396
|
+
processStepStatus: getMostAccurateTimelineStatus(
|
|
54397
|
+
previousTimelineItem.processStepStatus,
|
|
54398
|
+
currentStep.status
|
|
54399
|
+
)
|
|
54400
|
+
});
|
|
54401
|
+
},
|
|
54402
|
+
__spreadProps(__spreadValues({}, mapStepToTimelineItem(groupedStep.steps[0])), {
|
|
54403
|
+
value: groupedStep.steps.filter(isFailedStep).length || void 0
|
|
54404
|
+
})
|
|
54405
|
+
);
|
|
54389
54406
|
};
|
|
54390
|
-
var
|
|
54391
|
-
|
|
54392
|
-
|
|
54407
|
+
var mapGroupedStepsToTimelineItems = (groupedSteps) => groupedSteps.map(mapGroupedStepToTimelineItem);
|
|
54408
|
+
var getIndexOfCurrentStep = (timelineItems) => {
|
|
54409
|
+
const reversedTimelineItems = [...timelineItems].reverse();
|
|
54410
|
+
const reversedIndexOfCurrentStep = reversedTimelineItems.findIndex(
|
|
54411
|
+
(timelineItem) => timelineItem.processStepStatus === "running" /* RUNNING */
|
|
54412
|
+
);
|
|
54413
|
+
if (reversedIndexOfCurrentStep !== -1) {
|
|
54414
|
+
return timelineItems.length - reversedIndexOfCurrentStep - 1;
|
|
54393
54415
|
}
|
|
54394
|
-
|
|
54395
|
-
|
|
54396
|
-
|
|
54397
|
-
|
|
54398
|
-
|
|
54416
|
+
const indexOfFirstPending = timelineItems.findIndex(
|
|
54417
|
+
(timelineItem) => timelineItem.processStepStatus === "pending" /* PENDING */
|
|
54418
|
+
);
|
|
54419
|
+
if (indexOfFirstPending !== -1) {
|
|
54420
|
+
return indexOfFirstPending - 1;
|
|
54399
54421
|
}
|
|
54422
|
+
return timelineItems.length - 1;
|
|
54400
54423
|
};
|
|
54401
|
-
|
|
54402
|
-
|
|
54403
|
-
|
|
54424
|
+
|
|
54425
|
+
// src/pages/processes/WfoProcessDetail.tsx
|
|
54426
|
+
import { Fragment as Fragment37, jsx as jsx158, jsxs as jsxs88 } from "@emotion/react/jsx-runtime";
|
|
54427
|
+
var ProcessHeaderValue = ({
|
|
54428
|
+
translationKey,
|
|
54429
|
+
value = ""
|
|
54404
54430
|
}) => {
|
|
54431
|
+
const t = useTranslations49("processes.detail");
|
|
54405
54432
|
const { theme } = useOrchestratorTheme();
|
|
54406
|
-
|
|
54407
|
-
|
|
54408
|
-
|
|
54409
|
-
|
|
54410
|
-
|
|
54411
|
-
|
|
54412
|
-
|
|
54413
|
-
|
|
54414
|
-
|
|
54415
|
-
|
|
54416
|
-
|
|
54417
|
-
|
|
54418
|
-
|
|
54419
|
-
|
|
54420
|
-
|
|
54421
|
-
|
|
54422
|
-
|
|
54423
|
-
|
|
54424
|
-
|
|
54425
|
-
|
|
54426
|
-
|
|
54427
|
-
|
|
54428
|
-
|
|
54429
|
-
|
|
54430
|
-
|
|
54431
|
-
theme.colors.dangerText,
|
|
54432
|
-
true,
|
|
54433
|
-
theme.colors.dangerText
|
|
54434
|
-
];
|
|
54435
|
-
case "skipped" /* SKIPPED */:
|
|
54436
|
-
return [
|
|
54437
|
-
stepStateSuccessIconStyle,
|
|
54438
|
-
theme.colors.primaryText,
|
|
54439
|
-
true,
|
|
54440
|
-
theme.colors.darkShade
|
|
54441
|
-
];
|
|
54442
|
-
case "form" /* FORM */:
|
|
54443
|
-
return [stepStateSuccessIconStyle, theme.colors.link];
|
|
54444
|
-
default:
|
|
54445
|
-
return [
|
|
54446
|
-
stepStateSuccessIconStyle,
|
|
54447
|
-
theme.colors.primaryText,
|
|
54448
|
-
true,
|
|
54449
|
-
theme.colors.successText
|
|
54450
|
-
];
|
|
54433
|
+
return /* @__PURE__ */ jsxs88(
|
|
54434
|
+
EuiFlexGroup17,
|
|
54435
|
+
{
|
|
54436
|
+
direction: "column",
|
|
54437
|
+
gutterSize: "xs",
|
|
54438
|
+
css: {
|
|
54439
|
+
flex: 1,
|
|
54440
|
+
whiteSpace: "nowrap",
|
|
54441
|
+
overflow: "hidden"
|
|
54442
|
+
},
|
|
54443
|
+
children: [
|
|
54444
|
+
/* @__PURE__ */ jsx158(EuiText30, { size: "xs", children: t(translationKey) }),
|
|
54445
|
+
/* @__PURE__ */ jsx158(
|
|
54446
|
+
EuiText30,
|
|
54447
|
+
{
|
|
54448
|
+
css: {
|
|
54449
|
+
fontWeight: theme.font.weight.bold,
|
|
54450
|
+
fontSize: theme.size.m,
|
|
54451
|
+
overflow: "hidden",
|
|
54452
|
+
textOverflow: "ellipsis"
|
|
54453
|
+
},
|
|
54454
|
+
children: value
|
|
54455
|
+
}
|
|
54456
|
+
)
|
|
54457
|
+
]
|
|
54451
54458
|
}
|
|
54452
|
-
})();
|
|
54453
|
-
return /* @__PURE__ */ jsxs88(EuiFlexItem23, { css: { flexDirection: "row" }, grow: 0, children: [
|
|
54454
|
-
/* @__PURE__ */ jsx158("div", { css: stepStateStyle, children: /* @__PURE__ */ jsx158(
|
|
54455
|
-
MainIcon,
|
|
54456
|
-
{
|
|
54457
|
-
color: mainIconColor,
|
|
54458
|
-
stepStatus,
|
|
54459
|
-
isStartStep
|
|
54460
|
-
}
|
|
54461
|
-
) }),
|
|
54462
|
-
/* @__PURE__ */ jsx158(
|
|
54463
|
-
"div",
|
|
54464
|
-
{
|
|
54465
|
-
css: {
|
|
54466
|
-
transform: "translate(-16px, -8px)",
|
|
54467
|
-
width: `${theme.base}`,
|
|
54468
|
-
visibility: hasSubIcon ? "visible" : "hidden"
|
|
54469
|
-
},
|
|
54470
|
-
children: /* @__PURE__ */ jsx158(SubIcon, { color: subIconColor, stepStatus })
|
|
54471
|
-
}
|
|
54472
|
-
)
|
|
54473
|
-
] });
|
|
54474
|
-
};
|
|
54475
|
-
|
|
54476
|
-
// src/components/WfoWorkflowSteps/stepListUtils.ts
|
|
54477
|
-
var STEP_STATE_HIDDEN_KEYS = [
|
|
54478
|
-
"label_",
|
|
54479
|
-
"divider_",
|
|
54480
|
-
"__",
|
|
54481
|
-
"confirmation_mail"
|
|
54482
|
-
];
|
|
54483
|
-
var getStepContent = (stepDelta, showHiddenKeys) => {
|
|
54484
|
-
if (showHiddenKeys) {
|
|
54485
|
-
return stepDelta;
|
|
54486
|
-
}
|
|
54487
|
-
return Object.entries(stepDelta).filter(
|
|
54488
|
-
([key]) => !STEP_STATE_HIDDEN_KEYS.some((word) => key.startsWith(word))
|
|
54489
|
-
).reduce(
|
|
54490
|
-
(previousValue, currentValue) => __spreadProps(__spreadValues({}, previousValue), {
|
|
54491
|
-
[currentValue[0]]: currentValue[1]
|
|
54492
|
-
}),
|
|
54493
|
-
{}
|
|
54494
54459
|
);
|
|
54495
54460
|
};
|
|
54496
|
-
|
|
54497
|
-
|
|
54498
|
-
|
|
54499
|
-
|
|
54500
|
-
|
|
54501
|
-
|
|
54502
|
-
|
|
54503
|
-
|
|
54504
|
-
|
|
54461
|
+
var WfoProcessDetail = ({
|
|
54462
|
+
children,
|
|
54463
|
+
processDetail,
|
|
54464
|
+
pageTitle,
|
|
54465
|
+
productNames,
|
|
54466
|
+
buttonsAreDisabled,
|
|
54467
|
+
timelineItems,
|
|
54468
|
+
onTimelineItemClick,
|
|
54469
|
+
isLoading = false,
|
|
54470
|
+
hasError = false
|
|
54505
54471
|
}) => {
|
|
54506
|
-
|
|
54472
|
+
var _a, _b, _c;
|
|
54473
|
+
const t = useTranslations49("processes.detail");
|
|
54507
54474
|
const { theme } = useOrchestratorTheme();
|
|
54508
|
-
const
|
|
54509
|
-
const
|
|
54510
|
-
|
|
54511
|
-
|
|
54475
|
+
const { showConfirmDialog } = useContext7(ConfirmationDialogContext);
|
|
54476
|
+
const [retryProcess] = useRetryProcessMutation();
|
|
54477
|
+
const [deleteProcess] = useDeleteProcessMutation();
|
|
54478
|
+
const [abortProcess] = useAbortProcessMutation();
|
|
54479
|
+
const router = useRouter8();
|
|
54480
|
+
const { isEngineRunningNow } = useCheckEngineStatus();
|
|
54481
|
+
const { isAllowed } = usePolicy();
|
|
54482
|
+
const listIncludesStatus = (processStatusesForDisabledState, status) => status ? processStatusesForDisabledState.map((stat) => stat.toUpperCase()).includes(status) : false;
|
|
54483
|
+
const retryButtonIsDisabled = buttonsAreDisabled || !listIncludesStatus(
|
|
54484
|
+
[
|
|
54485
|
+
"failed" /* FAILED */,
|
|
54486
|
+
"api_unavailable" /* API_UNAVAILABLE */,
|
|
54487
|
+
"inconsistent_data" /* INCONSISTENT_DATA */,
|
|
54488
|
+
"waiting" /* WAITING */
|
|
54489
|
+
],
|
|
54490
|
+
processDetail == null ? void 0 : processDetail.lastStatus
|
|
54491
|
+
);
|
|
54492
|
+
const abortButtonIsDisabled = buttonsAreDisabled || listIncludesStatus(
|
|
54493
|
+
["completed" /* COMPLETED */, "aborted" /* ABORTED */],
|
|
54494
|
+
processDetail == null ? void 0 : processDetail.lastStatus
|
|
54495
|
+
);
|
|
54496
|
+
const deleteButtonIsDisabled = buttonsAreDisabled || listIncludesStatus(["running" /* RUNNING */], processDetail == null ? void 0 : processDetail.lastStatus);
|
|
54497
|
+
const processIsTask = (processDetail == null ? void 0 : processDetail.isTask) === true;
|
|
54498
|
+
const handleActionButtonClick = (action) => () => __async(void 0, null, function* () {
|
|
54499
|
+
if (yield isEngineRunningNow()) {
|
|
54500
|
+
action();
|
|
54512
54501
|
}
|
|
54513
|
-
|
|
54514
|
-
|
|
54515
|
-
|
|
54502
|
+
});
|
|
54503
|
+
const retryAction = () => showConfirmDialog({
|
|
54504
|
+
question: t(
|
|
54505
|
+
processIsTask ? "retryTaskQuestion" : "retryWorkflowQuestion",
|
|
54506
|
+
{
|
|
54507
|
+
workflowName: processDetail == null ? void 0 : processDetail.workflowName
|
|
54516
54508
|
}
|
|
54517
|
-
)
|
|
54518
|
-
|
|
54519
|
-
|
|
54520
|
-
UserInputFormWizard,
|
|
54521
|
-
{
|
|
54522
|
-
stepUserInput: userInputForm,
|
|
54523
|
-
stepSubmit: submitForm,
|
|
54524
|
-
hasNext: false,
|
|
54525
|
-
isTask,
|
|
54526
|
-
isResuming: true
|
|
54509
|
+
),
|
|
54510
|
+
confirmAction: () => {
|
|
54511
|
+
(processDetail == null ? void 0 : processDetail.processId) && retryProcess({ processId: processDetail.processId });
|
|
54527
54512
|
}
|
|
54528
|
-
|
|
54529
|
-
|
|
54530
|
-
|
|
54531
|
-
|
|
54532
|
-
|
|
54533
|
-
|
|
54534
|
-
({
|
|
54535
|
-
stepListItem,
|
|
54536
|
-
onToggleStepDetail,
|
|
54537
|
-
startedAt,
|
|
54538
|
-
showHiddenKeys,
|
|
54539
|
-
isStartStep = false,
|
|
54540
|
-
isTask,
|
|
54541
|
-
processId
|
|
54542
|
-
}, ref) => {
|
|
54543
|
-
var _a;
|
|
54544
|
-
const { isExpanded, step, userInputForm } = stepListItem;
|
|
54545
|
-
const { theme } = useOrchestratorTheme();
|
|
54546
|
-
const {
|
|
54547
|
-
stepEmailContainerStyle,
|
|
54548
|
-
getStepHeaderStyle,
|
|
54549
|
-
stepHeaderRightStyle,
|
|
54550
|
-
stepListContentBoldTextStyle,
|
|
54551
|
-
stepDurationStyle,
|
|
54552
|
-
stepRowStyle,
|
|
54553
|
-
getStepToggleExpandStyle
|
|
54554
|
-
} = useWithOrchestratorTheme(getStyles14);
|
|
54555
|
-
const t = useTranslations47("processes.steps");
|
|
54556
|
-
const hasHtmlMail = (_a = step.stateDelta) == null ? void 0 : _a.hasOwnProperty("confirmation_mail");
|
|
54557
|
-
const stepContent = step.stateDelta ? getStepContent(step.stateDelta, showHiddenKeys) : {};
|
|
54558
|
-
const hasStepContent = hasHtmlMail || Object.keys(stepContent).length > 0;
|
|
54559
|
-
const displayMailConfirmation = (value) => {
|
|
54560
|
-
if (!value) {
|
|
54561
|
-
return "";
|
|
54513
|
+
});
|
|
54514
|
+
const abortAction = () => showConfirmDialog({
|
|
54515
|
+
question: t(
|
|
54516
|
+
processIsTask ? "abortTaskQuestion" : "abortWorkflowQuestion",
|
|
54517
|
+
{
|
|
54518
|
+
workflowName: processDetail == null ? void 0 : processDetail.workflowName
|
|
54562
54519
|
}
|
|
54563
|
-
|
|
54564
|
-
|
|
54565
|
-
|
|
54566
|
-
|
|
54567
|
-
|
|
54568
|
-
|
|
54569
|
-
|
|
54570
|
-
|
|
54571
|
-
|
|
54572
|
-
|
|
54573
|
-
|
|
54574
|
-
|
|
54575
|
-
|
|
54576
|
-
|
|
54577
|
-
|
|
54578
|
-
|
|
54579
|
-
|
|
54580
|
-
|
|
54581
|
-
|
|
54582
|
-
/* @__PURE__ */
|
|
54583
|
-
/* @__PURE__ */
|
|
54584
|
-
|
|
54585
|
-
/* @__PURE__ */ jsx160(
|
|
54586
|
-
"div",
|
|
54520
|
+
),
|
|
54521
|
+
confirmAction: () => {
|
|
54522
|
+
(processDetail == null ? void 0 : processDetail.processId) && abortProcess({ processId: processDetail.processId });
|
|
54523
|
+
router.push(processIsTask ? PATH_TASKS : PATH_WORKFLOWS);
|
|
54524
|
+
}
|
|
54525
|
+
});
|
|
54526
|
+
const deleteAction = () => showConfirmDialog({
|
|
54527
|
+
question: t("deleteQuestion", {
|
|
54528
|
+
workflowName: processDetail == null ? void 0 : processDetail.workflowName
|
|
54529
|
+
}),
|
|
54530
|
+
confirmAction: () => {
|
|
54531
|
+
(processDetail == null ? void 0 : processDetail.processId) && deleteProcess({ processId: processDetail.processId });
|
|
54532
|
+
router.push(PATH_TASKS);
|
|
54533
|
+
}
|
|
54534
|
+
});
|
|
54535
|
+
return /* @__PURE__ */ jsxs88(Fragment37, { children: [
|
|
54536
|
+
/* @__PURE__ */ jsxs88(EuiFlexGroup17, { children: [
|
|
54537
|
+
/* @__PURE__ */ jsxs88(EuiFlexItem23, { children: [
|
|
54538
|
+
/* @__PURE__ */ jsx158(EuiPageHeader2, { pageTitle }),
|
|
54539
|
+
/* @__PURE__ */ jsx158(EuiSpacer15, {}),
|
|
54540
|
+
/* @__PURE__ */ jsx158(
|
|
54541
|
+
WfoProductInformationWithLink,
|
|
54587
54542
|
{
|
|
54588
|
-
|
|
54589
|
-
|
|
54543
|
+
productNames,
|
|
54544
|
+
workflowName: (_a = processDetail == null ? void 0 : processDetail.workflowName) != null ? _a : ""
|
|
54590
54545
|
}
|
|
54591
54546
|
)
|
|
54592
|
-
] })
|
|
54593
|
-
|
|
54594
|
-
return /* @__PURE__ */ jsx160("div", { ref, children: /* @__PURE__ */ jsxs89(EuiPanel4, { children: [
|
|
54595
|
-
/* @__PURE__ */ jsxs89(
|
|
54547
|
+
] }),
|
|
54548
|
+
/* @__PURE__ */ jsxs88(
|
|
54596
54549
|
EuiFlexGroup17,
|
|
54597
54550
|
{
|
|
54598
|
-
|
|
54599
|
-
|
|
54551
|
+
justifyContent: "flexEnd",
|
|
54552
|
+
direction: "row",
|
|
54553
|
+
css: { flexGrow: 0 },
|
|
54554
|
+
gutterSize: "s",
|
|
54600
54555
|
children: [
|
|
54601
|
-
/* @__PURE__ */
|
|
54602
|
-
|
|
54556
|
+
/* @__PURE__ */ jsx158(
|
|
54557
|
+
WfoIsAllowedToRender,
|
|
54603
54558
|
{
|
|
54604
|
-
|
|
54605
|
-
|
|
54559
|
+
resource: "/orchestrator/processes/retry/" /* PROCESS_RETRY */,
|
|
54560
|
+
children: /* @__PURE__ */ jsx158(
|
|
54561
|
+
EuiButton11,
|
|
54562
|
+
{
|
|
54563
|
+
onClick: handleActionButtonClick(retryAction),
|
|
54564
|
+
iconType: () => /* @__PURE__ */ jsx158(
|
|
54565
|
+
WfoRefresh,
|
|
54566
|
+
{
|
|
54567
|
+
color: retryButtonIsDisabled ? theme.colors.subduedText : theme.colors.link
|
|
54568
|
+
}
|
|
54569
|
+
),
|
|
54570
|
+
isDisabled: retryButtonIsDisabled,
|
|
54571
|
+
children: t("retry")
|
|
54572
|
+
}
|
|
54573
|
+
)
|
|
54606
54574
|
}
|
|
54607
54575
|
),
|
|
54608
|
-
/* @__PURE__ */
|
|
54609
|
-
|
|
54610
|
-
|
|
54611
|
-
|
|
54612
|
-
|
|
54613
|
-
|
|
54614
|
-
|
|
54615
|
-
|
|
54616
|
-
|
|
54617
|
-
|
|
54618
|
-
|
|
54619
|
-
|
|
54620
|
-
|
|
54621
|
-
|
|
54622
|
-
|
|
54623
|
-
|
|
54624
|
-
|
|
54625
|
-
|
|
54626
|
-
|
|
54627
|
-
|
|
54628
|
-
|
|
54629
|
-
|
|
54630
|
-
|
|
54631
|
-
|
|
54632
|
-
|
|
54633
|
-
|
|
54634
|
-
|
|
54635
|
-
|
|
54636
|
-
|
|
54637
|
-
|
|
54638
|
-
|
|
54639
|
-
|
|
54640
|
-
|
|
54641
|
-
|
|
54642
|
-
|
|
54643
|
-
|
|
54644
|
-
WfoChevronDown,
|
|
54645
|
-
{
|
|
54646
|
-
color: theme.colors.text
|
|
54647
|
-
}
|
|
54648
|
-
)
|
|
54649
|
-
}
|
|
54650
|
-
)
|
|
54651
|
-
] }) })
|
|
54576
|
+
/* @__PURE__ */ jsx158(
|
|
54577
|
+
WfoIsAllowedToRender,
|
|
54578
|
+
{
|
|
54579
|
+
resource: "/orchestrator/processes/abort/" /* PROCESS_ABORT */,
|
|
54580
|
+
children: /* @__PURE__ */ jsx158(
|
|
54581
|
+
EuiButton11,
|
|
54582
|
+
{
|
|
54583
|
+
onClick: handleActionButtonClick(abortAction),
|
|
54584
|
+
iconType: () => /* @__PURE__ */ jsx158(
|
|
54585
|
+
WfoXCircleFill,
|
|
54586
|
+
{
|
|
54587
|
+
color: abortButtonIsDisabled ? theme.colors.subduedText : theme.colors.danger
|
|
54588
|
+
}
|
|
54589
|
+
),
|
|
54590
|
+
color: "danger",
|
|
54591
|
+
isDisabled: abortButtonIsDisabled,
|
|
54592
|
+
children: t("abort")
|
|
54593
|
+
}
|
|
54594
|
+
)
|
|
54595
|
+
}
|
|
54596
|
+
),
|
|
54597
|
+
processDetail && processIsTask && isAllowed("/orchestrator/processes/delete/" /* PROCESS_DELETE */) && /* @__PURE__ */ jsx158(
|
|
54598
|
+
EuiButton11,
|
|
54599
|
+
{
|
|
54600
|
+
onClick: handleActionButtonClick(deleteAction),
|
|
54601
|
+
iconType: () => /* @__PURE__ */ jsx158(
|
|
54602
|
+
WfoXCircleFill,
|
|
54603
|
+
{
|
|
54604
|
+
color: deleteButtonIsDisabled ? theme.colors.subduedText : theme.colors.danger
|
|
54605
|
+
}
|
|
54606
|
+
),
|
|
54607
|
+
color: "danger",
|
|
54608
|
+
isDisabled: deleteButtonIsDisabled,
|
|
54609
|
+
children: t("delete")
|
|
54610
|
+
}
|
|
54611
|
+
)
|
|
54652
54612
|
]
|
|
54653
54613
|
}
|
|
54654
|
-
),
|
|
54655
|
-
hasStepContent && !hasHtmlMail && isExpanded && /* @__PURE__ */ jsx160(WfoJsonCodeBlock, { data: stepContent }),
|
|
54656
|
-
isExpanded && hasHtmlMail && /* @__PURE__ */ jsx160("div", { css: stepEmailContainerStyle, children: displayMailConfirmation(
|
|
54657
|
-
step.stateDelta.confirmation_mail
|
|
54658
|
-
) }),
|
|
54659
|
-
step.status === "suspend" /* SUSPEND */ && userInputForm && /* @__PURE__ */ jsx160(
|
|
54660
|
-
WfoStepForm,
|
|
54661
|
-
{
|
|
54662
|
-
userInputForm,
|
|
54663
|
-
isTask,
|
|
54664
|
-
processId
|
|
54665
|
-
}
|
|
54666
54614
|
)
|
|
54667
|
-
] })
|
|
54668
|
-
|
|
54669
|
-
|
|
54670
|
-
|
|
54671
|
-
|
|
54672
|
-
|
|
54673
|
-
|
|
54674
|
-
|
|
54675
|
-
|
|
54676
|
-
|
|
54677
|
-
|
|
54678
|
-
|
|
54679
|
-
|
|
54680
|
-
|
|
54681
|
-
|
|
54682
|
-
|
|
54683
|
-
|
|
54684
|
-
|
|
54685
|
-
|
|
54686
|
-
|
|
54687
|
-
|
|
54688
|
-
|
|
54689
|
-
|
|
54690
|
-
|
|
54691
|
-
|
|
54692
|
-
|
|
54693
|
-
|
|
54694
|
-
|
|
54695
|
-
|
|
54696
|
-
|
|
54697
|
-
|
|
54615
|
+
] }),
|
|
54616
|
+
/* @__PURE__ */ jsx158(EuiSpacer15, {}),
|
|
54617
|
+
/* @__PURE__ */ jsx158(
|
|
54618
|
+
EuiPanel4,
|
|
54619
|
+
{
|
|
54620
|
+
hasShadow: false,
|
|
54621
|
+
hasBorder: false,
|
|
54622
|
+
color: "subdued",
|
|
54623
|
+
element: "div",
|
|
54624
|
+
children: isLoading && !hasError && /* @__PURE__ */ jsx158(WfoLoading, {}) || processDetail !== void 0 && /* @__PURE__ */ jsxs88(EuiFlexGroup17, { direction: "row", gutterSize: "m", children: [
|
|
54625
|
+
/* @__PURE__ */ jsx158(
|
|
54626
|
+
ProcessHeaderValue,
|
|
54627
|
+
{
|
|
54628
|
+
translationKey: "status",
|
|
54629
|
+
value: processDetail.lastStatus
|
|
54630
|
+
}
|
|
54631
|
+
),
|
|
54632
|
+
/* @__PURE__ */ jsx158(
|
|
54633
|
+
ProcessHeaderValue,
|
|
54634
|
+
{
|
|
54635
|
+
translationKey: "lastStep",
|
|
54636
|
+
value: processDetail == null ? void 0 : processDetail.lastStep
|
|
54637
|
+
}
|
|
54638
|
+
),
|
|
54639
|
+
processDetail.customer && /* @__PURE__ */ jsx158(
|
|
54640
|
+
ProcessHeaderValue,
|
|
54641
|
+
{
|
|
54642
|
+
translationKey: "customer",
|
|
54643
|
+
value: (_b = processDetail.customer) == null ? void 0 : _b.fullname
|
|
54644
|
+
}
|
|
54645
|
+
),
|
|
54646
|
+
/* @__PURE__ */ jsx158(
|
|
54647
|
+
ProcessHeaderValue,
|
|
54648
|
+
{
|
|
54649
|
+
translationKey: "startedBy",
|
|
54650
|
+
value: processDetail == null ? void 0 : processDetail.createdBy
|
|
54651
|
+
}
|
|
54652
|
+
),
|
|
54653
|
+
/* @__PURE__ */ jsx158(
|
|
54654
|
+
ProcessHeaderValue,
|
|
54655
|
+
{
|
|
54656
|
+
translationKey: "startedOn",
|
|
54657
|
+
value: (processDetail == null ? void 0 : processDetail.startedAt) ? parseIsoString(
|
|
54658
|
+
parseDateRelativeToToday
|
|
54659
|
+
)(processDetail == null ? void 0 : processDetail.startedAt) : ""
|
|
54660
|
+
}
|
|
54661
|
+
),
|
|
54662
|
+
/* @__PURE__ */ jsx158(
|
|
54663
|
+
ProcessHeaderValue,
|
|
54664
|
+
{
|
|
54665
|
+
translationKey: "lastUpdate",
|
|
54666
|
+
value: (processDetail == null ? void 0 : processDetail.lastModifiedAt) ? parseIsoString(
|
|
54667
|
+
parseDateRelativeToToday
|
|
54668
|
+
)(processDetail == null ? void 0 : processDetail.lastModifiedAt) : ""
|
|
54669
|
+
}
|
|
54670
|
+
),
|
|
54671
|
+
process && isAllowed(
|
|
54672
|
+
"/orchestrator/subscriptions/view/from-process" /* PROCESS_RELATED_SUBSCRIPTIONS */
|
|
54673
|
+
) && processDetail.subscriptions && /* @__PURE__ */ jsxs88(
|
|
54674
|
+
EuiFlexGroup17,
|
|
54675
|
+
{
|
|
54676
|
+
gutterSize: "xs",
|
|
54677
|
+
direction: "column",
|
|
54678
|
+
css: {
|
|
54679
|
+
flex: 1,
|
|
54680
|
+
overflow: "hidden"
|
|
54681
|
+
},
|
|
54682
|
+
children: [
|
|
54683
|
+
/* @__PURE__ */ jsx158(EuiText30, { size: "xs", children: t("relatedSubscriptions") }),
|
|
54684
|
+
/* @__PURE__ */ jsx158(
|
|
54685
|
+
EuiText30,
|
|
54686
|
+
{
|
|
54687
|
+
css: {
|
|
54688
|
+
flex: 1,
|
|
54689
|
+
whiteSpace: "nowrap",
|
|
54690
|
+
overflow: "hidden",
|
|
54691
|
+
textOverflow: "ellipsis",
|
|
54692
|
+
fontSize: theme.size.m
|
|
54693
|
+
},
|
|
54694
|
+
children: /* @__PURE__ */ jsx158(
|
|
54695
|
+
WfoProcessListSubscriptionsCell,
|
|
54696
|
+
{
|
|
54697
|
+
subscriptions: process && ((_c = processDetail == null ? void 0 : processDetail.subscriptions) == null ? void 0 : _c.page.map(
|
|
54698
|
+
(subscription) => ({
|
|
54699
|
+
subscriptionId: subscription.subscriptionId,
|
|
54700
|
+
description: subscription.description
|
|
54701
|
+
})
|
|
54702
|
+
)) || [],
|
|
54703
|
+
renderDirection: "VERTICAL" /* VERTICAL */
|
|
54704
|
+
}
|
|
54705
|
+
)
|
|
54706
|
+
}
|
|
54707
|
+
)
|
|
54708
|
+
]
|
|
54698
54709
|
}
|
|
54699
|
-
return resolve(
|
|
54700
|
-
onTriggerExpandStepListItem(foundStepListItem)
|
|
54701
|
-
);
|
|
54702
|
-
});
|
|
54703
|
-
(_a = stepReferences.current.get(stepId)) == null ? void 0 : _a.scrollIntoView({
|
|
54704
|
-
behavior: "smooth"
|
|
54705
|
-
});
|
|
54706
|
-
} catch (e) {
|
|
54707
|
-
console.error(
|
|
54708
|
-
"Error scrolling to step with stepId ",
|
|
54709
|
-
stepId
|
|
54710
|
-
);
|
|
54711
|
-
}
|
|
54712
|
-
})
|
|
54713
|
-
}));
|
|
54714
|
-
const getReferenceCallbackForStepId = (stepId) => (node) => node ? stepReferences.current.set(stepId, node) : stepReferences.current.delete(stepId);
|
|
54715
|
-
return /* @__PURE__ */ jsx161(Fragment38, { children: stepListItems.map((stepListItem, index) => {
|
|
54716
|
-
const stepComponent = /* @__PURE__ */ jsxs90("div", { children: [
|
|
54717
|
-
index !== 0 && /* @__PURE__ */ jsx161("div", { css: stepSpacerStyle }),
|
|
54718
|
-
/* @__PURE__ */ jsx161(
|
|
54719
|
-
WfoStep,
|
|
54720
|
-
{
|
|
54721
|
-
ref: getReferenceCallbackForStepId(
|
|
54722
|
-
stepListItem.step.stepId
|
|
54723
|
-
),
|
|
54724
|
-
onToggleStepDetail: () => onToggleExpandStepListItem(stepListItem),
|
|
54725
|
-
stepListItem,
|
|
54726
|
-
startedAt: stepStartTime,
|
|
54727
|
-
showHiddenKeys,
|
|
54728
|
-
isStartStep: index === 0,
|
|
54729
|
-
isTask,
|
|
54730
|
-
processId
|
|
54731
|
-
}
|
|
54732
|
-
)
|
|
54733
|
-
] }, `step-${index}`);
|
|
54734
|
-
if (index > 0) {
|
|
54735
|
-
stepStartTime = stepListItem.step.executed;
|
|
54736
|
-
}
|
|
54737
|
-
return stepComponent;
|
|
54738
|
-
}) });
|
|
54739
|
-
}
|
|
54740
|
-
);
|
|
54741
|
-
WfoStepList.displayName = "WfoStepList";
|
|
54742
|
-
|
|
54743
|
-
// src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoWorkflowStepList.tsx
|
|
54744
|
-
import React48, { useEffect as useEffect24, useState as useState37 } from "react";
|
|
54745
|
-
import { useTranslations as useTranslations50 } from "next-intl";
|
|
54746
|
-
|
|
54747
|
-
// src/components/WfoDiff/WfoDiff.tsx
|
|
54748
|
-
var refractor = __toESM(require_refractor(), 1);
|
|
54749
|
-
import { useCallback as useCallback6, useEffect as useEffect23, useMemo as useMemo4, useState as useState36 } from "react";
|
|
54750
|
-
import { Diff, Hunk, parseDiff, tokenize } from "react-diff-view";
|
|
54751
|
-
import "react-diff-view/style/index.css";
|
|
54752
|
-
import { useTranslations as useTranslations48 } from "next-intl";
|
|
54753
|
-
import "prism-themes/themes/prism-ghcolors.min.css";
|
|
54754
|
-
import { diffLines, formatLines } from "unidiff";
|
|
54755
|
-
import {
|
|
54756
|
-
EuiButtonIcon as EuiButtonIcon6,
|
|
54757
|
-
EuiFlexGroup as EuiFlexGroup18,
|
|
54758
|
-
EuiFlexItem as EuiFlexItem26,
|
|
54759
|
-
EuiSpacer as EuiSpacer15,
|
|
54760
|
-
EuiText as EuiText31
|
|
54761
|
-
} from "@elastic/eui";
|
|
54762
|
-
|
|
54763
|
-
// src/components/WfoDiff/styles.ts
|
|
54764
|
-
import { shade as shade2, tint as tint4 } from "@elastic/eui";
|
|
54765
|
-
import { css as css28 } from "@emotion/react";
|
|
54766
|
-
var getWfoDiffStyles = ({
|
|
54767
|
-
theme,
|
|
54768
|
-
toSecondaryColor,
|
|
54769
|
-
isDarkThemeActive
|
|
54770
|
-
}) => {
|
|
54771
|
-
const SHADE_FACTOR = 0.5;
|
|
54772
|
-
const TINT_FACTOR = 0.65;
|
|
54773
|
-
const insertGutterColor = toSecondaryColor(theme.colors.success);
|
|
54774
|
-
const insertCodeColor = isDarkThemeActive ? shade2(insertGutterColor, SHADE_FACTOR) : tint4(insertGutterColor, TINT_FACTOR);
|
|
54775
|
-
const deleteColor = toSecondaryColor(theme.colors.danger);
|
|
54776
|
-
const deleteSecondaryColor = isDarkThemeActive ? shade2(deleteColor, SHADE_FACTOR) : tint4(deleteColor, TINT_FACTOR);
|
|
54777
|
-
const diffStyle = css28({
|
|
54778
|
-
".diff-code-insert": {
|
|
54779
|
-
backgroundColor: insertCodeColor
|
|
54780
|
-
},
|
|
54781
|
-
".diff-gutter-insert": {
|
|
54782
|
-
backgroundColor: insertGutterColor
|
|
54783
|
-
},
|
|
54784
|
-
".diff-code-delete": {
|
|
54785
|
-
backgroundColor: deleteSecondaryColor
|
|
54786
|
-
},
|
|
54787
|
-
".diff-gutter-delete": {
|
|
54788
|
-
backgroundColor: deleteColor
|
|
54789
|
-
},
|
|
54790
|
-
".operator, .punctuation": {
|
|
54791
|
-
color: theme.colors.text
|
|
54792
|
-
}
|
|
54793
|
-
});
|
|
54794
|
-
return {
|
|
54795
|
-
diffStyle
|
|
54796
|
-
};
|
|
54797
|
-
};
|
|
54798
|
-
|
|
54799
|
-
// src/components/WfoDiff/WfoDiff.tsx
|
|
54800
|
-
import { jsx as jsx162, jsxs as jsxs91 } from "@emotion/react/jsx-runtime";
|
|
54801
|
-
var EMPTY_HUNKS = [];
|
|
54802
|
-
var SMALL_CONTEXT = 3;
|
|
54803
|
-
var FULL_CONTEXT = 1e6;
|
|
54804
|
-
var WfoDiff = ({ oldText, newText, syntax }) => {
|
|
54805
|
-
const t = useTranslations48("processes.delta");
|
|
54806
|
-
const [showSplit, setShowSplit] = useState36(true);
|
|
54807
|
-
const [showFull, setShowFull] = useState36(false);
|
|
54808
|
-
const { diffStyle } = useWithOrchestratorTheme(getWfoDiffStyles);
|
|
54809
|
-
const [{ type, hunks }, setDiff] = useState36({
|
|
54810
|
-
type: "modify",
|
|
54811
|
-
hunks: []
|
|
54812
|
-
});
|
|
54813
|
-
const updateDiffText = useCallback6(() => {
|
|
54814
|
-
const diffText = formatLines(diffLines(oldText, newText), {
|
|
54815
|
-
context: showFull ? FULL_CONTEXT : SMALL_CONTEXT
|
|
54816
|
-
});
|
|
54817
|
-
const [diff] = parseDiff(diffText, { nearbySequences: "zip" });
|
|
54818
|
-
setDiff(diff);
|
|
54819
|
-
}, [oldText, newText, setDiff, showFull]);
|
|
54820
|
-
const tokens = useMemo4(() => {
|
|
54821
|
-
if (!hunks) {
|
|
54822
|
-
return void 0;
|
|
54823
|
-
}
|
|
54824
|
-
const options = {
|
|
54825
|
-
refractor,
|
|
54826
|
-
highlight: !!syntax,
|
|
54827
|
-
language: syntax != null ? syntax : ""
|
|
54828
|
-
};
|
|
54829
|
-
try {
|
|
54830
|
-
return tokenize(hunks, options);
|
|
54831
|
-
} catch (ex) {
|
|
54832
|
-
return void 0;
|
|
54833
|
-
}
|
|
54834
|
-
}, [hunks, syntax]);
|
|
54835
|
-
useEffect23(() => {
|
|
54836
|
-
updateDiffText();
|
|
54837
|
-
}, [updateDiffText, showFull]);
|
|
54838
|
-
return /* @__PURE__ */ jsxs91("div", { children: [
|
|
54839
|
-
/* @__PURE__ */ jsxs91(EuiFlexGroup18, { gutterSize: "xs", children: [
|
|
54840
|
-
/* @__PURE__ */ jsx162(EuiFlexItem26, { grow: false, children: /* @__PURE__ */ jsx162(EuiText31, { children: /* @__PURE__ */ jsx162("h3", { children: t("title") }) }) }),
|
|
54841
|
-
/* @__PURE__ */ jsx162(EuiFlexItem26, { grow: false, children: /* @__PURE__ */ jsx162(
|
|
54842
|
-
EuiButtonIcon6,
|
|
54843
|
-
{
|
|
54844
|
-
size: "s",
|
|
54845
|
-
iconType: showSplit ? "continuityAboveBelow" : "continuityWithin",
|
|
54846
|
-
onClick: () => setShowSplit(!showSplit),
|
|
54847
|
-
"aria-label": t(
|
|
54848
|
-
showSplit ? "continuityAboveBelow" : "continuityWithin"
|
|
54849
|
-
)
|
|
54850
|
-
}
|
|
54851
|
-
) }),
|
|
54852
|
-
/* @__PURE__ */ jsx162(EuiFlexItem26, { grow: false, children: /* @__PURE__ */ jsx162(
|
|
54853
|
-
EuiButtonIcon6,
|
|
54854
|
-
{
|
|
54855
|
-
size: "s",
|
|
54856
|
-
iconType: showFull ? "fullScreenExit" : "fullScreen",
|
|
54857
|
-
onClick: () => setShowFull(!showFull),
|
|
54858
|
-
"aria-label": t(
|
|
54859
|
-
showFull ? "fullScreenExit" : "fullScreen"
|
|
54860
54710
|
)
|
|
54861
|
-
}
|
|
54862
|
-
|
|
54863
|
-
|
|
54864
|
-
/* @__PURE__ */
|
|
54865
|
-
/* @__PURE__ */
|
|
54866
|
-
|
|
54711
|
+
] })
|
|
54712
|
+
}
|
|
54713
|
+
),
|
|
54714
|
+
/* @__PURE__ */ jsx158(EuiSpacer15, { size: "s" }),
|
|
54715
|
+
/* @__PURE__ */ jsx158(
|
|
54716
|
+
WfoTimeline,
|
|
54867
54717
|
{
|
|
54868
|
-
|
|
54869
|
-
|
|
54870
|
-
|
|
54871
|
-
hunks: hunks || EMPTY_HUNKS,
|
|
54872
|
-
tokens,
|
|
54873
|
-
children: (hunks2) => hunks2.map((hunk) => /* @__PURE__ */ jsx162(Hunk, { hunk }, hunk.content))
|
|
54718
|
+
timelineItems,
|
|
54719
|
+
indexOfCurrentStep: getIndexOfCurrentStep(timelineItems),
|
|
54720
|
+
onStepClick: (timelineItem) => onTimelineItemClick && timelineItem.id && onTimelineItemClick(timelineItem.id)
|
|
54874
54721
|
}
|
|
54875
|
-
)
|
|
54876
|
-
|
|
54877
|
-
};
|
|
54878
|
-
var WfoDiff_default = WfoDiff;
|
|
54879
|
-
|
|
54880
|
-
// src/components/WfoWorkflowSteps/WfoTraceback/WfoTraceback.tsx
|
|
54881
|
-
import { useTranslations as useTranslations49 } from "next-intl";
|
|
54882
|
-
import { EuiCodeBlock, EuiText as EuiText32 } from "@elastic/eui";
|
|
54883
|
-
|
|
54884
|
-
// src/components/WfoWorkflowSteps/WfoTraceback/styles.ts
|
|
54885
|
-
import { css as css29 } from "@emotion/react";
|
|
54886
|
-
var getStyles15 = ({ theme }) => {
|
|
54887
|
-
const codeBlockStyle = css29({
|
|
54888
|
-
marginTop: theme.size.m,
|
|
54889
|
-
marginBottom: theme.size.l,
|
|
54890
|
-
borderRadius: theme.border.radius.medium
|
|
54891
|
-
});
|
|
54892
|
-
return {
|
|
54893
|
-
codeBlockStyle
|
|
54894
|
-
};
|
|
54895
|
-
};
|
|
54896
|
-
|
|
54897
|
-
// src/components/WfoWorkflowSteps/WfoTraceback/WfoTraceback.tsx
|
|
54898
|
-
import { Fragment as Fragment39, jsx as jsx163, jsxs as jsxs92 } from "@emotion/react/jsx-runtime";
|
|
54899
|
-
var WfoTraceback = ({ children }) => {
|
|
54900
|
-
const { codeBlockStyle } = useWithOrchestratorTheme(getStyles15);
|
|
54901
|
-
const t = useTranslations49("processes.steps");
|
|
54902
|
-
return /* @__PURE__ */ jsxs92(Fragment39, { children: [
|
|
54903
|
-
/* @__PURE__ */ jsx163(EuiText32, { children: /* @__PURE__ */ jsx163("h3", { children: t("traceback") }) }),
|
|
54904
|
-
/* @__PURE__ */ jsx163(EuiCodeBlock, { css: codeBlockStyle, children })
|
|
54722
|
+
),
|
|
54723
|
+
children
|
|
54905
54724
|
] });
|
|
54906
54725
|
};
|
|
54907
54726
|
|
|
54908
|
-
// src/
|
|
54909
|
-
import {
|
|
54910
|
-
var
|
|
54911
|
-
const { data, isFetching } = useGetRawProcessDetailQuery({ processId });
|
|
54912
|
-
return isFetching ? /* @__PURE__ */ jsx164(WfoLoading, {}) : /* @__PURE__ */ jsx164(WfoJsonCodeBlock, { data: data || {} });
|
|
54913
|
-
};
|
|
54914
|
-
var WfoProcessSubscriptionDelta = ({
|
|
54727
|
+
// src/pages/processes/WfoProcessDetailPage.tsx
|
|
54728
|
+
import { jsx as jsx159 } from "@emotion/react/jsx-runtime";
|
|
54729
|
+
var WfoProcessDetailPage = ({
|
|
54915
54730
|
processId
|
|
54916
54731
|
}) => {
|
|
54917
|
-
var _a, _b
|
|
54918
|
-
const
|
|
54919
|
-
const
|
|
54920
|
-
|
|
54921
|
-
|
|
54922
|
-
|
|
54923
|
-
|
|
54732
|
+
var _a, _b;
|
|
54733
|
+
const stepListRef = useRef6(null);
|
|
54734
|
+
const { data, isLoading, isError: isError2 } = useGetProcessDetailQuery({
|
|
54735
|
+
processId
|
|
54736
|
+
});
|
|
54737
|
+
const processDetail = data == null ? void 0 : data.processes[0];
|
|
54738
|
+
const steps = (_a = processDetail == null ? void 0 : processDetail.steps) != null ? _a : [];
|
|
54739
|
+
const productNames = getProductNamesFromProcess(processDetail);
|
|
54740
|
+
const pageTitle = (processDetail == null ? void 0 : processDetail.workflowName) || "";
|
|
54741
|
+
const isTask = (_b = processDetail == null ? void 0 : processDetail.isTask) != null ? _b : false;
|
|
54742
|
+
const groupedSteps = convertStepsToGroupedSteps(steps);
|
|
54743
|
+
const timelineItems = mapGroupedStepsToTimelineItems(groupedSteps);
|
|
54744
|
+
return /* @__PURE__ */ jsx159(
|
|
54745
|
+
WfoProcessDetail,
|
|
54924
54746
|
{
|
|
54925
|
-
|
|
54926
|
-
|
|
54927
|
-
|
|
54747
|
+
pageTitle,
|
|
54748
|
+
productNames,
|
|
54749
|
+
buttonsAreDisabled: isLoading || isError2,
|
|
54750
|
+
processDetail,
|
|
54751
|
+
timelineItems,
|
|
54752
|
+
onTimelineItemClick: (id) => {
|
|
54753
|
+
var _a2;
|
|
54754
|
+
return (_a2 = stepListRef.current) == null ? void 0 : _a2.scrollToStep(id);
|
|
54755
|
+
},
|
|
54756
|
+
isLoading,
|
|
54757
|
+
hasError: isError2,
|
|
54758
|
+
children: isError2 && /* @__PURE__ */ jsx159(WfoError, {}) || isLoading && /* @__PURE__ */ jsx159(WfoLoading, {}) || processDetail !== void 0 && /* @__PURE__ */ jsx159(
|
|
54759
|
+
WfoWorkflowStepList,
|
|
54760
|
+
{
|
|
54761
|
+
ref: stepListRef,
|
|
54762
|
+
processId: processDetail.processId,
|
|
54763
|
+
steps: groupedSteps.flatMap(
|
|
54764
|
+
(groupedStep) => groupedStep.steps
|
|
54765
|
+
),
|
|
54766
|
+
traceBack: processDetail.traceback,
|
|
54767
|
+
userInputForm: processDetail.form,
|
|
54768
|
+
startedAt: processDetail.startedAt,
|
|
54769
|
+
isTask
|
|
54770
|
+
}
|
|
54771
|
+
) || /* @__PURE__ */ jsx159("h1", { children: "Invalid processId" })
|
|
54928
54772
|
}
|
|
54929
54773
|
);
|
|
54930
54774
|
};
|
|
54931
|
-
var WfoWorkflowStepList = React48.forwardRef(
|
|
54932
|
-
({
|
|
54933
|
-
steps = [],
|
|
54934
|
-
traceBack,
|
|
54935
|
-
startedAt,
|
|
54936
|
-
processId,
|
|
54937
|
-
isTask,
|
|
54938
|
-
userInputForm
|
|
54939
|
-
}, reference) => {
|
|
54940
|
-
const [showHiddenKeys, setShowHiddenKeys] = useState37(false);
|
|
54941
|
-
const [showRaw, setShowRaw] = useState37(false);
|
|
54942
|
-
const [showDelta, setShowDelta] = useState37(false);
|
|
54943
|
-
const [showTraceback, setShowTraceback] = useState37(false);
|
|
54944
|
-
const t = useTranslations50("processes.steps");
|
|
54945
|
-
const initialStepListItems = steps.map((step) => ({
|
|
54946
|
-
step,
|
|
54947
|
-
isExpanded: false
|
|
54948
|
-
}));
|
|
54949
|
-
const [stepListItems, setStepListItems] = useState37(initialStepListItems);
|
|
54950
|
-
const persistStepListItemState = (previousStepListItems, updatedSteps, userInputForm2) => {
|
|
54951
|
-
var _a;
|
|
54952
|
-
const reversedSteps = [...updatedSteps].reverse();
|
|
54953
|
-
const lastStepWithSuspendStatusStepId = (_a = reversedSteps.find(
|
|
54954
|
-
(step) => step.status === "suspend" /* SUSPEND */
|
|
54955
|
-
)) == null ? void 0 : _a.stepId;
|
|
54956
|
-
return updatedSteps.map((step) => {
|
|
54957
|
-
const previousStepListItem = previousStepListItems.find(
|
|
54958
|
-
(previousStepListItem2) => previousStepListItem2.step.stepId === step.stepId
|
|
54959
|
-
);
|
|
54960
|
-
return {
|
|
54961
|
-
step,
|
|
54962
|
-
isExpanded: (previousStepListItem == null ? void 0 : previousStepListItem.isExpanded) || false,
|
|
54963
|
-
userInputForm: lastStepWithSuspendStatusStepId === step.stepId && userInputForm2 ? userInputForm2 : void 0
|
|
54964
|
-
};
|
|
54965
|
-
});
|
|
54966
|
-
};
|
|
54967
|
-
useEffect24(() => {
|
|
54968
|
-
setStepListItems(
|
|
54969
|
-
(previousStepListItems) => persistStepListItemState(
|
|
54970
|
-
previousStepListItems,
|
|
54971
|
-
steps,
|
|
54972
|
-
userInputForm
|
|
54973
|
-
)
|
|
54974
|
-
);
|
|
54975
|
-
}, [steps, userInputForm]);
|
|
54976
|
-
const updateStepListItem = (stepListItemToUpdate, updateFunction) => setStepListItems(
|
|
54977
|
-
stepListItems.map(
|
|
54978
|
-
(stepListItem) => stepListItem === stepListItemToUpdate ? updateFunction(stepListItem) : stepListItem
|
|
54979
|
-
)
|
|
54980
|
-
);
|
|
54981
|
-
const allStepsAreExpanded = stepListItems.every(
|
|
54982
|
-
(item) => item.isExpanded
|
|
54983
|
-
);
|
|
54984
|
-
const setExpandedStateStepListItems = (isExpanded) => {
|
|
54985
|
-
setStepListItems(
|
|
54986
|
-
stepListItems.map((item) => __spreadProps(__spreadValues({}, item), {
|
|
54987
|
-
isExpanded
|
|
54988
|
-
}))
|
|
54989
|
-
);
|
|
54990
|
-
};
|
|
54991
|
-
const toggleExpandedStateStepListItem = (stepListItem) => updateStepListItem(stepListItem, (item) => __spreadProps(__spreadValues({}, item), {
|
|
54992
|
-
isExpanded: !item.isExpanded
|
|
54993
|
-
}));
|
|
54994
|
-
const handleExpandStepListItem = (stepListItem) => updateStepListItem(stepListItem, (item) => __spreadProps(__spreadValues({}, item), {
|
|
54995
|
-
isExpanded: true
|
|
54996
|
-
}));
|
|
54997
|
-
return /* @__PURE__ */ jsxs93(Fragment40, { children: [
|
|
54998
|
-
/* @__PURE__ */ jsx164(
|
|
54999
|
-
WfoStepListHeader,
|
|
55000
|
-
{
|
|
55001
|
-
showHiddenKeys,
|
|
55002
|
-
showRaw,
|
|
55003
|
-
showDelta,
|
|
55004
|
-
showTracebackButton: traceBack !== null,
|
|
55005
|
-
showTraceback,
|
|
55006
|
-
allDetailToggleText: allStepsAreExpanded ? t("collapseAll") : t("expandAll"),
|
|
55007
|
-
onChangeShowHiddenKeys: setShowHiddenKeys,
|
|
55008
|
-
onChangeShowRaw: setShowRaw,
|
|
55009
|
-
onChangeShowDelta: setShowDelta,
|
|
55010
|
-
onToggleAllDetailsIsOpen: () => setExpandedStateStepListItems(!allStepsAreExpanded),
|
|
55011
|
-
onShowTraceback: setShowTraceback,
|
|
55012
|
-
isTask
|
|
55013
|
-
}
|
|
55014
|
-
),
|
|
55015
|
-
showTraceback && /* @__PURE__ */ jsx164(WfoTraceback, { children: traceBack }),
|
|
55016
|
-
showRaw && /* @__PURE__ */ jsx164(WfoProcessRawData, { processId }),
|
|
55017
|
-
showDelta && /* @__PURE__ */ jsx164(WfoProcessSubscriptionDelta, { processId }),
|
|
55018
|
-
!showRaw && !showDelta && /* @__PURE__ */ jsx164(
|
|
55019
|
-
WfoStepList,
|
|
55020
|
-
{
|
|
55021
|
-
ref: reference,
|
|
55022
|
-
stepListItems,
|
|
55023
|
-
startedAt,
|
|
55024
|
-
showHiddenKeys,
|
|
55025
|
-
isTask,
|
|
55026
|
-
onToggleExpandStepListItem: toggleExpandedStateStepListItem,
|
|
55027
|
-
processId,
|
|
55028
|
-
onTriggerExpandStepListItem: handleExpandStepListItem
|
|
55029
|
-
}
|
|
55030
|
-
)
|
|
55031
|
-
] });
|
|
55032
|
-
}
|
|
55033
|
-
);
|
|
55034
|
-
WfoWorkflowStepList.displayName = "WfoWorkflowStepList";
|
|
55035
54775
|
|
|
55036
|
-
// src/
|
|
55037
|
-
import { useState as
|
|
55038
|
-
import { useTranslations as
|
|
54776
|
+
// src/pages/processes/WfoStartProcessPage.tsx
|
|
54777
|
+
import { useCallback as useCallback7, useEffect as useEffect25, useMemo as useMemo5, useState as useState39 } from "react";
|
|
54778
|
+
import { useTranslations as useTranslations55 } from "next-intl";
|
|
54779
|
+
import { useRouter as useRouter9 } from "next/router";
|
|
55039
54780
|
import {
|
|
55040
|
-
|
|
55041
|
-
|
|
55042
|
-
|
|
55043
|
-
|
|
55044
|
-
|
|
55045
|
-
EuiSwitch as EuiSwitch3,
|
|
55046
|
-
EuiText as EuiText34
|
|
54781
|
+
EuiFlexGroup as EuiFlexGroup21,
|
|
54782
|
+
EuiFlexItem as EuiFlexItem28,
|
|
54783
|
+
EuiHorizontalRule as EuiHorizontalRule5,
|
|
54784
|
+
EuiPanel as EuiPanel6,
|
|
54785
|
+
EuiText as EuiText36
|
|
55047
54786
|
} from "@elastic/eui";
|
|
55048
54787
|
|
|
55049
|
-
// src/components/
|
|
55050
|
-
import
|
|
54788
|
+
// src/components/WfoWorkflowSteps/WfoStep/WfoStep.tsx
|
|
54789
|
+
import React47 from "react";
|
|
54790
|
+
import { useTranslations as useTranslations50 } from "next-intl";
|
|
54791
|
+
import { EuiFlexGroup as EuiFlexGroup18, EuiFlexItem as EuiFlexItem26, EuiPanel as EuiPanel5, EuiText as EuiText31 } from "@elastic/eui";
|
|
55051
54792
|
|
|
55052
|
-
// src/components/
|
|
55053
|
-
import {
|
|
55054
|
-
|
|
55055
|
-
|
|
55056
|
-
|
|
54793
|
+
// src/components/WfoWorkflowSteps/WfoStepStatusIcon/WfoStepStatusIcon.tsx
|
|
54794
|
+
import { EuiFlexItem as EuiFlexItem24 } from "@elastic/eui";
|
|
54795
|
+
|
|
54796
|
+
// src/components/WfoWorkflowSteps/styles.ts
|
|
54797
|
+
import { css as css27 } from "@emotion/react";
|
|
54798
|
+
var getStyles14 = ({ theme, toSecondaryColor }) => {
|
|
54799
|
+
const stepSpacerStyle = css27({
|
|
54800
|
+
borderLeft: `1px solid ${theme.colors.darkShade}`,
|
|
54801
|
+
height: "24px",
|
|
54802
|
+
marginLeft: "36px"
|
|
54803
|
+
});
|
|
54804
|
+
const stepRowStyle = css27({
|
|
54805
|
+
flexGrow: 1,
|
|
54806
|
+
alignItems: "center",
|
|
54807
|
+
justifyContent: "flex-end"
|
|
54808
|
+
});
|
|
54809
|
+
const stepListHeaderStyle = css27({
|
|
54810
|
+
marginBottom: "24px",
|
|
54811
|
+
marginTop: "60px",
|
|
54812
|
+
alignItems: "flex-end"
|
|
54813
|
+
});
|
|
54814
|
+
const stepListContentStyle = css27({
|
|
54815
|
+
flexDirection: "row",
|
|
54816
|
+
alignItems: "center"
|
|
54817
|
+
});
|
|
54818
|
+
const stepListContentBoldTextStyle = css27({
|
|
54819
|
+
fontSize: theme.size.base,
|
|
54820
|
+
fontWeight: theme.font.weight.bold
|
|
54821
|
+
});
|
|
54822
|
+
const stepListContentAnchorStyle = css27({
|
|
54823
|
+
marginTop: 2,
|
|
55057
54824
|
marginLeft: 0,
|
|
55058
54825
|
fontSize: theme.size.m,
|
|
55059
54826
|
fontWeight: theme.font.weight.bold,
|
|
55060
54827
|
color: theme.colors.link,
|
|
55061
54828
|
cursor: "pointer"
|
|
55062
54829
|
});
|
|
54830
|
+
const stepListOptionsContainerStyle = css27({
|
|
54831
|
+
flexGrow: 0
|
|
54832
|
+
});
|
|
54833
|
+
const stepStateIcon = {
|
|
54834
|
+
height: "40px",
|
|
54835
|
+
width: "40px",
|
|
54836
|
+
alignItems: "center",
|
|
54837
|
+
display: "flex",
|
|
54838
|
+
justifyContent: "center",
|
|
54839
|
+
borderRadius: "24px"
|
|
54840
|
+
};
|
|
54841
|
+
const stepDurationStyle = {
|
|
54842
|
+
fontSize: theme.size.m,
|
|
54843
|
+
color: theme.colors.disabled,
|
|
54844
|
+
fontWeight: theme.font.weight.semiBold
|
|
54845
|
+
};
|
|
54846
|
+
const stepStateSuccessIconStyle = css27(__spreadProps(__spreadValues({}, stepStateIcon), {
|
|
54847
|
+
backgroundColor: toSecondaryColor(theme.colors.primary)
|
|
54848
|
+
}));
|
|
54849
|
+
const stepStateSuspendIconStyle = css27(__spreadProps(__spreadValues({}, stepStateIcon), {
|
|
54850
|
+
backgroundColor: toSecondaryColor(theme.colors.warning)
|
|
54851
|
+
}));
|
|
54852
|
+
const stepStatePendingIconStyle = css27(__spreadProps(__spreadValues({}, stepStateIcon), {
|
|
54853
|
+
backgroundColor: toSecondaryColor(theme.colors.darkShade)
|
|
54854
|
+
}));
|
|
54855
|
+
const stepStateFailedIconStyle = css27(__spreadProps(__spreadValues({}, stepStateIcon), {
|
|
54856
|
+
backgroundColor: toSecondaryColor(theme.colors.danger)
|
|
54857
|
+
}));
|
|
54858
|
+
const stepHeaderRightStyle = css27({
|
|
54859
|
+
alignItems: "center"
|
|
54860
|
+
});
|
|
54861
|
+
const stepEmailContainerStyle = css27({
|
|
54862
|
+
paddingLeft: 24,
|
|
54863
|
+
width: 600,
|
|
54864
|
+
marginTop: 0
|
|
54865
|
+
});
|
|
54866
|
+
const getStepHeaderStyle = (isClickable) => css27({
|
|
54867
|
+
gap: 0,
|
|
54868
|
+
alignItems: "center",
|
|
54869
|
+
cursor: isClickable ? "pointer" : "default"
|
|
54870
|
+
});
|
|
54871
|
+
const getStepToggleExpandStyle = (isVisible) => css27({
|
|
54872
|
+
marginRight: theme.base / 2,
|
|
54873
|
+
visibility: isVisible ? "visible" : "hidden"
|
|
54874
|
+
});
|
|
55063
54875
|
return {
|
|
55064
|
-
|
|
54876
|
+
stepDurationStyle,
|
|
54877
|
+
stepEmailContainerStyle,
|
|
54878
|
+
stepHeaderRightStyle,
|
|
54879
|
+
stepListContentAnchorStyle,
|
|
54880
|
+
stepListContentBoldTextStyle,
|
|
54881
|
+
stepListContentStyle,
|
|
54882
|
+
stepListHeaderStyle,
|
|
54883
|
+
stepListOptionsContainerStyle,
|
|
54884
|
+
stepRowStyle,
|
|
54885
|
+
stepSpacerStyle,
|
|
54886
|
+
stepStateFailedIconStyle,
|
|
54887
|
+
stepStatePendingIconStyle,
|
|
54888
|
+
stepStateSuccessIconStyle,
|
|
54889
|
+
stepStateSuspendIconStyle,
|
|
54890
|
+
getStepHeaderStyle,
|
|
54891
|
+
getStepToggleExpandStyle
|
|
55065
54892
|
};
|
|
55066
54893
|
};
|
|
55067
54894
|
|
|
55068
|
-
// src/components/
|
|
55069
|
-
import { jsx as
|
|
55070
|
-
var
|
|
55071
|
-
|
|
55072
|
-
|
|
54895
|
+
// src/components/WfoWorkflowSteps/WfoStepStatusIcon/WfoStepStatusIcon.tsx
|
|
54896
|
+
import { jsx as jsx160, jsxs as jsxs89 } from "@emotion/react/jsx-runtime";
|
|
54897
|
+
var SubIcon = ({ stepStatus, color = "" }) => {
|
|
54898
|
+
switch (stepStatus) {
|
|
54899
|
+
case "suspend" /* SUSPEND */:
|
|
54900
|
+
return /* @__PURE__ */ jsx160(WfoMinusCircleFill, { color });
|
|
54901
|
+
case "failed" /* FAILED */:
|
|
54902
|
+
return /* @__PURE__ */ jsx160(WfoXCircleFill, { color });
|
|
54903
|
+
default:
|
|
54904
|
+
return /* @__PURE__ */ jsx160(WfoCheckmarkCircleFill, { color });
|
|
54905
|
+
}
|
|
55073
54906
|
};
|
|
55074
|
-
|
|
55075
|
-
|
|
55076
|
-
|
|
55077
|
-
|
|
55078
|
-
|
|
55079
|
-
|
|
55080
|
-
|
|
55081
|
-
|
|
55082
|
-
|
|
55083
|
-
|
|
55084
|
-
|
|
55085
|
-
|
|
55086
|
-
|
|
55087
|
-
|
|
55088
|
-
onShowTraceback,
|
|
55089
|
-
isTask
|
|
54907
|
+
var MainIcon = ({ stepStatus, color = "", isStartStep }) => {
|
|
54908
|
+
if (isStartStep) {
|
|
54909
|
+
return /* @__PURE__ */ jsx160(WfoPlayFill, { color });
|
|
54910
|
+
}
|
|
54911
|
+
switch (stepStatus) {
|
|
54912
|
+
case "form" /* FORM */:
|
|
54913
|
+
return /* @__PURE__ */ jsx160(WfoPencilAlt, { color });
|
|
54914
|
+
default:
|
|
54915
|
+
return /* @__PURE__ */ jsx160(WfoCogFill, { color, width: 16, height: 16 });
|
|
54916
|
+
}
|
|
54917
|
+
};
|
|
54918
|
+
var WfoStepStatusIcon = ({
|
|
54919
|
+
stepStatus,
|
|
54920
|
+
isStartStep = false
|
|
55090
54921
|
}) => {
|
|
55091
|
-
const t = useTranslations51("processes.steps");
|
|
55092
54922
|
const { theme } = useOrchestratorTheme();
|
|
55093
54923
|
const {
|
|
55094
|
-
|
|
55095
|
-
|
|
55096
|
-
|
|
55097
|
-
|
|
54924
|
+
stepStateSuccessIconStyle,
|
|
54925
|
+
stepStateSuspendIconStyle,
|
|
54926
|
+
stepStatePendingIconStyle,
|
|
54927
|
+
stepStateFailedIconStyle
|
|
55098
54928
|
} = useWithOrchestratorTheme(getStyles14);
|
|
55099
|
-
const [
|
|
55100
|
-
|
|
55101
|
-
|
|
55102
|
-
|
|
55103
|
-
|
|
55104
|
-
|
|
55105
|
-
|
|
55106
|
-
|
|
55107
|
-
|
|
55108
|
-
|
|
55109
|
-
|
|
54929
|
+
const [
|
|
54930
|
+
stepStateStyle,
|
|
54931
|
+
mainIconColor,
|
|
54932
|
+
hasSubIcon = false,
|
|
54933
|
+
subIconColor = ""
|
|
54934
|
+
] = (() => {
|
|
54935
|
+
switch (stepStatus) {
|
|
54936
|
+
case "suspend" /* SUSPEND */:
|
|
54937
|
+
return [
|
|
54938
|
+
stepStateSuspendIconStyle,
|
|
54939
|
+
theme.colors.warningText,
|
|
54940
|
+
true,
|
|
54941
|
+
theme.colors.warningText
|
|
54942
|
+
];
|
|
54943
|
+
case "pending" /* PENDING */:
|
|
54944
|
+
return [stepStatePendingIconStyle, theme.colors.darkShade];
|
|
54945
|
+
case "failed" /* FAILED */:
|
|
54946
|
+
return [
|
|
54947
|
+
stepStateFailedIconStyle,
|
|
54948
|
+
theme.colors.dangerText,
|
|
54949
|
+
true,
|
|
54950
|
+
theme.colors.dangerText
|
|
54951
|
+
];
|
|
54952
|
+
case "skipped" /* SKIPPED */:
|
|
54953
|
+
return [
|
|
54954
|
+
stepStateSuccessIconStyle,
|
|
54955
|
+
theme.colors.primaryText,
|
|
54956
|
+
true,
|
|
54957
|
+
theme.colors.darkShade
|
|
54958
|
+
];
|
|
54959
|
+
case "form" /* FORM */:
|
|
54960
|
+
return [stepStateSuccessIconStyle, theme.colors.link];
|
|
54961
|
+
default:
|
|
54962
|
+
return [
|
|
54963
|
+
stepStateSuccessIconStyle,
|
|
54964
|
+
theme.colors.primaryText,
|
|
54965
|
+
true,
|
|
54966
|
+
theme.colors.successText
|
|
54967
|
+
];
|
|
55110
54968
|
}
|
|
55111
|
-
);
|
|
55112
|
-
return /* @__PURE__ */
|
|
55113
|
-
/* @__PURE__ */
|
|
55114
|
-
|
|
55115
|
-
!showRaw && /* @__PURE__ */ jsx166(
|
|
55116
|
-
WfoTextAnchor,
|
|
55117
|
-
{
|
|
55118
|
-
text: allDetailToggleText,
|
|
55119
|
-
onClick: onToggleAllDetailsIsOpen
|
|
55120
|
-
}
|
|
55121
|
-
)
|
|
55122
|
-
] }),
|
|
55123
|
-
/* @__PURE__ */ jsxs94(
|
|
55124
|
-
EuiFlexGroup19,
|
|
54969
|
+
})();
|
|
54970
|
+
return /* @__PURE__ */ jsxs89(EuiFlexItem24, { css: { flexDirection: "row" }, grow: 0, children: [
|
|
54971
|
+
/* @__PURE__ */ jsx160("div", { css: stepStateStyle, children: /* @__PURE__ */ jsx160(
|
|
54972
|
+
MainIcon,
|
|
55125
54973
|
{
|
|
55126
|
-
|
|
55127
|
-
|
|
55128
|
-
|
|
55129
|
-
|
|
55130
|
-
|
|
55131
|
-
|
|
55132
|
-
|
|
55133
|
-
|
|
55134
|
-
|
|
55135
|
-
|
|
55136
|
-
|
|
55137
|
-
|
|
55138
|
-
|
|
55139
|
-
|
|
55140
|
-
EuiButton11,
|
|
55141
|
-
{
|
|
55142
|
-
onClick: () => onChangeShowDelta(!showDelta),
|
|
55143
|
-
iconSide: "right",
|
|
55144
|
-
size: "s",
|
|
55145
|
-
iconType: () => /* @__PURE__ */ jsx166(WfoCode, { color: theme.colors.link }),
|
|
55146
|
-
children: showDelta ? t("hideDelta") : t("showDelta")
|
|
55147
|
-
}
|
|
55148
|
-
),
|
|
55149
|
-
/* @__PURE__ */ jsx166(
|
|
55150
|
-
EuiPopover5,
|
|
55151
|
-
{
|
|
55152
|
-
button: viewOptionButton,
|
|
55153
|
-
isOpen: isViewOptionOpen,
|
|
55154
|
-
closePopover: closeViewOption,
|
|
55155
|
-
display: "block",
|
|
55156
|
-
children: /* @__PURE__ */ jsx166("div", { children: /* @__PURE__ */ jsxs94(EuiForm2, { component: "form", children: [
|
|
55157
|
-
/* @__PURE__ */ jsx166(EuiFormRow20, { children: /* @__PURE__ */ jsx166(
|
|
55158
|
-
EuiSwitch3,
|
|
55159
|
-
{
|
|
55160
|
-
label: "Hidden keys",
|
|
55161
|
-
checked: showHiddenKeys,
|
|
55162
|
-
onChange: (e) => {
|
|
55163
|
-
onChangeShowHiddenKeys(
|
|
55164
|
-
e.target.checked
|
|
55165
|
-
);
|
|
55166
|
-
closeViewOption();
|
|
55167
|
-
}
|
|
55168
|
-
}
|
|
55169
|
-
) }),
|
|
55170
|
-
/* @__PURE__ */ jsx166(EuiFormRow20, { children: /* @__PURE__ */ jsx166(
|
|
55171
|
-
EuiSwitch3,
|
|
55172
|
-
{
|
|
55173
|
-
label: "Raw JSON data",
|
|
55174
|
-
checked: showRaw,
|
|
55175
|
-
onChange: (e) => {
|
|
55176
|
-
onChangeShowRaw(e.target.checked);
|
|
55177
|
-
closeViewOption();
|
|
55178
|
-
}
|
|
55179
|
-
}
|
|
55180
|
-
) })
|
|
55181
|
-
] }) })
|
|
55182
|
-
}
|
|
55183
|
-
)
|
|
55184
|
-
]
|
|
54974
|
+
color: mainIconColor,
|
|
54975
|
+
stepStatus,
|
|
54976
|
+
isStartStep
|
|
54977
|
+
}
|
|
54978
|
+
) }),
|
|
54979
|
+
/* @__PURE__ */ jsx160(
|
|
54980
|
+
"div",
|
|
54981
|
+
{
|
|
54982
|
+
css: {
|
|
54983
|
+
transform: "translate(-16px, -8px)",
|
|
54984
|
+
width: `${theme.base}`,
|
|
54985
|
+
visibility: hasSubIcon ? "visible" : "hidden"
|
|
54986
|
+
},
|
|
54987
|
+
children: /* @__PURE__ */ jsx160(SubIcon, { color: subIconColor, stepStatus })
|
|
55185
54988
|
}
|
|
55186
54989
|
)
|
|
55187
54990
|
] });
|
|
55188
54991
|
};
|
|
55189
54992
|
|
|
55190
|
-
// src/
|
|
55191
|
-
|
|
55192
|
-
|
|
55193
|
-
|
|
55194
|
-
|
|
55195
|
-
|
|
55196
|
-
|
|
55197
|
-
|
|
55198
|
-
|
|
55199
|
-
|
|
55200
|
-
EuiSpacer as EuiSpacer16,
|
|
55201
|
-
EuiText as EuiText35
|
|
55202
|
-
} from "@elastic/eui";
|
|
55203
|
-
|
|
55204
|
-
// src/pages/processes/timelineUtils.ts
|
|
55205
|
-
var getMostAccurateTimelineStatus = (statusPreviousStep, statusCurrentStep) => statusCurrentStep !== "pending" /* PENDING */ ? statusCurrentStep : statusPreviousStep;
|
|
55206
|
-
var isNonRetryableState = (status) => {
|
|
55207
|
-
return status === "complete" /* COMPLETE */ || status === "success" /* SUCCESS */ || status === "skipped" /* SKIPPED */;
|
|
55208
|
-
};
|
|
55209
|
-
var isFailedStep = (step) => step.status === "failed" /* FAILED */;
|
|
55210
|
-
var stepsShouldBeMerged = (previousStep, currentStep) => !isNonRetryableState(previousStep.status) && previousStep.name === currentStep.name;
|
|
55211
|
-
var convertStepsToGroupedSteps = (steps) => steps.reduce(
|
|
55212
|
-
(previousGroupedSteps, currentStep, index, allSteps) => {
|
|
55213
|
-
const previousGroupedStep = previousGroupedSteps.slice(-1)[0];
|
|
55214
|
-
if (index > 0 && stepsShouldBeMerged(allSteps[index - 1], currentStep)) {
|
|
55215
|
-
const allGroupedStepsExceptLast = previousGroupedSteps.slice(
|
|
55216
|
-
0,
|
|
55217
|
-
-1
|
|
55218
|
-
);
|
|
55219
|
-
const updatedLastGroupedStep = {
|
|
55220
|
-
steps: [...previousGroupedStep.steps, currentStep]
|
|
55221
|
-
};
|
|
55222
|
-
return [...allGroupedStepsExceptLast, updatedLastGroupedStep];
|
|
55223
|
-
}
|
|
55224
|
-
return [
|
|
55225
|
-
...previousGroupedSteps,
|
|
55226
|
-
{
|
|
55227
|
-
steps: [currentStep]
|
|
55228
|
-
}
|
|
55229
|
-
];
|
|
55230
|
-
},
|
|
55231
|
-
[]
|
|
55232
|
-
);
|
|
55233
|
-
var mapStepToTimelineItem = (processDetailStep) => {
|
|
55234
|
-
return {
|
|
55235
|
-
id: processDetailStep.stepId,
|
|
55236
|
-
processStepStatus: processDetailStep.status,
|
|
55237
|
-
stepDetail: processDetailStep.name
|
|
55238
|
-
};
|
|
55239
|
-
};
|
|
55240
|
-
var mapGroupedStepToTimelineItem = (groupedStep) => {
|
|
55241
|
-
if (groupedStep.steps.length === 1) {
|
|
55242
|
-
return mapStepToTimelineItem(groupedStep.steps[0]);
|
|
55243
|
-
}
|
|
55244
|
-
return groupedStep.steps.reduce(
|
|
55245
|
-
(previousTimelineItem, currentStep) => {
|
|
55246
|
-
var _a;
|
|
55247
|
-
return __spreadProps(__spreadValues({}, previousTimelineItem), {
|
|
55248
|
-
id: (_a = currentStep.stepId) != null ? _a : previousTimelineItem.id,
|
|
55249
|
-
processStepStatus: getMostAccurateTimelineStatus(
|
|
55250
|
-
previousTimelineItem.processStepStatus,
|
|
55251
|
-
currentStep.status
|
|
55252
|
-
)
|
|
55253
|
-
});
|
|
55254
|
-
},
|
|
55255
|
-
__spreadProps(__spreadValues({}, mapStepToTimelineItem(groupedStep.steps[0])), {
|
|
55256
|
-
value: groupedStep.steps.filter(isFailedStep).length || void 0
|
|
55257
|
-
})
|
|
55258
|
-
);
|
|
55259
|
-
};
|
|
55260
|
-
var mapGroupedStepsToTimelineItems = (groupedSteps) => groupedSteps.map(mapGroupedStepToTimelineItem);
|
|
55261
|
-
var getIndexOfCurrentStep = (timelineItems) => {
|
|
55262
|
-
const reversedTimelineItems = [...timelineItems].reverse();
|
|
55263
|
-
const reversedIndexOfCurrentStep = reversedTimelineItems.findIndex(
|
|
55264
|
-
(timelineItem) => timelineItem.processStepStatus === "running" /* RUNNING */
|
|
55265
|
-
);
|
|
55266
|
-
if (reversedIndexOfCurrentStep !== -1) {
|
|
55267
|
-
return timelineItems.length - reversedIndexOfCurrentStep - 1;
|
|
54993
|
+
// src/components/WfoWorkflowSteps/stepListUtils.ts
|
|
54994
|
+
var STEP_STATE_HIDDEN_KEYS = [
|
|
54995
|
+
"label_",
|
|
54996
|
+
"divider_",
|
|
54997
|
+
"__",
|
|
54998
|
+
"confirmation_mail"
|
|
54999
|
+
];
|
|
55000
|
+
var getStepContent = (stepDelta, showHiddenKeys) => {
|
|
55001
|
+
if (showHiddenKeys) {
|
|
55002
|
+
return stepDelta;
|
|
55268
55003
|
}
|
|
55269
|
-
|
|
55270
|
-
(
|
|
55004
|
+
return Object.entries(stepDelta).filter(
|
|
55005
|
+
([key]) => !STEP_STATE_HIDDEN_KEYS.some((word) => key.startsWith(word))
|
|
55006
|
+
).reduce(
|
|
55007
|
+
(previousValue, currentValue) => __spreadProps(__spreadValues({}, previousValue), {
|
|
55008
|
+
[currentValue[0]]: currentValue[1]
|
|
55009
|
+
}),
|
|
55010
|
+
{}
|
|
55271
55011
|
);
|
|
55272
|
-
if (indexOfFirstPending !== -1) {
|
|
55273
|
-
return indexOfFirstPending - 1;
|
|
55274
|
-
}
|
|
55275
|
-
return timelineItems.length - 1;
|
|
55276
55012
|
};
|
|
55277
55013
|
|
|
55278
|
-
// src/
|
|
55279
|
-
import {
|
|
55280
|
-
|
|
55281
|
-
|
|
55282
|
-
|
|
55014
|
+
// src/components/WfoWorkflowSteps/WfoStep/WfoStepForm.tsx
|
|
55015
|
+
import { useState as useState35 } from "react";
|
|
55016
|
+
import { EuiFlexItem as EuiFlexItem25 } from "@elastic/eui";
|
|
55017
|
+
import { jsx as jsx161 } from "@emotion/react/jsx-runtime";
|
|
55018
|
+
var WfoStepForm = ({
|
|
55019
|
+
userInputForm,
|
|
55020
|
+
isTask,
|
|
55021
|
+
processId
|
|
55283
55022
|
}) => {
|
|
55284
|
-
const
|
|
55023
|
+
const [isProcessing, setIsProcessing] = useState35(false);
|
|
55024
|
+
const [hasError, setHasError] = useState35(false);
|
|
55285
55025
|
const { theme } = useOrchestratorTheme();
|
|
55286
|
-
|
|
55287
|
-
|
|
55288
|
-
{
|
|
55289
|
-
|
|
55290
|
-
gutterSize: "xs",
|
|
55291
|
-
css: {
|
|
55292
|
-
flex: 1,
|
|
55293
|
-
whiteSpace: "nowrap",
|
|
55294
|
-
overflow: "hidden"
|
|
55295
|
-
},
|
|
55296
|
-
children: [
|
|
55297
|
-
/* @__PURE__ */ jsx167(EuiText35, { size: "xs", children: t(translationKey) }),
|
|
55298
|
-
/* @__PURE__ */ jsx167(
|
|
55299
|
-
EuiText35,
|
|
55300
|
-
{
|
|
55301
|
-
css: {
|
|
55302
|
-
fontWeight: theme.font.weight.bold,
|
|
55303
|
-
fontSize: theme.size.m,
|
|
55304
|
-
overflow: "hidden",
|
|
55305
|
-
textOverflow: "ellipsis"
|
|
55306
|
-
},
|
|
55307
|
-
children: value
|
|
55308
|
-
}
|
|
55309
|
-
)
|
|
55310
|
-
]
|
|
55026
|
+
const [resumeProcess] = useResumeProcessMutation();
|
|
55027
|
+
const submitForm = (processInput) => {
|
|
55028
|
+
if (!processId) {
|
|
55029
|
+
return Promise.reject();
|
|
55311
55030
|
}
|
|
55312
|
-
|
|
55313
|
-
|
|
55314
|
-
|
|
55315
|
-
|
|
55316
|
-
|
|
55317
|
-
|
|
55318
|
-
|
|
55319
|
-
|
|
55320
|
-
|
|
55321
|
-
|
|
55322
|
-
|
|
55323
|
-
hasError = false
|
|
55324
|
-
}) => {
|
|
55325
|
-
var _a, _b, _c;
|
|
55326
|
-
const t = useTranslations52("processes.detail");
|
|
55327
|
-
const { theme } = useOrchestratorTheme();
|
|
55328
|
-
const { showConfirmDialog } = useContext7(ConfirmationDialogContext);
|
|
55329
|
-
const [retryProcess] = useRetryProcessMutation();
|
|
55330
|
-
const [deleteProcess] = useDeleteProcessMutation();
|
|
55331
|
-
const [abortProcess] = useAbortProcessMutation();
|
|
55332
|
-
const router = useRouter8();
|
|
55333
|
-
const { isEngineRunningNow } = useCheckEngineStatus();
|
|
55334
|
-
const { isAllowed } = usePolicy();
|
|
55335
|
-
const listIncludesStatus = (processStatusesForDisabledState, status) => status ? processStatusesForDisabledState.map((stat) => stat.toUpperCase()).includes(status) : false;
|
|
55336
|
-
const retryButtonIsDisabled = buttonsAreDisabled || !listIncludesStatus(
|
|
55337
|
-
[
|
|
55338
|
-
"failed" /* FAILED */,
|
|
55339
|
-
"api_unavailable" /* API_UNAVAILABLE */,
|
|
55340
|
-
"inconsistent_data" /* INCONSISTENT_DATA */,
|
|
55341
|
-
"waiting" /* WAITING */
|
|
55342
|
-
],
|
|
55343
|
-
processDetail == null ? void 0 : processDetail.lastStatus
|
|
55344
|
-
);
|
|
55345
|
-
const abortButtonIsDisabled = buttonsAreDisabled || listIncludesStatus(
|
|
55346
|
-
["completed" /* COMPLETED */, "aborted" /* ABORTED */],
|
|
55347
|
-
processDetail == null ? void 0 : processDetail.lastStatus
|
|
55348
|
-
);
|
|
55349
|
-
const deleteButtonIsDisabled = buttonsAreDisabled || listIncludesStatus(["running" /* RUNNING */], processDetail == null ? void 0 : processDetail.lastStatus);
|
|
55350
|
-
const processIsTask = (processDetail == null ? void 0 : processDetail.isTask) === true;
|
|
55351
|
-
const handleActionButtonClick = (action) => () => __async(void 0, null, function* () {
|
|
55352
|
-
if (yield isEngineRunningNow()) {
|
|
55353
|
-
action();
|
|
55354
|
-
}
|
|
55355
|
-
});
|
|
55356
|
-
const retryAction = () => showConfirmDialog({
|
|
55357
|
-
question: t(
|
|
55358
|
-
processIsTask ? "retryTaskQuestion" : "retryWorkflowQuestion",
|
|
55359
|
-
{
|
|
55360
|
-
workflowName: processDetail == null ? void 0 : processDetail.workflowName
|
|
55031
|
+
return resumeProcess({ processId, userInputs: processInput }).unwrap().then(() => {
|
|
55032
|
+
setIsProcessing(true);
|
|
55033
|
+
}).catch((error) => {
|
|
55034
|
+
if ((error == null ? void 0 : error.status) !== 510 /* FormNotComplete */) {
|
|
55035
|
+
if ((error == null ? void 0 : error.status) === 400 /* BadRequest */) {
|
|
55036
|
+
throw error;
|
|
55037
|
+
}
|
|
55038
|
+
console.error(error);
|
|
55039
|
+
setHasError(true);
|
|
55040
|
+
} else {
|
|
55041
|
+
throw error;
|
|
55361
55042
|
}
|
|
55362
|
-
)
|
|
55363
|
-
|
|
55364
|
-
|
|
55043
|
+
});
|
|
55044
|
+
};
|
|
55045
|
+
return /* @__PURE__ */ jsx161(EuiFlexItem25, { css: { margin: theme.size.m }, children: hasError && /* @__PURE__ */ jsx161(WfoError, {}) || isProcessing && /* @__PURE__ */ jsx161(WfoLoading, {}) || /* @__PURE__ */ jsx161(
|
|
55046
|
+
UserInputFormWizard,
|
|
55047
|
+
{
|
|
55048
|
+
stepUserInput: userInputForm,
|
|
55049
|
+
stepSubmit: submitForm,
|
|
55050
|
+
hasNext: false,
|
|
55051
|
+
isTask,
|
|
55052
|
+
isResuming: true
|
|
55365
55053
|
}
|
|
55366
|
-
});
|
|
55367
|
-
|
|
55368
|
-
|
|
55369
|
-
|
|
55370
|
-
|
|
55371
|
-
|
|
55054
|
+
) });
|
|
55055
|
+
};
|
|
55056
|
+
|
|
55057
|
+
// src/components/WfoWorkflowSteps/WfoStep/WfoStep.tsx
|
|
55058
|
+
import { Fragment as Fragment38, jsx as jsx162, jsxs as jsxs90 } from "@emotion/react/jsx-runtime";
|
|
55059
|
+
var WfoStep = React47.forwardRef(
|
|
55060
|
+
({
|
|
55061
|
+
stepListItem,
|
|
55062
|
+
onToggleStepDetail,
|
|
55063
|
+
startedAt,
|
|
55064
|
+
showHiddenKeys,
|
|
55065
|
+
isStartStep = false,
|
|
55066
|
+
isTask,
|
|
55067
|
+
processId
|
|
55068
|
+
}, ref) => {
|
|
55069
|
+
var _a;
|
|
55070
|
+
const { isExpanded, step, userInputForm } = stepListItem;
|
|
55071
|
+
const { theme } = useOrchestratorTheme();
|
|
55072
|
+
const {
|
|
55073
|
+
stepEmailContainerStyle,
|
|
55074
|
+
getStepHeaderStyle,
|
|
55075
|
+
stepHeaderRightStyle,
|
|
55076
|
+
stepListContentBoldTextStyle,
|
|
55077
|
+
stepDurationStyle,
|
|
55078
|
+
stepRowStyle,
|
|
55079
|
+
getStepToggleExpandStyle
|
|
55080
|
+
} = useWithOrchestratorTheme(getStyles14);
|
|
55081
|
+
const t = useTranslations50("processes.steps");
|
|
55082
|
+
const hasHtmlMail = (_a = step.stateDelta) == null ? void 0 : _a.hasOwnProperty("confirmation_mail");
|
|
55083
|
+
const stepContent = step.stateDelta ? getStepContent(step.stateDelta, showHiddenKeys) : {};
|
|
55084
|
+
const hasStepContent = hasHtmlMail || Object.keys(stepContent).length > 0;
|
|
55085
|
+
const displayMailConfirmation = (value) => {
|
|
55086
|
+
if (!value) {
|
|
55087
|
+
return "";
|
|
55372
55088
|
}
|
|
55373
|
-
|
|
55374
|
-
|
|
55375
|
-
|
|
55376
|
-
|
|
55377
|
-
|
|
55378
|
-
|
|
55379
|
-
|
|
55380
|
-
|
|
55381
|
-
|
|
55382
|
-
|
|
55383
|
-
|
|
55384
|
-
|
|
55385
|
-
|
|
55386
|
-
|
|
55387
|
-
|
|
55388
|
-
|
|
55389
|
-
|
|
55390
|
-
|
|
55391
|
-
|
|
55392
|
-
/* @__PURE__ */
|
|
55393
|
-
/* @__PURE__ */
|
|
55394
|
-
|
|
55089
|
+
return /* @__PURE__ */ jsxs90(EuiText31, { size: "s", children: [
|
|
55090
|
+
/* @__PURE__ */ jsx162("h4", { children: "To" }),
|
|
55091
|
+
/* @__PURE__ */ jsx162("p", { children: value.to.map(
|
|
55092
|
+
(v, i) => /* @__PURE__ */ jsxs90("div", { children: [
|
|
55093
|
+
v.name,
|
|
55094
|
+
" <",
|
|
55095
|
+
/* @__PURE__ */ jsx162("a", { href: `mailto: ${v.email}`, children: v.email }),
|
|
55096
|
+
">"
|
|
55097
|
+
] }, `to-${i}`)
|
|
55098
|
+
) }),
|
|
55099
|
+
/* @__PURE__ */ jsx162("h4", { children: "CC" }),
|
|
55100
|
+
/* @__PURE__ */ jsx162("p", { children: value.cc.map(
|
|
55101
|
+
(v, i) => /* @__PURE__ */ jsxs90("div", { children: [
|
|
55102
|
+
v.name,
|
|
55103
|
+
" <",
|
|
55104
|
+
/* @__PURE__ */ jsx162("a", { href: `mailto: ${v.email}`, children: v.email }),
|
|
55105
|
+
">"
|
|
55106
|
+
] }, `cc-${i}`)
|
|
55107
|
+
) }),
|
|
55108
|
+
/* @__PURE__ */ jsx162("h4", { children: "Subject" }),
|
|
55109
|
+
/* @__PURE__ */ jsx162("p", { children: value.subject }),
|
|
55110
|
+
/* @__PURE__ */ jsx162("h4", { children: "Message" }),
|
|
55111
|
+
/* @__PURE__ */ jsx162(
|
|
55112
|
+
"div",
|
|
55395
55113
|
{
|
|
55396
|
-
|
|
55397
|
-
|
|
55114
|
+
className: "emailMessage",
|
|
55115
|
+
dangerouslySetInnerHTML: { __html: value.message }
|
|
55398
55116
|
}
|
|
55399
55117
|
)
|
|
55400
|
-
] })
|
|
55401
|
-
|
|
55402
|
-
|
|
55118
|
+
] });
|
|
55119
|
+
};
|
|
55120
|
+
return /* @__PURE__ */ jsx162("div", { ref, children: /* @__PURE__ */ jsxs90(EuiPanel5, { children: [
|
|
55121
|
+
/* @__PURE__ */ jsxs90(
|
|
55122
|
+
EuiFlexGroup18,
|
|
55403
55123
|
{
|
|
55404
|
-
|
|
55405
|
-
|
|
55406
|
-
css: { flexGrow: 0 },
|
|
55407
|
-
gutterSize: "s",
|
|
55124
|
+
css: getStepHeaderStyle(hasStepContent),
|
|
55125
|
+
onClick: () => hasStepContent && onToggleStepDetail(),
|
|
55408
55126
|
children: [
|
|
55409
|
-
/* @__PURE__ */
|
|
55410
|
-
|
|
55411
|
-
{
|
|
55412
|
-
resource: "/orchestrator/processes/retry/" /* PROCESS_RETRY */,
|
|
55413
|
-
children: /* @__PURE__ */ jsx167(
|
|
55414
|
-
EuiButton12,
|
|
55415
|
-
{
|
|
55416
|
-
onClick: handleActionButtonClick(retryAction),
|
|
55417
|
-
iconType: () => /* @__PURE__ */ jsx167(
|
|
55418
|
-
WfoRefresh,
|
|
55419
|
-
{
|
|
55420
|
-
color: retryButtonIsDisabled ? theme.colors.subduedText : theme.colors.link
|
|
55421
|
-
}
|
|
55422
|
-
),
|
|
55423
|
-
isDisabled: retryButtonIsDisabled,
|
|
55424
|
-
children: t("retry")
|
|
55425
|
-
}
|
|
55426
|
-
)
|
|
55427
|
-
}
|
|
55428
|
-
),
|
|
55429
|
-
/* @__PURE__ */ jsx167(
|
|
55430
|
-
WfoIsAllowedToRender,
|
|
55127
|
+
/* @__PURE__ */ jsx162(
|
|
55128
|
+
WfoStepStatusIcon,
|
|
55431
55129
|
{
|
|
55432
|
-
|
|
55433
|
-
|
|
55434
|
-
EuiButton12,
|
|
55435
|
-
{
|
|
55436
|
-
onClick: handleActionButtonClick(abortAction),
|
|
55437
|
-
iconType: () => /* @__PURE__ */ jsx167(
|
|
55438
|
-
WfoXCircleFill,
|
|
55439
|
-
{
|
|
55440
|
-
color: abortButtonIsDisabled ? theme.colors.subduedText : theme.colors.danger
|
|
55441
|
-
}
|
|
55442
|
-
),
|
|
55443
|
-
color: "danger",
|
|
55444
|
-
isDisabled: abortButtonIsDisabled,
|
|
55445
|
-
children: t("abort")
|
|
55446
|
-
}
|
|
55447
|
-
)
|
|
55130
|
+
stepStatus: step.status,
|
|
55131
|
+
isStartStep
|
|
55448
55132
|
}
|
|
55449
55133
|
),
|
|
55450
|
-
|
|
55451
|
-
|
|
55452
|
-
{
|
|
55453
|
-
|
|
55454
|
-
|
|
55455
|
-
|
|
55456
|
-
|
|
55457
|
-
|
|
55458
|
-
|
|
55459
|
-
|
|
55460
|
-
|
|
55461
|
-
|
|
55462
|
-
|
|
55463
|
-
|
|
55464
|
-
|
|
55134
|
+
/* @__PURE__ */ jsxs90(EuiFlexItem26, { grow: 0, children: [
|
|
55135
|
+
/* @__PURE__ */ jsx162(EuiText31, { css: stepListContentBoldTextStyle, children: step.name }),
|
|
55136
|
+
/* @__PURE__ */ jsxs90(EuiText31, { children: [
|
|
55137
|
+
step.status,
|
|
55138
|
+
" ",
|
|
55139
|
+
step.executed && `- ${formatDate(step.executed)}`
|
|
55140
|
+
] })
|
|
55141
|
+
] }),
|
|
55142
|
+
/* @__PURE__ */ jsx162(EuiFlexGroup18, { css: stepRowStyle, children: step.executed && /* @__PURE__ */ jsxs90(Fragment38, { children: [
|
|
55143
|
+
/* @__PURE__ */ jsxs90(
|
|
55144
|
+
EuiFlexItem26,
|
|
55145
|
+
{
|
|
55146
|
+
grow: 0,
|
|
55147
|
+
css: stepHeaderRightStyle,
|
|
55148
|
+
children: [
|
|
55149
|
+
/* @__PURE__ */ jsx162(EuiText31, { css: stepDurationStyle, children: t("duration") }),
|
|
55150
|
+
/* @__PURE__ */ jsx162(EuiText31, { size: "m", children: calculateTimeDifference(
|
|
55151
|
+
startedAt,
|
|
55152
|
+
step.executed
|
|
55153
|
+
) })
|
|
55154
|
+
]
|
|
55155
|
+
}
|
|
55156
|
+
),
|
|
55157
|
+
/* @__PURE__ */ jsx162(
|
|
55158
|
+
EuiFlexItem26,
|
|
55159
|
+
{
|
|
55160
|
+
grow: 0,
|
|
55161
|
+
css: getStepToggleExpandStyle(
|
|
55162
|
+
hasStepContent
|
|
55163
|
+
),
|
|
55164
|
+
children: isExpanded && /* @__PURE__ */ jsx162(
|
|
55165
|
+
WfoChevronUp,
|
|
55166
|
+
{
|
|
55167
|
+
color: theme.colors.text
|
|
55168
|
+
}
|
|
55169
|
+
) || /* @__PURE__ */ jsx162(
|
|
55170
|
+
WfoChevronDown,
|
|
55171
|
+
{
|
|
55172
|
+
color: theme.colors.text
|
|
55173
|
+
}
|
|
55174
|
+
)
|
|
55175
|
+
}
|
|
55176
|
+
)
|
|
55177
|
+
] }) })
|
|
55465
55178
|
]
|
|
55466
55179
|
}
|
|
55180
|
+
),
|
|
55181
|
+
hasStepContent && !hasHtmlMail && isExpanded && /* @__PURE__ */ jsx162(WfoJsonCodeBlock, { data: stepContent }),
|
|
55182
|
+
isExpanded && hasHtmlMail && /* @__PURE__ */ jsx162("div", { css: stepEmailContainerStyle, children: displayMailConfirmation(
|
|
55183
|
+
step.stateDelta.confirmation_mail
|
|
55184
|
+
) }),
|
|
55185
|
+
step.status === "suspend" /* SUSPEND */ && userInputForm && /* @__PURE__ */ jsx162(
|
|
55186
|
+
WfoStepForm,
|
|
55187
|
+
{
|
|
55188
|
+
userInputForm,
|
|
55189
|
+
isTask,
|
|
55190
|
+
processId
|
|
55191
|
+
}
|
|
55192
|
+
)
|
|
55193
|
+
] }) });
|
|
55194
|
+
}
|
|
55195
|
+
);
|
|
55196
|
+
WfoStep.displayName = "WfoStep";
|
|
55197
|
+
|
|
55198
|
+
// src/components/WfoWorkflowSteps/WfoStepList/WfoStepList.tsx
|
|
55199
|
+
import React48, { useImperativeHandle, useRef as useRef7 } from "react";
|
|
55200
|
+
import { Fragment as Fragment39, jsx as jsx163, jsxs as jsxs91 } from "@emotion/react/jsx-runtime";
|
|
55201
|
+
var WfoStepList = React48.forwardRef(
|
|
55202
|
+
({
|
|
55203
|
+
stepListItems,
|
|
55204
|
+
showHiddenKeys,
|
|
55205
|
+
startedAt,
|
|
55206
|
+
onToggleExpandStepListItem,
|
|
55207
|
+
onTriggerExpandStepListItem,
|
|
55208
|
+
isTask,
|
|
55209
|
+
processId
|
|
55210
|
+
}, reference) => {
|
|
55211
|
+
const { stepSpacerStyle } = useWithOrchestratorTheme(getStyles14);
|
|
55212
|
+
const stepReferences = useRef7(/* @__PURE__ */ new Map());
|
|
55213
|
+
let stepStartTime = startedAt;
|
|
55214
|
+
useImperativeHandle(reference, () => ({
|
|
55215
|
+
scrollToStep: (stepId) => __async(void 0, null, function* () {
|
|
55216
|
+
var _a;
|
|
55217
|
+
try {
|
|
55218
|
+
yield new Promise((resolve, reject) => {
|
|
55219
|
+
const foundStepListItem = stepListItems.find(
|
|
55220
|
+
(value) => value.step.stepId === stepId
|
|
55221
|
+
);
|
|
55222
|
+
if (!foundStepListItem) {
|
|
55223
|
+
return reject(void 0);
|
|
55224
|
+
}
|
|
55225
|
+
return resolve(
|
|
55226
|
+
onTriggerExpandStepListItem(foundStepListItem)
|
|
55227
|
+
);
|
|
55228
|
+
});
|
|
55229
|
+
(_a = stepReferences.current.get(stepId)) == null ? void 0 : _a.scrollIntoView({
|
|
55230
|
+
behavior: "smooth"
|
|
55231
|
+
});
|
|
55232
|
+
} catch (e) {
|
|
55233
|
+
console.error(
|
|
55234
|
+
"Error scrolling to step with stepId ",
|
|
55235
|
+
stepId
|
|
55236
|
+
);
|
|
55237
|
+
}
|
|
55238
|
+
})
|
|
55239
|
+
}));
|
|
55240
|
+
const getReferenceCallbackForStepId = (stepId) => (node) => node ? stepReferences.current.set(stepId, node) : stepReferences.current.delete(stepId);
|
|
55241
|
+
return /* @__PURE__ */ jsx163(Fragment39, { children: stepListItems.map((stepListItem, index) => {
|
|
55242
|
+
const stepComponent = /* @__PURE__ */ jsxs91("div", { children: [
|
|
55243
|
+
index !== 0 && /* @__PURE__ */ jsx163("div", { css: stepSpacerStyle }),
|
|
55244
|
+
/* @__PURE__ */ jsx163(
|
|
55245
|
+
WfoStep,
|
|
55246
|
+
{
|
|
55247
|
+
ref: getReferenceCallbackForStepId(
|
|
55248
|
+
stepListItem.step.stepId
|
|
55249
|
+
),
|
|
55250
|
+
onToggleStepDetail: () => onToggleExpandStepListItem(stepListItem),
|
|
55251
|
+
stepListItem,
|
|
55252
|
+
startedAt: stepStartTime,
|
|
55253
|
+
showHiddenKeys,
|
|
55254
|
+
isStartStep: index === 0,
|
|
55255
|
+
isTask,
|
|
55256
|
+
processId
|
|
55257
|
+
}
|
|
55258
|
+
)
|
|
55259
|
+
] }, `step-${index}`);
|
|
55260
|
+
if (index > 0) {
|
|
55261
|
+
stepStartTime = stepListItem.step.executed;
|
|
55262
|
+
}
|
|
55263
|
+
return stepComponent;
|
|
55264
|
+
}) });
|
|
55265
|
+
}
|
|
55266
|
+
);
|
|
55267
|
+
WfoStepList.displayName = "WfoStepList";
|
|
55268
|
+
|
|
55269
|
+
// src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoWorkflowStepList.tsx
|
|
55270
|
+
import React50, { useEffect as useEffect24, useState as useState37 } from "react";
|
|
55271
|
+
import { useTranslations as useTranslations53 } from "next-intl";
|
|
55272
|
+
|
|
55273
|
+
// src/components/WfoDiff/WfoDiff.tsx
|
|
55274
|
+
var refractor = __toESM(require_refractor(), 1);
|
|
55275
|
+
import { useCallback as useCallback6, useEffect as useEffect23, useMemo as useMemo4, useState as useState36 } from "react";
|
|
55276
|
+
import { Diff, Hunk, parseDiff, tokenize } from "react-diff-view";
|
|
55277
|
+
import "react-diff-view/style/index.css";
|
|
55278
|
+
import { useTranslations as useTranslations51 } from "next-intl";
|
|
55279
|
+
import "prism-themes/themes/prism-ghcolors.min.css";
|
|
55280
|
+
import { diffLines, formatLines } from "unidiff";
|
|
55281
|
+
import {
|
|
55282
|
+
EuiButtonIcon as EuiButtonIcon6,
|
|
55283
|
+
EuiFlexGroup as EuiFlexGroup19,
|
|
55284
|
+
EuiFlexItem as EuiFlexItem27,
|
|
55285
|
+
EuiSpacer as EuiSpacer16,
|
|
55286
|
+
EuiText as EuiText32
|
|
55287
|
+
} from "@elastic/eui";
|
|
55288
|
+
|
|
55289
|
+
// src/components/WfoDiff/styles.ts
|
|
55290
|
+
import { shade as shade2, tint as tint4 } from "@elastic/eui";
|
|
55291
|
+
import { css as css28 } from "@emotion/react";
|
|
55292
|
+
var getWfoDiffStyles = ({
|
|
55293
|
+
theme,
|
|
55294
|
+
toSecondaryColor,
|
|
55295
|
+
isDarkThemeActive
|
|
55296
|
+
}) => {
|
|
55297
|
+
const SHADE_FACTOR = 0.5;
|
|
55298
|
+
const TINT_FACTOR = 0.65;
|
|
55299
|
+
const insertGutterColor = toSecondaryColor(theme.colors.success);
|
|
55300
|
+
const insertCodeColor = isDarkThemeActive ? shade2(insertGutterColor, SHADE_FACTOR) : tint4(insertGutterColor, TINT_FACTOR);
|
|
55301
|
+
const deleteColor = toSecondaryColor(theme.colors.danger);
|
|
55302
|
+
const deleteSecondaryColor = isDarkThemeActive ? shade2(deleteColor, SHADE_FACTOR) : tint4(deleteColor, TINT_FACTOR);
|
|
55303
|
+
const diffStyle = css28({
|
|
55304
|
+
".diff-code-insert": {
|
|
55305
|
+
backgroundColor: insertCodeColor
|
|
55306
|
+
},
|
|
55307
|
+
".diff-gutter-insert": {
|
|
55308
|
+
backgroundColor: insertGutterColor
|
|
55309
|
+
},
|
|
55310
|
+
".diff-code-delete": {
|
|
55311
|
+
backgroundColor: deleteSecondaryColor
|
|
55312
|
+
},
|
|
55313
|
+
".diff-gutter-delete": {
|
|
55314
|
+
backgroundColor: deleteColor
|
|
55315
|
+
},
|
|
55316
|
+
".operator, .punctuation": {
|
|
55317
|
+
color: theme.colors.text
|
|
55318
|
+
}
|
|
55319
|
+
});
|
|
55320
|
+
return {
|
|
55321
|
+
diffStyle
|
|
55322
|
+
};
|
|
55323
|
+
};
|
|
55324
|
+
|
|
55325
|
+
// src/components/WfoDiff/WfoDiff.tsx
|
|
55326
|
+
import { jsx as jsx164, jsxs as jsxs92 } from "@emotion/react/jsx-runtime";
|
|
55327
|
+
var EMPTY_HUNKS = [];
|
|
55328
|
+
var SMALL_CONTEXT = 3;
|
|
55329
|
+
var FULL_CONTEXT = 1e6;
|
|
55330
|
+
var WfoDiff = ({ oldText, newText, syntax }) => {
|
|
55331
|
+
const t = useTranslations51("processes.delta");
|
|
55332
|
+
const [showSplit, setShowSplit] = useState36(true);
|
|
55333
|
+
const [showFull, setShowFull] = useState36(false);
|
|
55334
|
+
const { diffStyle } = useWithOrchestratorTheme(getWfoDiffStyles);
|
|
55335
|
+
const [{ type, hunks }, setDiff] = useState36({
|
|
55336
|
+
type: "modify",
|
|
55337
|
+
hunks: []
|
|
55338
|
+
});
|
|
55339
|
+
const updateDiffText = useCallback6(() => {
|
|
55340
|
+
const diffText = formatLines(diffLines(oldText, newText), {
|
|
55341
|
+
context: showFull ? FULL_CONTEXT : SMALL_CONTEXT
|
|
55342
|
+
});
|
|
55343
|
+
const [diff] = parseDiff(diffText, { nearbySequences: "zip" });
|
|
55344
|
+
setDiff(diff);
|
|
55345
|
+
}, [oldText, newText, setDiff, showFull]);
|
|
55346
|
+
const tokens = useMemo4(() => {
|
|
55347
|
+
if (!hunks) {
|
|
55348
|
+
return void 0;
|
|
55349
|
+
}
|
|
55350
|
+
const options = {
|
|
55351
|
+
refractor,
|
|
55352
|
+
highlight: !!syntax,
|
|
55353
|
+
language: syntax != null ? syntax : ""
|
|
55354
|
+
};
|
|
55355
|
+
try {
|
|
55356
|
+
return tokenize(hunks, options);
|
|
55357
|
+
} catch (ex) {
|
|
55358
|
+
return void 0;
|
|
55359
|
+
}
|
|
55360
|
+
}, [hunks, syntax]);
|
|
55361
|
+
useEffect23(() => {
|
|
55362
|
+
updateDiffText();
|
|
55363
|
+
}, [updateDiffText, showFull]);
|
|
55364
|
+
return /* @__PURE__ */ jsxs92("div", { children: [
|
|
55365
|
+
/* @__PURE__ */ jsxs92(EuiFlexGroup19, { gutterSize: "xs", children: [
|
|
55366
|
+
/* @__PURE__ */ jsx164(EuiFlexItem27, { grow: false, children: /* @__PURE__ */ jsx164(EuiText32, { children: /* @__PURE__ */ jsx164("h3", { children: t("title") }) }) }),
|
|
55367
|
+
/* @__PURE__ */ jsx164(EuiFlexItem27, { grow: false, children: /* @__PURE__ */ jsx164(
|
|
55368
|
+
EuiButtonIcon6,
|
|
55369
|
+
{
|
|
55370
|
+
size: "s",
|
|
55371
|
+
iconType: showSplit ? "continuityAboveBelow" : "continuityWithin",
|
|
55372
|
+
onClick: () => setShowSplit(!showSplit),
|
|
55373
|
+
"aria-label": t(
|
|
55374
|
+
showSplit ? "continuityAboveBelow" : "continuityWithin"
|
|
55375
|
+
)
|
|
55376
|
+
}
|
|
55377
|
+
) }),
|
|
55378
|
+
/* @__PURE__ */ jsx164(EuiFlexItem27, { grow: false, children: /* @__PURE__ */ jsx164(
|
|
55379
|
+
EuiButtonIcon6,
|
|
55380
|
+
{
|
|
55381
|
+
size: "s",
|
|
55382
|
+
iconType: showFull ? "fullScreenExit" : "fullScreen",
|
|
55383
|
+
onClick: () => setShowFull(!showFull),
|
|
55384
|
+
"aria-label": t(
|
|
55385
|
+
showFull ? "fullScreenExit" : "fullScreen"
|
|
55386
|
+
)
|
|
55387
|
+
}
|
|
55388
|
+
) })
|
|
55389
|
+
] }),
|
|
55390
|
+
/* @__PURE__ */ jsx164(EuiSpacer16, {}),
|
|
55391
|
+
/* @__PURE__ */ jsx164(
|
|
55392
|
+
Diff,
|
|
55393
|
+
{
|
|
55394
|
+
css: diffStyle,
|
|
55395
|
+
viewType: showSplit ? "split" : "unified",
|
|
55396
|
+
diffType: type,
|
|
55397
|
+
hunks: hunks || EMPTY_HUNKS,
|
|
55398
|
+
tokens,
|
|
55399
|
+
children: (hunks2) => hunks2.map((hunk) => /* @__PURE__ */ jsx164(Hunk, { hunk }, hunk.content))
|
|
55400
|
+
}
|
|
55401
|
+
)
|
|
55402
|
+
] });
|
|
55403
|
+
};
|
|
55404
|
+
var WfoDiff_default = WfoDiff;
|
|
55405
|
+
|
|
55406
|
+
// src/components/WfoWorkflowSteps/WfoTraceback/WfoTraceback.tsx
|
|
55407
|
+
import { useTranslations as useTranslations52 } from "next-intl";
|
|
55408
|
+
import { EuiCodeBlock, EuiText as EuiText33 } from "@elastic/eui";
|
|
55409
|
+
|
|
55410
|
+
// src/components/WfoWorkflowSteps/WfoTraceback/styles.ts
|
|
55411
|
+
import { css as css29 } from "@emotion/react";
|
|
55412
|
+
var getStyles15 = ({ theme }) => {
|
|
55413
|
+
const codeBlockStyle = css29({
|
|
55414
|
+
marginTop: theme.size.m,
|
|
55415
|
+
marginBottom: theme.size.l,
|
|
55416
|
+
borderRadius: theme.border.radius.medium
|
|
55417
|
+
});
|
|
55418
|
+
return {
|
|
55419
|
+
codeBlockStyle
|
|
55420
|
+
};
|
|
55421
|
+
};
|
|
55422
|
+
|
|
55423
|
+
// src/components/WfoWorkflowSteps/WfoTraceback/WfoTraceback.tsx
|
|
55424
|
+
import { Fragment as Fragment40, jsx as jsx165, jsxs as jsxs93 } from "@emotion/react/jsx-runtime";
|
|
55425
|
+
var WfoTraceback = ({ children }) => {
|
|
55426
|
+
const { codeBlockStyle } = useWithOrchestratorTheme(getStyles15);
|
|
55427
|
+
const t = useTranslations52("processes.steps");
|
|
55428
|
+
return /* @__PURE__ */ jsxs93(Fragment40, { children: [
|
|
55429
|
+
/* @__PURE__ */ jsx165(EuiText33, { children: /* @__PURE__ */ jsx165("h3", { children: t("traceback") }) }),
|
|
55430
|
+
/* @__PURE__ */ jsx165(EuiCodeBlock, { css: codeBlockStyle, children })
|
|
55431
|
+
] });
|
|
55432
|
+
};
|
|
55433
|
+
|
|
55434
|
+
// src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoWorkflowStepList.tsx
|
|
55435
|
+
import { Fragment as Fragment41, jsx as jsx166, jsxs as jsxs94 } from "@emotion/react/jsx-runtime";
|
|
55436
|
+
var WfoProcessRawData = ({ processId }) => {
|
|
55437
|
+
const { data, isFetching } = useGetRawProcessDetailQuery({ processId });
|
|
55438
|
+
return isFetching ? /* @__PURE__ */ jsx166(WfoLoading, {}) : /* @__PURE__ */ jsx166(WfoJsonCodeBlock, { data: data || {} });
|
|
55439
|
+
};
|
|
55440
|
+
var WfoProcessSubscriptionDelta = ({
|
|
55441
|
+
processId
|
|
55442
|
+
}) => {
|
|
55443
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
55444
|
+
const { data, isFetching } = useGetRawProcessDetailQuery({ processId });
|
|
55445
|
+
const subscriptionKey = (_c = (_b = (_a = data == null ? void 0 : data.current_state) == null ? void 0 : _a.subscription) == null ? void 0 : _b.subscription_id) != null ? _c : "";
|
|
55446
|
+
const newText = (_e = (_d = data == null ? void 0 : data.current_state) == null ? void 0 : _d.subscription) != null ? _e : null;
|
|
55447
|
+
const oldText = ((_f = data == null ? void 0 : data.current_state) == null ? void 0 : _f.__old_subscriptions__) && subscriptionKey in ((_g = data == null ? void 0 : data.current_state) == null ? void 0 : _g.__old_subscriptions__) ? (_h = data == null ? void 0 : data.current_state) == null ? void 0 : _h.__old_subscriptions__[subscriptionKey] : null;
|
|
55448
|
+
return isFetching ? /* @__PURE__ */ jsx166(WfoLoading, {}) : /* @__PURE__ */ jsx166(
|
|
55449
|
+
WfoDiff_default,
|
|
55450
|
+
{
|
|
55451
|
+
oldText: oldText ? JSON.stringify(oldText, null, 2) : "",
|
|
55452
|
+
newText: newText ? JSON.stringify(newText, null, 2) : "",
|
|
55453
|
+
syntax: "javascript"
|
|
55454
|
+
}
|
|
55455
|
+
);
|
|
55456
|
+
};
|
|
55457
|
+
var WfoWorkflowStepList = React50.forwardRef(
|
|
55458
|
+
({
|
|
55459
|
+
steps = [],
|
|
55460
|
+
traceBack,
|
|
55461
|
+
startedAt,
|
|
55462
|
+
processId,
|
|
55463
|
+
isTask,
|
|
55464
|
+
userInputForm
|
|
55465
|
+
}, reference) => {
|
|
55466
|
+
const [showHiddenKeys, setShowHiddenKeys] = useState37(false);
|
|
55467
|
+
const [showRaw, setShowRaw] = useState37(false);
|
|
55468
|
+
const [showDelta, setShowDelta] = useState37(false);
|
|
55469
|
+
const [showTraceback, setShowTraceback] = useState37(false);
|
|
55470
|
+
const t = useTranslations53("processes.steps");
|
|
55471
|
+
const initialStepListItems = steps.map((step) => ({
|
|
55472
|
+
step,
|
|
55473
|
+
isExpanded: false
|
|
55474
|
+
}));
|
|
55475
|
+
const [stepListItems, setStepListItems] = useState37(initialStepListItems);
|
|
55476
|
+
const persistStepListItemState = (previousStepListItems, updatedSteps, userInputForm2) => {
|
|
55477
|
+
var _a;
|
|
55478
|
+
const reversedSteps = [...updatedSteps].reverse();
|
|
55479
|
+
const lastStepWithSuspendStatusStepId = (_a = reversedSteps.find(
|
|
55480
|
+
(step) => step.status === "suspend" /* SUSPEND */
|
|
55481
|
+
)) == null ? void 0 : _a.stepId;
|
|
55482
|
+
return updatedSteps.map((step) => {
|
|
55483
|
+
const previousStepListItem = previousStepListItems.find(
|
|
55484
|
+
(previousStepListItem2) => previousStepListItem2.step.stepId === step.stepId
|
|
55485
|
+
);
|
|
55486
|
+
return {
|
|
55487
|
+
step,
|
|
55488
|
+
isExpanded: (previousStepListItem == null ? void 0 : previousStepListItem.isExpanded) || false,
|
|
55489
|
+
userInputForm: lastStepWithSuspendStatusStepId === step.stepId && userInputForm2 ? userInputForm2 : void 0
|
|
55490
|
+
};
|
|
55491
|
+
});
|
|
55492
|
+
};
|
|
55493
|
+
useEffect24(() => {
|
|
55494
|
+
setStepListItems(
|
|
55495
|
+
(previousStepListItems) => persistStepListItemState(
|
|
55496
|
+
previousStepListItems,
|
|
55497
|
+
steps,
|
|
55498
|
+
userInputForm
|
|
55499
|
+
)
|
|
55500
|
+
);
|
|
55501
|
+
}, [steps, userInputForm]);
|
|
55502
|
+
const updateStepListItem = (stepListItemToUpdate, updateFunction) => setStepListItems(
|
|
55503
|
+
stepListItems.map(
|
|
55504
|
+
(stepListItem) => stepListItem === stepListItemToUpdate ? updateFunction(stepListItem) : stepListItem
|
|
55505
|
+
)
|
|
55506
|
+
);
|
|
55507
|
+
const allStepsAreExpanded = stepListItems.every(
|
|
55508
|
+
(item) => item.isExpanded
|
|
55509
|
+
);
|
|
55510
|
+
const setExpandedStateStepListItems = (isExpanded) => {
|
|
55511
|
+
setStepListItems(
|
|
55512
|
+
stepListItems.map((item) => __spreadProps(__spreadValues({}, item), {
|
|
55513
|
+
isExpanded
|
|
55514
|
+
}))
|
|
55515
|
+
);
|
|
55516
|
+
};
|
|
55517
|
+
const toggleExpandedStateStepListItem = (stepListItem) => updateStepListItem(stepListItem, (item) => __spreadProps(__spreadValues({}, item), {
|
|
55518
|
+
isExpanded: !item.isExpanded
|
|
55519
|
+
}));
|
|
55520
|
+
const handleExpandStepListItem = (stepListItem) => updateStepListItem(stepListItem, (item) => __spreadProps(__spreadValues({}, item), {
|
|
55521
|
+
isExpanded: true
|
|
55522
|
+
}));
|
|
55523
|
+
return /* @__PURE__ */ jsxs94(Fragment41, { children: [
|
|
55524
|
+
/* @__PURE__ */ jsx166(
|
|
55525
|
+
WfoStepListHeader,
|
|
55526
|
+
{
|
|
55527
|
+
showHiddenKeys,
|
|
55528
|
+
showRaw,
|
|
55529
|
+
showDelta,
|
|
55530
|
+
showTracebackButton: traceBack !== null,
|
|
55531
|
+
showTraceback,
|
|
55532
|
+
allDetailToggleText: allStepsAreExpanded ? t("collapseAll") : t("expandAll"),
|
|
55533
|
+
onChangeShowHiddenKeys: setShowHiddenKeys,
|
|
55534
|
+
onChangeShowRaw: setShowRaw,
|
|
55535
|
+
onChangeShowDelta: setShowDelta,
|
|
55536
|
+
onToggleAllDetailsIsOpen: () => setExpandedStateStepListItems(!allStepsAreExpanded),
|
|
55537
|
+
onShowTraceback: setShowTraceback,
|
|
55538
|
+
isTask
|
|
55539
|
+
}
|
|
55540
|
+
),
|
|
55541
|
+
showTraceback && /* @__PURE__ */ jsx166(WfoTraceback, { children: traceBack }),
|
|
55542
|
+
showRaw && /* @__PURE__ */ jsx166(WfoProcessRawData, { processId }),
|
|
55543
|
+
showDelta && /* @__PURE__ */ jsx166(WfoProcessSubscriptionDelta, { processId }),
|
|
55544
|
+
!showRaw && !showDelta && /* @__PURE__ */ jsx166(
|
|
55545
|
+
WfoStepList,
|
|
55546
|
+
{
|
|
55547
|
+
ref: reference,
|
|
55548
|
+
stepListItems,
|
|
55549
|
+
startedAt,
|
|
55550
|
+
showHiddenKeys,
|
|
55551
|
+
isTask,
|
|
55552
|
+
onToggleExpandStepListItem: toggleExpandedStateStepListItem,
|
|
55553
|
+
processId,
|
|
55554
|
+
onTriggerExpandStepListItem: handleExpandStepListItem
|
|
55555
|
+
}
|
|
55556
|
+
)
|
|
55557
|
+
] });
|
|
55558
|
+
}
|
|
55559
|
+
);
|
|
55560
|
+
WfoWorkflowStepList.displayName = "WfoWorkflowStepList";
|
|
55561
|
+
|
|
55562
|
+
// src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoStepListHeader.tsx
|
|
55563
|
+
import { useState as useState38 } from "react";
|
|
55564
|
+
import { useTranslations as useTranslations54 } from "next-intl";
|
|
55565
|
+
import {
|
|
55566
|
+
EuiButton as EuiButton12,
|
|
55567
|
+
EuiFlexGroup as EuiFlexGroup20,
|
|
55568
|
+
EuiForm as EuiForm2,
|
|
55569
|
+
EuiFormRow as EuiFormRow20,
|
|
55570
|
+
EuiPopover as EuiPopover5,
|
|
55571
|
+
EuiSwitch as EuiSwitch3,
|
|
55572
|
+
EuiText as EuiText35
|
|
55573
|
+
} from "@elastic/eui";
|
|
55574
|
+
|
|
55575
|
+
// src/components/WfoTextAnchor/WfoTextAnchor.tsx
|
|
55576
|
+
import { EuiText as EuiText34 } from "@elastic/eui";
|
|
55577
|
+
|
|
55578
|
+
// src/components/WfoTextAnchor/styles.ts
|
|
55579
|
+
import { css as css30 } from "@emotion/react";
|
|
55580
|
+
var getStyles16 = ({ theme }) => {
|
|
55581
|
+
const textAnchorStyle = css30({
|
|
55582
|
+
marginTop: theme.size.xxs,
|
|
55583
|
+
marginLeft: 0,
|
|
55584
|
+
fontSize: theme.size.m,
|
|
55585
|
+
fontWeight: theme.font.weight.bold,
|
|
55586
|
+
color: theme.colors.link,
|
|
55587
|
+
cursor: "pointer"
|
|
55588
|
+
});
|
|
55589
|
+
return {
|
|
55590
|
+
textAnchorStyle
|
|
55591
|
+
};
|
|
55592
|
+
};
|
|
55593
|
+
|
|
55594
|
+
// src/components/WfoTextAnchor/WfoTextAnchor.tsx
|
|
55595
|
+
import { jsx as jsx167 } from "@emotion/react/jsx-runtime";
|
|
55596
|
+
var WfoTextAnchor = ({ text, onClick }) => {
|
|
55597
|
+
const { textAnchorStyle } = useWithOrchestratorTheme(getStyles16);
|
|
55598
|
+
return /* @__PURE__ */ jsx167(EuiText34, { onClick, css: textAnchorStyle, children: text });
|
|
55599
|
+
};
|
|
55600
|
+
|
|
55601
|
+
// src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoStepListHeader.tsx
|
|
55602
|
+
import { jsx as jsx168, jsxs as jsxs95 } from "@emotion/react/jsx-runtime";
|
|
55603
|
+
var WfoStepListHeader = ({
|
|
55604
|
+
showHiddenKeys,
|
|
55605
|
+
showRaw,
|
|
55606
|
+
showDelta,
|
|
55607
|
+
showTraceback,
|
|
55608
|
+
showTracebackButton,
|
|
55609
|
+
onChangeShowHiddenKeys,
|
|
55610
|
+
onChangeShowRaw,
|
|
55611
|
+
onChangeShowDelta,
|
|
55612
|
+
allDetailToggleText,
|
|
55613
|
+
onToggleAllDetailsIsOpen,
|
|
55614
|
+
onShowTraceback,
|
|
55615
|
+
isTask
|
|
55616
|
+
}) => {
|
|
55617
|
+
const t = useTranslations54("processes.steps");
|
|
55618
|
+
const { theme } = useOrchestratorTheme();
|
|
55619
|
+
const {
|
|
55620
|
+
stepListHeaderStyle,
|
|
55621
|
+
stepListContentStyle,
|
|
55622
|
+
stepListContentBoldTextStyle,
|
|
55623
|
+
stepListOptionsContainerStyle
|
|
55624
|
+
} = useWithOrchestratorTheme(getStyles14);
|
|
55625
|
+
const [isViewOptionOpen, setIsViewOptionOpen] = useState38(false);
|
|
55626
|
+
const onViewOptionClick = () => setIsViewOptionOpen((isViewOptionOpen2) => !isViewOptionOpen2);
|
|
55627
|
+
const closeViewOption = () => setIsViewOptionOpen(false);
|
|
55628
|
+
const viewOptionButton = /* @__PURE__ */ jsx168(
|
|
55629
|
+
EuiButton12,
|
|
55630
|
+
{
|
|
55631
|
+
onClick: onViewOptionClick,
|
|
55632
|
+
iconType: () => /* @__PURE__ */ jsx168(WfoEyeFill, { color: theme.colors.link }),
|
|
55633
|
+
iconSide: "right",
|
|
55634
|
+
size: "s",
|
|
55635
|
+
children: t("viewOptions")
|
|
55636
|
+
}
|
|
55637
|
+
);
|
|
55638
|
+
return /* @__PURE__ */ jsxs95(EuiFlexGroup20, { css: stepListHeaderStyle, children: [
|
|
55639
|
+
/* @__PURE__ */ jsxs95(EuiFlexGroup20, { css: stepListContentStyle, children: [
|
|
55640
|
+
/* @__PURE__ */ jsx168(EuiText35, { css: stepListContentBoldTextStyle, children: t(isTask ? "taskSteps" : "workflowSteps") }),
|
|
55641
|
+
!showRaw && /* @__PURE__ */ jsx168(
|
|
55642
|
+
WfoTextAnchor,
|
|
55643
|
+
{
|
|
55644
|
+
text: allDetailToggleText,
|
|
55645
|
+
onClick: onToggleAllDetailsIsOpen
|
|
55646
|
+
}
|
|
55467
55647
|
)
|
|
55468
55648
|
] }),
|
|
55469
|
-
/* @__PURE__ */
|
|
55470
|
-
|
|
55471
|
-
EuiPanel5,
|
|
55649
|
+
/* @__PURE__ */ jsxs95(
|
|
55650
|
+
EuiFlexGroup20,
|
|
55472
55651
|
{
|
|
55473
|
-
|
|
55474
|
-
|
|
55475
|
-
|
|
55476
|
-
|
|
55477
|
-
children:
|
|
55478
|
-
/* @__PURE__ */
|
|
55479
|
-
|
|
55480
|
-
{
|
|
55481
|
-
translationKey: "status",
|
|
55482
|
-
value: processDetail.lastStatus
|
|
55483
|
-
}
|
|
55484
|
-
),
|
|
55485
|
-
/* @__PURE__ */ jsx167(
|
|
55486
|
-
ProcessHeaderValue,
|
|
55487
|
-
{
|
|
55488
|
-
translationKey: "lastStep",
|
|
55489
|
-
value: processDetail == null ? void 0 : processDetail.lastStep
|
|
55490
|
-
}
|
|
55491
|
-
),
|
|
55492
|
-
processDetail.customer && /* @__PURE__ */ jsx167(
|
|
55493
|
-
ProcessHeaderValue,
|
|
55494
|
-
{
|
|
55495
|
-
translationKey: "customer",
|
|
55496
|
-
value: (_b = processDetail.customer) == null ? void 0 : _b.fullname
|
|
55497
|
-
}
|
|
55498
|
-
),
|
|
55499
|
-
/* @__PURE__ */ jsx167(
|
|
55500
|
-
ProcessHeaderValue,
|
|
55501
|
-
{
|
|
55502
|
-
translationKey: "startedBy",
|
|
55503
|
-
value: processDetail == null ? void 0 : processDetail.createdBy
|
|
55504
|
-
}
|
|
55505
|
-
),
|
|
55506
|
-
/* @__PURE__ */ jsx167(
|
|
55507
|
-
ProcessHeaderValue,
|
|
55652
|
+
justifyContent: "flexEnd",
|
|
55653
|
+
direction: "row",
|
|
55654
|
+
css: stepListOptionsContainerStyle,
|
|
55655
|
+
gutterSize: "s",
|
|
55656
|
+
children: [
|
|
55657
|
+
showTracebackButton && /* @__PURE__ */ jsx168(
|
|
55658
|
+
EuiButton12,
|
|
55508
55659
|
{
|
|
55509
|
-
|
|
55510
|
-
|
|
55511
|
-
|
|
55512
|
-
)(processDetail == null ? void 0 : processDetail.startedAt) : ""
|
|
55660
|
+
onClick: () => onShowTraceback(!showTraceback),
|
|
55661
|
+
size: "s",
|
|
55662
|
+
children: showTraceback ? t("hideTraceback") : t("showTraceback")
|
|
55513
55663
|
}
|
|
55514
55664
|
),
|
|
55515
|
-
/* @__PURE__ */
|
|
55516
|
-
|
|
55665
|
+
/* @__PURE__ */ jsx168(
|
|
55666
|
+
EuiButton12,
|
|
55517
55667
|
{
|
|
55518
|
-
|
|
55519
|
-
|
|
55520
|
-
|
|
55521
|
-
)
|
|
55668
|
+
onClick: () => onChangeShowDelta(!showDelta),
|
|
55669
|
+
iconSide: "right",
|
|
55670
|
+
size: "s",
|
|
55671
|
+
iconType: () => /* @__PURE__ */ jsx168(WfoCode, { color: theme.colors.link }),
|
|
55672
|
+
children: showDelta ? t("hideDelta") : t("showDelta")
|
|
55522
55673
|
}
|
|
55523
55674
|
),
|
|
55524
|
-
|
|
55525
|
-
|
|
55526
|
-
) && processDetail.subscriptions && /* @__PURE__ */ jsxs95(
|
|
55527
|
-
EuiFlexGroup20,
|
|
55675
|
+
/* @__PURE__ */ jsx168(
|
|
55676
|
+
EuiPopover5,
|
|
55528
55677
|
{
|
|
55529
|
-
|
|
55530
|
-
|
|
55531
|
-
|
|
55532
|
-
|
|
55533
|
-
|
|
55534
|
-
|
|
55535
|
-
|
|
55536
|
-
/* @__PURE__ */ jsx167(EuiText35, { size: "xs", children: t("relatedSubscriptions") }),
|
|
55537
|
-
/* @__PURE__ */ jsx167(
|
|
55538
|
-
EuiText35,
|
|
55678
|
+
button: viewOptionButton,
|
|
55679
|
+
isOpen: isViewOptionOpen,
|
|
55680
|
+
closePopover: closeViewOption,
|
|
55681
|
+
display: "block",
|
|
55682
|
+
children: /* @__PURE__ */ jsx168("div", { children: /* @__PURE__ */ jsxs95(EuiForm2, { component: "form", children: [
|
|
55683
|
+
/* @__PURE__ */ jsx168(EuiFormRow20, { children: /* @__PURE__ */ jsx168(
|
|
55684
|
+
EuiSwitch3,
|
|
55539
55685
|
{
|
|
55540
|
-
|
|
55541
|
-
|
|
55542
|
-
|
|
55543
|
-
|
|
55544
|
-
|
|
55545
|
-
|
|
55546
|
-
|
|
55547
|
-
|
|
55548
|
-
WfoProcessListSubscriptionsCell,
|
|
55549
|
-
{
|
|
55550
|
-
subscriptions: process && ((_c = processDetail == null ? void 0 : processDetail.subscriptions) == null ? void 0 : _c.page.map(
|
|
55551
|
-
(subscription) => ({
|
|
55552
|
-
subscriptionId: subscription.subscriptionId,
|
|
55553
|
-
description: subscription.description
|
|
55554
|
-
})
|
|
55555
|
-
)) || [],
|
|
55556
|
-
renderDirection: "VERTICAL" /* VERTICAL */
|
|
55557
|
-
}
|
|
55558
|
-
)
|
|
55686
|
+
label: "Hidden keys",
|
|
55687
|
+
checked: showHiddenKeys,
|
|
55688
|
+
onChange: (e) => {
|
|
55689
|
+
onChangeShowHiddenKeys(
|
|
55690
|
+
e.target.checked
|
|
55691
|
+
);
|
|
55692
|
+
closeViewOption();
|
|
55693
|
+
}
|
|
55559
55694
|
}
|
|
55560
|
-
)
|
|
55561
|
-
|
|
55695
|
+
) }),
|
|
55696
|
+
/* @__PURE__ */ jsx168(EuiFormRow20, { children: /* @__PURE__ */ jsx168(
|
|
55697
|
+
EuiSwitch3,
|
|
55698
|
+
{
|
|
55699
|
+
label: "Raw JSON data",
|
|
55700
|
+
checked: showRaw,
|
|
55701
|
+
onChange: (e) => {
|
|
55702
|
+
onChangeShowRaw(e.target.checked);
|
|
55703
|
+
closeViewOption();
|
|
55704
|
+
}
|
|
55705
|
+
}
|
|
55706
|
+
) })
|
|
55707
|
+
] }) })
|
|
55562
55708
|
}
|
|
55563
55709
|
)
|
|
55564
|
-
]
|
|
55565
|
-
}
|
|
55566
|
-
),
|
|
55567
|
-
/* @__PURE__ */ jsx167(EuiSpacer16, { size: "s" }),
|
|
55568
|
-
/* @__PURE__ */ jsx167(
|
|
55569
|
-
WfoTimeline,
|
|
55570
|
-
{
|
|
55571
|
-
timelineItems,
|
|
55572
|
-
indexOfCurrentStep: getIndexOfCurrentStep(timelineItems),
|
|
55573
|
-
onStepClick: (timelineItem) => onTimelineItemClick && timelineItem.id && onTimelineItemClick(timelineItem.id)
|
|
55710
|
+
]
|
|
55574
55711
|
}
|
|
55575
|
-
)
|
|
55576
|
-
children
|
|
55712
|
+
)
|
|
55577
55713
|
] });
|
|
55578
55714
|
};
|
|
55579
55715
|
|
|
55580
|
-
// src/pages/processes/WfoProcessDetailPage.tsx
|
|
55581
|
-
import { jsx as jsx168 } from "@emotion/react/jsx-runtime";
|
|
55582
|
-
var PROCESS_DETAIL_DEFAULT_REFETCH_INTERVAL = 3e3;
|
|
55583
|
-
var WfoProcessDetailPage = ({
|
|
55584
|
-
processId,
|
|
55585
|
-
processDetailRefetchInterval = PROCESS_DETAIL_DEFAULT_REFETCH_INTERVAL
|
|
55586
|
-
}) => {
|
|
55587
|
-
var _a, _b;
|
|
55588
|
-
const stepListRef = useRef7(null);
|
|
55589
|
-
const [fetchInterval, setFetchInterval] = useState39();
|
|
55590
|
-
const [process3, setProcess] = useState39();
|
|
55591
|
-
const { data, isLoading, isError: isError2 } = useGetProcessDetailQuery(
|
|
55592
|
-
{ processId },
|
|
55593
|
-
{ pollingInterval: fetchInterval }
|
|
55594
|
-
);
|
|
55595
|
-
if (isError2) {
|
|
55596
|
-
if (fetchInterval) {
|
|
55597
|
-
setFetchInterval(void 0);
|
|
55598
|
-
}
|
|
55599
|
-
}
|
|
55600
|
-
useEffect25(() => {
|
|
55601
|
-
const process4 = data == null ? void 0 : data.processes[0];
|
|
55602
|
-
const lastStatus = process4 == null ? void 0 : process4.lastStatus.toLocaleLowerCase();
|
|
55603
|
-
const isInProgress = !(lastStatus && ProcessDoneStatuses.includes(lastStatus));
|
|
55604
|
-
setFetchInterval(
|
|
55605
|
-
isInProgress ? processDetailRefetchInterval : void 0
|
|
55606
|
-
);
|
|
55607
|
-
}, [data, processDetailRefetchInterval]);
|
|
55608
|
-
useEffect25(() => {
|
|
55609
|
-
const fetchedProcessDetails = data == null ? void 0 : data.processes[0];
|
|
55610
|
-
if (!process3) {
|
|
55611
|
-
setProcess(fetchedProcessDetails);
|
|
55612
|
-
return;
|
|
55613
|
-
}
|
|
55614
|
-
const shouldUpdateProcess = process3.lastStatus != (fetchedProcessDetails == null ? void 0 : fetchedProcessDetails.lastStatus) || process3.lastStep !== (fetchedProcessDetails == null ? void 0 : fetchedProcessDetails.lastStep);
|
|
55615
|
-
if (shouldUpdateProcess) {
|
|
55616
|
-
setProcess(fetchedProcessDetails);
|
|
55617
|
-
}
|
|
55618
|
-
}, [data, process3]);
|
|
55619
|
-
const steps = (_a = process3 == null ? void 0 : process3.steps) != null ? _a : [];
|
|
55620
|
-
const productNames = getProductNamesFromProcess(process3);
|
|
55621
|
-
const pageTitle = (process3 == null ? void 0 : process3.workflowName) || "";
|
|
55622
|
-
const isTask = (_b = process3 == null ? void 0 : process3.isTask) != null ? _b : false;
|
|
55623
|
-
const groupedSteps = convertStepsToGroupedSteps(steps);
|
|
55624
|
-
const timelineItems = mapGroupedStepsToTimelineItems(groupedSteps);
|
|
55625
|
-
return /* @__PURE__ */ jsx168(
|
|
55626
|
-
WfoProcessDetail,
|
|
55627
|
-
{
|
|
55628
|
-
pageTitle,
|
|
55629
|
-
productNames,
|
|
55630
|
-
buttonsAreDisabled: isLoading || isError2,
|
|
55631
|
-
processDetail: process3,
|
|
55632
|
-
timelineItems,
|
|
55633
|
-
onTimelineItemClick: (id) => {
|
|
55634
|
-
var _a2;
|
|
55635
|
-
return (_a2 = stepListRef.current) == null ? void 0 : _a2.scrollToStep(id);
|
|
55636
|
-
},
|
|
55637
|
-
isLoading,
|
|
55638
|
-
hasError: isError2,
|
|
55639
|
-
children: isError2 && /* @__PURE__ */ jsx168(WfoError, {}) || isLoading && /* @__PURE__ */ jsx168(WfoLoading, {}) || process3 !== void 0 && /* @__PURE__ */ jsx168(
|
|
55640
|
-
WfoWorkflowStepList,
|
|
55641
|
-
{
|
|
55642
|
-
ref: stepListRef,
|
|
55643
|
-
processId: process3.processId,
|
|
55644
|
-
steps: groupedSteps.flatMap(
|
|
55645
|
-
(groupedStep) => groupedStep.steps
|
|
55646
|
-
),
|
|
55647
|
-
traceBack: process3.traceback,
|
|
55648
|
-
userInputForm: process3.form,
|
|
55649
|
-
startedAt: process3.startedAt,
|
|
55650
|
-
isTask
|
|
55651
|
-
}
|
|
55652
|
-
) || /* @__PURE__ */ jsx168("h1", { children: "Invalid processId" })
|
|
55653
|
-
}
|
|
55654
|
-
);
|
|
55655
|
-
};
|
|
55656
|
-
|
|
55657
55716
|
// src/pages/processes/WfoStartProcessPage.tsx
|
|
55658
|
-
import { useCallback as useCallback7, useEffect as useEffect26, useMemo as useMemo5, useState as useState40 } from "react";
|
|
55659
|
-
import { useTranslations as useTranslations53 } from "next-intl";
|
|
55660
|
-
import { useRouter as useRouter9 } from "next/router";
|
|
55661
|
-
import {
|
|
55662
|
-
EuiFlexGroup as EuiFlexGroup21,
|
|
55663
|
-
EuiFlexItem as EuiFlexItem28,
|
|
55664
|
-
EuiHorizontalRule as EuiHorizontalRule5,
|
|
55665
|
-
EuiPanel as EuiPanel6,
|
|
55666
|
-
EuiText as EuiText36
|
|
55667
|
-
} from "@elastic/eui";
|
|
55668
55717
|
import { jsx as jsx169, jsxs as jsxs96 } from "@emotion/react/jsx-runtime";
|
|
55669
55718
|
var getInitialProcessPayload = ({
|
|
55670
55719
|
productId,
|
|
@@ -55686,12 +55735,22 @@ var WfoStartProcessPage = ({
|
|
|
55686
55735
|
processName,
|
|
55687
55736
|
isTask = false
|
|
55688
55737
|
}) => {
|
|
55689
|
-
const t =
|
|
55738
|
+
const t = useTranslations55("processes.steps");
|
|
55690
55739
|
const router = useRouter9();
|
|
55691
|
-
const [hasError, setHasError] =
|
|
55740
|
+
const [hasError, setHasError] = useState39(false);
|
|
55692
55741
|
const { theme } = useOrchestratorTheme();
|
|
55693
|
-
const [form, setForm] =
|
|
55742
|
+
const [form, setForm] = useState39({});
|
|
55694
55743
|
const { productId, subscriptionId } = router.query;
|
|
55744
|
+
const {
|
|
55745
|
+
data: subscriptionDetail,
|
|
55746
|
+
isLoading: isLoadingSubscriptionDetail,
|
|
55747
|
+
isError: isErrorSubscriptionDetail
|
|
55748
|
+
} = useGetSubscriptionDetailQuery(
|
|
55749
|
+
{
|
|
55750
|
+
subscriptionId: subscriptionId || ""
|
|
55751
|
+
},
|
|
55752
|
+
{ skip: !subscriptionId }
|
|
55753
|
+
);
|
|
55695
55754
|
const [startProcess] = useStartProcessMutation();
|
|
55696
55755
|
const startProcessPayload = useMemo5(
|
|
55697
55756
|
() => getInitialProcessPayload({ productId, subscriptionId }),
|
|
@@ -55701,9 +55760,11 @@ var WfoStartProcessPage = ({
|
|
|
55701
55760
|
const { getStepHeaderStyle, stepListContentBoldTextStyle } = useWithOrchestratorTheme(getStyles14);
|
|
55702
55761
|
const {
|
|
55703
55762
|
data: timeLineItems = [],
|
|
55704
|
-
isError:
|
|
55705
|
-
isLoading
|
|
55763
|
+
isError: isErrorTimeLineItems,
|
|
55764
|
+
isLoading: isLoadingTimeLineItems
|
|
55706
55765
|
} = useGetTimeLineItemsQuery(processName);
|
|
55766
|
+
const isLoading = isLoadingSubscriptionDetail || isLoadingTimeLineItems;
|
|
55767
|
+
const isError2 = isErrorSubscriptionDetail || isErrorTimeLineItems;
|
|
55707
55768
|
if (isError2) {
|
|
55708
55769
|
if (!hasError) {
|
|
55709
55770
|
setHasError(true);
|
|
@@ -55718,7 +55779,7 @@ var WfoStartProcessPage = ({
|
|
|
55718
55779
|
(process3) => {
|
|
55719
55780
|
if (process3.id) {
|
|
55720
55781
|
const basePath = isTask ? PATH_TASKS : PATH_WORKFLOWS;
|
|
55721
|
-
router.
|
|
55782
|
+
router.replace(`${basePath}/${process3.id}`);
|
|
55722
55783
|
}
|
|
55723
55784
|
},
|
|
55724
55785
|
// Reject handler
|
|
@@ -55747,7 +55808,7 @@ var WfoStartProcessPage = ({
|
|
|
55747
55808
|
},
|
|
55748
55809
|
[startProcess, processName, startProcessPayload, isTask, router]
|
|
55749
55810
|
);
|
|
55750
|
-
|
|
55811
|
+
useEffect25(() => {
|
|
55751
55812
|
if (processName) {
|
|
55752
55813
|
const clientResultCallback = (json) => {
|
|
55753
55814
|
var _a, _b;
|
|
@@ -55770,7 +55831,18 @@ var WfoStartProcessPage = ({
|
|
|
55770
55831
|
lastStatus: "create" /* CREATE */,
|
|
55771
55832
|
lastStep: "form" /* FORM */,
|
|
55772
55833
|
workflowName: processName,
|
|
55773
|
-
createdBy: "-"
|
|
55834
|
+
createdBy: "-",
|
|
55835
|
+
subscriptions: subscriptionDetail && {
|
|
55836
|
+
page: [
|
|
55837
|
+
{
|
|
55838
|
+
product: {
|
|
55839
|
+
name: subscriptionDetail.subscription.product.name
|
|
55840
|
+
},
|
|
55841
|
+
description: subscriptionDetail.subscription.description,
|
|
55842
|
+
subscriptionId: subscriptionDetail.subscription.subscriptionId
|
|
55843
|
+
}
|
|
55844
|
+
]
|
|
55845
|
+
}
|
|
55774
55846
|
};
|
|
55775
55847
|
return /* @__PURE__ */ jsx169(
|
|
55776
55848
|
WfoProcessDetail,
|
|
@@ -55810,7 +55882,7 @@ var WfoStartProcessPage = ({
|
|
|
55810
55882
|
};
|
|
55811
55883
|
|
|
55812
55884
|
// src/pages/processes/WfoProductInformationWithLink.tsx
|
|
55813
|
-
import { useTranslations as
|
|
55885
|
+
import { useTranslations as useTranslations56 } from "next-intl";
|
|
55814
55886
|
import { EuiButtonIcon as EuiButtonIcon7, EuiFlexGroup as EuiFlexGroup22, EuiText as EuiText37, EuiToolTip as EuiToolTip5 } from "@elastic/eui";
|
|
55815
55887
|
import { jsx as jsx170, jsxs as jsxs97 } from "@emotion/react/jsx-runtime";
|
|
55816
55888
|
var WfoProductInformationWithLink = ({
|
|
@@ -55818,7 +55890,7 @@ var WfoProductInformationWithLink = ({
|
|
|
55818
55890
|
productNames
|
|
55819
55891
|
}) => {
|
|
55820
55892
|
const { workflowInformationLinkUrl, showWorkflowInformationLink } = useGetOrchestratorConfig();
|
|
55821
|
-
const t =
|
|
55893
|
+
const t = useTranslations56("processes.detail");
|
|
55822
55894
|
const docsUrl = workflowInformationLinkUrl + workflowName;
|
|
55823
55895
|
return /* @__PURE__ */ jsxs97(EuiFlexGroup22, { gutterSize: "s", alignItems: "center", children: [
|
|
55824
55896
|
showWorkflowInformationLink && /* @__PURE__ */ jsx170(EuiToolTip5, { content: t("openWorkflowTaskInfo"), children: /* @__PURE__ */ jsx170("a", { href: docsUrl, target: "_blank", children: /* @__PURE__ */ jsx170(
|
|
@@ -55913,8 +55985,8 @@ var WfoSubscriptionDetailPage = () => {
|
|
|
55913
55985
|
};
|
|
55914
55986
|
|
|
55915
55987
|
// src/pages/subscriptions/WfoSubscriptionsListPage.tsx
|
|
55916
|
-
import { useEffect as
|
|
55917
|
-
import { useTranslations as
|
|
55988
|
+
import { useEffect as useEffect26, useState as useState40 } from "react";
|
|
55989
|
+
import { useTranslations as useTranslations58 } from "next-intl";
|
|
55918
55990
|
import { StringParam as StringParam3, useQueryParam as useQueryParam2, withDefault as withDefault3 } from "use-query-params";
|
|
55919
55991
|
import { EuiPageHeader as EuiPageHeader4, EuiSpacer as EuiSpacer18 } from "@elastic/eui";
|
|
55920
55992
|
|
|
@@ -55997,7 +56069,7 @@ var subscriptionListTabs = [
|
|
|
55997
56069
|
];
|
|
55998
56070
|
|
|
55999
56071
|
// src/components/WfoSubscriptionsList/WfoSubscriptionsList.tsx
|
|
56000
|
-
import { useTranslations as
|
|
56072
|
+
import { useTranslations as useTranslations57 } from "next-intl";
|
|
56001
56073
|
import Link7 from "next/link";
|
|
56002
56074
|
import { useRouter as useRouter11 } from "next/router";
|
|
56003
56075
|
import { jsx as jsx174 } from "@emotion/react/jsx-runtime";
|
|
@@ -56009,8 +56081,8 @@ var WfoSubscriptionsList = ({
|
|
|
56009
56081
|
}) => {
|
|
56010
56082
|
var _a, _b, _c;
|
|
56011
56083
|
const router = useRouter11();
|
|
56012
|
-
const t =
|
|
56013
|
-
const tError =
|
|
56084
|
+
const t = useTranslations57("subscriptions.index");
|
|
56085
|
+
const tError = useTranslations57("errors");
|
|
56014
56086
|
const { showToastMessage } = useShowToastMessage();
|
|
56015
56087
|
const tableColumns = {
|
|
56016
56088
|
subscriptionId: {
|
|
@@ -56159,12 +56231,12 @@ var WfoSubscriptionsList = ({
|
|
|
56159
56231
|
import { Fragment as Fragment44, jsx as jsx175, jsxs as jsxs99 } from "@emotion/react/jsx-runtime";
|
|
56160
56232
|
var WfoSubscriptionsListPage = () => {
|
|
56161
56233
|
var _a;
|
|
56162
|
-
const t =
|
|
56163
|
-
const [tableDefaults, setTableDefaults] =
|
|
56234
|
+
const t = useTranslations58("subscriptions.detail");
|
|
56235
|
+
const [tableDefaults, setTableDefaults] = useState40();
|
|
56164
56236
|
const getStoredTableConfig = useStoredTableConfig(
|
|
56165
56237
|
SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY
|
|
56166
56238
|
);
|
|
56167
|
-
|
|
56239
|
+
useEffect26(() => {
|
|
56168
56240
|
const storedConfig = getStoredTableConfig();
|
|
56169
56241
|
if (storedConfig) {
|
|
56170
56242
|
setTableDefaults(storedConfig);
|
|
@@ -56223,8 +56295,8 @@ var WfoSubscriptionsListPage = () => {
|
|
|
56223
56295
|
};
|
|
56224
56296
|
|
|
56225
56297
|
// src/pages/tasks/WfoTasksListPage.tsx
|
|
56226
|
-
import { useContext as useContext8, useEffect as
|
|
56227
|
-
import { useTranslations as
|
|
56298
|
+
import { useContext as useContext8, useEffect as useEffect27, useState as useState41 } from "react";
|
|
56299
|
+
import { useTranslations as useTranslations59 } from "next-intl";
|
|
56228
56300
|
import Link8 from "next/link";
|
|
56229
56301
|
import { useRouter as useRouter12 } from "next/router";
|
|
56230
56302
|
import { StringParam as StringParam4, useQueryParam as useQueryParam3, withDefault as withDefault4 } from "use-query-params";
|
|
@@ -56303,12 +56375,12 @@ import { Fragment as Fragment45, jsx as jsx176, jsxs as jsxs100 } from "@emotion
|
|
|
56303
56375
|
var WfoTasksListPage = () => {
|
|
56304
56376
|
var _a;
|
|
56305
56377
|
const router = useRouter12();
|
|
56306
|
-
const t =
|
|
56378
|
+
const t = useTranslations59("tasks.page");
|
|
56307
56379
|
const [activeTab, setActiveTab] = useQueryParam3(
|
|
56308
56380
|
"activeTab",
|
|
56309
56381
|
withDefault4(StringParam4, "ACTIVE" /* ACTIVE */)
|
|
56310
56382
|
);
|
|
56311
|
-
const [tableDefaults, setTableDefaults] =
|
|
56383
|
+
const [tableDefaults, setTableDefaults] = useState41();
|
|
56312
56384
|
const selectedTasksListTab = getTasksListTabTypeFromString(activeTab);
|
|
56313
56385
|
const localStorageKey = selectedTasksListTab === "ACTIVE" /* ACTIVE */ ? ACTIVE_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY : COMPLETED_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY;
|
|
56314
56386
|
const getStoredTableConfig = useStoredTableConfig(localStorageKey);
|
|
@@ -56316,7 +56388,7 @@ var WfoTasksListPage = () => {
|
|
|
56316
56388
|
const { showConfirmDialog } = useContext8(ConfirmationDialogContext);
|
|
56317
56389
|
const [retryAllProcesses] = useRetryAllProcessesMutation();
|
|
56318
56390
|
const { isEngineRunningNow } = useCheckEngineStatus();
|
|
56319
|
-
|
|
56391
|
+
useEffect27(() => {
|
|
56320
56392
|
const storedConfig = getStoredTableConfig();
|
|
56321
56393
|
if (storedConfig) {
|
|
56322
56394
|
setTableDefaults(storedConfig);
|
|
@@ -56431,8 +56503,8 @@ var WfoTasksListPage = () => {
|
|
|
56431
56503
|
};
|
|
56432
56504
|
|
|
56433
56505
|
// src/pages/workflows/WfoWorkflowsListPage.tsx
|
|
56434
|
-
import { useEffect as
|
|
56435
|
-
import { useTranslations as
|
|
56506
|
+
import { useEffect as useEffect28, useState as useState42 } from "react";
|
|
56507
|
+
import { useTranslations as useTranslations60 } from "next-intl";
|
|
56436
56508
|
import { useRouter as useRouter13 } from "next/router";
|
|
56437
56509
|
import { StringParam as StringParam5, useQueryParam as useQueryParam4, withDefault as withDefault5 } from "use-query-params";
|
|
56438
56510
|
import { EuiPageHeader as EuiPageHeader6, EuiSpacer as EuiSpacer20 } from "@elastic/eui";
|
|
@@ -56504,16 +56576,16 @@ import { Fragment as Fragment46, jsx as jsx177, jsxs as jsxs101 } from "@emotion
|
|
|
56504
56576
|
var WfoWorkflowsListPage = () => {
|
|
56505
56577
|
var _a;
|
|
56506
56578
|
const router = useRouter13();
|
|
56507
|
-
const t =
|
|
56579
|
+
const t = useTranslations60("workflows.index");
|
|
56508
56580
|
const [activeTab, setActiveTab] = useQueryParam4(
|
|
56509
56581
|
"activeTab",
|
|
56510
56582
|
withDefault5(StringParam5, "ACTIVE" /* ACTIVE */)
|
|
56511
56583
|
);
|
|
56512
|
-
const [tableDefaults, setTableDefaults] =
|
|
56584
|
+
const [tableDefaults, setTableDefaults] = useState42();
|
|
56513
56585
|
const selectedWorkflowsListTab = getWorkflowsListTabTypeFromString(activeTab);
|
|
56514
56586
|
const localStorageKey = selectedWorkflowsListTab === "ACTIVE" /* ACTIVE */ ? ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY : COMPLETED_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY;
|
|
56515
56587
|
const getStoredTableConfig = useStoredTableConfig(localStorageKey);
|
|
56516
|
-
|
|
56588
|
+
useEffect28(() => {
|
|
56517
56589
|
const storedConfig = getStoredTableConfig();
|
|
56518
56590
|
if (storedConfig) {
|
|
56519
56591
|
setTableDefaults(storedConfig);
|
|
@@ -56673,8 +56745,8 @@ var WfoProcessesList = ({
|
|
|
56673
56745
|
overrideDefaultTableColumns
|
|
56674
56746
|
}) => {
|
|
56675
56747
|
var _a, _b;
|
|
56676
|
-
const t =
|
|
56677
|
-
const tError =
|
|
56748
|
+
const t = useTranslations61("processes.index");
|
|
56749
|
+
const tError = useTranslations61("errors");
|
|
56678
56750
|
const { showToastMessage } = useShowToastMessage();
|
|
56679
56751
|
const defaultTableColumns = {
|
|
56680
56752
|
workflowName: {
|
|
@@ -56882,8 +56954,8 @@ var WfoJsonCodeBlock = ({
|
|
|
56882
56954
|
};
|
|
56883
56955
|
|
|
56884
56956
|
// src/components/WfoSettings/WfoFlushSettings.tsx
|
|
56885
|
-
import { useState as
|
|
56886
|
-
import { useTranslations as
|
|
56957
|
+
import { useState as useState43 } from "react";
|
|
56958
|
+
import { useTranslations as useTranslations62 } from "next-intl";
|
|
56887
56959
|
import {
|
|
56888
56960
|
EuiButton as EuiButton14,
|
|
56889
56961
|
EuiComboBox,
|
|
@@ -56923,8 +56995,8 @@ var WfoFlushSettings = () => {
|
|
|
56923
56995
|
getWfoFlushSettingsStyle
|
|
56924
56996
|
);
|
|
56925
56997
|
const [clearCache] = useClearCacheMutation();
|
|
56926
|
-
const t =
|
|
56927
|
-
const [selectedOptions, setSelected] =
|
|
56998
|
+
const t = useTranslations62("settings.page");
|
|
56999
|
+
const [selectedOptions, setSelected] = useState43(
|
|
56928
57000
|
[]
|
|
56929
57001
|
);
|
|
56930
57002
|
const { showToastMessage } = useShowToastMessage();
|
|
@@ -56977,14 +57049,14 @@ var WfoFlushSettings = () => {
|
|
|
56977
57049
|
};
|
|
56978
57050
|
|
|
56979
57051
|
// src/components/WfoSettings/WfoEngineStatusButton.tsx
|
|
56980
|
-
import { useTranslations as
|
|
57052
|
+
import { useTranslations as useTranslations63 } from "next-intl";
|
|
56981
57053
|
import { EuiButton as EuiButton15 } from "@elastic/eui";
|
|
56982
57054
|
import { jsx as jsx181 } from "@emotion/react/jsx-runtime";
|
|
56983
57055
|
var WfoEngineStatusButton = () => {
|
|
56984
57056
|
const { data, isLoading } = useGetEngineStatusQuery();
|
|
56985
57057
|
const { engineStatus } = data || {};
|
|
56986
57058
|
const [setEngineStatus, { isLoading: isSettingEngineStatus }] = useSetEngineStatusMutation();
|
|
56987
|
-
const t =
|
|
57059
|
+
const t = useTranslations63("settings.page");
|
|
56988
57060
|
if (isLoading || isSettingEngineStatus) {
|
|
56989
57061
|
return /* @__PURE__ */ jsx181(EuiButton15, { isLoading: true, fill: true, children: "Loading..." });
|
|
56990
57062
|
}
|
|
@@ -57010,16 +57082,16 @@ var WfoEngineStatusButton = () => {
|
|
|
57010
57082
|
};
|
|
57011
57083
|
|
|
57012
57084
|
// src/components/WfoSettings/WfoModifySettings.tsx
|
|
57013
|
-
import { useTranslations as
|
|
57085
|
+
import { useTranslations as useTranslations65 } from "next-intl";
|
|
57014
57086
|
import { EuiFlexItem as EuiFlexItem30, EuiPanel as EuiPanel8, EuiSpacer as EuiSpacer22, EuiText as EuiText39 } from "@elastic/eui";
|
|
57015
57087
|
|
|
57016
57088
|
// src/components/WfoSettings/WfoResetTextSearchIndexButton.tsx
|
|
57017
|
-
import { useTranslations as
|
|
57089
|
+
import { useTranslations as useTranslations64 } from "next-intl";
|
|
57018
57090
|
import { EuiButton as EuiButton16 } from "@elastic/eui";
|
|
57019
57091
|
import { jsx as jsx182 } from "@emotion/react/jsx-runtime";
|
|
57020
57092
|
var WfoResetTextSearchIndexButton = () => {
|
|
57021
57093
|
const [resetTextSearchIndex] = useResetTextSearchIndexMutation();
|
|
57022
|
-
const t =
|
|
57094
|
+
const t = useTranslations64("settings.page");
|
|
57023
57095
|
return /* @__PURE__ */ jsx182(
|
|
57024
57096
|
EuiButton16,
|
|
57025
57097
|
{
|
|
@@ -57033,7 +57105,7 @@ var WfoResetTextSearchIndexButton = () => {
|
|
|
57033
57105
|
// src/components/WfoSettings/WfoModifySettings.tsx
|
|
57034
57106
|
import { jsx as jsx183, jsxs as jsxs103 } from "@emotion/react/jsx-runtime";
|
|
57035
57107
|
var WfoModifySettings = () => {
|
|
57036
|
-
const t =
|
|
57108
|
+
const t = useTranslations65("settings.page");
|
|
57037
57109
|
return /* @__PURE__ */ jsxs103(EuiFlexItem30, { children: [
|
|
57038
57110
|
/* @__PURE__ */ jsxs103(EuiPanel8, { hasShadow: false, color: "subdued", paddingSize: "l", children: [
|
|
57039
57111
|
/* @__PURE__ */ jsx183(EuiText39, { size: "s", children: /* @__PURE__ */ jsx183("h4", { children: t("resetTextSearchIndex") }) }),
|
|
@@ -57050,7 +57122,7 @@ var WfoModifySettings = () => {
|
|
|
57050
57122
|
};
|
|
57051
57123
|
|
|
57052
57124
|
// src/components/WfoSettings/WfoStatus.tsx
|
|
57053
|
-
import { useTranslations as
|
|
57125
|
+
import { useTranslations as useTranslations66 } from "next-intl";
|
|
57054
57126
|
import {
|
|
57055
57127
|
EuiFlexGroup as EuiFlexGroup24,
|
|
57056
57128
|
EuiFlexItem as EuiFlexItem31,
|
|
@@ -57064,7 +57136,7 @@ var WfoStatus = () => {
|
|
|
57064
57136
|
const { data } = useGetEngineStatusQuery();
|
|
57065
57137
|
const { engineStatus, runningProcesses } = data || {};
|
|
57066
57138
|
const isRunning = engineStatus === "RUNNING" /* RUNNING */;
|
|
57067
|
-
const t =
|
|
57139
|
+
const t = useTranslations66("settings.page");
|
|
57068
57140
|
return /* @__PURE__ */ jsxs104(EuiPanel9, { hasShadow: false, color: "subdued", paddingSize: "l", children: [
|
|
57069
57141
|
/* @__PURE__ */ jsxs104(EuiFlexGroup24, { children: [
|
|
57070
57142
|
/* @__PURE__ */ jsx184(EuiFlexItem31, { grow: false, style: { minWidth: 208 }, children: /* @__PURE__ */ jsx184(EuiText40, { size: "s", children: /* @__PURE__ */ jsx184("h4", { children: t("runningProcesses") }) }) }),
|
|
@@ -57151,12 +57223,12 @@ var WfoNoResults = ({ text, icon }) => {
|
|
|
57151
57223
|
};
|
|
57152
57224
|
|
|
57153
57225
|
// src/components/WfoStartButton/WfoStartTaskComboBox.tsx
|
|
57154
|
-
import { useTranslations as
|
|
57226
|
+
import { useTranslations as useTranslations67 } from "next-intl";
|
|
57155
57227
|
import { useRouter as useRouter14 } from "next/router";
|
|
57156
57228
|
import { jsx as jsx186 } from "@emotion/react/jsx-runtime";
|
|
57157
57229
|
var WfoStartTaskButtonComboBox = () => {
|
|
57158
57230
|
const router = useRouter14();
|
|
57159
|
-
const t =
|
|
57231
|
+
const t = useTranslations67("common");
|
|
57160
57232
|
const { isEngineRunningNow } = useCheckEngineStatus();
|
|
57161
57233
|
const { data } = useGetTaskOptionsQuery();
|
|
57162
57234
|
const taskOptions = (data == null ? void 0 : data.startOptions) || [];
|
|
@@ -57520,7 +57592,7 @@ var WfoSummaryCard = ({
|
|
|
57520
57592
|
};
|
|
57521
57593
|
|
|
57522
57594
|
// src/components/WfoSummary/WfoActiveWorkflowsSummaryCard.tsx
|
|
57523
|
-
import { useTranslations as
|
|
57595
|
+
import { useTranslations as useTranslations68 } from "next-intl";
|
|
57524
57596
|
|
|
57525
57597
|
// src/pages/startPage/queryVariables.ts
|
|
57526
57598
|
var baseQueryVariables = {
|
|
@@ -57613,7 +57685,7 @@ var productsSummaryQueryVariables = {
|
|
|
57613
57685
|
import { jsx as jsx193 } from "@emotion/react/jsx-runtime";
|
|
57614
57686
|
var WfoActiveWorkflowsSummaryCard = () => {
|
|
57615
57687
|
var _a;
|
|
57616
|
-
const t =
|
|
57688
|
+
const t = useTranslations68("startPage.activeWorkflows");
|
|
57617
57689
|
const {
|
|
57618
57690
|
data: activeWorkflowsSummaryResponse,
|
|
57619
57691
|
isFetching: activeWorkflowsSummaryIsFetching
|
|
@@ -57636,11 +57708,11 @@ var WfoActiveWorkflowsSummaryCard = () => {
|
|
|
57636
57708
|
};
|
|
57637
57709
|
|
|
57638
57710
|
// src/components/WfoSummary/WfoFailedTasksSummaryCard.tsx
|
|
57639
|
-
import { useTranslations as
|
|
57711
|
+
import { useTranslations as useTranslations69 } from "next-intl";
|
|
57640
57712
|
import { jsx as jsx194 } from "@emotion/react/jsx-runtime";
|
|
57641
57713
|
var WfoFailedTasksSummaryCard = () => {
|
|
57642
57714
|
var _a;
|
|
57643
|
-
const t =
|
|
57715
|
+
const t = useTranslations69("startPage.failedTasks");
|
|
57644
57716
|
const {
|
|
57645
57717
|
data: failedTasksSummaryResponse,
|
|
57646
57718
|
isFetching: failedTasksSummaryIsFetching
|
|
@@ -57663,11 +57735,11 @@ var WfoFailedTasksSummaryCard = () => {
|
|
|
57663
57735
|
};
|
|
57664
57736
|
|
|
57665
57737
|
// src/components/WfoSummary/WfoLatestActiveSubscriptionsSummaryCard.tsx
|
|
57666
|
-
import { useTranslations as
|
|
57738
|
+
import { useTranslations as useTranslations70 } from "next-intl";
|
|
57667
57739
|
import { jsx as jsx195 } from "@emotion/react/jsx-runtime";
|
|
57668
57740
|
var WfoLatestActiveSubscriptionsSummaryCard = () => {
|
|
57669
57741
|
var _a;
|
|
57670
|
-
const t =
|
|
57742
|
+
const t = useTranslations70("startPage.activeSubscriptions");
|
|
57671
57743
|
const {
|
|
57672
57744
|
data: subscriptionsSummaryResult,
|
|
57673
57745
|
isLoading: subscriptionsSummaryIsFetching
|
|
@@ -57692,11 +57764,11 @@ var WfoLatestActiveSubscriptionsSummaryCard = () => {
|
|
|
57692
57764
|
};
|
|
57693
57765
|
|
|
57694
57766
|
// src/components/WfoSummary/WfoLatestOutOfSyncSubscriptionSummaryCard.tsx
|
|
57695
|
-
import { useTranslations as
|
|
57767
|
+
import { useTranslations as useTranslations71 } from "next-intl";
|
|
57696
57768
|
import { jsx as jsx196 } from "@emotion/react/jsx-runtime";
|
|
57697
57769
|
var WfoLatestOutOfSyncSubscriptionSummaryCard = () => {
|
|
57698
57770
|
var _a;
|
|
57699
|
-
const t =
|
|
57771
|
+
const t = useTranslations71("startPage.outOfSyncSubscriptions");
|
|
57700
57772
|
const {
|
|
57701
57773
|
data: outOfSyncSubscriptionsSummaryResult,
|
|
57702
57774
|
isLoading: outOfSyncsubscriptionsSummaryIsFetching
|
|
@@ -57724,13 +57796,13 @@ var WfoLatestOutOfSyncSubscriptionSummaryCard = () => {
|
|
|
57724
57796
|
};
|
|
57725
57797
|
|
|
57726
57798
|
// src/components/WfoSummary/WfoMyWorkflowsSummaryCard.tsx
|
|
57727
|
-
import { useTranslations as
|
|
57799
|
+
import { useTranslations as useTranslations72 } from "next-intl";
|
|
57728
57800
|
import { jsx as jsx197 } from "@emotion/react/jsx-runtime";
|
|
57729
57801
|
var WfoMyWorkflowsSummaryCard = ({
|
|
57730
57802
|
username
|
|
57731
57803
|
}) => {
|
|
57732
57804
|
var _a;
|
|
57733
|
-
const t =
|
|
57805
|
+
const t = useTranslations72("startPage.myWorkflows");
|
|
57734
57806
|
const {
|
|
57735
57807
|
data: myWorkflowsSummaryResponse,
|
|
57736
57808
|
isFetching: myWorkflowsSummaryIsFetching
|
|
@@ -57758,11 +57830,11 @@ var WfoMyWorkflowsSummaryCard = ({
|
|
|
57758
57830
|
};
|
|
57759
57831
|
|
|
57760
57832
|
// src/components/WfoSummary/WfoProductsSummaryCard.tsx
|
|
57761
|
-
import { useTranslations as
|
|
57833
|
+
import { useTranslations as useTranslations73 } from "next-intl";
|
|
57762
57834
|
import { jsx as jsx198, jsxs as jsxs111 } from "@emotion/react/jsx-runtime";
|
|
57763
57835
|
var WfoProductsSummaryCard = () => {
|
|
57764
57836
|
var _a, _b, _c;
|
|
57765
|
-
const t =
|
|
57837
|
+
const t = useTranslations73("startPage.products");
|
|
57766
57838
|
const {
|
|
57767
57839
|
data: productsSummaryResult,
|
|
57768
57840
|
isLoading: productsSummaryIsFetching
|
|
@@ -57842,7 +57914,11 @@ var en_GB_default = {
|
|
|
57842
57914
|
darkMode: "Dark mode",
|
|
57843
57915
|
lightMode: "Light mode",
|
|
57844
57916
|
websocketConnected: "The websocket is connected",
|
|
57845
|
-
websocketDisconnected: "The websocket is disconnected, click the icon or refresh the page"
|
|
57917
|
+
websocketDisconnected: "The websocket is disconnected, click the icon or refresh the page",
|
|
57918
|
+
resetToDefault: "Reset to default",
|
|
57919
|
+
savePreferences: "Save preferences",
|
|
57920
|
+
numberOfRows: "Number of rows",
|
|
57921
|
+
tableSettings: "Table settings"
|
|
57846
57922
|
},
|
|
57847
57923
|
common: {
|
|
57848
57924
|
product: "Product",
|
|
@@ -58255,7 +58331,11 @@ var nl_NL_default = {
|
|
|
58255
58331
|
darkMode: "Dark mode",
|
|
58256
58332
|
lightMode: "Light mode",
|
|
58257
58333
|
websocketConnected: "De websocket is actief",
|
|
58258
|
-
websocketDisconnected: "De websocket verbinding is verbroken, klik op het icoon of ververs de pagina."
|
|
58334
|
+
websocketDisconnected: "De websocket verbinding is verbroken, klik op het icoon of ververs de pagina.",
|
|
58335
|
+
resetToDefault: "Reset naar standaard",
|
|
58336
|
+
savePreferences: "Voorkeuren opslaan",
|
|
58337
|
+
numberOfRows: "Aantal rijen",
|
|
58338
|
+
tableSettings: "Tabel instellingen"
|
|
58259
58339
|
},
|
|
58260
58340
|
common: {
|
|
58261
58341
|
product: "Produkt",
|