@orchestrator-ui/orchestrator-ui-components 1.38.2 → 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.
Files changed (113) hide show
  1. package/.turbo/turbo-build.log +11 -9
  2. package/.turbo/turbo-lint.log +5 -2
  3. package/.turbo/turbo-test.log +14 -14
  4. package/CHANGELOG.md +30 -0
  5. package/dist/index.d.ts +329 -172
  6. package/dist/index.js +6152 -5545
  7. package/dist/index.js.map +1 -0
  8. package/package.json +2 -2
  9. package/src/components/WfoContentHeader/WfoContentHeader.tsx +55 -0
  10. package/src/components/WfoContentHeader/index.ts +1 -0
  11. package/src/components/WfoForms/formFields/SubscriptionSummaryField.tsx +6 -5
  12. package/src/components/WfoInlineNoteEdit/WfoInlineNoteEdit.tsx +105 -0
  13. package/src/components/WfoInlineNoteEdit/index.ts +1 -0
  14. package/src/components/WfoPageTemplate/WfoPageHeader/WfoPageHeader.tsx +3 -1
  15. package/src/components/WfoPageTemplate/WfoSidebar/WfoCopyright.tsx +1 -1
  16. package/src/components/WfoPageTemplate/WfoSidebar/WfoSidebar.tsx +6 -6
  17. package/src/components/WfoProcessList/WfoProcessesList.tsx +52 -51
  18. package/src/components/WfoRadioDropdown/WfoRadioDropdown.tsx +88 -0
  19. package/src/components/WfoRadioDropdown/index.ts +1 -0
  20. package/src/components/WfoRenderElementOrString/WfoRenderElementOrString.tsx +16 -0
  21. package/src/components/WfoRenderElementOrString/index.ts +1 -0
  22. package/src/components/WfoSubscription/WfoInSyncField.tsx +13 -9
  23. package/src/components/WfoSubscription/WfoInUseByRelations.tsx +4 -2
  24. package/src/components/WfoSubscription/WfoProcessesTimeline.tsx +76 -29
  25. package/src/components/WfoSubscription/WfoRelatedSubscriptions.tsx +92 -84
  26. package/src/components/WfoSubscription/WfoSubscription.tsx +19 -37
  27. package/src/components/WfoSubscription/WfoSubscriptionDetailTree.tsx +17 -9
  28. package/src/components/WfoSubscription/WfoSubscriptionGeneral.tsx +18 -156
  29. package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/WfoSubscriptionDetailSection.tsx +119 -0
  30. package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/WfoSubscriptionFixedInputSection.tsx +28 -0
  31. package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/WfoSubscriptionMetadataSection.tsx +29 -0
  32. package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/WfoSubscriptionProductInfoSection.tsx +55 -0
  33. package/src/components/WfoSubscription/WfoSubscriptionGeneralSections/index.ts +4 -0
  34. package/src/components/WfoSubscription/index.ts +3 -0
  35. package/src/components/WfoSubscription/overrides/index.ts +1 -0
  36. package/src/components/WfoSubscription/styles.ts +4 -1
  37. package/src/components/WfoSubscription/utils/relatedSubscriptionsListItemsObjectMappers.ts +62 -0
  38. package/src/components/WfoSubscription/utils/utils.spec.ts +0 -13
  39. package/src/components/WfoSubscription/utils/utils.ts +18 -5
  40. package/src/components/WfoSubscriptionsList/WfoSubscriptionsList.tsx +105 -100
  41. package/src/components/WfoTable/{WfoTableWithFilter/WfoTableWithFilter.tsx → WfoAdvancedTable/WfoAdvancedTable.tsx} +65 -123
  42. package/src/components/WfoTable/WfoAdvancedTable/getRowDetailData.tsx +55 -0
  43. package/src/components/WfoTable/WfoAdvancedTable/index.ts +4 -0
  44. package/src/components/WfoTable/WfoAdvancedTable/toSortedTableColumnConfig.ts +12 -0
  45. package/src/components/WfoTable/WfoAdvancedTable/types.ts +23 -0
  46. package/src/components/WfoTable/WfoStatusColorField/WfoStatusColorField.tsx +16 -0
  47. package/src/components/WfoTable/WfoStatusColorField/index.ts +1 -0
  48. package/src/components/WfoTable/WfoStatusColorField/styles.ts +20 -0
  49. package/src/components/WfoTable/WfoTable/WfoExpandedRow.tsx +33 -0
  50. package/src/components/WfoTable/WfoTable/WfoGroupedTable/WfoExpandableRow.tsx +48 -0
  51. package/src/components/WfoTable/WfoTable/WfoGroupedTable/WfoExpandedGroupRow.tsx +71 -0
  52. package/src/components/WfoTable/WfoTable/WfoGroupedTable/WfoGroupedTable.tsx +100 -0
  53. package/src/components/WfoTable/WfoTable/WfoGroupedTable/WfoGroupedTableGroups.tsx +74 -0
  54. package/src/components/WfoTable/WfoTable/WfoGroupedTable/styles.ts +39 -0
  55. package/src/components/WfoTable/WfoTable/WfoGroupedTable/useGroupedTableConfig.tsx +184 -0
  56. package/src/components/WfoTable/WfoTable/WfoGroupedTable/utils.spec.ts +133 -0
  57. package/src/components/WfoTable/WfoTable/WfoGroupedTable/utils.ts +41 -0
  58. package/src/components/WfoTable/WfoTable/WfoMultilineCell.tsx +13 -0
  59. package/src/components/WfoTable/WfoTable/WfoTable.tsx +201 -0
  60. package/src/components/WfoTable/WfoTable/WfoTableDataRows.tsx +112 -0
  61. package/src/components/WfoTable/{WfoBasicTable → WfoTable/WfoTableHeaderCell}/WfoSortDirectionIcon.tsx +3 -3
  62. package/src/components/WfoTable/{WfoBasicTable → WfoTable/WfoTableHeaderCell}/WfoTableHeaderCell.tsx +4 -3
  63. package/src/components/WfoTable/WfoTable/WfoTableHeaderCell/index.ts +2 -0
  64. package/src/components/WfoTable/WfoTable/WfoTableHeaderRow.tsx +114 -0
  65. package/src/components/WfoTable/WfoTable/WfoTruncateCell.tsx +23 -0
  66. package/src/components/WfoTable/WfoTable/constants.ts +1 -0
  67. package/src/components/WfoTable/WfoTable/index.ts +14 -0
  68. package/src/components/WfoTable/WfoTable/styles.ts +117 -0
  69. package/src/components/WfoTable/WfoTable/utils.spec.ts +79 -0
  70. package/src/components/WfoTable/WfoTable/utils.ts +78 -0
  71. package/src/components/WfoTable/WfoTableSettingsModal/WfoTableSettingsModal.tsx +13 -12
  72. package/src/components/WfoTable/WfoTableWithFilter/index.ts +1 -1
  73. package/src/components/WfoTable/index.ts +4 -5
  74. package/src/components/WfoTable/utils/columns.ts +1 -48
  75. package/src/components/WfoTable/utils/tableUtils.ts +13 -10
  76. package/src/components/WfoTree/WfoTreeBranch.tsx +10 -1
  77. package/src/components/WfoTree/WfoTreeNode.tsx +8 -57
  78. package/src/components/WfoTree/WfoTreeNodeListItem.tsx +65 -0
  79. package/src/components/WfoTree/styles.ts +28 -4
  80. package/src/components/index.ts +4 -0
  81. package/src/configuration/policy-resources.ts +1 -0
  82. package/src/configuration/version.ts +1 -1
  83. package/src/icons/WfoXMarkSmall.tsx +29 -0
  84. package/src/messages/en-GB.json +4 -0
  85. package/src/messages/nl-NL.json +4 -0
  86. package/src/pages/metadata/WfoMetadataPageLayout.tsx +4 -4
  87. package/src/pages/metadata/WfoProductBlocksPage.tsx +42 -59
  88. package/src/pages/metadata/WfoProductsPage.tsx +41 -47
  89. package/src/pages/metadata/WfoResourceTypesPage.tsx +26 -35
  90. package/src/pages/metadata/WfoTasksPage.tsx +35 -33
  91. package/src/pages/metadata/WfoWorkflowsPage.tsx +33 -29
  92. package/src/pages/processes/WfoProcessDetail.tsx +47 -55
  93. package/src/pages/settings/WfoSettingsPage.tsx +9 -4
  94. package/src/pages/startPage/WfoStartPage.tsx +17 -1
  95. package/src/pages/subscriptions/WfoSubscriptionsListPage.tsx +4 -5
  96. package/src/pages/tasks/WfoTasksListPage.tsx +44 -52
  97. package/src/pages/workflows/WfoWorkflowsListPage.tsx +4 -5
  98. package/src/rtk/endpoints/index.ts +1 -0
  99. package/src/rtk/endpoints/relatedSubscriptions.ts +5 -4
  100. package/src/rtk/endpoints/subscriptionActions.ts +11 -1
  101. package/src/utils/getObjectKeys.ts +3 -0
  102. package/src/utils/index.ts +5 -3
  103. package/tsup.config.ts +10 -0
  104. package/src/components/WfoTable/WfoBasicTable/WfoBasicTable.tsx +0 -194
  105. package/src/components/WfoTable/WfoBasicTable/WfoStatusColorField.tsx +0 -21
  106. package/src/components/WfoTable/WfoBasicTable/index.ts +0 -5
  107. package/src/components/WfoTable/WfoDataGridTable/WfoDataGridTable.stories.tsx +0 -136
  108. package/src/components/WfoTable/WfoDataGridTable/WfoDataGridTable.tsx +0 -146
  109. package/src/components/WfoTable/WfoDataGridTable/WfodataGridColumns.spec.ts +0 -113
  110. package/src/components/WfoTable/WfoDataGridTable/WfodataGridColumns.ts +0 -81
  111. package/src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.spec.ts +0 -52
  112. package/src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.ts +0 -23
  113. /package/src/components/WfoTable/{WfoBasicTable → WfoTable/WfoTableHeaderCell}/styles.ts +0 -0
