@orchestrator-ui/orchestrator-ui-components 2.0.0 → 2.1.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 +11 -9
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-test.log +11 -11
- package/CHANGELOG.md +12 -0
- package/dist/index.d.ts +85 -4
- package/dist/index.js +3018 -3257
- package/dist/index.js.map +1 -0
- package/package.json +2 -2
- package/src/components/WfoContentHeader/WfoContentHeader.tsx +55 -0
- package/src/components/WfoContentHeader/index.ts +1 -0
- package/src/components/WfoInlineNoteEdit/WfoInlineNoteEdit.tsx +105 -0
- package/src/components/WfoInlineNoteEdit/index.ts +1 -0
- package/src/components/WfoPageTemplate/WfoSidebar/WfoSidebar.tsx +6 -6
- package/src/components/WfoRenderElementOrString/WfoRenderElementOrString.tsx +16 -0
- package/src/components/WfoRenderElementOrString/index.ts +1 -0
- package/src/components/WfoSubscription/WfoRelatedSubscriptions.tsx +49 -35
- package/src/components/WfoSubscription/WfoSubscription.tsx +19 -37
- package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/WfoSubscriptionDetailSection.tsx +7 -1
- package/src/components/WfoSubscription/utils/relatedSubscriptionsListItemsObjectMappers.ts +62 -0
- package/src/components/index.ts +3 -0
- package/src/configuration/version.ts +1 -1
- package/src/pages/metadata/WfoMetadataPageLayout.tsx +4 -4
- package/src/pages/processes/WfoProcessDetail.tsx +47 -55
- package/src/pages/settings/WfoSettingsPage.tsx +9 -4
- package/src/pages/startPage/WfoStartPage.tsx +17 -1
- package/src/pages/subscriptions/WfoSubscriptionsListPage.tsx +4 -5
- package/src/pages/tasks/WfoTasksListPage.tsx +19 -33
- package/src/pages/workflows/WfoWorkflowsListPage.tsx +4 -5
- package/src/rtk/endpoints/index.ts +1 -0
- package/src/rtk/endpoints/relatedSubscriptions.ts +5 -4
- package/src/rtk/endpoints/subscriptionActions.ts +11 -1
- package/tsup.config.ts +10 -0
|
@@ -6,7 +6,6 @@ import { useRouter } from 'next/router';
|
|
|
6
6
|
import {
|
|
7
7
|
EuiButton,
|
|
8
8
|
EuiFlexGroup,
|
|
9
|
-
EuiFlexItem,
|
|
10
9
|
EuiPanel,
|
|
11
10
|
EuiSpacer,
|
|
12
11
|
EuiText,
|
|
@@ -21,6 +20,7 @@ import {
|
|
|
21
20
|
WfoTimeline,
|
|
22
21
|
WfoTitleWithWebsocketBadge,
|
|
23
22
|
} from '@/components';
|
|
23
|
+
import { WfoContentHeader } from '@/components/WfoContentHeader/WfoContentHeader';
|
|
24
24
|
import { PolicyResource } from '@/configuration/policy-resources';
|
|
25
25
|
import { ConfirmationDialogContext } from '@/contexts';
|
|
26
26
|
import { useCheckEngineStatus, useOrchestratorTheme, usePolicy } from '@/hooks';
|
|
@@ -192,63 +192,55 @@ export const WfoProcessDetail = ({
|
|
|
192
192
|
|
|
193
193
|
return (
|
|
194
194
|
<>
|
|
195
|
-
<
|
|
196
|
-
<
|
|
197
|
-
|
|
198
|
-
<EuiSpacer />
|
|
195
|
+
<WfoContentHeader
|
|
196
|
+
title={<WfoTitleWithWebsocketBadge title={pageTitle} />}
|
|
197
|
+
subtitle={
|
|
199
198
|
<WfoProductInformationWithLink
|
|
200
199
|
productNames={productNames}
|
|
201
200
|
workflowName={processDetail?.workflowName ?? ''}
|
|
202
201
|
/>
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
202
|
+
}
|
|
203
|
+
>
|
|
204
|
+
<WfoIsAllowedToRender resource={PolicyResource.PROCESS_RETRY}>
|
|
205
|
+
<EuiButton
|
|
206
|
+
onClick={handleActionButtonClick(retryAction)}
|
|
207
|
+
iconType={() => (
|
|
208
|
+
<WfoRefresh
|
|
209
|
+
color={
|
|
210
|
+
retryButtonIsDisabled
|
|
211
|
+
? theme.colors.subduedText
|
|
212
|
+
: theme.colors.link
|
|
213
|
+
}
|
|
214
|
+
/>
|
|
215
|
+
)}
|
|
216
|
+
isDisabled={retryButtonIsDisabled}
|
|
212
217
|
>
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
resource={PolicyResource.PROCESS_ABORT}
|
|
218
|
+
{t('retry')}
|
|
219
|
+
</EuiButton>
|
|
220
|
+
</WfoIsAllowedToRender>
|
|
221
|
+
<WfoIsAllowedToRender resource={PolicyResource.PROCESS_ABORT}>
|
|
222
|
+
<EuiButton
|
|
223
|
+
onClick={handleActionButtonClick(abortAction)}
|
|
224
|
+
iconType={() => (
|
|
225
|
+
<WfoXCircleFill
|
|
226
|
+
color={
|
|
227
|
+
abortButtonIsDisabled
|
|
228
|
+
? theme.colors.subduedText
|
|
229
|
+
: theme.colors.danger
|
|
230
|
+
}
|
|
231
|
+
/>
|
|
232
|
+
)}
|
|
233
|
+
color="danger"
|
|
234
|
+
isDisabled={abortButtonIsDisabled}
|
|
231
235
|
>
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
: theme.colors.danger
|
|
240
|
-
}
|
|
241
|
-
/>
|
|
242
|
-
)}
|
|
243
|
-
color="danger"
|
|
244
|
-
isDisabled={abortButtonIsDisabled}
|
|
236
|
+
{t('abort')}
|
|
237
|
+
</EuiButton>
|
|
238
|
+
</WfoIsAllowedToRender>
|
|
239
|
+
<>
|
|
240
|
+
{processDetail && processIsTask && (
|
|
241
|
+
<WfoIsAllowedToRender
|
|
242
|
+
resource={PolicyResource.PROCESS_DELETE}
|
|
245
243
|
>
|
|
246
|
-
{t('abort')}
|
|
247
|
-
</EuiButton>
|
|
248
|
-
</WfoIsAllowedToRender>
|
|
249
|
-
{processDetail &&
|
|
250
|
-
processIsTask &&
|
|
251
|
-
isAllowed(PolicyResource.PROCESS_DELETE) && (
|
|
252
244
|
<EuiButton
|
|
253
245
|
onClick={handleActionButtonClick(deleteAction)}
|
|
254
246
|
iconType={() => (
|
|
@@ -265,10 +257,10 @@ export const WfoProcessDetail = ({
|
|
|
265
257
|
>
|
|
266
258
|
{t('delete')}
|
|
267
259
|
</EuiButton>
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
260
|
+
</WfoIsAllowedToRender>
|
|
261
|
+
)}
|
|
262
|
+
</>
|
|
263
|
+
</WfoContentHeader>
|
|
272
264
|
|
|
273
265
|
<EuiPanel
|
|
274
266
|
hasShadow={false}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { useTranslations } from 'next-intl';
|
|
4
|
+
|
|
5
|
+
import { EuiHorizontalRule, EuiSpacer } from '@elastic/eui';
|
|
4
6
|
|
|
5
7
|
import {
|
|
6
8
|
WfoEngineStatus,
|
|
@@ -8,17 +10,20 @@ import {
|
|
|
8
10
|
WfoModifySettings,
|
|
9
11
|
WfoWorkerStatus,
|
|
10
12
|
} from '@/components';
|
|
13
|
+
import { WfoContentHeader } from '@/components/WfoContentHeader/WfoContentHeader';
|
|
11
14
|
import { useOrchestratorTheme } from '@/hooks';
|
|
12
15
|
|
|
13
16
|
export const WfoSettingsPage = () => {
|
|
14
17
|
const { theme } = useOrchestratorTheme();
|
|
18
|
+
const t = useTranslations('main');
|
|
15
19
|
|
|
16
20
|
return (
|
|
17
21
|
<>
|
|
18
|
-
<
|
|
22
|
+
<WfoContentHeader
|
|
23
|
+
title={t('settings')}
|
|
24
|
+
subtitle={<EuiHorizontalRule margin="s" />}
|
|
25
|
+
/>
|
|
19
26
|
|
|
20
|
-
<EuiPageHeader pageTitle="Settings" />
|
|
21
|
-
<EuiHorizontalRule />
|
|
22
27
|
<div css={{ maxWidth: theme.base * 40 }}>
|
|
23
28
|
<WfoFlushSettings />
|
|
24
29
|
<EuiSpacer />
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import React, { ReactElement } from 'react';
|
|
2
2
|
|
|
3
|
+
import { useTranslations } from 'next-intl';
|
|
4
|
+
|
|
5
|
+
import { EuiPageHeader } from '@elastic/eui';
|
|
6
|
+
|
|
3
7
|
import {
|
|
4
8
|
WfoActiveWorkflowsSummaryCard,
|
|
5
9
|
WfoFailedTasksSummaryCard,
|
|
@@ -9,6 +13,7 @@ import {
|
|
|
9
13
|
WfoProductsSummaryCard,
|
|
10
14
|
WfoSummaryCards,
|
|
11
15
|
} from '@/components';
|
|
16
|
+
import { WfoContentHeader } from '@/components/WfoContentHeader/WfoContentHeader';
|
|
12
17
|
import { PolicyResource } from '@/configuration';
|
|
13
18
|
import { usePolicy, useWfoSession } from '@/hooks';
|
|
14
19
|
import { toOptionalArrayEntry } from '@/utils';
|
|
@@ -16,6 +21,8 @@ import { toOptionalArrayEntry } from '@/utils';
|
|
|
16
21
|
import { useStartPageSummaryCardConfigurationOverride } from './useStartPageSummaryCardConfigurationOverride';
|
|
17
22
|
|
|
18
23
|
export const WfoStartPage = () => {
|
|
24
|
+
const t = useTranslations('main');
|
|
25
|
+
|
|
19
26
|
const { overrideSummaryCards } =
|
|
20
27
|
useStartPageSummaryCardConfigurationOverride();
|
|
21
28
|
|
|
@@ -42,5 +49,14 @@ export const WfoStartPage = () => {
|
|
|
42
49
|
const summaryCards =
|
|
43
50
|
overrideSummaryCards?.(defaultSummaryCards) || defaultSummaryCards;
|
|
44
51
|
|
|
45
|
-
return
|
|
52
|
+
return (
|
|
53
|
+
<>
|
|
54
|
+
<WfoContentHeader
|
|
55
|
+
title={
|
|
56
|
+
<EuiPageHeader pageTitle={`${t('welcome')} ${username}`} />
|
|
57
|
+
}
|
|
58
|
+
/>
|
|
59
|
+
<WfoSummaryCards>{summaryCards}</WfoSummaryCards>
|
|
60
|
+
</>
|
|
61
|
+
);
|
|
46
62
|
};
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
WfoTitleWithWebsocketBadge,
|
|
19
19
|
subscriptionListTabs,
|
|
20
20
|
} from '@/components';
|
|
21
|
+
import { WfoContentHeader } from '@/components/WfoContentHeader/WfoContentHeader';
|
|
21
22
|
import { useDataDisplayParams, useStoredTableConfig } from '@/hooks';
|
|
22
23
|
import { SortOrder } from '@/types';
|
|
23
24
|
|
|
@@ -77,11 +78,9 @@ export const WfoSubscriptionsListPage = () => {
|
|
|
77
78
|
|
|
78
79
|
return (
|
|
79
80
|
<>
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
<EuiSpacer size="m" />
|
|
81
|
+
<WfoContentHeader
|
|
82
|
+
title={<WfoTitleWithWebsocketBadge title={t('title')} />}
|
|
83
|
+
/>
|
|
85
84
|
|
|
86
85
|
<WfoFilterTabs
|
|
87
86
|
tabs={subscriptionListTabs}
|
|
@@ -5,7 +5,7 @@ import Link from 'next/link';
|
|
|
5
5
|
import { useRouter } from 'next/router';
|
|
6
6
|
import { StringParam, useQueryParam, withDefault } from 'use-query-params';
|
|
7
7
|
|
|
8
|
-
import { EuiButton,
|
|
8
|
+
import { EuiButton, EuiSpacer } from '@elastic/eui';
|
|
9
9
|
|
|
10
10
|
import {
|
|
11
11
|
ACTIVE_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY,
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
WfoProcessesList,
|
|
24
24
|
WfoTitleWithWebsocketBadge,
|
|
25
25
|
} from '@/components';
|
|
26
|
+
import { WfoContentHeader } from '@/components/WfoContentHeader/WfoContentHeader';
|
|
26
27
|
import { toSortedTableColumnConfig } from '@/components/WfoTable/WfoAdvancedTable/';
|
|
27
28
|
import { WfoAdvancedTableColumnConfig } from '@/components/WfoTable/WfoAdvancedTable/types';
|
|
28
29
|
import { PolicyResource } from '@/configuration/policy-resources';
|
|
@@ -143,38 +144,23 @@ export const WfoTasksListPage = () => {
|
|
|
143
144
|
|
|
144
145
|
return (
|
|
145
146
|
<>
|
|
146
|
-
<
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
<
|
|
150
|
-
<
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
color={theme.colors.primaryText}
|
|
164
|
-
/>
|
|
165
|
-
)}
|
|
166
|
-
>
|
|
167
|
-
{t('rerunAll')}
|
|
168
|
-
</EuiButton>
|
|
169
|
-
</WfoIsAllowedToRender>
|
|
170
|
-
<WfoIsAllowedToRender
|
|
171
|
-
resource={PolicyResource.TASKS_CREATE}
|
|
172
|
-
>
|
|
173
|
-
<WfoStartTaskButtonComboBox />
|
|
174
|
-
</WfoIsAllowedToRender>
|
|
175
|
-
</EuiFlexGroup>
|
|
176
|
-
</EuiFlexItem>
|
|
177
|
-
</EuiFlexGroup>
|
|
147
|
+
<WfoContentHeader
|
|
148
|
+
title={<WfoTitleWithWebsocketBadge title="Tasks" />}
|
|
149
|
+
>
|
|
150
|
+
<WfoIsAllowedToRender resource={PolicyResource.TASKS_RETRY_ALL}>
|
|
151
|
+
<EuiButton
|
|
152
|
+
onClick={handleRerunAllButtonClick}
|
|
153
|
+
iconType={() => (
|
|
154
|
+
<WfoRefresh color={theme.colors.primaryText} />
|
|
155
|
+
)}
|
|
156
|
+
>
|
|
157
|
+
{t('rerunAll')}
|
|
158
|
+
</EuiButton>
|
|
159
|
+
</WfoIsAllowedToRender>
|
|
160
|
+
<WfoIsAllowedToRender resource={PolicyResource.TASKS_CREATE}>
|
|
161
|
+
<WfoStartTaskButtonComboBox />
|
|
162
|
+
</WfoIsAllowedToRender>
|
|
163
|
+
</WfoContentHeader>
|
|
178
164
|
|
|
179
165
|
<WfoFilterTabs
|
|
180
166
|
tabs={defaultTasksListTabs}
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
WfoProcessesList,
|
|
20
20
|
WfoTitleWithWebsocketBadge,
|
|
21
21
|
} from '@/components';
|
|
22
|
+
import { WfoContentHeader } from '@/components/WfoContentHeader/WfoContentHeader';
|
|
22
23
|
import { useDataDisplayParams, useStoredTableConfig } from '@/hooks';
|
|
23
24
|
import { SortOrder } from '@/types';
|
|
24
25
|
|
|
@@ -84,11 +85,9 @@ export const WfoWorkflowsListPage = () => {
|
|
|
84
85
|
|
|
85
86
|
return (
|
|
86
87
|
<>
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
<EuiSpacer size="m" />
|
|
88
|
+
<WfoContentHeader
|
|
89
|
+
title={<WfoTitleWithWebsocketBadge title={t('title')} />}
|
|
90
|
+
/>
|
|
92
91
|
|
|
93
92
|
<WfoFilterTabs
|
|
94
93
|
tabs={defaultWorkflowsListTabs}
|
|
@@ -60,10 +60,11 @@ export type RelatedSubscriptionsResponse = {
|
|
|
60
60
|
relatedSubscriptions: RelatedSubscription[];
|
|
61
61
|
} & BaseGraphQlResult;
|
|
62
62
|
|
|
63
|
-
type RelatedSubscriptionVariables =
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
export type RelatedSubscriptionVariables =
|
|
64
|
+
GraphqlQueryVariables<RelatedSubscription> &
|
|
65
|
+
Pick<Subscription, 'subscriptionId'> & {
|
|
66
|
+
terminatedSubscriptionFilter?: GraphqlFilter<RelatedSubscription>;
|
|
67
|
+
};
|
|
67
68
|
|
|
68
69
|
const relatedSubscriptionsApi = orchestratorApi.injectEndpoints({
|
|
69
70
|
endpoints: (build) => ({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SUBSCRIPTION_ACTIONS_ENDPOINT } from '@/configuration';
|
|
2
2
|
import { BaseQueryTypes, orchestratorApi } from '@/rtk';
|
|
3
|
-
import { SubscriptionActions } from '@/types';
|
|
3
|
+
import { CacheTagType, SubscriptionActions } from '@/types';
|
|
4
|
+
import { getCacheTag } from '@/utils/cacheTag';
|
|
4
5
|
|
|
5
6
|
const subscriptionActionsApi = orchestratorApi.injectEndpoints({
|
|
6
7
|
endpoints: (build) => ({
|
|
@@ -13,6 +14,15 @@ const subscriptionActionsApi = orchestratorApi.injectEndpoints({
|
|
|
13
14
|
extraOptions: {
|
|
14
15
|
baseQueryType: BaseQueryTypes.fetch,
|
|
15
16
|
},
|
|
17
|
+
providesTags: (result, error, queryArguments) => {
|
|
18
|
+
if (!error && result) {
|
|
19
|
+
return getCacheTag(
|
|
20
|
+
CacheTagType.subscriptions,
|
|
21
|
+
queryArguments.subscriptionId,
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
return [];
|
|
25
|
+
},
|
|
16
26
|
}),
|
|
17
27
|
}),
|
|
18
28
|
});
|