@orchestrator-ui/orchestrator-ui-components 8.7.3 → 8.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-test.log +17 -15
- package/CHANGELOG.md +34 -0
- package/dist/index.d.ts +42 -20
- package/dist/index.js +1612 -1378
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/src/components/WfoBadges/WfoWorkflowTargetBadge/WfoWorkflowTargetBadge.tsx +2 -2
- package/src/components/WfoContentHeader/WfoContentHeader.tsx +1 -1
- package/src/components/WfoInlineNoteEdit/WfoProcessListNoteEdit.spec.tsx +35 -0
- package/src/components/WfoInlineNoteEdit/WfoProcessListNoteEdit.tsx +7 -9
- package/src/components/WfoProcessList/WfoProcessListDeltaPopover.tsx +1 -1
- package/src/components/WfoProcessList/WfoProcessesList.tsx +7 -5
- package/src/components/WfoPydanticForm/fields/WfoMultiCheckboxField.tsx +2 -1
- package/src/components/WfoSubscription/WfoProcessesTimeline.tsx +21 -7
- package/src/components/WfoSubscription/WfoSubscriptionActions/WfoSubscriptionActions.tsx +25 -9
- package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/WfoSubscriptionDetailSection.tsx +1 -1
- package/src/components/WfoSubscription/styles.ts +6 -0
- package/src/components/WfoSubscription/utils/utils.ts +2 -4
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoExpandingSearchRow.tsx +0 -1
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoFieldSelector.tsx +12 -8
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoFilterBuilder.tsx +23 -10
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoStructuredSearchTable.tsx +73 -3
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoValueEditor.tsx +4 -2
- package/src/components/WfoTable/WfoStructuredSearchTable/styles.ts +8 -9
- package/src/components/WfoTable/WfoTable/WfoTable.tsx +80 -45
- package/src/components/WfoTable/WfoTable/WfoTableDataRows.tsx +11 -2
- package/src/components/WfoTable/WfoTable/WfoTableExpandedRowReveal.spec.tsx +120 -0
- package/src/components/WfoTable/WfoTable/WfoTableSkeletonRows.tsx +52 -0
- package/src/components/WfoTable/WfoTable/index.ts +1 -0
- package/src/components/WfoTable/WfoTable/styles.ts +6 -0
- package/src/components/WfoTable/WfoTableSettingsModal/WfoTableSettingsModal.tsx +21 -18
- package/src/components/WfoTable/WfoTableSettingsModal/styles.ts +17 -0
- package/src/components/WfoTable/utils/tableConfigPersistence.ts +2 -0
- package/src/components/WfoTimeline/styles.ts +1 -1
- package/src/components/WfoWorkflowUserGuide/WfoPageWithUserGuide.tsx +8 -2
- package/src/components/WfoWorkflowUserGuide/WfoWorkflowGuideExpandablePanel.tsx +39 -30
- package/src/components/WfoWorkflowUserGuide/styles.ts +55 -7
- package/src/configuration/constants.ts +1 -1
- package/src/configuration/version.ts +1 -1
- package/src/hooks/useGetPydanticFormsConfig.tsx +5 -3
- package/src/hooks/useSearch.ts +2 -2
- package/src/hooks/useStoredTableConfig.ts +2 -0
- package/src/messages/en-GB.json +5 -1
- package/src/messages/nl-NL.json +6 -2
- package/src/pages/WfoSearchPocPage.tsx +29 -24
- package/src/pages/processes/WfoProductInformationWithLink.tsx +9 -4
- package/src/pages/tasks/WfoTasksListPage.tsx +1 -0
- package/src/types/search.ts +8 -0
- package/src/types/types.ts +11 -11
- package/src/utils/getDefaultTableConfig.ts +2 -0
|
@@ -29,6 +29,7 @@ interface WfoUserGuideToggleStripProps {
|
|
|
29
29
|
ariaLabel: string;
|
|
30
30
|
isBigScreen: boolean;
|
|
31
31
|
noLeadingBorder?: boolean;
|
|
32
|
+
sticky?: boolean;
|
|
32
33
|
children: ReactNode;
|
|
33
34
|
}
|
|
34
35
|
|
|
@@ -37,37 +38,51 @@ const WfoWorkflowGuideToggleStrip = ({
|
|
|
37
38
|
ariaLabel,
|
|
38
39
|
isBigScreen,
|
|
39
40
|
noLeadingBorder,
|
|
41
|
+
sticky,
|
|
40
42
|
children,
|
|
41
43
|
}: WfoUserGuideToggleStripProps) => {
|
|
42
44
|
const {
|
|
43
45
|
fullHeightStyle,
|
|
46
|
+
stickyStripContainerStyle,
|
|
47
|
+
stripIconStyle,
|
|
48
|
+
stickyPanelFillStyle,
|
|
44
49
|
toggleStripContainerStyle,
|
|
45
50
|
toggleStripContainerHorizontalStyle,
|
|
51
|
+
stickyHorizontalStripContainerStyle,
|
|
46
52
|
toggleStripPanelStyle,
|
|
47
53
|
noLeftBorderStyle,
|
|
48
54
|
noBottomBorderStyle,
|
|
49
55
|
} = useWithOrchestratorTheme(getStyles);
|
|
50
56
|
|
|
57
|
+
const containerStyle =
|
|
58
|
+
isBigScreen ?
|
|
59
|
+
sticky ? stickyStripContainerStyle
|
|
60
|
+
: toggleStripContainerStyle
|
|
61
|
+
: sticky ? stickyHorizontalStripContainerStyle
|
|
62
|
+
: toggleStripContainerHorizontalStyle;
|
|
63
|
+
|
|
51
64
|
return (
|
|
52
|
-
<EuiFlexItem
|
|
53
|
-
grow={false}
|
|
54
|
-
onClick={onToggle}
|
|
55
|
-
aria-label={ariaLabel}
|
|
56
|
-
css={isBigScreen ? toggleStripContainerStyle : toggleStripContainerHorizontalStyle}
|
|
57
|
-
>
|
|
65
|
+
<EuiFlexItem grow={false} onClick={onToggle} aria-label={ariaLabel} css={containerStyle}>
|
|
58
66
|
<EuiPanel
|
|
59
67
|
hasShadow={false}
|
|
60
|
-
css={[
|
|
68
|
+
css={[
|
|
69
|
+
toggleStripPanelStyle,
|
|
70
|
+
sticky && stickyPanelFillStyle,
|
|
71
|
+
noLeadingBorder && (isBigScreen ? noLeftBorderStyle : noBottomBorderStyle),
|
|
72
|
+
]}
|
|
61
73
|
>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
{isBigScreen ?
|
|
75
|
+
<div css={stripIconStyle}>{children}</div>
|
|
76
|
+
: <EuiFlexGroup
|
|
77
|
+
direction="row"
|
|
78
|
+
alignItems="center"
|
|
79
|
+
gutterSize="s"
|
|
80
|
+
justifyContent="center"
|
|
81
|
+
css={fullHeightStyle}
|
|
82
|
+
>
|
|
83
|
+
{children}
|
|
84
|
+
</EuiFlexGroup>
|
|
85
|
+
}
|
|
71
86
|
</EuiPanel>
|
|
72
87
|
</EuiFlexItem>
|
|
73
88
|
);
|
|
@@ -82,12 +97,13 @@ const WfoWorkflowGuideMarkdown = ({ workflowName, isBigScreen }: { workflowName:
|
|
|
82
97
|
|
|
83
98
|
return (
|
|
84
99
|
<div css={isBigScreen ? guideBodyStyle : guideStackedBodyStyle}>
|
|
85
|
-
{(isLoading && <EuiLoadingSpinner size="m" />)
|
|
86
|
-
|
|
87
|
-
<
|
|
100
|
+
{(isLoading && <EuiLoadingSpinner size="m" />) || (
|
|
101
|
+
<EuiPanel paddingSize="m" hasShadow css={isBigScreen ? guidePanelStyle : guideStackedPanelStyle}>
|
|
102
|
+
{((isError || !content) && <EuiText color="subdued">{t('noGuideAvailable')}</EuiText>) || (
|
|
88
103
|
<EuiMarkdownFormat>{content}</EuiMarkdownFormat>
|
|
89
|
-
|
|
90
|
-
|
|
104
|
+
)}
|
|
105
|
+
</EuiPanel>
|
|
106
|
+
)}
|
|
91
107
|
</div>
|
|
92
108
|
);
|
|
93
109
|
};
|
|
@@ -97,14 +113,7 @@ export const WfoWorkflowGuideExpandablePanel = ({ workflowName, isExpanded, onTo
|
|
|
97
113
|
const { fullHeightStyle, guideExpandedItemStyle, guideExpandedFillStyle } = useWithOrchestratorTheme(getStyles);
|
|
98
114
|
const isBigScreen = useIsWithinBreakpoints(['xl', 'xxl']);
|
|
99
115
|
|
|
100
|
-
const OpenGuideButton = () =>
|
|
101
|
-
<EuiFlexItem grow={false}>
|
|
102
|
-
<EuiFlexGroup gutterSize="xs" alignItems="center" direction={isBigScreen ? 'column' : 'row'}>
|
|
103
|
-
<EuiIcon type={isBigScreen ? 'arrowLeft' : 'arrowDown'} size="xxl" color="primary" />
|
|
104
|
-
<EuiIcon type={'info'} size="xxl" color="primary" />
|
|
105
|
-
</EuiFlexGroup>
|
|
106
|
-
</EuiFlexItem>
|
|
107
|
-
);
|
|
116
|
+
const OpenGuideButton = () => <EuiIcon type={'info'} size="xxl" color="primary" />;
|
|
108
117
|
|
|
109
118
|
const CloseGuideButton = () => (
|
|
110
119
|
<EuiFlexItem grow={false}>
|
|
@@ -114,7 +123,7 @@ export const WfoWorkflowGuideExpandablePanel = ({ workflowName, isExpanded, onTo
|
|
|
114
123
|
|
|
115
124
|
if (!isExpanded) {
|
|
116
125
|
return (
|
|
117
|
-
<WfoWorkflowGuideToggleStrip onToggle={onToggle} ariaLabel={t('show')} isBigScreen={isBigScreen}>
|
|
126
|
+
<WfoWorkflowGuideToggleStrip onToggle={onToggle} ariaLabel={t('show')} isBigScreen={isBigScreen} sticky>
|
|
118
127
|
<OpenGuideButton />
|
|
119
128
|
</WfoWorkflowGuideToggleStrip>
|
|
120
129
|
);
|
|
@@ -3,6 +3,11 @@ import { css } from '@emotion/react';
|
|
|
3
3
|
import { WfoThemeHelpers } from '@/hooks';
|
|
4
4
|
|
|
5
5
|
export const getStyles = ({ theme }: WfoThemeHelpers) => {
|
|
6
|
+
const navigationHeight = theme.base * 3;
|
|
7
|
+
const timelineStickyHeight = theme.base * 4;
|
|
8
|
+
const stripBottomGap = theme.base;
|
|
9
|
+
const stripMinHeight = theme.base * 40;
|
|
10
|
+
|
|
6
11
|
const fullHeightStyle = css({
|
|
7
12
|
height: '100%',
|
|
8
13
|
});
|
|
@@ -12,25 +17,56 @@ export const getStyles = ({ theme }: WfoThemeHelpers) => {
|
|
|
12
17
|
cursor: 'pointer',
|
|
13
18
|
});
|
|
14
19
|
|
|
20
|
+
const stickyStripContainerStyle = css({
|
|
21
|
+
width: theme.base * 4,
|
|
22
|
+
cursor: 'pointer',
|
|
23
|
+
alignSelf: 'stretch',
|
|
24
|
+
position: 'sticky',
|
|
25
|
+
top: timelineStickyHeight,
|
|
26
|
+
minHeight: stripMinHeight,
|
|
27
|
+
maxHeight: `calc(100vh - ${navigationHeight + timelineStickyHeight + stripBottomGap}px)`,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const stripIconStyle = css({
|
|
31
|
+
display: 'flex',
|
|
32
|
+
justifyContent: 'center',
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const stickyPanelFillStyle = css({
|
|
36
|
+
flexGrow: 1,
|
|
37
|
+
});
|
|
38
|
+
|
|
15
39
|
const toggleStripContainerHorizontalStyle = css({
|
|
16
40
|
width: '100%',
|
|
17
41
|
height: theme.base * 4,
|
|
18
42
|
cursor: 'pointer',
|
|
19
43
|
});
|
|
20
44
|
|
|
45
|
+
const stickyHorizontalStripContainerStyle = css({
|
|
46
|
+
width: '100%',
|
|
47
|
+
height: theme.base * 4,
|
|
48
|
+
cursor: 'pointer',
|
|
49
|
+
position: 'sticky',
|
|
50
|
+
top: timelineStickyHeight,
|
|
51
|
+
zIndex: 2,
|
|
52
|
+
});
|
|
53
|
+
|
|
21
54
|
const toggleStripPanelStyle = css({
|
|
22
55
|
height: '100%',
|
|
23
56
|
backgroundColor: theme.colors.backgroundBasePrimary,
|
|
24
|
-
border: `2px
|
|
25
|
-
transition: '
|
|
57
|
+
border: `2px solid ${theme.colors.backgroundLightPrimary}`,
|
|
58
|
+
transition: 'border-color 100ms ease-in-out',
|
|
26
59
|
'&:hover': {
|
|
27
|
-
|
|
28
|
-
boxShadow: `0 0 0 2px ${theme.colors.backgroundBasePrimary}`,
|
|
60
|
+
borderColor: theme.colors.borderBasePrimary,
|
|
29
61
|
},
|
|
30
62
|
});
|
|
31
63
|
|
|
32
64
|
const guideExpandedItemStyle = css({
|
|
33
|
-
|
|
65
|
+
alignSelf: 'stretch',
|
|
66
|
+
position: 'sticky',
|
|
67
|
+
top: timelineStickyHeight,
|
|
68
|
+
minHeight: stripMinHeight,
|
|
69
|
+
maxHeight: `calc(100vh - ${navigationHeight + timelineStickyHeight + stripBottomGap}px)`,
|
|
34
70
|
});
|
|
35
71
|
|
|
36
72
|
const guideExpandedFillStyle = css({
|
|
@@ -41,8 +77,10 @@ export const getStyles = ({ theme }: WfoThemeHelpers) => {
|
|
|
41
77
|
const guidePanelStyle = css({
|
|
42
78
|
height: '100%',
|
|
43
79
|
overflowY: 'auto',
|
|
44
|
-
border: `2px
|
|
80
|
+
border: `2px solid ${theme.colors.backgroundLightPrimary}`,
|
|
45
81
|
borderRightWidth: 0,
|
|
82
|
+
borderTopRightRadius: 0,
|
|
83
|
+
borderBottomRightRadius: 0,
|
|
46
84
|
});
|
|
47
85
|
|
|
48
86
|
const guideBodyStyle = css({
|
|
@@ -54,10 +92,14 @@ export const getStyles = ({ theme }: WfoThemeHelpers) => {
|
|
|
54
92
|
|
|
55
93
|
const noLeftBorderStyle = css({
|
|
56
94
|
borderLeftWidth: 0,
|
|
95
|
+
borderTopLeftRadius: 0,
|
|
96
|
+
borderBottomLeftRadius: 0,
|
|
57
97
|
});
|
|
58
98
|
|
|
59
99
|
const noBottomBorderStyle = css({
|
|
60
100
|
borderBottomWidth: 0,
|
|
101
|
+
borderBottomLeftRadius: 0,
|
|
102
|
+
borderBottomRightRadius: 0,
|
|
61
103
|
});
|
|
62
104
|
|
|
63
105
|
const guideStackedBodyStyle = css({
|
|
@@ -66,14 +108,20 @@ export const getStyles = ({ theme }: WfoThemeHelpers) => {
|
|
|
66
108
|
});
|
|
67
109
|
|
|
68
110
|
const guideStackedPanelStyle = css({
|
|
69
|
-
border: `2px
|
|
111
|
+
border: `2px solid ${theme.colors.backgroundLightPrimary}`,
|
|
70
112
|
borderTopWidth: 0,
|
|
113
|
+
borderTopLeftRadius: 0,
|
|
114
|
+
borderTopRightRadius: 0,
|
|
71
115
|
});
|
|
72
116
|
|
|
73
117
|
return {
|
|
74
118
|
fullHeightStyle,
|
|
75
119
|
toggleStripContainerStyle,
|
|
120
|
+
stickyStripContainerStyle,
|
|
121
|
+
stripIconStyle,
|
|
122
|
+
stickyPanelFillStyle,
|
|
76
123
|
toggleStripContainerHorizontalStyle,
|
|
124
|
+
stickyHorizontalStripContainerStyle,
|
|
77
125
|
toggleStripPanelStyle,
|
|
78
126
|
noLeftBorderStyle,
|
|
79
127
|
noBottomBorderStyle,
|
|
@@ -34,7 +34,7 @@ export const METADATA_PRODUCT_ENDPOINT = 'products';
|
|
|
34
34
|
export const METADATA_PRODUCT_BLOCK_ENDPOINT = 'product_blocks';
|
|
35
35
|
export const METADATA_RESOURCE_TYPE_ENDPOINT = 'resource_types';
|
|
36
36
|
export const METADATA_WORKFLOWS_ENDPOINT = 'workflows';
|
|
37
|
-
export const METADATA_SCHEDULES_ENDPOINT = 'schedules';
|
|
37
|
+
export const METADATA_SCHEDULES_ENDPOINT = 'schedules/';
|
|
38
38
|
|
|
39
39
|
//search
|
|
40
40
|
export const SEARCH_QUERY_RESULTS_ENDPOINT = 'search/queries';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ORCHESTRATOR_UI_LIBRARY_VERSION = '8.
|
|
1
|
+
export const ORCHESTRATOR_UI_LIBRARY_VERSION = '8.8.2';
|
|
@@ -163,11 +163,13 @@ const useGetComponentMatcherExtender = (): ComponentMatcherExtender => {
|
|
|
163
163
|
isControlledElement: true,
|
|
164
164
|
},
|
|
165
165
|
matcher(field) {
|
|
166
|
+
const fieldOptions = field.arrayItem?.options;
|
|
167
|
+
|
|
166
168
|
return (
|
|
167
169
|
field.type === PydanticFormFieldType.ARRAY
|
|
168
|
-
&& _.isArray(
|
|
169
|
-
&&
|
|
170
|
-
&&
|
|
170
|
+
&& _.isArray(fieldOptions)
|
|
171
|
+
&& fieldOptions?.length > 0
|
|
172
|
+
&& fieldOptions?.length <= 5
|
|
171
173
|
);
|
|
172
174
|
},
|
|
173
175
|
validator: zodValidationPresets.multiSelect,
|
package/src/hooks/useSearch.ts
CHANGED
|
@@ -25,7 +25,7 @@ export const useSearch = (
|
|
|
25
25
|
) => {
|
|
26
26
|
const [results, setResults] = useState<PaginatedSearchResults>({ ...emptyResult });
|
|
27
27
|
|
|
28
|
-
const [triggerSearch, {
|
|
28
|
+
const [triggerSearch, { isFetching, isError }] = useLazySearchQuery();
|
|
29
29
|
|
|
30
30
|
useEffect(() => {
|
|
31
31
|
const queryText = typeof query === 'string' ? query : query.text?.trim() || '';
|
|
@@ -75,7 +75,7 @@ export const useSearch = (
|
|
|
75
75
|
|
|
76
76
|
return {
|
|
77
77
|
results,
|
|
78
|
-
loading:
|
|
78
|
+
loading: isFetching,
|
|
79
79
|
error: isError ? 'Search failed' : null,
|
|
80
80
|
setResults,
|
|
81
81
|
};
|
|
@@ -23,6 +23,8 @@ export const useStoredTableConfig = <T>(localeStorageKey: string) => {
|
|
|
23
23
|
if (storedConfig) {
|
|
24
24
|
tableConfig.hiddenColumns = storedConfig.hiddenColumns;
|
|
25
25
|
tableConfig.selectedPageSize = storedConfig.selectedPageSize;
|
|
26
|
+
tableConfig.showMatchDetails = storedConfig.showMatchDetails;
|
|
27
|
+
tableConfig.advancedNestedSearch = storedConfig.advancedNestedSearch;
|
|
26
28
|
}
|
|
27
29
|
return tableConfig;
|
|
28
30
|
} catch {
|
package/src/messages/en-GB.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
|
+
"advancedNestedSearch": "Advanced nested search",
|
|
3
4
|
"applyFilter": "Apply filter",
|
|
4
5
|
"createFilter": "Create a filter",
|
|
5
6
|
"deselect": "Deselect",
|
|
6
7
|
"editColumns": "Edit columns",
|
|
7
8
|
"errorMessage": "An error occurred",
|
|
8
9
|
"export": "Export",
|
|
10
|
+
"exportRows": "Export {numberOfRows, plural, one {# row} other {# rows}}",
|
|
9
11
|
"insyncFalse": "out-of-sync",
|
|
10
12
|
"insyncTrue": "in-sync",
|
|
11
13
|
"loadMore": "Load more",
|
|
@@ -24,6 +26,7 @@
|
|
|
24
26
|
"searchModalText": "<p>Different options are available from free text search covering all data columns, or column specific filtering. Note that: <p></p><ul><li>Hidden columns are included</li> <li>Searching is case-insensitive</li> <li>Ordering of words does not matter (unless it is a Phrase)</li> <li>TSV (text search vector) search only available for subscriptions table</li></ul></p> <p>For example:</p> <li><b>\"l2vpn\"</b> – free text search</li> <li><b>tag:l2vpn</b> – search in a specific column</li><li><b>tag:lp description:test</b> – search in multiple columns</li><li><b>tag:(lp|lr)</b> – multiselect within 1 column</li><li><b>-tag:lp</b> – negated filter</li><li><b>test*</b> – prefix filter</li> <p></p><p><b>Note:</b> Search words containing characters `|-*():\"` may not be valid, as they are part of the search query grammar</p><p>Invalid search strings are for example:</p><ul><li>2a10:e300:fff0::/48</li> <li>\"node123(planned)\"</li> <li>\"node123|planned\"</li></ul>",
|
|
25
27
|
"searchModalTitle": "Search string options",
|
|
26
28
|
"showAllColumnsInDetailView": "Show all columns in detail view",
|
|
29
|
+
"showMatchDetails": "Show match details",
|
|
27
30
|
"tableSettings": "Table settings",
|
|
28
31
|
"unauthorizedPage": "You are not authorized to see this page",
|
|
29
32
|
"unknownError": "Unknown error"
|
|
@@ -520,7 +523,8 @@
|
|
|
520
523
|
"title": "Subscriptions",
|
|
521
524
|
"workflowsTab": {
|
|
522
525
|
"startWithNewestLabel": "Start with newest first",
|
|
523
|
-
"startWithOldestLabel": "Start with oldest first"
|
|
526
|
+
"startWithOldestLabel": "Start with oldest first",
|
|
527
|
+
"hideValidateTasks": "Hide validation tasks"
|
|
524
528
|
}
|
|
525
529
|
},
|
|
526
530
|
"index": {
|
package/src/messages/nl-NL.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
|
+
"advancedNestedSearch": "Geavanceerd genest zoeken",
|
|
3
4
|
"applyFilter": "Pas filter toe",
|
|
4
5
|
"createFilter": "Filter",
|
|
5
6
|
"deselect": "Deselecteer",
|
|
6
7
|
"editColumns": "Wijzig kolommen",
|
|
7
8
|
"errorMessage": "Er is een fout opgetreden",
|
|
8
9
|
"export": "Exporteren",
|
|
10
|
+
"exportRows": "Exporteer {numberOfRows, plural, one {# rij} other {# rijen}}",
|
|
9
11
|
"insyncFalse": "out-of-sync",
|
|
10
12
|
"insyncTrue": "in-sync",
|
|
11
13
|
"loadMore": "Meer laden",
|
|
@@ -24,6 +26,7 @@
|
|
|
24
26
|
"searchModalText": "<p>Er zijn verschillende opties beschikbaar: zoeken in vrije tekst voor alle datakolommen en specifiek per kolom te filteren. Houd er rekening mee dat: </p><p></p><ul><li>Verborgen kolommen zijn inbegrepen</li> <li>Zoeken is niet hoofdlettergevoelig</li> <li>De volgorde van woorden doet er niet toe (tenzij het een quote)</li> <li>TSV (text search vector) zoekactie alleen beschikbaar voor subscription tabel</li></ul><p>Bijvoorbeeld:</p> <li><b>\"l2vpn\"</b> – vrije tekst search</li> <li><b>tag:l2vpn</b> – zoeken in een specifieke kolom</li> <li><b>tag:lp beschrijving: test</b> – zoeken in meerdere kolommen</li><li><b>tag:(lp|lr)</b> – multi select binnen 1 kolom</li> <li><b>-tag:lp</b> – omgekeerd filteren</li> <li><b>test*</b> – prefix filter</li> <p></p><p><b>Opmerking:</b> Zoeken op woorden die tekens `|-*():\"` bevatten, zijn mogelijk niet geldig, omdat ze deel uitmaken van de grammatica van de zoekfunctie</p><p>Ongeldige zoekwoorden zijn bijvoorbeeld:</p><ul><li>2a10:e300:fff0::/48</li> <li>\"node123(gepland)\"</li> <li>\"node123|gepland\"</li></ul>",
|
|
25
27
|
"searchModalTitle": "Zoekwoorden opties",
|
|
26
28
|
"showAllColumnsInDetailView": "Toon alle kolommen in detailweergave",
|
|
29
|
+
"showMatchDetails": "Toon overeenkomstdetails",
|
|
27
30
|
"tableSettings": "Tabel instellingen",
|
|
28
31
|
"unauthorizedPage": "Niet geautoriseerd om deze pagina te bekijken",
|
|
29
32
|
"unknownError": "Onbekende fout"
|
|
@@ -519,8 +522,9 @@
|
|
|
519
522
|
"tag": "Tag",
|
|
520
523
|
"title": "Subscriptions",
|
|
521
524
|
"workflowsTab": {
|
|
522
|
-
"startWithNewestLabel": "Start met nieuwste
|
|
523
|
-
"startWithOldestLabel": "Start met oudste
|
|
525
|
+
"startWithNewestLabel": "Start met nieuwste",
|
|
526
|
+
"startWithOldestLabel": "Start met oudste",
|
|
527
|
+
"hideValidateTasks": "Verberg validatie taken"
|
|
524
528
|
}
|
|
525
529
|
},
|
|
526
530
|
"index": {
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
} from '@/components';
|
|
34
34
|
import { parseCelToRuleGroup } from '@/components/WfoTable/WfoStructuredSearchTable/utils';
|
|
35
35
|
import { ColumnType, WfoTableProps } from '@/components/WfoTable/WfoTable';
|
|
36
|
+
import { mapSortableAndFilterableValuesToTableColumnConfig } from '@/components/WfoTable/WfoTable/utils';
|
|
36
37
|
import { useStoredTableConfig } from '@/hooks';
|
|
37
38
|
import { SearchPayload, useLazySearchQuery, useSearchQuery } from '@/rtk';
|
|
38
39
|
import {
|
|
@@ -88,7 +89,6 @@ const getDataFromResponse = <T extends object>(
|
|
|
88
89
|
},
|
|
89
90
|
{} as Record<string, ReactNode>,
|
|
90
91
|
),
|
|
91
|
-
shouldOnlyShowOnHover: true,
|
|
92
92
|
};
|
|
93
93
|
|
|
94
94
|
const items: T[] = responseColumns.map((responseColumn) => {
|
|
@@ -180,8 +180,7 @@ export const WfoSearchPocPage = () => {
|
|
|
180
180
|
);
|
|
181
181
|
const [isValidFilterString, setIsValidFilterString] = useState<boolean>(true);
|
|
182
182
|
const [tableDefaults, setTableDefaults] = useState<StoredTableConfig<SubscriptionListItem>>();
|
|
183
|
-
const [pageSize, setPageSize] = useState<number>(
|
|
184
|
-
const [limit, setLimit] = useState<number>(pageSize);
|
|
183
|
+
const [pageSize, setPageSize] = useState<number>(DEFAULT_PAGE_SIZE);
|
|
185
184
|
const [pageCursor, setPageCursor] = useState<{ cursor: string; searchKey: string } | undefined>(undefined);
|
|
186
185
|
const [dataSorting, setDataSorting] = useState<WfoDataSorting<SubscriptionListItem>>({
|
|
187
186
|
field: 'subscriptionId',
|
|
@@ -215,7 +214,7 @@ export const WfoSearchPocPage = () => {
|
|
|
215
214
|
};
|
|
216
215
|
return {
|
|
217
216
|
query: committedSearchQuery,
|
|
218
|
-
limit,
|
|
217
|
+
limit: pageSize,
|
|
219
218
|
entity_type: EntityKind.SUBSCRIPTION,
|
|
220
219
|
response_columns: Array.from(resultColumToPropertyMap.keys()),
|
|
221
220
|
order_by,
|
|
@@ -223,17 +222,19 @@ export const WfoSearchPocPage = () => {
|
|
|
223
222
|
...(filters && { filters }),
|
|
224
223
|
...(cursor && { cursor }),
|
|
225
224
|
};
|
|
226
|
-
}, [committedSearchQuery, committedRuleGroup, selectedTab, retrieverType,
|
|
225
|
+
}, [committedSearchQuery, committedRuleGroup, selectedTab, retrieverType, pageSize, dataSorting, cursor]);
|
|
227
226
|
|
|
228
227
|
const { data, isFetching } = useSearchQuery(searchPayload);
|
|
229
228
|
|
|
230
229
|
const [getSubscriptionListTrigger] = useLazySearchQuery();
|
|
231
|
-
const getSubscriptionListForExport = () =>
|
|
230
|
+
const getSubscriptionListForExport = (exportLimit: number) =>
|
|
231
|
+
getSubscriptionListTrigger({ ...searchPayload, limit: exportLimit, cursor: undefined }).unwrap();
|
|
232
232
|
|
|
233
233
|
useEffect(() => {
|
|
234
234
|
const storedConfig = getStoredTableConfig();
|
|
235
235
|
if (storedConfig) {
|
|
236
236
|
setTableDefaults(storedConfig);
|
|
237
|
+
setPageSize(storedConfig.selectedPageSize);
|
|
237
238
|
}
|
|
238
239
|
}, [getStoredTableConfig]);
|
|
239
240
|
|
|
@@ -250,8 +251,6 @@ export const WfoSearchPocPage = () => {
|
|
|
250
251
|
renderData: (value) => <WfoFirstPartUUID UUID={value} />,
|
|
251
252
|
renderDetails: (value) => value,
|
|
252
253
|
renderTooltip: (value) => value,
|
|
253
|
-
isSortable: true,
|
|
254
|
-
isFilterable: true,
|
|
255
254
|
},
|
|
256
255
|
description: {
|
|
257
256
|
columnType: ColumnType.DATA,
|
|
@@ -259,44 +258,37 @@ export const WfoSearchPocPage = () => {
|
|
|
259
258
|
width: '500px',
|
|
260
259
|
renderData: (value, record) => <Link href={`/subscriptions/${record.subscriptionId}`}>{value}</Link>,
|
|
261
260
|
renderTooltip: (value) => value,
|
|
262
|
-
isFilterable: true,
|
|
263
261
|
},
|
|
264
262
|
status: {
|
|
265
263
|
columnType: ColumnType.DATA,
|
|
266
264
|
label: t('status'),
|
|
267
265
|
width: '120px',
|
|
268
266
|
renderData: (value) => <WfoSubscriptionStatusBadge status={value} />,
|
|
269
|
-
isFilterable: true,
|
|
270
267
|
},
|
|
271
268
|
insync: {
|
|
272
269
|
columnType: ColumnType.DATA,
|
|
273
270
|
label: t('insync'),
|
|
274
271
|
width: '75px',
|
|
275
272
|
renderData: (value) => <WfoInsyncIcon inSync={value} />,
|
|
276
|
-
isFilterable: true,
|
|
277
273
|
},
|
|
278
274
|
productName: {
|
|
279
275
|
columnType: ColumnType.DATA,
|
|
280
276
|
width: '260px',
|
|
281
277
|
label: t('product'),
|
|
282
|
-
isFilterable: true,
|
|
283
278
|
},
|
|
284
279
|
tag: {
|
|
285
280
|
columnType: ColumnType.DATA,
|
|
286
281
|
label: t('tag'),
|
|
287
282
|
width: '100px',
|
|
288
|
-
isFilterable: true,
|
|
289
283
|
},
|
|
290
284
|
customerFullname: {
|
|
291
285
|
columnType: ColumnType.DATA,
|
|
292
286
|
label: t('customerFullname'),
|
|
293
|
-
isFilterable: true,
|
|
294
287
|
},
|
|
295
288
|
customerShortcode: {
|
|
296
289
|
columnType: ColumnType.DATA,
|
|
297
290
|
label: t('customerShortcode'),
|
|
298
291
|
width: '150px',
|
|
299
|
-
isFilterable: true,
|
|
300
292
|
},
|
|
301
293
|
startDate: {
|
|
302
294
|
columnType: ColumnType.DATA,
|
|
@@ -306,7 +298,6 @@ export const WfoSearchPocPage = () => {
|
|
|
306
298
|
renderDetails: parseDateToLocaleDateTimeString,
|
|
307
299
|
clipboardText: parseDateToLocaleDateTimeString,
|
|
308
300
|
renderTooltip: (cellValue) => cellValue?.toString(),
|
|
309
|
-
isFilterable: true,
|
|
310
301
|
},
|
|
311
302
|
endDate: {
|
|
312
303
|
columnType: ColumnType.DATA,
|
|
@@ -316,7 +307,6 @@ export const WfoSearchPocPage = () => {
|
|
|
316
307
|
renderDetails: parseDateToLocaleDateTimeString,
|
|
317
308
|
clipboardText: parseDateToLocaleDateTimeString,
|
|
318
309
|
renderTooltip: (cellValue) => cellValue?.toString(),
|
|
319
|
-
isFilterable: true,
|
|
320
310
|
},
|
|
321
311
|
note: {
|
|
322
312
|
columnType: ColumnType.DATA,
|
|
@@ -333,7 +323,6 @@ export const WfoSearchPocPage = () => {
|
|
|
333
323
|
/>
|
|
334
324
|
);
|
|
335
325
|
},
|
|
336
|
-
isFilterable: true,
|
|
337
326
|
},
|
|
338
327
|
metadata: {
|
|
339
328
|
columnType: ColumnType.DATA,
|
|
@@ -342,10 +331,18 @@ export const WfoSearchPocPage = () => {
|
|
|
342
331
|
renderData: (value) => <WfoInlineJson data={value} />,
|
|
343
332
|
renderDetails: (value) => value && <WfoJsonCodeBlock data={value} isBasicStyle />,
|
|
344
333
|
renderTooltip: (value) => value && <WfoJsonCodeBlock data={value} isBasicStyle={false} />,
|
|
345
|
-
isFilterable: true,
|
|
346
334
|
},
|
|
347
335
|
};
|
|
348
336
|
|
|
337
|
+
const sortableAndFilterableFieldNames = Object.keys(tableColumnConfig).filter((fieldName) => fieldName !== 'actions');
|
|
338
|
+
const isSortingAllowed = queryText === '';
|
|
339
|
+
const tableColumnConfigWithSortingAndFiltering =
|
|
340
|
+
mapSortableAndFilterableValuesToTableColumnConfig<SubscriptionListItem>(
|
|
341
|
+
tableColumnConfig,
|
|
342
|
+
isSortingAllowed ? sortableAndFilterableFieldNames : [],
|
|
343
|
+
sortableAndFilterableFieldNames,
|
|
344
|
+
);
|
|
345
|
+
|
|
349
346
|
const handleApplyFilter = (searchParams?: SearchParams) => {
|
|
350
347
|
const ruleGroupParam = searchParams?.ruleGroup;
|
|
351
348
|
// Use an explicitly passed rule group when provided (e.g. a column-header search), a cleared filter
|
|
@@ -383,7 +380,6 @@ export const WfoSearchPocPage = () => {
|
|
|
383
380
|
|
|
384
381
|
const handleChangeTab = (updatedTab: WfoSubscriptionListTab) => {
|
|
385
382
|
setActiveTab(updatedTab);
|
|
386
|
-
setLimit(pageSize);
|
|
387
383
|
setPageCursor(undefined);
|
|
388
384
|
};
|
|
389
385
|
|
|
@@ -469,7 +465,7 @@ export const WfoSearchPocPage = () => {
|
|
|
469
465
|
const nextPageCursor = data?.page_info?.next_page_cursor ?? undefined;
|
|
470
466
|
|
|
471
467
|
const exportData = async () => {
|
|
472
|
-
const exportResult = await getSubscriptionListForExport();
|
|
468
|
+
const exportResult = await getSubscriptionListForExport(totalItems || pageSize);
|
|
473
469
|
const { items: exportItems } = getDataFromResponse<SubscriptionListItem>(
|
|
474
470
|
exportResult,
|
|
475
471
|
resultColumToPropertyMap,
|
|
@@ -490,7 +486,14 @@ export const WfoSearchPocPage = () => {
|
|
|
490
486
|
|
|
491
487
|
const onUpdateDataSorting = ({ field, sortOrder }: WfoDataSorting<SubscriptionListItem>) => {
|
|
492
488
|
setDataSorting({ field, sortOrder });
|
|
493
|
-
|
|
489
|
+
setPageCursor(undefined);
|
|
490
|
+
};
|
|
491
|
+
|
|
492
|
+
const onUpdatePageSize = (updatedPageSize: number) => {
|
|
493
|
+
if (updatedPageSize === pageSize) {
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
setPageSize(updatedPageSize);
|
|
494
497
|
setPageCursor(undefined);
|
|
495
498
|
};
|
|
496
499
|
|
|
@@ -508,6 +511,8 @@ export const WfoSearchPocPage = () => {
|
|
|
508
511
|
data={subscriptionListItems}
|
|
509
512
|
rowExpandingConfiguration={rowExpandingConfiguration}
|
|
510
513
|
defaultHiddenColumns={tableDefaults?.hiddenColumns}
|
|
514
|
+
defaultShowMatchDetails={tableDefaults?.showMatchDetails}
|
|
515
|
+
defaultAdvancedNestedSearch={tableDefaults?.advancedNestedSearch}
|
|
511
516
|
filterString={filterString}
|
|
512
517
|
handleSearch={handleApplyFilter}
|
|
513
518
|
isLoading={isFetching}
|
|
@@ -523,11 +528,11 @@ export const WfoSearchPocPage = () => {
|
|
|
523
528
|
queryBuilderRuleGroup={queryBuilderRuleGroup}
|
|
524
529
|
queryText={queryText}
|
|
525
530
|
retrieverType={retrieverType}
|
|
526
|
-
tableColumnConfig={
|
|
531
|
+
tableColumnConfig={tableColumnConfigWithSortingAndFiltering}
|
|
527
532
|
getColumnSearchFieldName={(field) => getKeyByValueFromMap(resultColumToPropertyMap, field)}
|
|
528
533
|
pageSize={pageSize}
|
|
529
534
|
onUpdateDataSorting={onUpdateDataSorting}
|
|
530
|
-
setPageSize={
|
|
535
|
+
setPageSize={onUpdatePageSize}
|
|
531
536
|
totalItems={totalItems}
|
|
532
537
|
hasNextPage={hasNextPage}
|
|
533
538
|
prefilledFieldOptions={prefilledFieldOptions}
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { useTranslations } from 'next-intl';
|
|
4
4
|
|
|
5
|
-
import { EuiButtonIcon, EuiFlexGroup, EuiText, EuiToolTip } from '@elastic/eui';
|
|
5
|
+
import { EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiText, EuiToolTip } from '@elastic/eui';
|
|
6
6
|
|
|
7
|
-
import { useGetOrchestratorConfig } from '@/hooks';
|
|
7
|
+
import { useGetOrchestratorConfig, useOrchestratorTheme } from '@/hooks';
|
|
8
8
|
|
|
9
9
|
interface WfoProductInformationWithLinkProps {
|
|
10
10
|
workflowName: string;
|
|
@@ -15,8 +15,10 @@ export const WfoProductInformationWithLink = ({ workflowName, productNames }: Wf
|
|
|
15
15
|
const { workflowInformationLinkUrl, showWorkflowInformationLink } = useGetOrchestratorConfig();
|
|
16
16
|
const t = useTranslations('processes.detail');
|
|
17
17
|
const docsUrl = workflowInformationLinkUrl + workflowName;
|
|
18
|
+
const { theme } = useOrchestratorTheme();
|
|
19
|
+
|
|
18
20
|
return (
|
|
19
|
-
<EuiFlexGroup gutterSize={'s'} alignItems={'center'}>
|
|
21
|
+
<EuiFlexGroup css={{ paddingBottom: theme.size.xs }} gutterSize={'s'} alignItems={'center'}>
|
|
20
22
|
{showWorkflowInformationLink && (
|
|
21
23
|
<EuiToolTip content={t('openWorkflowTaskInfo')}>
|
|
22
24
|
<a href={docsUrl} target="_blank">
|
|
@@ -24,7 +26,10 @@ export const WfoProductInformationWithLink = ({ workflowName, productNames }: Wf
|
|
|
24
26
|
</a>
|
|
25
27
|
</EuiToolTip>
|
|
26
28
|
)}
|
|
27
|
-
<
|
|
29
|
+
<EuiFlexItem>
|
|
30
|
+
<EuiSpacer size={'xs'} />
|
|
31
|
+
<EuiText size="m">{productNames}</EuiText>
|
|
32
|
+
</EuiFlexItem>
|
|
28
33
|
</EuiFlexGroup>
|
|
29
34
|
);
|
|
30
35
|
};
|
package/src/types/search.ts
CHANGED
|
@@ -214,3 +214,11 @@ export type ExportArtifact = {
|
|
|
214
214
|
|
|
215
215
|
export type ResultColumToPropertyMap<T> = Map<string, keyof T>;
|
|
216
216
|
export type FieldToOperatorMap = Map<string, string[]>;
|
|
217
|
+
|
|
218
|
+
export type WfoQueryBuilderContext = {
|
|
219
|
+
onFieldSelected: (field: string, operators: string[], pathInfo?: PathInfo) => void;
|
|
220
|
+
prefilledFieldOptions: FieldToOperatorMap;
|
|
221
|
+
fieldPathInfoMap: Map<string, PathInfo>;
|
|
222
|
+
onValueEditorEnter: () => void;
|
|
223
|
+
useAdvancedNestedSearch: boolean;
|
|
224
|
+
};
|
package/src/types/types.ts
CHANGED
|
@@ -134,12 +134,12 @@ export interface ProductDefinition {
|
|
|
134
134
|
export type ProductsSummary = Pick<ProductDefinition, 'name'> & SubscriptionsResult<never>;
|
|
135
135
|
|
|
136
136
|
export enum WorkflowTarget {
|
|
137
|
-
CREATE = '
|
|
138
|
-
MODIFY = '
|
|
139
|
-
TERMINATE = '
|
|
140
|
-
SYSTEM = '
|
|
141
|
-
VALIDATE = '
|
|
142
|
-
RECONCILE = '
|
|
137
|
+
CREATE = 'CREATE',
|
|
138
|
+
MODIFY = 'MODIFY',
|
|
139
|
+
TERMINATE = 'TERMINATE',
|
|
140
|
+
SYSTEM = 'SYSTEM',
|
|
141
|
+
VALIDATE = 'VALIDATE',
|
|
142
|
+
RECONCILE = 'RECONCILE',
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
export type Process = {
|
|
@@ -624,11 +624,11 @@ export type SubscriptionActions = {
|
|
|
624
624
|
reason?: string;
|
|
625
625
|
locked_relations?: string[];
|
|
626
626
|
locked_relations_detail?: SubscriptionRelation[];
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
627
|
+
[WorkflowTarget.MODIFY]: SubscriptionAction[];
|
|
628
|
+
[WorkflowTarget.TERMINATE]: SubscriptionAction[];
|
|
629
|
+
[WorkflowTarget.SYSTEM]: SubscriptionAction[];
|
|
630
|
+
[WorkflowTarget.VALIDATE]: SubscriptionAction[];
|
|
631
|
+
[WorkflowTarget.RECONCILE]: SubscriptionAction[];
|
|
632
632
|
};
|
|
633
633
|
|
|
634
634
|
export enum CacheTagType {
|