@orchestrator-ui/orchestrator-ui-components 7.1.1 → 7.2.1
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 +5 -2
- package/.turbo/turbo-test.log +6 -6
- package/CHANGELOG.md +13 -0
- package/dist/index.d.ts +2892 -24
- package/dist/index.js +2929 -2478
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
- package/src/components/WfoAgent/ExportButton/styles.ts +9 -9
- package/src/components/WfoAgent/ToolProgress/SetFilterTreeDisplay.styles.ts +5 -5
- package/src/components/WfoAgent/ToolProgress/styles.ts +7 -7
- package/src/components/WfoAgent/WfoAgentChart/WfoAgentLineChart.tsx +2 -2
- package/src/components/WfoAgent/WfoAgentChart/WfoAgentPieChart.tsx +2 -2
- package/src/components/WfoBadges/WfoEngineStatusBadge/WfoEngineStatusBadge.tsx +2 -2
- package/src/components/WfoBadges/WfoFailedTasksBadge/WfoFailedTasksBadge.tsx +21 -29
- package/src/components/WfoBadges/WfoProcessStatusBadge/WfoProcessStatusBadge.tsx +12 -12
- package/src/components/WfoBadges/WfoProductBlockBadge/WfoProductBlockBadge.tsx +12 -12
- package/src/components/WfoBadges/WfoProductStatusBadge/WfoProductStatusBadge.tsx +8 -8
- package/src/components/WfoBadges/WfoScheduledTasksBadges/WfoScheduledTasksBadges.tsx +38 -0
- package/src/components/WfoBadges/WfoScheduledTasksBadges/WfoScheduledTasksBadgesContainer.tsx +27 -0
- package/src/components/WfoBadges/WfoScheduledTasksBadges/index.ts +2 -0
- package/src/components/WfoBadges/WfoSubscriptionStatusBadge/WfoSubscriptionStatusBadge.tsx +8 -8
- package/src/components/WfoBadges/WfoSubscriptionSyncStatusBadge/WfoSubscriptionSyncStatusBadge.tsx +5 -4
- package/src/components/WfoBadges/WfoWebsocketStatusBadge/styles.ts +5 -3
- package/src/components/WfoBadges/WfoWorkflowTargetBadge/WfoWorkflowTargetBadge.tsx +14 -13
- package/src/components/WfoBadges/index.ts +1 -0
- package/src/components/WfoButtonComboBox/styles.ts +6 -6
- package/src/components/WfoDiff/styles.ts +6 -6
- package/src/components/WfoError/WfoError.tsx +1 -1
- package/src/components/WfoExpandableField/styles.ts +2 -2
- package/src/components/WfoFilterTabs/styles.ts +2 -2
- package/src/components/WfoJsonCodeBlock/styles.ts +2 -2
- package/src/components/WfoKeyValueTable/WfoValueCell.tsx +1 -1
- package/src/components/WfoKeyValueTable/styles.ts +6 -6
- package/src/components/WfoLogoSpinner/styles.ts +6 -0
- package/src/components/WfoMonacoCodeBlock/WfoMonacoCodeBlock.tsx +7 -7
- package/src/components/WfoMonacoCodeBlock/styles.ts +5 -3
- package/src/components/WfoNoResults/styles.ts +3 -3
- package/src/components/WfoPageTemplate/WfoBreadcrumbs/WfoBreadcrumbs.tsx +1 -1
- package/src/components/WfoPageTemplate/WfoPageHeader/WfoHamburgerMenu.tsx +3 -7
- package/src/components/WfoPageTemplate/WfoPageHeader/WfoPageHeader.tsx +6 -6
- package/src/components/WfoPageTemplate/WfoPageHeader/styles.ts +3 -3
- package/src/components/WfoPageTemplate/WfoPageTemplate/WfoPageTemplate.tsx +56 -8
- package/src/components/WfoPageTemplate/WfoPageTemplate/styles.ts +4 -4
- package/src/components/WfoPageTemplate/WfoSidebar/WfoSidebar.tsx +19 -0
- package/src/components/WfoPageTemplate/WfoSidebar/styles.ts +26 -24
- package/src/components/WfoPageTemplate/paths.ts +1 -0
- package/src/components/WfoPydanticForm/Footer.tsx +5 -5
- package/src/components/WfoPydanticForm/fields/WfoArrayField/WfoArrayField.tsx +4 -3
- package/src/components/WfoPydanticForm/fields/WfoArrayField/styles.ts +4 -2
- package/src/components/WfoPydanticForm/fields/WfoInteger.tsx +5 -5
- package/src/components/WfoPydanticForm/fields/WfoLabel.tsx +1 -1
- package/src/components/WfoPydanticForm/fields/WfoReactSelect/styles.ts +36 -13
- package/src/components/WfoPydanticForm/fields/styles.ts +8 -8
- package/src/components/WfoSearchPage/WfoConditionRow/WfoPathChips.tsx +1 -1
- package/src/components/WfoSearchPage/WfoConditionRow/WfoSelectedPathDisplay.tsx +8 -5
- package/src/components/WfoSearchPage/WfoFilterGroup/WfoFilterGroup.tsx +1 -1
- package/src/components/WfoSettings/styles.ts +5 -6
- package/src/components/WfoStartButton/WfoStartButtonComboBox.tsx +4 -7
- package/src/components/WfoStartButton/styles.ts +6 -6
- package/src/components/WfoSubscription/WfoSubscriptionActions/styles.ts +3 -3
- package/src/components/WfoSubscription/WfoSubscriptionProductBlock/styles.ts +8 -9
- package/src/components/WfoSubscription/WfoTargetTypeIcon.tsx +4 -2
- package/src/components/WfoSubscription/styles.ts +9 -4
- package/src/components/WfoSubscription/utils/utils.spec.ts +8 -8
- package/src/components/WfoSubscription/utils/utils.ts +4 -4
- package/src/components/WfoSummary/WfoSummaryCardHeader/WfoSummaryCardHeader.tsx +5 -1
- package/src/components/WfoSummary/WfoSummaryCardHeader/styles.ts +2 -2
- package/src/components/WfoSummary/WfoSummaryCardList/WfoSummaryCardListItem.tsx +3 -1
- package/src/components/WfoSummary/WfoSummaryCardList/styles.ts +4 -3
- package/src/components/WfoSummary/styles.ts +2 -2
- package/src/components/WfoTable/WfoAdvancedTable/WfoAdvancedTable.tsx +17 -11
- package/src/components/WfoTable/WfoFirstPartUUID/WfoFirstPartUUID.tsx +1 -1
- package/src/components/WfoTable/WfoFirstPartUUID/styles.ts +2 -2
- package/src/components/WfoTable/WfoSortButtons/WfoSortButton.tsx +5 -1
- package/src/components/WfoTable/WfoStatusColorField/styles.ts +2 -2
- package/src/components/WfoTable/WfoTable/WfoGroupedTable/styles.ts +3 -3
- package/src/components/WfoTable/WfoTable/WfoTable.tsx +9 -3
- package/src/components/WfoTable/WfoTable/WfoTableHeaderCell/WfoSortDirectionIcon.tsx +3 -3
- package/src/components/WfoTable/WfoTable/WfoTableHeaderCell/styles.ts +10 -10
- package/src/components/WfoTable/WfoTable/styles.ts +13 -14
- package/src/components/WfoTable/WfoTable/utils.ts +29 -1
- package/src/components/WfoTable/WfoTableSettingsModal/styles.ts +6 -6
- package/src/components/WfoTable/utils/constants.ts +1 -0
- package/src/components/WfoTable/utils/tableUtils.ts +0 -1
- package/src/components/WfoTableCodeBlock/styles.ts +2 -2
- package/src/components/WfoTextAnchor/styles.ts +2 -2
- package/src/components/WfoTimeline/styles.ts +8 -8
- package/src/components/WfoTree/styles.ts +5 -6
- package/src/components/WfoWorkflowSteps/WfoStep/WfoStep.tsx +6 -2
- package/src/components/WfoWorkflowSteps/WfoStepStatusIcon/WfoStepStatusIcon.tsx +12 -9
- package/src/components/WfoWorkflowSteps/WfoTraceback/styles.ts +2 -2
- package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoStepListHeader.tsx +1 -1
- package/src/components/WfoWorkflowSteps/styles.ts +9 -6
- package/src/components/confirmationDialog/WfoConfirmationDialog.tsx +1 -1
- package/src/configuration/constants.ts +1 -0
- package/src/configuration/version.ts +1 -1
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useGetSchedulesForWorkflow.tsx +30 -0
- package/src/hooks/useGetWorkflowNameById.tsx +23 -0
- package/src/hooks/useOrchestratorTheme.ts +20 -18
- package/src/hooks/useWithOrchestratorTheme.ts +4 -4
- package/src/icons/heroicons/WfoScheduledTaskOnce.tsx +32 -0
- package/src/icons/heroicons/WfoScheduledTaskRecurring.tsx +32 -0
- package/src/icons/heroicons/index.ts +2 -0
- package/src/messages/en-GB.json +11 -1
- package/src/messages/nl-NL.json +10 -1
- package/src/pages/metadata/WfoMetadataPageLayout.tsx +6 -1
- package/src/pages/metadata/WfoScheduledTasksPage.tsx +223 -0
- package/src/pages/metadata/WfoTasksPage.tsx +20 -3
- package/src/pages/metadata/index.ts +1 -0
- package/src/pages/metadata/taskListObjectMapper.ts +3 -0
- package/src/pages/processes/WfoProcessDetail.tsx +3 -3
- package/src/pages/processes/WfoProcessListSubscriptionsCell.tsx +1 -1
- package/src/pages/processes/WfoProductInformationWithLink.tsx +1 -1
- package/src/pages/processes/WfoStartProcessPage.tsx +6 -1
- package/src/pages/settings/WfoSettingsPage.tsx +2 -1
- package/src/pages/tasks/WfoTasksListPage.tsx +1 -1
- package/src/rtk/endpoints/metadata/index.ts +1 -0
- package/src/rtk/endpoints/metadata/scheduledTasks.ts +66 -0
- package/src/rtk/endpoints/metadata/tasks.ts +1 -1
- package/src/theme/baseStyles/formFieldsBaseStyle.ts +8 -6
- package/src/theme/index.ts +1 -1
- package/src/theme/wfoThemeModifications.ts +117 -0
- package/src/types/types.ts +18 -3
- package/src/theme/defaultOrchestratorTheme.ts +0 -129
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import { useTranslations } from 'next-intl';
|
|
4
|
+
|
|
5
|
+
import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
WfoDataSorting,
|
|
9
|
+
WfoProductBlockBadge,
|
|
10
|
+
WfoScheduledTasksBadges,
|
|
11
|
+
getPageIndexChangeHandler,
|
|
12
|
+
getPageSizeChangeHandler,
|
|
13
|
+
} from '@/components';
|
|
14
|
+
import {
|
|
15
|
+
DEFAULT_PAGE_SIZE,
|
|
16
|
+
DEFAULT_PAGE_SIZES,
|
|
17
|
+
METADATA_SCHEDULES_LOCAL_STORAGE_KEY,
|
|
18
|
+
StoredTableConfig,
|
|
19
|
+
getDataSortHandler,
|
|
20
|
+
getQueryStringHandler,
|
|
21
|
+
} from '@/components';
|
|
22
|
+
import { WfoAdvancedTable } from '@/components/WfoTable/WfoAdvancedTable';
|
|
23
|
+
import { WfoAdvancedTableColumnConfig } from '@/components/WfoTable/WfoAdvancedTable/types';
|
|
24
|
+
import { ColumnType, Pagination } from '@/components/WfoTable/WfoTable';
|
|
25
|
+
import { mapSortableAndFilterableValuesToTableColumnConfig } from '@/components/WfoTable/WfoTable/utils';
|
|
26
|
+
import {
|
|
27
|
+
useDataDisplayParams,
|
|
28
|
+
useGetWorkflowNameById,
|
|
29
|
+
useShowToastMessage,
|
|
30
|
+
useStoredTableConfig,
|
|
31
|
+
} from '@/hooks';
|
|
32
|
+
import {
|
|
33
|
+
ScheduledTasksResponse,
|
|
34
|
+
useGetScheduledTasksQuery,
|
|
35
|
+
useLazyGetScheduledTasksQuery,
|
|
36
|
+
} from '@/rtk';
|
|
37
|
+
import { mapRtkErrorToWfoError } from '@/rtk/utils';
|
|
38
|
+
import { BadgeType } from '@/types';
|
|
39
|
+
import type { GraphqlQueryVariables, ScheduledTaskDefinition } from '@/types';
|
|
40
|
+
import { SortOrder } from '@/types';
|
|
41
|
+
import { formatDate } from '@/utils';
|
|
42
|
+
import {
|
|
43
|
+
getQueryVariablesForExport,
|
|
44
|
+
parseDateToLocaleDateTimeString,
|
|
45
|
+
parseIsoString,
|
|
46
|
+
} from '@/utils';
|
|
47
|
+
import {
|
|
48
|
+
csvDownloadHandler,
|
|
49
|
+
getCsvFileNameWithDate,
|
|
50
|
+
} from '@/utils/csvDownload';
|
|
51
|
+
|
|
52
|
+
import { WfoMetadataPageLayout } from './WfoMetadataPageLayout';
|
|
53
|
+
|
|
54
|
+
const TASK_NAME_FIELD: keyof ScheduledTaskDefinition = 'name';
|
|
55
|
+
|
|
56
|
+
type ScheduledTasksDefinitionExportItem = ScheduledTaskDefinition;
|
|
57
|
+
|
|
58
|
+
const WfoWorkflowNameById = ({ workflowId }: { workflowId: string }) => {
|
|
59
|
+
const { workflowName } = useGetWorkflowNameById(workflowId);
|
|
60
|
+
return workflowName ? (
|
|
61
|
+
<WfoProductBlockBadge badgeType={BadgeType.TASK}>
|
|
62
|
+
{workflowName}
|
|
63
|
+
</WfoProductBlockBadge>
|
|
64
|
+
) : (
|
|
65
|
+
''
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const WfoScheduledTasksPage = () => {
|
|
70
|
+
const t = useTranslations('metadata.scheduledTasks');
|
|
71
|
+
const tError = useTranslations('errors');
|
|
72
|
+
const { showToastMessage } = useShowToastMessage();
|
|
73
|
+
const [tableDefaults, setTableDefaults] =
|
|
74
|
+
useState<StoredTableConfig<ScheduledTaskDefinition>>();
|
|
75
|
+
|
|
76
|
+
const getStoredTableConfig = useStoredTableConfig<ScheduledTaskDefinition>(
|
|
77
|
+
METADATA_SCHEDULES_LOCAL_STORAGE_KEY,
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
const storedConfig = getStoredTableConfig();
|
|
82
|
+
|
|
83
|
+
if (storedConfig) {
|
|
84
|
+
setTableDefaults(storedConfig);
|
|
85
|
+
}
|
|
86
|
+
}, [getStoredTableConfig]);
|
|
87
|
+
|
|
88
|
+
const { dataDisplayParams, setDataDisplayParam } =
|
|
89
|
+
useDataDisplayParams<ScheduledTaskDefinition>({
|
|
90
|
+
// TODO: Improvement: A default pageSize value is set to avoid a graphql error when the query is executed
|
|
91
|
+
// the fist time before the useEffect has populated the tableDefaults. Better is to create a way for
|
|
92
|
+
// the query to wait for the values to be available
|
|
93
|
+
// https://github.com/workfloworchestrator/orchestrator-ui/issues/261
|
|
94
|
+
pageSize: tableDefaults?.selectedPageSize || DEFAULT_PAGE_SIZE,
|
|
95
|
+
sortBy: {
|
|
96
|
+
field: TASK_NAME_FIELD,
|
|
97
|
+
order: SortOrder.ASC,
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
const tableColumns: WfoAdvancedTableColumnConfig<ScheduledTaskDefinition> =
|
|
102
|
+
{
|
|
103
|
+
workflowId: {
|
|
104
|
+
columnType: ColumnType.DATA,
|
|
105
|
+
label: t('task'),
|
|
106
|
+
width: '180px',
|
|
107
|
+
renderData: (workflowId) => (
|
|
108
|
+
<WfoWorkflowNameById workflowId={workflowId} />
|
|
109
|
+
),
|
|
110
|
+
},
|
|
111
|
+
name: {
|
|
112
|
+
columnType: ColumnType.DATA,
|
|
113
|
+
label: t('taskDescription'),
|
|
114
|
+
width: '700px',
|
|
115
|
+
},
|
|
116
|
+
nextRunTime: {
|
|
117
|
+
columnType: ColumnType.DATA,
|
|
118
|
+
label: t('nextRuntime'),
|
|
119
|
+
width: '180px',
|
|
120
|
+
renderData: (date) => formatDate(date),
|
|
121
|
+
renderDetails: parseIsoString(parseDateToLocaleDateTimeString),
|
|
122
|
+
clipboardText: parseIsoString(parseDateToLocaleDateTimeString),
|
|
123
|
+
renderTooltip: parseIsoString(parseDateToLocaleDateTimeString),
|
|
124
|
+
},
|
|
125
|
+
trigger: {
|
|
126
|
+
columnType: ColumnType.DATA,
|
|
127
|
+
label: t('schedule'),
|
|
128
|
+
width: '255px',
|
|
129
|
+
isSortable: false,
|
|
130
|
+
renderData: (trigger) => (
|
|
131
|
+
<EuiFlexGroup
|
|
132
|
+
gutterSize="s"
|
|
133
|
+
justifyContent="flexStart"
|
|
134
|
+
alignItems="center"
|
|
135
|
+
>
|
|
136
|
+
<EuiFlexItem grow={0}>
|
|
137
|
+
<WfoScheduledTasksBadges
|
|
138
|
+
workflowSchedules={[trigger]}
|
|
139
|
+
/>
|
|
140
|
+
</EuiFlexItem>
|
|
141
|
+
<EuiFlexItem>{trigger}</EuiFlexItem>
|
|
142
|
+
</EuiFlexGroup>
|
|
143
|
+
),
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
const { pageSize, pageIndex, sortBy, queryString } = dataDisplayParams;
|
|
148
|
+
const graphqlQueryVariables: GraphqlQueryVariables<ScheduledTaskDefinition> =
|
|
149
|
+
{
|
|
150
|
+
first: pageSize,
|
|
151
|
+
after: pageIndex * pageSize,
|
|
152
|
+
sortBy: sortBy,
|
|
153
|
+
query: queryString || undefined,
|
|
154
|
+
};
|
|
155
|
+
const { data, isFetching, error } = useGetScheduledTasksQuery(
|
|
156
|
+
graphqlQueryVariables,
|
|
157
|
+
);
|
|
158
|
+
const [getSchedulesTrigger, { isFetching: isFetchingCsv }] =
|
|
159
|
+
useLazyGetScheduledTasksQuery();
|
|
160
|
+
const getSchedulesForExport = () =>
|
|
161
|
+
getSchedulesTrigger(
|
|
162
|
+
getQueryVariablesForExport(graphqlQueryVariables),
|
|
163
|
+
).unwrap();
|
|
164
|
+
|
|
165
|
+
const { totalItems, sortFields, filterFields } = data?.pageInfo ?? {};
|
|
166
|
+
|
|
167
|
+
const pagination: Pagination = {
|
|
168
|
+
pageSize: pageSize,
|
|
169
|
+
pageIndex: pageIndex,
|
|
170
|
+
pageSizeOptions: DEFAULT_PAGE_SIZES,
|
|
171
|
+
totalItemCount: totalItems ? totalItems : 0,
|
|
172
|
+
onChangePage: getPageIndexChangeHandler(setDataDisplayParam),
|
|
173
|
+
onChangeItemsPerPage: getPageSizeChangeHandler(setDataDisplayParam),
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
const dataSorting: WfoDataSorting<ScheduledTaskDefinition> = {
|
|
177
|
+
field: sortBy?.field ?? TASK_NAME_FIELD,
|
|
178
|
+
sortOrder: sortBy?.order ?? SortOrder.ASC,
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
const mapToExportItems = ({
|
|
182
|
+
schedules,
|
|
183
|
+
}: ScheduledTasksResponse): ScheduledTasksDefinitionExportItem[] => {
|
|
184
|
+
return schedules;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
return (
|
|
188
|
+
<WfoMetadataPageLayout>
|
|
189
|
+
<WfoAdvancedTable
|
|
190
|
+
data={data?.schedules ?? []}
|
|
191
|
+
tableColumnConfig={mapSortableAndFilterableValuesToTableColumnConfig(
|
|
192
|
+
tableColumns,
|
|
193
|
+
sortFields,
|
|
194
|
+
filterFields,
|
|
195
|
+
)}
|
|
196
|
+
dataSorting={[dataSorting]}
|
|
197
|
+
defaultHiddenColumns={tableDefaults?.hiddenColumns}
|
|
198
|
+
onUpdateDataSorting={getDataSortHandler<ScheduledTaskDefinition>(
|
|
199
|
+
setDataDisplayParam,
|
|
200
|
+
)}
|
|
201
|
+
onUpdateQueryString={getQueryStringHandler<ScheduledTaskDefinition>(
|
|
202
|
+
setDataDisplayParam,
|
|
203
|
+
)}
|
|
204
|
+
pagination={pagination}
|
|
205
|
+
isLoading={isFetching}
|
|
206
|
+
error={mapRtkErrorToWfoError(error)}
|
|
207
|
+
queryString={queryString}
|
|
208
|
+
localStorageKey={METADATA_SCHEDULES_LOCAL_STORAGE_KEY}
|
|
209
|
+
onExportData={csvDownloadHandler(
|
|
210
|
+
getSchedulesForExport,
|
|
211
|
+
mapToExportItems,
|
|
212
|
+
(data) => data?.pageInfo || {},
|
|
213
|
+
Object.keys(tableColumns),
|
|
214
|
+
getCsvFileNameWithDate('Schedules'),
|
|
215
|
+
showToastMessage,
|
|
216
|
+
tError,
|
|
217
|
+
)}
|
|
218
|
+
exportDataIsLoading={isFetchingCsv}
|
|
219
|
+
disableSearch={true}
|
|
220
|
+
/>
|
|
221
|
+
</WfoMetadataPageLayout>
|
|
222
|
+
);
|
|
223
|
+
};
|
|
@@ -7,6 +7,7 @@ import { EuiBadgeGroup } from '@elastic/eui';
|
|
|
7
7
|
import {
|
|
8
8
|
PATH_METADATA_PRODUCTS,
|
|
9
9
|
WfoFirstPartUUID,
|
|
10
|
+
WfoScheduledTasksBadgesContainer,
|
|
10
11
|
WfoWorkflowTargetBadge,
|
|
11
12
|
getPageIndexChangeHandler,
|
|
12
13
|
getPageSizeChangeHandler,
|
|
@@ -42,7 +43,7 @@ import {
|
|
|
42
43
|
} from '@/rtk';
|
|
43
44
|
import { mapRtkErrorToWfoError } from '@/rtk/utils';
|
|
44
45
|
import type { GraphqlQueryVariables, TaskDefinition } from '@/types';
|
|
45
|
-
import { BadgeType, SortOrder } from '@/types';
|
|
46
|
+
import { BadgeType, ScheduleFrequency, SortOrder } from '@/types';
|
|
46
47
|
import {
|
|
47
48
|
getConcatenatedResult,
|
|
48
49
|
getQueryUrl,
|
|
@@ -67,9 +68,13 @@ export type TaskListItem = Pick<
|
|
|
67
68
|
'workflowId' | 'name' | 'description' | 'target' | 'createdAt'
|
|
68
69
|
> & {
|
|
69
70
|
productTags: string[];
|
|
71
|
+
scheduleFrequency: ScheduleFrequency[];
|
|
70
72
|
};
|
|
71
73
|
|
|
72
|
-
type TaskListExportItem = Omit<
|
|
74
|
+
export type TaskListExportItem = Omit<
|
|
75
|
+
TaskListItem,
|
|
76
|
+
'productTags' | 'scheduleFrequency'
|
|
77
|
+
> & {
|
|
73
78
|
productTags: string;
|
|
74
79
|
};
|
|
75
80
|
|
|
@@ -109,7 +114,7 @@ export const WfoTasksPage = () => {
|
|
|
109
114
|
workflowId: {
|
|
110
115
|
columnType: ColumnType.DATA,
|
|
111
116
|
label: t('workflowId'),
|
|
112
|
-
width: '
|
|
117
|
+
width: '95px',
|
|
113
118
|
renderData: (value) => <WfoFirstPartUUID UUID={value} />,
|
|
114
119
|
renderDetails: (value) => value,
|
|
115
120
|
renderTooltip: (value) => value,
|
|
@@ -195,6 +200,16 @@ export const WfoTasksPage = () => {
|
|
|
195
200
|
));
|
|
196
201
|
},
|
|
197
202
|
},
|
|
203
|
+
scheduleFrequency: {
|
|
204
|
+
columnType: ColumnType.DATA,
|
|
205
|
+
label: t('scheduled'),
|
|
206
|
+
renderData: (_, taskListItem) => (
|
|
207
|
+
<WfoScheduledTasksBadgesContainer
|
|
208
|
+
workflowId={taskListItem.workflowId}
|
|
209
|
+
/>
|
|
210
|
+
),
|
|
211
|
+
width: '80px',
|
|
212
|
+
},
|
|
198
213
|
createdAt: {
|
|
199
214
|
columnType: ColumnType.DATA,
|
|
200
215
|
label: t('createdAt'),
|
|
@@ -214,6 +229,7 @@ export const WfoTasksPage = () => {
|
|
|
214
229
|
sortBy: graphQlTaskListMapper(sortBy),
|
|
215
230
|
query: queryString || undefined,
|
|
216
231
|
};
|
|
232
|
+
|
|
217
233
|
const { data, isFetching, error } = useGetTasksQuery(
|
|
218
234
|
taskListQueryVariables,
|
|
219
235
|
);
|
|
@@ -246,6 +262,7 @@ export const WfoTasksPage = () => {
|
|
|
246
262
|
tasksResponse: TasksResponse,
|
|
247
263
|
): TaskListExportItem[] => {
|
|
248
264
|
const { tasks } = tasksResponse;
|
|
265
|
+
|
|
249
266
|
return tasks.map(
|
|
250
267
|
({
|
|
251
268
|
workflowId,
|
|
@@ -18,6 +18,7 @@ export const mapTaskDefinitionToTaskListItem = (
|
|
|
18
18
|
target,
|
|
19
19
|
createdAt,
|
|
20
20
|
productTags,
|
|
21
|
+
scheduleFrequency: [],
|
|
21
22
|
};
|
|
22
23
|
});
|
|
23
24
|
|
|
@@ -27,6 +28,8 @@ export const taskFieldMapper = (
|
|
|
27
28
|
switch (field) {
|
|
28
29
|
case 'productTags':
|
|
29
30
|
return 'productTag' as keyof TaskDefinition;
|
|
31
|
+
case 'scheduleFrequency':
|
|
32
|
+
return 'scheduleFrequency' as keyof TaskDefinition;
|
|
30
33
|
default:
|
|
31
34
|
return field;
|
|
32
35
|
}
|
|
@@ -230,7 +230,7 @@ export const WfoProcessDetail = ({
|
|
|
230
230
|
<WfoRefresh
|
|
231
231
|
color={
|
|
232
232
|
retryButtonIsDisabled
|
|
233
|
-
? theme.colors.
|
|
233
|
+
? theme.colors.textSubdued
|
|
234
234
|
: theme.colors.link
|
|
235
235
|
}
|
|
236
236
|
/>
|
|
@@ -247,7 +247,7 @@ export const WfoProcessDetail = ({
|
|
|
247
247
|
<WfoXCircleFill
|
|
248
248
|
color={
|
|
249
249
|
abortButtonIsDisabled
|
|
250
|
-
? theme.colors.
|
|
250
|
+
? theme.colors.textSubdued
|
|
251
251
|
: theme.colors.danger
|
|
252
252
|
}
|
|
253
253
|
/>
|
|
@@ -269,7 +269,7 @@ export const WfoProcessDetail = ({
|
|
|
269
269
|
<WfoXCircleFill
|
|
270
270
|
color={
|
|
271
271
|
deleteButtonIsDisabled
|
|
272
|
-
? theme.colors.
|
|
272
|
+
? theme.colors.textSubdued
|
|
273
273
|
: theme.colors.danger
|
|
274
274
|
}
|
|
275
275
|
/>
|
|
@@ -74,7 +74,7 @@ export const WfoProcessListSubscriptionsCell: FC<
|
|
|
74
74
|
|
|
75
75
|
{numberOfNotVisibleSubscriptions > 0 && (
|
|
76
76
|
<WfoBadge
|
|
77
|
-
textColor={theme.colors.
|
|
77
|
+
textColor={theme.colors.textPrimary}
|
|
78
78
|
color={toSecondaryColor(theme.colors.primary)}
|
|
79
79
|
onClick={() => onMoreSubscriptionsClick()}
|
|
80
80
|
iconOnClick={() => onMoreSubscriptionsClick()}
|
|
@@ -160,7 +160,12 @@ export const WfoStartProcessPage = ({
|
|
|
160
160
|
timelineItems={timeLineItems}
|
|
161
161
|
isLoading={isLoading}
|
|
162
162
|
>
|
|
163
|
-
<EuiPanel
|
|
163
|
+
<EuiPanel
|
|
164
|
+
css={{
|
|
165
|
+
backgroundColor: theme.colors.backgroundBaseNeutral,
|
|
166
|
+
marginTop: theme.base * 3,
|
|
167
|
+
}}
|
|
168
|
+
>
|
|
164
169
|
<EuiFlexGroup css={getStepHeaderStyle(false)}>
|
|
165
170
|
<WfoStepStatusIcon stepStatus={StepStatus.FORM} />
|
|
166
171
|
|
|
@@ -151,7 +151,7 @@ export const WfoTasksListPage = () => {
|
|
|
151
151
|
<EuiButton
|
|
152
152
|
onClick={handleRerunAllButtonClick}
|
|
153
153
|
iconType={() => (
|
|
154
|
-
<WfoRefresh color={theme.colors.
|
|
154
|
+
<WfoRefresh color={theme.colors.textPrimary} />
|
|
155
155
|
)}
|
|
156
156
|
>
|
|
157
157
|
{t('rerunAll')}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { orchestratorApi } from '@/rtk';
|
|
2
|
+
import {
|
|
3
|
+
BaseGraphQlResult,
|
|
4
|
+
GraphqlQueryVariables,
|
|
5
|
+
ScheduledTaskDefinition,
|
|
6
|
+
ScheduledTasksDefinitionsResult,
|
|
7
|
+
} from '@/types';
|
|
8
|
+
|
|
9
|
+
export const scheduledTasks = `
|
|
10
|
+
query ScheduledTasks(
|
|
11
|
+
$first: Int!
|
|
12
|
+
$after: Int!
|
|
13
|
+
$sortBy: [GraphqlSort!]
|
|
14
|
+
) {
|
|
15
|
+
scheduledTasks(first: $first, after: $after, sortBy: $sortBy) {
|
|
16
|
+
page {
|
|
17
|
+
id
|
|
18
|
+
name
|
|
19
|
+
nextRunTime
|
|
20
|
+
trigger
|
|
21
|
+
workflowId
|
|
22
|
+
}
|
|
23
|
+
pageInfo {
|
|
24
|
+
endCursor
|
|
25
|
+
hasNextPage
|
|
26
|
+
hasPreviousPage
|
|
27
|
+
startCursor
|
|
28
|
+
totalItems
|
|
29
|
+
sortFields
|
|
30
|
+
filterFields
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
export type ScheduledTasksResponse = {
|
|
37
|
+
schedules: ScheduledTaskDefinition[];
|
|
38
|
+
} & BaseGraphQlResult;
|
|
39
|
+
|
|
40
|
+
const scheduledTasksApi = orchestratorApi.injectEndpoints({
|
|
41
|
+
endpoints: (builder) => ({
|
|
42
|
+
getScheduledTasks: builder.query<
|
|
43
|
+
ScheduledTasksResponse,
|
|
44
|
+
GraphqlQueryVariables<ScheduledTaskDefinition>
|
|
45
|
+
>({
|
|
46
|
+
query: (variables) => ({
|
|
47
|
+
document: scheduledTasks,
|
|
48
|
+
variables,
|
|
49
|
+
}),
|
|
50
|
+
transformResponse: (
|
|
51
|
+
response: ScheduledTasksDefinitionsResult,
|
|
52
|
+
): ScheduledTasksResponse => {
|
|
53
|
+
const schedules = response.scheduledTasks.page || [];
|
|
54
|
+
const pageInfo = response.scheduledTasks.pageInfo || {};
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
schedules,
|
|
58
|
+
pageInfo,
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
}),
|
|
62
|
+
}),
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
export const { useGetScheduledTasksQuery, useLazyGetScheduledTasksQuery } =
|
|
66
|
+
scheduledTasksApi;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { WfoThemeHelpers } from '@/hooks';
|
|
4
4
|
|
|
5
|
-
export const getFormFieldsBaseStyle = ({ theme }:
|
|
5
|
+
export const getFormFieldsBaseStyle = ({ theme }: WfoThemeHelpers) => {
|
|
6
6
|
const formFieldBaseStyle = css({
|
|
7
|
-
backgroundColor: theme.colors.
|
|
8
|
-
color: theme.colors.
|
|
9
|
-
'&:focus': {
|
|
10
|
-
backgroundColor: theme.colors.
|
|
7
|
+
backgroundColor: theme.colors.backgroundBaseSubdued,
|
|
8
|
+
color: theme.colors.textParagraph,
|
|
9
|
+
'&:focus, &:focus-visible, &:focus-within': {
|
|
10
|
+
backgroundColor: theme.colors.backgroundBaseNeutral,
|
|
11
|
+
boxShadow: `0 0 0 1px ${theme.colors.primary}`,
|
|
11
12
|
},
|
|
13
|
+
// boxShadow: `0 0 0 1px ${theme.colors.borderBaseSubdued} !important`,
|
|
12
14
|
});
|
|
13
15
|
|
|
14
16
|
return {
|
package/src/theme/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './baseStyles';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './wfoThemeModifications';
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { EuiThemeComputed, EuiThemeModifications } from '@elastic/eui';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
shadeOrchestratorColor,
|
|
5
|
+
tintOrchestratorColor,
|
|
6
|
+
} from '../hooks/useOrchestratorTheme';
|
|
7
|
+
|
|
8
|
+
type WfoThemeExtraColors = {
|
|
9
|
+
colors: {
|
|
10
|
+
LIGHT: {
|
|
11
|
+
header: string;
|
|
12
|
+
};
|
|
13
|
+
DARK: {
|
|
14
|
+
header: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type WfoComputedModifications = {
|
|
20
|
+
colors: {
|
|
21
|
+
header: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
type WfoThemeModifications = EuiThemeModifications<WfoThemeExtraColors>;
|
|
26
|
+
|
|
27
|
+
export type WfoComputedTheme = EuiThemeComputed<WfoComputedModifications>;
|
|
28
|
+
|
|
29
|
+
/*
|
|
30
|
+
* Eui's default theme is Borealis. This is applied automatically. These are the modifications passed into modify
|
|
31
|
+
* property when calling EuiProvider
|
|
32
|
+
*/
|
|
33
|
+
export const wfoThemeModifications: WfoThemeModifications = {
|
|
34
|
+
base: 16,
|
|
35
|
+
breakpoint: {
|
|
36
|
+
xs: 0,
|
|
37
|
+
s: 575,
|
|
38
|
+
m: 768,
|
|
39
|
+
l: 992,
|
|
40
|
+
xl: 1200,
|
|
41
|
+
xxl: 1600,
|
|
42
|
+
},
|
|
43
|
+
size: {
|
|
44
|
+
base: '16px',
|
|
45
|
+
xxs: '2px',
|
|
46
|
+
xs: '4px',
|
|
47
|
+
s: '8px',
|
|
48
|
+
m: '12px',
|
|
49
|
+
l: '24px',
|
|
50
|
+
xl: '32px',
|
|
51
|
+
xxl: '40px',
|
|
52
|
+
xxxl: '48px',
|
|
53
|
+
xxxxl: '64px',
|
|
54
|
+
},
|
|
55
|
+
colors: {
|
|
56
|
+
DARK: {
|
|
57
|
+
accent: '#E67300',
|
|
58
|
+
backgroundBaseAccent: '#9CA3AF',
|
|
59
|
+
backgroundBaseDisabled: '#1F2937',
|
|
60
|
+
backgroundBaseNeutral: '#101827',
|
|
61
|
+
backgroundBaseSubdued: '#1F2937',
|
|
62
|
+
backgroundBasePlain: '#1F2937',
|
|
63
|
+
borderBasePlain: '#4B5563',
|
|
64
|
+
borderBaseSubdued: '#374151',
|
|
65
|
+
danger: '#FF4F46',
|
|
66
|
+
header: '#04385F',
|
|
67
|
+
highlight: '#51482F',
|
|
68
|
+
link: '#1F8DD8',
|
|
69
|
+
primary: '#0077C8',
|
|
70
|
+
backgroundLightPrimary: shadeOrchestratorColor('#0077C8'),
|
|
71
|
+
backgroundFilledPrimary: '#0167ad',
|
|
72
|
+
backgroundFilledDanger: '#BD271F',
|
|
73
|
+
shadow: '#000000',
|
|
74
|
+
success: '#13B054',
|
|
75
|
+
textAccent: '#E67300',
|
|
76
|
+
textDanger: '#FF4F46',
|
|
77
|
+
textDisabled: '#515c69',
|
|
78
|
+
textHeading: '#ffffff',
|
|
79
|
+
textParagraph: '#FFFFFF',
|
|
80
|
+
textPrimary: '#1F8DD8',
|
|
81
|
+
textSubdued: '#9CA3AF',
|
|
82
|
+
textSuccess: '#13B054',
|
|
83
|
+
textWarning: '#FFC514',
|
|
84
|
+
warning: '#FFC514',
|
|
85
|
+
textInverse: '#FFFFFF',
|
|
86
|
+
},
|
|
87
|
+
LIGHT: {
|
|
88
|
+
accent: '#E67300',
|
|
89
|
+
backgroundBaseAccent: '#64758B',
|
|
90
|
+
backgroundBaseDisabled: '#f1f1f8',
|
|
91
|
+
backgroundBaseNeutral: '#FFFFFF',
|
|
92
|
+
backgroundBaseSubdued: '#f4f6fa',
|
|
93
|
+
backgroundBasePlain: '#FFFFFF',
|
|
94
|
+
borderBasePlain: '#CCD5E2',
|
|
95
|
+
borderBaseSubdued: '#CCD5E2',
|
|
96
|
+
danger: '#BD271F',
|
|
97
|
+
header: '#04385F',
|
|
98
|
+
highlight: '#FFF6DE',
|
|
99
|
+
link: '#0067AC',
|
|
100
|
+
primary: '#0077C8',
|
|
101
|
+
backgroundLightPrimary: tintOrchestratorColor('#0077C8'),
|
|
102
|
+
backgroundFilledPrimary: '#0077C8',
|
|
103
|
+
shadow: '#000000',
|
|
104
|
+
success: '#008939',
|
|
105
|
+
textAccent: '#B05200',
|
|
106
|
+
textDanger: '#AC0A01',
|
|
107
|
+
textDisabled: '#879bad',
|
|
108
|
+
textHeading: '#0F172B',
|
|
109
|
+
textParagraph: '#334255',
|
|
110
|
+
textPrimary: '#0067AC',
|
|
111
|
+
textSubdued: '#64758B',
|
|
112
|
+
textSuccess: '#007832',
|
|
113
|
+
textWarning: '#8E6A00',
|
|
114
|
+
warning: '#FFC514',
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
};
|
package/src/types/types.ts
CHANGED
|
@@ -278,8 +278,21 @@ export interface TaskDefinition {
|
|
|
278
278
|
createdAt: string;
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
+
export interface ScheduledTaskDefinition {
|
|
282
|
+
id: string;
|
|
283
|
+
name: string;
|
|
284
|
+
nextRunTime: string;
|
|
285
|
+
trigger: string;
|
|
286
|
+
workflowId: string;
|
|
287
|
+
}
|
|
288
|
+
|
|
281
289
|
//// Utility types
|
|
282
290
|
|
|
291
|
+
export enum ScheduleFrequency {
|
|
292
|
+
RECURRING = 'RECURRING',
|
|
293
|
+
ONCE = 'ONCE',
|
|
294
|
+
}
|
|
295
|
+
|
|
283
296
|
export enum SortOrder {
|
|
284
297
|
ASC = 'ASC',
|
|
285
298
|
DESC = 'DESC',
|
|
@@ -322,7 +335,9 @@ export type BaseGraphQlResult = {
|
|
|
322
335
|
export interface SubscriptionsResult<T = Subscription> {
|
|
323
336
|
subscriptions: GraphQlResultPage<T>;
|
|
324
337
|
}
|
|
325
|
-
|
|
338
|
+
export interface ProductDefinitionsResult<T = ProductDefinition> {
|
|
339
|
+
products: GraphQlResultPage<T>;
|
|
340
|
+
}
|
|
326
341
|
export interface SubscriptionDropdownOptionsResult {
|
|
327
342
|
subscriptions: GraphQlSinglePage<SubscriptionDropdownOption>;
|
|
328
343
|
}
|
|
@@ -331,8 +346,8 @@ export interface SubscriptionDetailResult {
|
|
|
331
346
|
subscriptions: GraphQlResultPage<SubscriptionDetail>;
|
|
332
347
|
}
|
|
333
348
|
|
|
334
|
-
export interface
|
|
335
|
-
|
|
349
|
+
export interface ScheduledTasksDefinitionsResult<T = ScheduledTaskDefinition> {
|
|
350
|
+
scheduledTasks: GraphQlResultPage<T>;
|
|
336
351
|
}
|
|
337
352
|
export interface StartProcessStep {
|
|
338
353
|
name: Step['name'];
|