@@ -3,10 +3,13 @@ import React, { useEffect, useState } from 'react';
3
3
  import { useTranslations } from 'next-intl';
4
4
 
5
5
  import { EuiBadgeGroup } from '@elastic/eui';
6
- import type { Pagination } from '@elastic/eui/src/components';
7
6
 
8
- import { WfoTableWithFilter, WfoWorkflowTargetBadge } from '@/components';
9
- import type { WfoDataSorting, WfoTableColumns } from '@/components';
7
+ import {
8
+ WfoWorkflowTargetBadge,
9
+ getPageIndexChangeHandler,
10
+ getPageSizeChangeHandler,
11
+ } from '@/components';
12
+ import type { WfoDataSorting } from '@/components';
10
13
  import { StoredTableConfig } from '@/components';
11
14
  import {
12
15
  DEFAULT_PAGE_SIZE,
@@ -14,13 +17,15 @@ import {
14
17
  METADATA_TASKS_TABLE_LOCAL_STORAGE_KEY,
15
18
  WfoProductBlockBadge,
16
19
  } from '@/components';
17
- import {
18
- getDataSortHandler,
19
- getPageChangeHandler,
20
- getQueryStringHandler,
21
- } from '@/components';
20
+ import { getDataSortHandler, getQueryStringHandler } from '@/components';
22
21
  import { WfoDateTime } from '@/components/WfoDateTime/WfoDateTime';
23
- import { mapSortableAndFilterableValuesToTableColumnConfig } from '@/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig';
22
+ import { WfoAdvancedTable } from '@/components/WfoTable/WfoAdvancedTable';
23
+ import { WfoAdvancedTableColumnConfig } from '@/components/WfoTable/WfoAdvancedTable/types';
24
+ import {
25
+ ColumnType,
26
+ Pagination,
27
+ } from '@/components/WfoTable/WfoTable/WfoTable';
28
+ import { mapSortableAndFilterableValuesToTableColumnConfig } from '@/components/WfoTable/WfoTable/utils';
24
29
  import {
25
30
  useDataDisplayParams,
26
31
  useShowToastMessage,
@@ -91,33 +96,31 @@ export const WfoTasksPage = () => {
91
96
  },
92
97
  });
