@orchestrator-ui/orchestrator-ui-components 1.14.2 → 1.15.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 +9 -9
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +11 -1
- package/dist/index.js +247 -219
- package/package.json +1 -1
- package/src/contexts/OrchestratorConfigContext.tsx +2 -0
- package/src/messages/en-GB.json +2 -1
- package/src/messages/nl-NL.json +2 -1
- package/src/pages/processes/WfoProcessDetail.tsx +9 -5
- package/src/pages/processes/WfoProductInformationWithLink.tsx +34 -0
- package/src/pages/processes/index.ts +1 -0
- package/src/types/types.ts +2 -0
package/package.json
CHANGED
|
@@ -17,6 +17,8 @@ export const OrchestratorConfigContext = createContext<OrchestratorConfig>({
|
|
|
17
17
|
authActive: true,
|
|
18
18
|
useWebSockets: false,
|
|
19
19
|
useThemeToggle: false,
|
|
20
|
+
showWorkflowInformationLink: false,
|
|
21
|
+
workflowInformationLinkUrl: '',
|
|
20
22
|
});
|
|
21
23
|
|
|
22
24
|
export type OrchestratorConfigProviderProps = {
|
package/src/messages/en-GB.json
CHANGED
|
@@ -210,7 +210,8 @@
|
|
|
210
210
|
"lastUpdate": "Last update",
|
|
211
211
|
"relatedSubscriptions": "Related subscriptions",
|
|
212
212
|
"subscriptions": "{count, plural, =0 {0 subscriptions} =1 {1 subscription} other {# subscriptions}}",
|
|
213
|
-
"customer": "Customer"
|
|
213
|
+
"customer": "Customer",
|
|
214
|
+
"openWorkflowTaskInfo": "open workflow/task information in a new tab"
|
|
214
215
|
},
|
|
215
216
|
"steps": {
|
|
216
217
|
"taskSteps": "Task steps",
|
package/src/messages/nl-NL.json
CHANGED
|
@@ -209,7 +209,8 @@
|
|
|
209
209
|
"lastUpdate": "Laatste update",
|
|
210
210
|
"relatedSubscriptions": "Gerelateerde subscriptions",
|
|
211
211
|
"subscriptions": "{count, plural, =0 {0 subscriptions} =1 {1 subscriptie} other {# subscriptions}}",
|
|
212
|
-
"customer": "Customer"
|
|
212
|
+
"customer": "Customer",
|
|
213
|
+
"openWorkflowTaskInfo": "open workflow-/taakinformatie op een nieuw tabblad"
|
|
213
214
|
},
|
|
214
215
|
"steps": {
|
|
215
216
|
"steps": "Workflow stappen",
|
|
@@ -30,13 +30,14 @@ import {
|
|
|
30
30
|
usePolicy,
|
|
31
31
|
} from '@/hooks';
|
|
32
32
|
import { WfoRefresh, WfoXCircleFill } from '@/icons';
|
|
33
|
-
import { ProcessDetail, ProcessStatus } from '@/types';
|
|
34
|
-
import { parseDateRelativeToToday, parseIsoString } from '@/utils';
|
|
35
|
-
|
|
36
33
|
import {
|
|
37
34
|
RenderDirection,
|
|
38
35
|
WfoProcessListSubscriptionsCell,
|
|
39
|
-
|
|
36
|
+
WfoProductInformationWithLink,
|
|
37
|
+
} from '@/pages';
|
|
38
|
+
import { ProcessDetail, ProcessStatus } from '@/types';
|
|
39
|
+
import { parseDateRelativeToToday, parseIsoString } from '@/utils';
|
|
40
|
+
|
|
40
41
|
import { getIndexOfCurrentStep } from './timelineUtils';
|
|
41
42
|
|
|
42
43
|
interface ProcessHeaderValueProps {
|
|
@@ -192,7 +193,10 @@ export const WfoProcessDetail = ({
|
|
|
192
193
|
<EuiFlexItem>
|
|
193
194
|
<EuiPageHeader pageTitle={pageTitle} />
|
|
194
195
|
<EuiSpacer />
|
|
195
|
-
<
|
|
196
|
+
<WfoProductInformationWithLink
|
|
197
|
+
productNames={productNames}
|
|
198
|
+
workflowName={processDetail?.workflowName ?? ''}
|
|
199
|
+
/>
|
|
196
200
|
</EuiFlexItem>
|
|
197
201
|
<EuiFlexGroup
|
|
198
202
|
justifyContent="flexEnd"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { useTranslations } from 'next-intl';
|
|
4
|
+
|
|
5
|
+
import { EuiButtonIcon, EuiFlexGroup, EuiText, EuiToolTip } from '@elastic/eui';
|
|
6
|
+
|
|
7
|
+
import { useGetOrchestratorConfig } from '@/hooks';
|
|
8
|
+
|
|
9
|
+
interface WfoProductInformationWithLinkProps {
|
|
10
|
+
workflowName: string;
|
|
11
|
+
productNames: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const WfoProductInformationWithLink = ({
|
|
15
|
+
workflowName,
|
|
16
|
+
productNames,
|
|
17
|
+
}: WfoProductInformationWithLinkProps) => {
|
|
18
|
+
const { workflowInformationLinkUrl, showWorkflowInformationLink } =
|
|
19
|
+
useGetOrchestratorConfig();
|
|
20
|
+
const t = useTranslations('processes.detail');
|
|
21
|
+
const docsUrl = workflowInformationLinkUrl + workflowName;
|
|
22
|
+
return (
|
|
23
|
+
<EuiFlexGroup gutterSize={'s'} alignItems={'center'}>
|
|
24
|
+
{showWorkflowInformationLink && (
|
|
25
|
+
<EuiToolTip content={t('openWorkflowTaskInfo')}>
|
|
26
|
+
<a href={docsUrl} target="_blank">
|
|
27
|
+
<EuiButtonIcon iconSize={'l'} iconType={'iInCircle'} />
|
|
28
|
+
</a>
|
|
29
|
+
</EuiToolTip>
|
|
30
|
+
)}
|
|
31
|
+
<EuiText size="s">{productNames}</EuiText>
|
|
32
|
+
</EuiFlexGroup>
|
|
33
|
+
);
|
|
34
|
+
};
|
package/src/types/types.ts
CHANGED
|
@@ -521,9 +521,11 @@ export type OrchestratorConfig = {
|
|
|
521
521
|
processesEndpoint: string;
|
|
522
522
|
subscriptionActionsEndpoint: string;
|
|
523
523
|
subscriptionProcessesEndpoint: string;
|
|
524
|
+
workflowInformationLinkUrl: string;
|
|
524
525
|
authActive: boolean;
|
|
525
526
|
useWebSockets: boolean;
|
|
526
527
|
useThemeToggle: boolean;
|
|
528
|
+
showWorkflowInformationLink: boolean;
|
|
527
529
|
};
|
|
528
530
|
|
|
529
531
|
export enum ColorModes {
|