@orchestrator-ui/orchestrator-ui-components 8.4.4 → 8.5.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 +8 -8
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-test.log +7 -7
- package/CHANGELOG.md +17 -0
- package/dist/index.d.ts +1890 -562
- package/dist/index.js +3814 -2103
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
- package/src/components/WfoPydanticForm/WfoPydanticForm.tsx +23 -1
- package/src/components/WfoSearchBar/WfoSearchField.tsx +0 -1
- package/src/components/WfoSearchPage/WfoFilterGroup/WfoFilterGroup.tsx +5 -5
- package/src/components/WfoSearchPage/WfoSearch/WfoSearch.tsx +12 -5
- package/src/components/WfoSearchPage/constants.ts +0 -4
- package/src/components/WfoSearchPage/utils.ts +75 -20
- package/src/components/WfoSubscription/WfoSubscriptionActions/WfoSubscriptionActionExpandableMenuItem.tsx +36 -18
- package/src/components/WfoSubscription/WfoSubscriptionActions/WfoSubscriptionActionsMenuItem.tsx +38 -2
- package/src/components/WfoSubscription/utils/index.ts +3 -0
- package/src/components/WfoSubscription/utils/utils.spec.ts +39 -4
- package/src/components/WfoSubscription/utils/utils.ts +10 -4
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoAddGroupAction.tsx +19 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoAddRuleAction.tsx +23 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoCombinatorSelector.tsx +30 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoExpandingSearchRow.tsx +38 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoFieldSelector.tsx +84 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoFilterBuilder.tsx +189 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoOperatorSelector.tsx +33 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoRangeEditor.tsx +64 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoRemoveGroupAction.tsx +21 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoRemoveRuleAction.tsx +20 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoRule.tsx +16 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoRuleGroup.tsx +73 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoStructuredSearchTable.tsx +323 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/WfoValueEditor.tsx +159 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/index.ts +2 -0
- package/src/components/WfoTable/WfoStructuredSearchTable/styles.ts +146 -0
- package/src/components/WfoTable/WfoTable/WfoDragHandler.tsx +4 -2
- package/src/components/WfoTable/index.ts +2 -6
- package/src/components/WfoTitleWithWebsocketBadge/WfoTitleWithWebsocketBadge.tsx +14 -6
- package/src/components/WfoWorkflowSteps/WfoStep/WfoStep.tsx +1 -0
- package/src/components/WfoWorkflowSteps/WfoStepList/WfoStepList.tsx +3 -0
- package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoWorkflowStepList.tsx +32 -12
- package/src/components/WfoWorkflowUserGuide/WfoPageWithUserGuide.tsx +38 -0
- package/src/components/WfoWorkflowUserGuide/WfoWorkflowGuideExpandablePanel.tsx +151 -0
- package/src/components/WfoWorkflowUserGuide/index.ts +2 -0
- package/src/components/WfoWorkflowUserGuide/styles.ts +87 -0
- package/src/components/index.ts +1 -0
- package/src/configuration/version.ts +1 -1
- package/src/contexts/OrchestratorConfigContext.tsx +1 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/usePathAutoComplete.ts +3 -4
- package/src/hooks/useSearch.ts +20 -15
- package/src/hooks/useSearchPagination.ts +11 -8
- package/src/hooks/useUrlParams.ts +3 -5
- package/src/icons/WfoTrashFilled.tsx +13 -0
- package/src/icons/WfoXMarkSmall.tsx +2 -2
- package/src/icons/index.ts +1 -0
- package/src/messages/en-GB.json +94 -8
- package/src/messages/nl-NL.json +23 -5
- package/src/pages/WfoSearchPocPage.tsx +402 -0
- package/src/pages/index.ts +1 -0
- package/src/pages/processes/WfoProcessDetail.tsx +10 -10
- package/src/pages/processes/WfoProcessDetailPage.tsx +1 -0
- package/src/pages/processes/WfoStartProcessPage.tsx +15 -19
- package/src/rtk/api.ts +1 -0
- package/src/rtk/endpoints/index.ts +1 -0
- package/src/rtk/endpoints/search.ts +45 -10
- package/src/rtk/endpoints/workflowGuides.ts +25 -0
- package/src/types/search.ts +21 -5
- package/src/types/types.ts +10 -1
package/src/pages/index.ts
CHANGED
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
TimelineItem,
|
|
12
12
|
WfoIsAllowedToRender,
|
|
13
13
|
WfoLoading,
|
|
14
|
-
WfoProcessListNoteEdit,
|
|
15
14
|
WfoTimeline,
|
|
16
15
|
WfoTitleWithWebsocketBadge,
|
|
17
16
|
} from '@/components';
|
|
@@ -181,15 +180,16 @@ export const WfoProcessDetail = ({
|
|
|
181
180
|
return (
|
|
182
181
|
<>
|
|
183
182
|
<WfoContentHeader
|
|
184
|
-
title={
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
183
|
+
title={
|
|
184
|
+
<WfoTitleWithWebsocketBadge
|
|
185
|
+
title={pageTitle}
|
|
186
|
+
extraElement={
|
|
187
|
+
<WfoProductInformationWithLink
|
|
188
|
+
productNames={productNames}
|
|
189
|
+
workflowName={processDetail?.workflowName ?? ''}
|
|
190
|
+
/>
|
|
191
|
+
}
|
|
192
|
+
/>
|
|
193
193
|
}
|
|
194
194
|
>
|
|
195
195
|
<WfoIsAllowedToRender resource={PolicyResource.PROCESS_RETRY}>
|
|
@@ -59,6 +59,7 @@ export const WfoProcessDetailPage = ({ processId }: WfoProcessDetailPageProps) =
|
|
|
59
59
|
ref={stepListRef}
|
|
60
60
|
lastStatus={processDetail.lastStatus}
|
|
61
61
|
processId={processDetail.processId}
|
|
62
|
+
workflowName={processDetail.workflowName}
|
|
62
63
|
steps={groupedSteps.flatMap((groupedStep) => groupedStep.steps)}
|
|
63
64
|
traceBack={processDetail.traceback}
|
|
64
65
|
userInputForm={processDetail.form}
|
|
@@ -6,7 +6,7 @@ import { useRouter } from 'next/router';
|
|
|
6
6
|
|
|
7
7
|
import { EuiFlexGroup, EuiFlexItem, EuiHorizontalRule, EuiPanel, EuiText } from '@elastic/eui';
|
|
8
8
|
|
|
9
|
-
import { WfoError,
|
|
9
|
+
import { WfoError, WfoPageWithUserGuide } from '@/components';
|
|
10
10
|
import { WfoPydanticForm } from '@/components/WfoPydanticForm';
|
|
11
11
|
import { WfoStepStatusIcon } from '@/components/WfoWorkflowSteps';
|
|
12
12
|
import { getWorkflowStepsStyles } from '@/components/WfoWorkflowSteps/styles';
|
|
@@ -140,25 +140,21 @@ export const WfoStartProcessPage = ({ processName, isTask = false }: WfoStartPro
|
|
|
140
140
|
timelineItems={timeLineItems}
|
|
141
141
|
isLoading={isLoading}
|
|
142
142
|
>
|
|
143
|
-
<
|
|
144
|
-
css={{
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
<
|
|
153
|
-
|
|
154
|
-
<EuiText>{t(isTask ? 'submitTaskFormLabel' : 'submitWorkflowFormLabel')}</EuiText>
|
|
155
|
-
</EuiFlexItem>
|
|
156
|
-
</EuiFlexGroup>
|
|
157
|
-
<EuiHorizontalRule />
|
|
158
|
-
{(hasError && <WfoError />) || (
|
|
143
|
+
<WfoPageWithUserGuide workflowName={processName}>
|
|
144
|
+
<EuiPanel css={{ backgroundColor: theme.colors.backgroundBaseNeutral }}>
|
|
145
|
+
<EuiFlexGroup gutterSize="none" css={getStepHeaderStyle(false)}>
|
|
146
|
+
<WfoStepStatusIcon stepStatus={StepStatus.FORM} />
|
|
147
|
+
<EuiFlexItem grow={0}>
|
|
148
|
+
<EuiText css={stepListContentBoldTextStyle}>{t('userInput')}</EuiText>
|
|
149
|
+
<EuiText>{t(isTask ? 'submitTaskFormLabel' : 'submitWorkflowFormLabel')}</EuiText>
|
|
150
|
+
</EuiFlexItem>
|
|
151
|
+
</EuiFlexGroup>
|
|
152
|
+
<EuiHorizontalRule />
|
|
153
|
+
{(hasError && <WfoError />) || (
|
|
159
154
|
<WfoPydanticForm processName={processName} startProcessPayload={startProcessPayload} isTask={isTask} />
|
|
160
|
-
)
|
|
161
|
-
|
|
155
|
+
)}
|
|
156
|
+
</EuiPanel>
|
|
157
|
+
</WfoPageWithUserGuide>
|
|
162
158
|
</WfoProcessDetail>
|
|
163
159
|
);
|
|
164
160
|
};
|
package/src/rtk/api.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { getEndpointPath } from '@/components/WfoSearchPage/utils';
|
|
|
2
2
|
import { BaseQueryTypes, orchestratorApi } from '@/rtk';
|
|
3
3
|
import {
|
|
4
4
|
EntityKind,
|
|
5
|
-
|
|
5
|
+
Filter,
|
|
6
6
|
PaginatedSearchResults,
|
|
7
7
|
PathAutocompleteResponse,
|
|
8
8
|
RetrieverType,
|
|
@@ -10,14 +10,20 @@ import {
|
|
|
10
10
|
} from '@/types';
|
|
11
11
|
|
|
12
12
|
export interface SearchPayload {
|
|
13
|
+
order_by?: {
|
|
14
|
+
element: string;
|
|
15
|
+
direction: string;
|
|
16
|
+
};
|
|
17
|
+
response_columns: string[];
|
|
13
18
|
entity_type: EntityKind;
|
|
14
19
|
query: string;
|
|
15
|
-
filters?:
|
|
16
|
-
limit?: number;
|
|
20
|
+
filters?: Filter;
|
|
21
|
+
limit?: number | number[];
|
|
17
22
|
retriever?: RetrieverType;
|
|
23
|
+
cursor?: string;
|
|
18
24
|
}
|
|
19
25
|
|
|
20
|
-
export interface SearchPaginationPayload extends SearchPayload {
|
|
26
|
+
export interface SearchPaginationPayload extends Omit<SearchPayload, 'cursor'> {
|
|
21
27
|
cursor: number;
|
|
22
28
|
}
|
|
23
29
|
|
|
@@ -30,15 +36,39 @@ export interface SearchDefinitionsResponse {
|
|
|
30
36
|
|
|
31
37
|
const searchApi = orchestratorApi.injectEndpoints({
|
|
32
38
|
endpoints: (build) => ({
|
|
33
|
-
search: build.
|
|
34
|
-
query: ({ entity_type, query, filters, limit, retriever }) => ({
|
|
35
|
-
url: `search/${getEndpointPath(entity_type)}`,
|
|
39
|
+
search: build.query<PaginatedSearchResults, SearchPayload>({
|
|
40
|
+
query: ({ entity_type, query, filters, limit, retriever, response_columns, order_by, cursor }) => ({
|
|
41
|
+
url: `search/${getEndpointPath(entity_type)}${cursor ? `?cursor=${cursor}` : ''}`,
|
|
36
42
|
method: 'POST',
|
|
37
|
-
body: {
|
|
43
|
+
body: {
|
|
44
|
+
query,
|
|
45
|
+
filters,
|
|
46
|
+
limit: cursor ? undefined : limit,
|
|
47
|
+
retriever,
|
|
48
|
+
order_by: order_by && !query ? order_by : undefined,
|
|
49
|
+
response_columns,
|
|
50
|
+
},
|
|
38
51
|
headers: {
|
|
39
52
|
'Content-Type': 'application/json',
|
|
40
53
|
},
|
|
41
54
|
}),
|
|
55
|
+
serializeQueryArgs: ({ queryArgs, endpointName }) => {
|
|
56
|
+
// Strip cursor so every page of the same base search shares one cache entry.
|
|
57
|
+
const rest = { ...queryArgs };
|
|
58
|
+
delete rest.cursor;
|
|
59
|
+
return { endpointName, queryArgs: rest };
|
|
60
|
+
},
|
|
61
|
+
merge: (currentCache, newItems, { arg }) => {
|
|
62
|
+
if (!arg.cursor) {
|
|
63
|
+
Object.assign(currentCache, newItems);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
currentCache.data.push(...newItems.data);
|
|
67
|
+
currentCache.page_info = newItems.page_info;
|
|
68
|
+
currentCache.cursor = newItems.cursor;
|
|
69
|
+
currentCache.search_metadata = newItems.search_metadata;
|
|
70
|
+
},
|
|
71
|
+
forceRefetch: ({ currentArg, previousArg }) => currentArg?.cursor !== previousArg?.cursor,
|
|
42
72
|
extraOptions: {
|
|
43
73
|
baseQueryType: BaseQueryTypes.fetch,
|
|
44
74
|
},
|
|
@@ -77,5 +107,10 @@ const searchApi = orchestratorApi.injectEndpoints({
|
|
|
77
107
|
}),
|
|
78
108
|
});
|
|
79
109
|
|
|
80
|
-
export const {
|
|
81
|
-
|
|
110
|
+
export const {
|
|
111
|
+
useSearchQuery,
|
|
112
|
+
useLazySearchQuery,
|
|
113
|
+
useSearchWithPaginationMutation,
|
|
114
|
+
useSearchPathsQuery,
|
|
115
|
+
useSearchDefinitionsQuery,
|
|
116
|
+
} = searchApi;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseQueryTypes, orchestratorApi } from '@/rtk';
|
|
2
|
+
|
|
3
|
+
export interface WorkflowGuideResponse {
|
|
4
|
+
content: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
const workflowGuidesApi = orchestratorApi.injectEndpoints({
|
|
8
|
+
endpoints: (build) => ({
|
|
9
|
+
getWorkflowGuide: build.query<WorkflowGuideResponse, { workflowName: string }>({
|
|
10
|
+
query: ({ workflowName }) => ({
|
|
11
|
+
url: `surf/workflow_user_guides/${workflowName}`,
|
|
12
|
+
method: 'GET',
|
|
13
|
+
headers: {
|
|
14
|
+
'Content-Type': 'application/json',
|
|
15
|
+
},
|
|
16
|
+
}),
|
|
17
|
+
transformResponse: (content: string): WorkflowGuideResponse => ({ content: content ?? '' }),
|
|
18
|
+
extraOptions: {
|
|
19
|
+
baseQueryType: BaseQueryTypes.fetch,
|
|
20
|
+
},
|
|
21
|
+
}),
|
|
22
|
+
}),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export const { useGetWorkflowGuideQuery } = workflowGuidesApi;
|
package/src/types/search.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
export
|
|
1
|
+
export enum EntityKind {
|
|
2
|
+
SUBSCRIPTION = 'SUBSCRIPTION',
|
|
3
|
+
PRODUCT = 'PRODUCT',
|
|
4
|
+
WORKFLOW = 'WORKFLOW',
|
|
5
|
+
PROCESS = 'PROCESS',
|
|
6
|
+
}
|
|
2
7
|
|
|
3
8
|
export enum RetrieverType {
|
|
4
9
|
Auto = 'auto',
|
|
@@ -20,14 +25,20 @@ export interface SearchResult {
|
|
|
20
25
|
score: number;
|
|
21
26
|
perfect_match: number;
|
|
22
27
|
matching_field?: MatchingField | null;
|
|
28
|
+
response_columns: Record<string, string | number | null>;
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
/** Paginated search results */
|
|
26
32
|
export type PaginatedSearchResults = {
|
|
27
33
|
data: SearchResult[];
|
|
34
|
+
cursor: {
|
|
35
|
+
total_items: number;
|
|
36
|
+
start_cursor: number;
|
|
37
|
+
end_cursor: number;
|
|
38
|
+
};
|
|
28
39
|
page_info: {
|
|
29
40
|
has_next_page: boolean;
|
|
30
|
-
next_page_cursor:
|
|
41
|
+
next_page_cursor: string | null;
|
|
31
42
|
};
|
|
32
43
|
search_metadata: {
|
|
33
44
|
search_type: string | null;
|
|
@@ -78,12 +89,17 @@ export type PathFilter = {
|
|
|
78
89
|
| LtreeMatchesFilter;
|
|
79
90
|
};
|
|
80
91
|
|
|
92
|
+
export interface OperatorDisplay {
|
|
93
|
+
symbol: string;
|
|
94
|
+
description: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
81
97
|
type ActionType = 'select';
|
|
82
98
|
|
|
83
99
|
type BaseSearchParameters = {
|
|
84
100
|
query?: string | null;
|
|
85
101
|
|
|
86
|
-
filters?: PathFilter[] |
|
|
102
|
+
filters?: PathFilter[] | Filter | null;
|
|
87
103
|
|
|
88
104
|
action: ActionType;
|
|
89
105
|
};
|
|
@@ -116,9 +132,9 @@ export type Condition = {
|
|
|
116
132
|
condition: { op: string; value?: unknown };
|
|
117
133
|
};
|
|
118
134
|
|
|
119
|
-
export type
|
|
135
|
+
export type Filter = {
|
|
120
136
|
op: 'AND' | 'OR';
|
|
121
|
-
children: Array<
|
|
137
|
+
children: Array<Filter | Condition>;
|
|
122
138
|
};
|
|
123
139
|
|
|
124
140
|
export type value_schema = {
|
package/src/types/types.ts
CHANGED
|
@@ -588,6 +588,7 @@ export type OrchestratorConfig = {
|
|
|
588
588
|
useWebSockets: boolean;
|
|
589
589
|
useThemeToggle: boolean;
|
|
590
590
|
showWorkflowInformationLink: boolean;
|
|
591
|
+
showWorkflowUserGuide: boolean;
|
|
591
592
|
enableSupportMenuItem: boolean;
|
|
592
593
|
supportMenuItemUrl: string;
|
|
593
594
|
enableAoStackStatus: boolean;
|
|
@@ -600,14 +601,21 @@ export enum ColorModes {
|
|
|
600
601
|
DARK = 'DARK',
|
|
601
602
|
}
|
|
602
603
|
|
|
604
|
+
export interface SubscriptionRelation {
|
|
605
|
+
subscription_id: string;
|
|
606
|
+
subscription_description: string;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
// TODO: remove locked_relations and unterminated_in_use_by_subscriptions (UUID-only fields) when orchestrator-core 6.0.0 is released and only use the _detail variants
|
|
603
610
|
export interface SubscriptionAction {
|
|
604
611
|
name: string;
|
|
605
612
|
description: string;
|
|
606
613
|
reason?: string;
|
|
607
614
|
usable_when?: string[];
|
|
608
615
|
locked_relations?: string[];
|
|
609
|
-
|
|
616
|
+
locked_relations_detail?: SubscriptionRelation[];
|
|
610
617
|
unterminated_in_use_by_subscriptions?: string[];
|
|
618
|
+
unterminated_in_use_by_subscriptions_detail?: SubscriptionRelation[];
|
|
611
619
|
status?: string;
|
|
612
620
|
action?: string;
|
|
613
621
|
}
|
|
@@ -615,6 +623,7 @@ export interface SubscriptionAction {
|
|
|
615
623
|
export type SubscriptionActions = {
|
|
616
624
|
reason?: string;
|
|
617
625
|
locked_relations?: string[];
|
|
626
|
+
locked_relations_detail?: SubscriptionRelation[];
|
|
618
627
|
modify: SubscriptionAction[];
|
|
619
628
|
terminate: SubscriptionAction[];
|
|
620
629
|
system: SubscriptionAction[];
|