93
98
 
94
- const tableColumns: WfoTableColumns<TaskListItem> = {
99
+ const tableColumns: WfoAdvancedTableColumnConfig<TaskListItem> = {
95
100
  name: {
96
- field: 'name',
97
- name: t('name'),
98
- width: '20%',
99
- render: (name) => (
101
+ columnType: ColumnType.DATA,
102
+ label: t('name'),
103
+ renderData: (name) => (
100
104
  <WfoProductBlockBadge badgeType={BadgeType.TASK}>
101
105
  {name}
102
106
  </WfoProductBlockBadge>
103
107
  ),
104
108
  },
105
109
  description: {
106
- field: 'description',
107
- name: t('description'),
110
+ columnType: ColumnType.DATA,
111
+ label: t('description'),
108
112
  width: '40%',
109
113
  },
110
114
  target: {
111
- field: 'target',
112
- name: t('target'),
113
- width: '15%',
114
- render: (target) => <WfoWorkflowTargetBadge target={target} />,
115
+ columnType: ColumnType.DATA,
116
+ label: t('target'),
117
+ renderData: (target) => <WfoWorkflowTargetBadge target={target} />,
115
118
  },
116
119
  productTags: {
117
- field: 'productTags',
118
- name: t('productTags'),
120
+ columnType: ColumnType.DATA,
121
+ label: t('productTags'),
119
122
  width: '20%',
120
- render: (productTags) => (
123
+ renderData: (productTags) => (
121
124
  <>
122
125
  {productTags
123
126
  ?.filter(onlyUnique)
@@ -147,10 +150,10 @@ export const WfoTasksPage = () => {
147
150
  ),
148
151
  },
149
152
  createdAt: {
150
- field: 'createdAt',
151
- name: t('createdAt'),
153
+ columnType: ColumnType.DATA,
154
+ label: t('createdAt'),
152
155
  width: '15%',
153
- render: (date) => <WfoDateTime dateOrIsoString={date} />,
156
+ renderData: (date) => <WfoDateTime dateOrIsoString={date} />,
154
157
  renderDetails: parseIsoString(parseDateToLocaleDateTimeString),
155
158
  clipboardText: parseIsoString(parseDateToLocaleDateTimeString),
156
159
  },
@@ -188,6 +191,8 @@ export const WfoTasksPage = () => {
188
191
  pageIndex: pageIndex,
189
192
  pageSizeOptions: DEFAULT_PAGE_SIZES,
190
193
  totalItemCount: totalItems ? totalItems : 0,
194
+ onChangePage: getPageIndexChangeHandler(setDataDisplayParam),
195
+ onChangeItemsPerPage: getPageSizeChangeHandler(setDataDisplayParam),
191
196
  };
192
197
 
193
198
  const mapToExportItems = (
@@ -212,19 +217,16 @@ export const WfoTasksPage = () => {
212
217
 
213
218
  return (
214
219
  <WfoMetadataPageLayout>
215
- <WfoTableWithFilter<TaskListItem>
220
+ <WfoAdvancedTable
216
221
  data={data ? mapTaskDefinitionToTaskListItem(data.tasks) : []}
217
- tableColumns={mapSortableAndFilterableValuesToTableColumnConfig(
222
+ tableColumnConfig={mapSortableAndFilterableValuesToTableColumnConfig(
218
223
  tableColumns,
219
224
  sortFields,
220
225
  filterFields,
221
226
  )}
222
- dataSorting={dataSorting}
227
+ dataSorting={[dataSorting]}
223
228
  defaultHiddenColumns={tableDefaults?.hiddenColumns}
224
- onUpdateDataSort={getDataSortHandler<TaskListItem>(
225
- setDataDisplayParam,
226
- )}
227
- onUpdatePage={getPageChangeHandler<TaskListItem>(
229
+ onUpdateDataSorting={getDataSortHandler<TaskListItem>(
228
230
  setDataDisplayParam,
229
231
  )}
230
232
  onUpdateQueryString={getQueryStringHandler<TaskListItem>(
@@ -3,9 +3,12 @@ import React, { useEffect, useState } from 'react';
3
3
  import { useTranslations } from 'next-intl';
4
4
 
5
5
  import { EuiBadgeGroup } from '@elastic/eui';
6
- import type { Pagination } from '@elastic/eui/src/components';
7
6
 
8
- import type { WfoDataSorting, WfoTableColumns } from '@/components';
7
+ import {
8
+ WfoDataSorting,
9
+ getPageIndexChangeHandler,
10
+ getPageSizeChangeHandler,
11
+ } from '@/components';
9
12
  import {
10
13
  DEFAULT_PAGE_SIZE,
11
14
  DEFAULT_PAGE_SIZES,
@@ -13,12 +16,17 @@ import {
13
16
  StoredTableConfig,
14
17
  WfoDateTime,
15
18
  WfoProductBlockBadge,
16
- WfoTableWithFilter,
17
19
  WfoWorkflowTargetBadge,
18
20
  getDataSortHandler,
19
- getPageChangeHandler,
20
21
  getQueryStringHandler,
21
22
  } from '@/components';
23
+ import { WfoAdvancedTable } from '@/components/WfoTable/WfoAdvancedTable/WfoAdvancedTable';
24
+ import { WfoAdvancedTableColumnConfig } from '@/components/WfoTable/WfoAdvancedTable/types';
25
+ import {
26
+ ColumnType,
27
+ Pagination,
28
+ } from '@/components/WfoTable/WfoTable/WfoTable';
29
+ import { mapSortableAndFilterableValuesToTableColumnConfig } from '@/components/WfoTable/WfoTable/utils';
22
30
  import {
23
31
  useDataDisplayParams,
24
32
  useShowToastMessage,
@@ -44,7 +52,6 @@ import {
44
52
  getCsvFileNameWithDate,
45
53
  } from '@/utils/csvDownload';
46
54
 
47
- import { mapSortableAndFilterableValuesToTableColumnConfig } from '../../components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig';
48
55
  import { WfoMetadataPageLayout } from './WfoMetadataPageLayout';
49
56
  import {
50
57
  graphQlWorkflowListMapper,
@@ -95,33 +102,31 @@ export const WfoWorkflowsPage = () => {
95
102
  },
96
103
  });
97
104
 
98
- const tableColumns: WfoTableColumns<WorkflowListItem> = {
105
+ const tableColumns: WfoAdvancedTableColumnConfig<WorkflowListItem> = {
99
106
  name: {
100
- field: 'name',
101
- name: t('name'),
102
- width: '20%',
103
- render: (name) => (
107
+ columnType: ColumnType.DATA,
108
+ label: t('name'),
109
+ renderData: (name) => (
104
110
  <WfoProductBlockBadge badgeType={BadgeType.WORKFLOW}>
105
111
  {name}
106
112
  </WfoProductBlockBadge>
107
113
  ),
108
114
  },
109
115
  description: {
110
- field: 'description',
111
- name: t('description'),
116
+ columnType: ColumnType.DATA,
117
+ label: t('description'),
112
118
  width: '40%',
113
119
  },
114
120
  target: {
115
- field: 'target',
116
- name: t('target'),
117
- width: '15%',
118
- render: (target) => <WfoWorkflowTargetBadge target={target} />,
121
+ columnType: ColumnType.DATA,
122
+ label: t('target'),
123
+ renderData: (target) => <WfoWorkflowTargetBadge target={target} />,
119
124
  },
120
125
  productTags: {
121
- field: 'productTags',
122
- name: t('productTags'),
126
+ columnType: ColumnType.DATA,
127
+ label: t('productTags'),
123
128
  width: '20%',
124
- render: (productTags) => (
129
+ renderData: (productTags) => (
125
130
  <>
126
131
  {productTags
127
132
  ?.filter(onlyUnique)
@@ -151,10 +156,10 @@ export const WfoWorkflowsPage = () => {
151
156
  ),
152
157
  },
153
158
  createdAt: {
154
- field: 'createdAt',
155
- name: t('createdAt'),
159
+ columnType: ColumnType.DATA,
160
+ label: t('createdAt'),
156
161
  width: '15%',
157
- render: (date) => <WfoDateTime dateOrIsoString={date} />,
162
+ renderData: (date) => <WfoDateTime dateOrIsoString={date} />,
158
163
  renderDetails: parseIsoString(parseDateToLocaleDateTimeString),
159
164
  clipboardText: parseIsoString(parseDateToLocaleDateTimeString),
160
165
  },
@@ -193,6 +198,8 @@ export const WfoWorkflowsPage = () => {
193
198
  pageIndex: pageIndex,
194
199
  pageSizeOptions: DEFAULT_PAGE_SIZES,
195
200
  totalItemCount: totalItems ? totalItems : 0,
201
+ onChangePage: getPageIndexChangeHandler(setDataDisplayParam),
202
+ onChangeItemsPerPage: getPageSizeChangeHandler(setDataDisplayParam),
196
203
  };
197
204
 
198
205
  const mapToExportItems = (
@@ -212,7 +219,7 @@ export const WfoWorkflowsPage = () => {
212
219
 
213
220
  return (
214
221
  <WfoMetadataPageLayout>
215
- <WfoTableWithFilter<WorkflowListItem>
222
+ <WfoAdvancedTable
216
223
  data={
217
224
  data
218
225
  ? mapWorkflowDefinitionToWorkflowListItem(
@@ -220,17 +227,14 @@ export const WfoWorkflowsPage = () => {
220
227
  )
221
228
  : []
222
229
  }
223
- tableColumns={mapSortableAndFilterableValuesToTableColumnConfig(
230
+ tableColumnConfig={mapSortableAndFilterableValuesToTableColumnConfig(
224
231
  tableColumns,
225
232
  sortFields,
226
233
  filterFields,
227
234
  )}
228
- dataSorting={dataSorting}
235
+ dataSorting={[dataSorting]}
229
236
  defaultHiddenColumns={tableDefaults?.hiddenColumns}
230
- onUpdateDataSort={getDataSortHandler<WorkflowListItem>(
231
- setDataDisplayParam,
232
- )}
233
- onUpdatePage={getPageChangeHandler<WorkflowListItem>(
237
+ onUpdateDataSorting={getDataSortHandler<WorkflowListItem>(
234
238
  setDataDisplayParam,
235
239
  )}
236
240
  onUpdateQueryString={getQueryStringHandler<WorkflowListItem>(
@@ -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
- <EuiFlexGroup>
196
- <EuiFlexItem>
197
- <WfoTitleWithWebsocketBadge title={pageTitle} />
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
- </EuiFlexItem>
204
- <EuiFlexGroup
205
- justifyContent="flexEnd"
206
- direction="row"
207
- css={{ flexGrow: 0 }}
208
- gutterSize="s"
209
- >
210
- <WfoIsAllowedToRender
211
- resource={PolicyResource.PROCESS_RETRY}
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
- <EuiButton
214
- onClick={handleActionButtonClick(retryAction)}
215
- iconType={() => (
216
- <WfoRefresh
217
- color={
218
- retryButtonIsDisabled
219
- ? theme.colors.subduedText
220
- : theme.colors.link
221
- }
222
- />
223
- )}
224
- isDisabled={retryButtonIsDisabled}
225
- >
226
- {t('retry')}
227
- </EuiButton>
228
- </WfoIsAllowedToRender>
229
- <WfoIsAllowedToRender
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
- <EuiButton
233
- onClick={handleActionButtonClick(abortAction)}
234
- iconType={() => (
235
- <WfoXCircleFill
236
- color={
237
- abortButtonIsDisabled
238
- ? theme.colors.subduedText
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
- </EuiFlexGroup>
270
- </EuiFlexGroup>
271
- <EuiSpacer />
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 { EuiHorizontalRule, EuiPageHeader, EuiSpacer } from '@elastic/eui';
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
- <EuiSpacer />
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 <WfoSummaryCards>{summaryCards}</WfoSummaryCards>;
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
- <EuiSpacer />
81
-
82
- <WfoTitleWithWebsocketBadge title={t('title')} />
83
-
84
- <EuiSpacer size="m" />
81
+ <WfoContentHeader
82
+ title={<WfoTitleWithWebsocketBadge title={t('title')} />}
83
+ />
85
84
 
86
85
  <WfoFilterTabs
87
86
  tabs={subscriptionListTabs}
@@ -5,17 +5,17 @@ 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, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui';
8
+ import { EuiButton, EuiSpacer } from '@elastic/eui';
9
9
 
10
10
  import {
11
11
  ACTIVE_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY,
12
12
  COMPLETED_TASKS_LIST_TABLE_LOCAL_STORAGE_KEY,
13
+ ColumnType,
13
14
  DEFAULT_PAGE_SIZE,
14
15
  StoredTableConfig,
15
16
  WfoFilterTabs,
16
17
  WfoIsAllowedToRender,
17
18
  WfoStartTaskButtonComboBox,
18
- WfoTableColumns,
19
19
  } from '@/components';
20
20
  import { PATH_TASKS } from '@/components';
21
21
  import {
@@ -23,6 +23,9 @@ import {
23
23
  WfoProcessesList,
24
24
  WfoTitleWithWebsocketBadge,
25
25
  } from '@/components';
26
+ import { WfoContentHeader } from '@/components/WfoContentHeader/WfoContentHeader';
27
+ import { toSortedTableColumnConfig } from '@/components/WfoTable/WfoAdvancedTable/';
28
+ import { WfoAdvancedTableColumnConfig } from '@/components/WfoTable/WfoAdvancedTable/types';
26
29
  import { PolicyResource } from '@/configuration/policy-resources';
27
30
  import { ConfirmationDialogContext } from '@/contexts';
28
31
  import {
@@ -111,64 +114,53 @@ export const WfoTasksListPage = () => {
111
114
 
112
115
  // Changing the order of the keys, resulting in an updated column order in the table
113
116
  const handleOverrideTableColumns: (
114
- defaultTableColumns: WfoTableColumns<ProcessListItem>,
115
- ) => WfoTableColumns<ProcessListItem> = (defaultTableColumns) => ({
117
+ defaultTableColumns: WfoAdvancedTableColumnConfig<ProcessListItem>,
118
+ ) => WfoAdvancedTableColumnConfig<ProcessListItem> = (
119
+ defaultTableColumns,
120
+ ) => ({
116
121
  workflowName: {
117
- field: 'workflowName',
118
- name: t('taskName'),
119
- render: (value, { processId }) => (
122
+ columnType: ColumnType.DATA,
123
+ label: t('taskName'),
124
+ renderData: (value, { processId }) => (
120
125
  <Link href={`${PATH_TASKS}/${processId}`}>{value}</Link>
121
126
  ),
122
127
  },
123
- lastStep: defaultTableColumns.lastStep,
124
- lastStatus: defaultTableColumns.lastStatus,
125
- workflowTarget: defaultTableColumns.workflowTarget,
126
- productTag: defaultTableColumns.tag,
127
- productName: defaultTableColumns.productName,
128
- customer: defaultTableColumns.customer,
129
- customerAbbreviation: defaultTableColumns.customerAbbreviation,
130
- subscriptions: defaultTableColumns.subscriptions,
131
- createdBy: defaultTableColumns.createdBy,
132
- assignee: defaultTableColumns.assignee,
133
- processId: defaultTableColumns.processId,
134
- startedAt: defaultTableColumns.startedAt,
135
- lastModifiedAt: defaultTableColumns.lastModifiedAt,
128
+ ...toSortedTableColumnConfig(defaultTableColumns, [
129
+ 'lastStep',
130
+ 'lastStatus',
131
+ 'workflowTarget',
132
+ 'tag',
133
+ 'productName',
134
+ 'customer',
135
+ 'customerAbbreviation',
136
+ 'subscriptions',
137
+ 'createdBy',
138
+ 'assignee',
139
+ 'processId',
140
+ 'startedAt',
141
+ 'lastModifiedAt',
142
+ ]),
136
143
  });
137
144
 
138
145
  return (
139
146
  <>
140
- <EuiSpacer />
141
-
142
- <EuiFlexGroup>
143
- <EuiFlexItem>
144
- <WfoTitleWithWebsocketBadge title="Tasks" />
145
- </EuiFlexItem>
146
-
147
- <EuiFlexItem>
148
- <EuiFlexGroup justifyContent="flexEnd">
149
- {' '}
150
- <WfoIsAllowedToRender
151
- resource={PolicyResource.TASKS_RETRY_ALL}
152
- >
153
- <EuiButton
154
- onClick={handleRerunAllButtonClick}
155
- iconType={() => (
156
- <WfoRefresh
157
- color={theme.colors.primaryText}
158
- />
159
- )}
160
- >
161
- {t('rerunAll')}
162
- </EuiButton>
163
- </WfoIsAllowedToRender>
164
- <WfoIsAllowedToRender
165
- resource={PolicyResource.TASKS_CREATE}
166
- >
167
- <WfoStartTaskButtonComboBox />
168
- </WfoIsAllowedToRender>
169
- </EuiFlexGroup>
170
- </EuiFlexItem>
171
- </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>
172
164
 
173
165
  <WfoFilterTabs
174
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
- <EuiSpacer />
88
-
89
- <WfoTitleWithWebsocketBadge title={t('title')} />
90
-
91
- <EuiSpacer size="m" />
88
+ <WfoContentHeader
89
+ title={<WfoTitleWithWebsocketBadge title={t('title')} />}
90
+ />
92
91
 
93
92
  <WfoFilterTabs
94
93
  tabs={defaultWorkflowsListTabs}