@orchestrator-ui/orchestrator-ui-components 1.14.2 → 1.16.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 +8 -8
- package/CHANGELOG.md +16 -0
- package/dist/index.d.ts +13 -1
- package/dist/index.js +1111 -1056
- package/package.json +1 -1
- package/src/components/WfoForms/formFields/ListAddField.tsx +2 -2
- package/src/components/WfoForms/formFields/ListDelField.tsx +7 -2
- package/src/components/WfoForms/formFields/deprecated/VlanField.tsx +2 -4
- package/src/contexts/OrchestratorConfigContext.tsx +2 -0
- package/src/icons/WfoTrash.tsx +28 -0
- package/src/icons/index.ts +1 -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/rtk/endpoints/subscriptionInUseByRelationsList.ts +1 -1
- package/src/types/types.ts +2 -0
package/package.json
CHANGED
|
@@ -53,9 +53,9 @@ function ListAdd({
|
|
|
53
53
|
!disabled &&
|
|
54
54
|
!(
|
|
55
55
|
parent.maxCount! <=
|
|
56
|
-
Math.max(initialCount ?? 0, parent
|
|
56
|
+
Math.max(initialCount ?? 0, parent?.value!.length)
|
|
57
57
|
);
|
|
58
|
-
const count = 1 + Math.max((initialCount ?? 0) - parent
|
|
58
|
+
const count = 1 + Math.max((initialCount ?? 0) - parent?.value!.length, 0);
|
|
59
59
|
|
|
60
60
|
function onAction(event: React.KeyboardEvent | React.MouseEvent) {
|
|
61
61
|
if (
|
|
@@ -50,15 +50,20 @@ function ListDel({
|
|
|
50
50
|
)[0];
|
|
51
51
|
|
|
52
52
|
const limitNotReached =
|
|
53
|
-
|
|
53
|
+
parent &&
|
|
54
|
+
!disabled &&
|
|
55
|
+
parent.minCount &&
|
|
56
|
+
parent.value &&
|
|
57
|
+
!(parent.minCount >= parent.value.length);
|
|
54
58
|
|
|
55
59
|
function onAction(event: React.KeyboardEvent | React.MouseEvent) {
|
|
56
60
|
if (
|
|
61
|
+
parent &&
|
|
57
62
|
limitNotReached &&
|
|
58
63
|
!readOnly &&
|
|
59
64
|
(!('key' in event) || event.key === 'Enter')
|
|
60
65
|
) {
|
|
61
|
-
const value = parent
|
|
66
|
+
const value = parent?.value!.slice();
|
|
62
67
|
value.splice(nameIndex, 1);
|
|
63
68
|
parent.onChange(value);
|
|
64
69
|
}
|
|
@@ -227,10 +227,8 @@ function Vlan({
|
|
|
227
227
|
: undefined;
|
|
228
228
|
|
|
229
229
|
let message = '';
|
|
230
|
-
if (!imsIsLoading) {
|
|
231
|
-
if (
|
|
232
|
-
message = t('widgets.vlan.missingInIms');
|
|
233
|
-
} else if (portIsTagged && nsiVlansOnly) {
|
|
230
|
+
if (!imsIsLoading && subscriptionId) {
|
|
231
|
+
if (portIsTagged && nsiVlansOnly) {
|
|
234
232
|
const initialUsedVlans = schema
|
|
235
233
|
.getInitialValue('service_ports', {})
|
|
236
234
|
.map((sp: { vlan: string }) => sp.vlan);
|
|
@@ -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 = {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
import { WfoIconProps } from './WfoIconProps';
|
|
4
|
+
|
|
5
|
+
export const WfoTrash: FC<WfoIconProps> = ({
|
|
6
|
+
width = 24,
|
|
7
|
+
height = 24,
|
|
8
|
+
color = '#000000',
|
|
9
|
+
}) => (
|
|
10
|
+
<svg
|
|
11
|
+
width={width}
|
|
12
|
+
height={height}
|
|
13
|
+
viewBox={`0 0 24 24`}
|
|
14
|
+
version="1.1"
|
|
15
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
+
>
|
|
17
|
+
<title>icon/trash</title>
|
|
18
|
+
<g id="Symbols" stroke={color} strokeWidth="1.5" fill="none">
|
|
19
|
+
<g id="icon/trash" fill="none">
|
|
20
|
+
<path
|
|
21
|
+
stroke-linecap="round"
|
|
22
|
+
stroke-linejoin="round"
|
|
23
|
+
d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"
|
|
24
|
+
/>
|
|
25
|
+
</g>
|
|
26
|
+
</g>
|
|
27
|
+
</svg>
|
|
28
|
+
);
|
package/src/icons/index.ts
CHANGED
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
|
+
};
|
|
@@ -21,7 +21,7 @@ export const subscriptionInUseByRelationQuery = `
|
|
|
21
21
|
subscriptions(
|
|
22
22
|
first: ${NUMBER_OF_ITEMS_REPRESENTING_ALL_ITEMS}
|
|
23
23
|
after: 0
|
|
24
|
-
filterBy: [{field: "subscriptionId", value: $subscriptionIds},{field: "status", value: ${nonTerminalSubscriptionStatuses}}]
|
|
24
|
+
filterBy: [{field: "subscriptionId", value: $subscriptionIds},{field: "status", value: "${nonTerminalSubscriptionStatuses}"}]
|
|
25
25
|
) {
|
|
26
26
|
page {
|
|
27
27
|
product {
|
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 {
|