@orchestrator-ui/orchestrator-ui-components 0.2.3 → 0.2.5
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/.storybook/main.js +1 -1
- package/.turbo/turbo-build.log +9 -7
- package/.turbo/turbo-lint.log +3 -6
- package/.turbo/turbo-test.log +17 -9
- package/CHANGELOG.md +12 -0
- package/dist/index.d.ts +1116 -359
- package/dist/index.js +23126 -6279
- package/jest.config.cjs +0 -1
- package/package.json +24 -8
- package/src/api/axios.ts +34 -0
- package/src/api/index.ts +170 -0
- package/src/components/WfoAuth/WfoAuth.tsx +22 -0
- package/src/components/WfoAuth/index.ts +1 -0
- package/src/components/{WFOBadges/WFOBadge/WFOBadge.stories.tsx → WfoBadges/WfoBadge/WfoBadge.stories.tsx} +5 -4
- package/src/components/{WFOBadges/WFOBadge/WFOBadge.tsx → WfoBadges/WfoBadge/WfoBadge.tsx} +4 -3
- package/src/components/WfoBadges/WfoBadge/index.ts +1 -0
- package/src/components/{WFOBadges/WFOEngineStatusBadge/WFOEngineStatusBadge.stories.tsx → WfoBadges/WfoEngineStatusBadge/WfoEngineStatusBadge.stories.tsx} +6 -4
- package/src/components/{WFOBadges/WFOEngineStatusBadge/WFOEngineStatusBadge.tsx → WfoBadges/WfoEngineStatusBadge/WfoEngineStatusBadge.tsx} +13 -7
- package/src/components/WfoBadges/WfoEngineStatusBadge/index.ts +1 -0
- package/src/components/{WFOBadges/WFOEnvironmentBadge/WFOEnvironmentBadge.stories.tsx → WfoBadges/WfoEnvironmentBadge/WfoEnvironmentBadge.stories.tsx} +6 -4
- package/src/components/{WFOBadges/WFOEnvironmentBadge/WFOEnvironmentBadge.tsx → WfoBadges/WfoEnvironmentBadge/WfoEnvironmentBadge.tsx} +8 -7
- package/src/components/WfoBadges/WfoEnvironmentBadge/index.ts +1 -0
- package/src/components/WfoBadges/WfoFailedTasksBadge/WfoFailedTasksBadge.stories.tsx +13 -0
- package/src/components/WfoBadges/WfoFailedTasksBadge/WfoFailedTasksBadge.tsx +95 -0
- package/src/components/WfoBadges/WfoFailedTasksBadge/index.ts +1 -0
- package/src/components/{WFOBadges/WFOHeaderBadge/WFOHeaderBadge.stories.tsx → WfoBadges/WfoHeaderBadge/WfoHeaderBadge.stories.tsx} +6 -4
- package/src/components/{WFOBadges/WFOHeaderBadge/WFOHeaderBadge.tsx → WfoBadges/WfoHeaderBadge/WfoHeaderBadge.tsx} +6 -4
- package/src/components/WfoBadges/WfoHeaderBadge/index.ts +1 -0
- package/src/components/{WFOBadges/WFOProcessStatusBadge/WFOProcessStatusBadge.tsx → WfoBadges/WfoProcessStatusBadge/WfoProcessStatusBadge.tsx} +8 -6
- package/src/components/WfoBadges/WfoProcessStatusBadge/index.ts +1 -0
- package/src/components/WfoBadges/WfoProductBlockBadge/WfoProductBlockBadge.stories.tsx +16 -0
- package/src/components/WfoBadges/WfoProductBlockBadge/WfoProductBlockBadge.tsx +70 -0
- package/src/components/WfoBadges/WfoProductBlockBadge/index.ts +1 -0
- package/src/components/WfoBadges/WfoProductStatusBadge/WfoProductStatusBadge.stories.tsx +22 -0
- package/src/components/WfoBadges/WfoProductStatusBadge/WfoProductStatusBadge.tsx +53 -0
- package/src/components/WfoBadges/WfoProductStatusBadge/index.ts +1 -0
- package/src/components/{WFOBadges/WFOStatusBadge/WFOStatusBadge.stories.tsx → WfoBadges/WfoSubscriptionStatusBadge/WfoSubscriptionStatusBadge.stories.tsx} +5 -4
- package/src/components/{WFOBadges/WFOStatusBadge/WFOStatusBadge.tsx → WfoBadges/WfoSubscriptionStatusBadge/WfoSubscriptionStatusBadge.tsx} +14 -10
- package/src/components/WfoBadges/WfoSubscriptionStatusBadge/index.ts +1 -0
- package/src/components/WfoBadges/WfoWorkflowTargetBadge/WfoWorkflowTargetBadge.tsx +65 -0
- package/src/components/WfoBadges/WfoWorkflowTargetBadge/index.ts +1 -0
- package/src/components/WfoBadges/index.ts +9 -0
- package/src/components/WfoButtonComboBox/WfoButtonComboBox.tsx +76 -0
- package/src/components/WfoButtonComboBox/styles.ts +13 -0
- package/src/components/WfoDateTime/WfoDateTime.tsx +28 -0
- package/src/components/WfoDateTime/index.ts +1 -0
- package/src/components/WfoDropdownButton/WfoDropdownButton.tsx +67 -0
- package/src/components/WfoDropdownButton/index.ts +1 -0
- package/src/components/{WFOFilterTabs/WFOFilterTabs.tsx → WfoFilterTabs/WfoFilterTabs.tsx} +8 -6
- package/src/components/WfoFilterTabs/index.ts +1 -0
- package/src/components/WfoForms/AutoFieldLoader.tsx +110 -0
- package/src/components/WfoForms/AutoFields.tsx +49 -0
- package/src/components/WfoForms/CreateForm.tsx +71 -0
- package/src/components/WfoForms/UserInputForm.tsx +607 -0
- package/src/components/WfoForms/UserInputFormStyling.ts +80 -0
- package/src/components/WfoForms/UserInputFormWizard.tsx +120 -0
- package/src/components/WfoForms/formFields/AcceptField.tsx +239 -0
- package/src/components/WfoForms/formFields/AcceptFieldStyling.ts +29 -0
- package/src/components/WfoForms/formFields/BoolField.tsx +71 -0
- package/src/components/WfoForms/formFields/BoolFieldStyling.ts +68 -0
- package/src/components/WfoForms/formFields/ContactPersonAutocomplete.tsx +97 -0
- package/src/components/WfoForms/formFields/ContactPersonAutocompleteStyles.ts +40 -0
- package/src/components/WfoForms/formFields/ContactPersonNameField.tsx +253 -0
- package/src/components/WfoForms/formFields/DateField.tsx +72 -0
- package/src/components/WfoForms/formFields/DividerField.tsx +29 -0
- package/src/components/WfoForms/formFields/ErrorField.tsx +40 -0
- package/src/components/WfoForms/formFields/ErrorsField.tsx +34 -0
- package/src/components/WfoForms/formFields/ImsNodeIdField.tsx +110 -0
- package/src/components/WfoForms/formFields/IpNetworkField.tsx +128 -0
- package/src/components/WfoForms/formFields/IpPrefixTableField.tsx +454 -0
- package/src/components/WfoForms/formFields/IpPrefixTableFieldStyling.ts +117 -0
- package/src/components/WfoForms/formFields/LabelField.tsx +39 -0
- package/src/components/WfoForms/formFields/ListAddField.tsx +98 -0
- package/src/components/WfoForms/formFields/ListDelField.tsx +95 -0
- package/src/components/WfoForms/formFields/ListField.tsx +113 -0
- package/src/components/WfoForms/formFields/ListItemField.tsx +40 -0
- package/src/components/WfoForms/formFields/ListSelectField.tsx +92 -0
- package/src/components/WfoForms/formFields/LocationCodeField.tsx +66 -0
- package/src/components/WfoForms/formFields/LongTextField.tsx +68 -0
- package/src/components/WfoForms/formFields/NestField.tsx +107 -0
- package/src/components/WfoForms/formFields/NumField.tsx +75 -0
- package/src/components/WfoForms/formFields/OptGroupField.tsx +74 -0
- package/src/components/WfoForms/formFields/OrganisationField.tsx +57 -0
- package/src/components/WfoForms/formFields/ProductField.tsx +78 -0
- package/src/components/WfoForms/formFields/RadioField.tsx +87 -0
- package/src/components/WfoForms/formFields/SelectField.tsx +152 -0
- package/src/components/WfoForms/formFields/SplitPrefix.tsx +163 -0
- package/src/components/WfoForms/formFields/SplitPrefixStyling.ts +11 -0
- package/src/components/WfoForms/formFields/SubmitField.tsx +50 -0
- package/src/components/WfoForms/formFields/SubscriptionField.tsx +351 -0
- package/src/components/WfoForms/formFields/SubscriptionFieldStyling.ts +33 -0
- package/src/components/WfoForms/formFields/SubscriptionSummaryField.tsx +75 -0
- package/src/components/WfoForms/formFields/TextField.tsx +71 -0
- package/src/components/WfoForms/formFields/TimestampField.tsx +103 -0
- package/src/components/WfoForms/formFields/VlanField.tsx +297 -0
- package/src/components/WfoForms/formFields/index.ts +29 -0
- package/src/components/WfoForms/formFields/listFieldStyling.ts +86 -0
- package/src/components/WfoForms/formFields/reactSelectStyles.ts +45 -0
- package/src/components/WfoForms/formFields/surf/types.ts +53 -0
- package/src/components/WfoForms/formFields/surf/utils.ts +1 -0
- package/src/components/WfoForms/formFields/types.ts +50 -0
- package/src/components/WfoForms/formFields/utils.spec.ts +196 -0
- package/src/components/WfoForms/formFields/utils.ts +65 -0
- package/src/components/WfoForms/index.ts +5 -0
- package/src/components/WfoForms/useAxiosApiClient.ts +8 -0
- package/src/components/WfoInsyncIcon/WfoInsyncIcon.stories.tsx +21 -0
- package/src/components/WfoInsyncIcon/WfoInsyncIcon.tsx +26 -0
- package/src/components/WfoInsyncIcon/index.ts +1 -0
- package/src/components/WfoJsonCodeBlock/WfoJsonCodeBlock.tsx +27 -0
- package/src/components/WfoJsonCodeBlock/styles.ts +13 -0
- package/src/components/WfoKeyValueTable/WfoKeyCell.tsx +25 -0
- package/src/components/WfoKeyValueTable/WfoKeyValueTable.tsx +41 -0
- package/src/components/WfoKeyValueTable/WfoValueCell.tsx +53 -0
- package/src/components/WfoKeyValueTable/index.ts +3 -0
- package/src/components/WfoKeyValueTable/styles.ts +77 -0
- package/src/components/WfoLoading/WfoLoading.tsx +3 -0
- package/src/components/WfoLoading/index.ts +1 -0
- package/src/components/WfoNoResults/WfoNoResults.stories.tsx +19 -0
- package/src/components/WfoNoResults/WfoNoResults.tsx +22 -0
- package/src/components/WfoNoResults/index.ts +1 -0
- package/src/components/WfoNoResults/styles.ts +22 -0
- package/src/components/WfoPageHeader/WfoPageHeader.tsx +25 -0
- package/src/components/{WFOBreadcrumbs/WFOBreadcrumbs.tsx → WfoPageTemplate/WfoBreadcrumbs/WfoBreadcrumbs.tsx} +6 -3
- package/src/components/WfoPageTemplate/WfoBreadcrumbs/index.ts +1 -0
- package/src/components/{WFOPageTemplate/WFOPageHeader/WFOPageHeader.stories.tsx → WfoPageTemplate/WfoPageHeader/WfoPageHeader.stories.tsx} +7 -5
- package/src/components/{WFOPageTemplate/WFOPageHeader/WFOPageHeader.tsx → WfoPageTemplate/WfoPageHeader/WfoPageHeader.tsx} +26 -11
- package/src/components/WfoPageTemplate/WfoPageHeader/index.ts +1 -0
- package/src/components/{WFOPageTemplate/WFOPageTemplate/WFOPageTemplate.stories.tsx → WfoPageTemplate/WfoPageTemplate/WfoPageTemplate.stories.tsx} +8 -6
- package/src/components/{WFOPageTemplate/WFOPageTemplate/WFOPageTemplate.tsx → WfoPageTemplate/WfoPageTemplate/WfoPageTemplate.tsx} +20 -8
- package/src/components/WfoPageTemplate/WfoPageTemplate/index.ts +1 -0
- package/src/components/{WFOPageTemplate/WFOSidebar/WFOSidebar.stories.tsx → WfoPageTemplate/WfoSidebar/WfoSidebar.stories.tsx} +6 -4
- package/src/components/WfoPageTemplate/WfoSidebar/WfoSidebar.tsx +161 -0
- package/src/components/WfoPageTemplate/WfoSidebar/WfoStartCreateWorkflowButtonComboBox.tsx +58 -0
- package/src/components/WfoPageTemplate/WfoSidebar/index.ts +1 -0
- package/src/components/WfoPageTemplate/index.ts +4 -0
- package/src/components/WfoPageTemplate/paths.ts +11 -0
- package/src/components/WfoProcessesList/WfoProcessList.tsx +227 -0
- package/src/components/WfoProcessesList/processListObjectMappers.ts +79 -0
- package/src/components/{WFOSearchBar/WFOSearchField.tsx → WfoSearchBar/WfoSearchField.tsx} +4 -3
- package/src/components/WfoSearchBar/index.ts +1 -0
- package/src/components/WfoSettingsModal/WfoInformationModal.tsx +41 -0
- package/src/components/{WFOSettingsModal/WFOSettingsModal.tsx → WfoSettingsModal/WfoSettingsModal.tsx} +3 -2
- package/src/components/WfoSettingsModal/index.tsx +2 -0
- package/src/components/{WFOSettingsPage/WFOEngineStatusButton.tsx → WfoSettingsPage/WfoEngineStatusButton.tsx} +5 -3
- package/src/components/{WFOSettingsPage/WFOFlushSettings.tsx → WfoSettingsPage/WfoFlushSettings.tsx} +19 -30
- package/src/components/{WFOSettingsPage/WFOModifySettings.tsx → WfoSettingsPage/WfoModifySettings.tsx} +7 -5
- package/src/components/{WFOSettingsPage/WFOSettings.tsx → WfoSettingsPage/WfoSettings.tsx} +12 -8
- package/src/components/{WFOSettingsPage/WFOStatus.tsx → WfoSettingsPage/WfoStatus.tsx} +8 -6
- package/src/components/WfoSettingsPage/index.ts +1 -0
- package/src/components/{WFOStartPage/WFOFrequentlyUsed.stories.tsx → WfoStartPage/WfoFrequentlyUsed.stories.tsx} +5 -4
- package/src/components/{WFOStartPage/WFOFrequentlyUsed.tsx → WfoStartPage/WfoFrequentlyUsed.tsx} +4 -3
- package/src/components/{WFOStartPage/WFOListItemStartPage.stories.tsx → WfoStartPage/WfoListItemStartPage.stories.tsx} +6 -4
- package/src/components/{WFOStartPage/WFOListItemStartPage.tsx → WfoStartPage/WfoListItemStartPage.tsx} +9 -6
- package/src/components/{WFOStartPage/WFOListStartPage.stories.tsx → WfoStartPage/WfoListStartPage.stories.tsx} +6 -4
- package/src/components/{WFOStartPage/WFOListStartPage.tsx → WfoStartPage/WfoListStartPage.tsx} +7 -5
- package/src/components/{WFOStartPage/WFOMultiListSection.stories.tsx → WfoStartPage/WfoMultiListSection.stories.tsx} +5 -4
- package/src/components/{WFOStartPage/WFOMultiListSection.tsx → WfoStartPage/WfoMultiListSection.tsx} +7 -5
- package/src/components/WfoStartPage/WfoNewProcessPanel.stories.tsx +13 -0
- package/src/components/{WFOStartPage/WFONewProcessPanel.tsx → WfoStartPage/WfoNewProcessPanel.tsx} +5 -3
- package/src/components/WfoStartPage/WfoStatCards.stories.tsx +13 -0
- package/src/components/{WFOStartPage/WFOStatCards.tsx → WfoStartPage/WfoStatCards.tsx} +4 -2
- package/src/components/WfoStartPage/index.ts +6 -0
- package/src/components/WfoStartTaskButtonComboBox/WfoStartTaskButtonComboBox.tsx +51 -0
- package/src/components/WfoStartTaskButtonComboBox/index.ts +1 -0
- package/src/components/WfoSubscription/SubscriptionKeyValueBlock.tsx +46 -0
- package/src/components/WfoSubscription/WfoProcessesTimeline.tsx +158 -0
- package/src/components/WfoSubscription/WfoRelatedSubscriptions.tsx +192 -0
- package/src/components/WfoSubscription/WfoSubscription.tsx +145 -0
- package/src/components/WfoSubscription/WfoSubscriptionActions.tsx +236 -0
- package/src/components/WfoSubscription/WfoSubscriptionDetailTree.tsx +161 -0
- package/src/components/WfoSubscription/WfoSubscriptionGeneral.tsx +147 -0
- package/src/components/WfoSubscription/WfoSubscriptionProductBlock.tsx +207 -0
- package/src/components/WfoSubscription/index.ts +8 -0
- package/src/components/WfoSubscription/styles.ts +104 -0
- package/src/components/WfoSubscription/utils/index.ts +1 -0
- package/src/components/WfoSubscription/utils/utils.spec.ts +168 -0
- package/src/components/WfoSubscription/utils/utils.ts +76 -0
- package/src/components/WfoSubscriptionsList/WfoSubscriptionsList.tsx +205 -0
- package/src/components/WfoSubscriptionsList/index.ts +3 -0
- package/src/components/WfoSubscriptionsList/mapGrapghQlSubscriptionsResultToSubscriptionListItems.ts +43 -0
- package/src/{pages/subscriptions → components/WfoSubscriptionsList}/subscriptionListTabs.ts +18 -18
- package/src/components/WfoTable/WfoBasicTable/WfoBasicTable.tsx +178 -0
- package/src/components/{WFOTable/WFOSortDirectionIcon.tsx → WfoTable/WfoBasicTable/WfoSortDirectionIcon.tsx} +8 -8
- package/src/components/WfoTable/WfoBasicTable/WfoStatusColorField.tsx +21 -0
- package/src/components/WfoTable/WfoBasicTable/WfoTableHeaderCell.tsx +120 -0
- package/src/components/WfoTable/WfoBasicTable/index.ts +4 -0
- package/src/components/WfoTable/WfoBasicTable/styles.ts +73 -0
- package/src/components/{WFOTable/WFODataGridTable/WFODataGridTable.stories.tsx → WfoTable/WfoDataGridTable/WfoDataGridTable.stories.tsx} +9 -7
- package/src/components/{WFOTable/WFODataGridTable/WFODataGridTable.tsx → WfoTable/WfoDataGridTable/WfoDataGridTable.tsx} +23 -21
- package/src/components/{WFOTable/WFODataGridTable/WFOdataGridColumns.spec.ts → WfoTable/WfoDataGridTable/WfodataGridColumns.spec.ts} +7 -7
- package/src/components/{WFOTable/WFODataGridTable/WFOdataGridColumns.ts → WfoTable/WfoDataGridTable/WfodataGridColumns.ts} +8 -7
- package/src/components/WfoTable/WfoFirstPartUUID/WfoFirstPartUUID.tsx +11 -0
- package/src/components/WfoTable/WfoFirstPartUUID/index.ts +1 -0
- package/src/components/WfoTable/WfoSortButtons/WfoSortButton.tsx +31 -0
- package/src/components/WfoTable/WfoSortButtons/WfoSortButtons.tsx +33 -0
- package/src/components/WfoTable/WfoSortButtons/index.ts +2 -0
- package/src/components/WfoTable/WfoSortButtons/styles.ts +20 -0
- package/src/components/{WFOTable/WFOTableSettingsModal/WFOTableSettingsModal.tsx → WfoTable/WfoTableSettingsModal/WfoTableSettingsModal.tsx} +5 -3
- package/src/components/WfoTable/WfoTableSettingsModal/index.ts +1 -0
- package/src/components/WfoTable/WfoTableWithFilter/WfoTableWithFilter.tsx +253 -0
- package/src/components/WfoTable/WfoTableWithFilter/index.ts +1 -0
- package/src/components/WfoTable/index.ts +15 -0
- package/src/components/{WFOTable → WfoTable}/utils/columns.ts +27 -16
- package/src/components/{WFOTable → WfoTable}/utils/constants.ts +5 -1
- package/src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.spec.ts +52 -0
- package/src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.ts +21 -0
- package/src/components/{WFOTable → WfoTable}/utils/tableConfigPersistence.spec.ts +4 -4
- package/src/components/{WFOTable → WfoTable}/utils/tableConfigPersistence.ts +12 -16
- package/src/components/{WFOTable → WfoTable}/utils/tableUtils.spec.ts +1 -1
- package/src/components/{WFOTable → WfoTable}/utils/tableUtils.ts +6 -25
- package/src/components/WfoTimeline/WfoTimeline.tsx +69 -0
- package/src/components/WfoTimeline/WfoTimelineStep.tsx +57 -0
- package/src/components/WfoTimeline/index.ts +1 -0
- package/src/components/WfoTimeline/mapProcessStepStatusToEuiStepStatus.ts +23 -0
- package/src/components/WfoTimeline/styles.ts +165 -0
- package/src/components/WfoTimeline/timelineUtils.ts +14 -0
- package/src/components/WfoToastsList/WfoToastsList.tsx +22 -0
- package/src/components/WfoToastsList/index.ts +1 -0
- package/src/components/WfoTree/WfoTree.tsx +27 -0
- package/src/components/{WFOTree/WFOTreeBranch.tsx → WfoTree/WfoTreeBranch.tsx} +7 -6
- package/src/components/{WFOTree/WFOTreeNode.tsx → WfoTree/WfoTreeNode.tsx} +28 -13
- package/src/components/WfoTree/index.ts +4 -0
- package/src/components/WfoTree/styles.ts +18 -0
- package/src/components/WfoTree/treeUtils.spec.ts +100 -0
- package/src/components/WfoTree/treeUtils.ts +21 -0
- package/src/components/WfoWorkflowSteps/WfoStep/WfoStep.stories.tsx +13 -0
- package/src/components/WfoWorkflowSteps/WfoStep/WfoStep.tsx +167 -0
- package/src/components/WfoWorkflowSteps/WfoStep/index.ts +1 -0
- package/src/components/WfoWorkflowSteps/WfoStepList/WfoStepList.tsx +107 -0
- package/src/components/WfoWorkflowSteps/WfoStepList/index.ts +1 -0
- package/src/components/WfoWorkflowSteps/WfoStepStatusIcon/WfoStepStatusIcon.stories.tsx +16 -0
- package/src/components/WfoWorkflowSteps/WfoStepStatusIcon/WfoStepStatusIcon.tsx +114 -0
- package/src/components/WfoWorkflowSteps/WfoStepStatusIcon/index.ts +1 -0
- package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoStepListHeader.tsx +139 -0
- package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoWorkflowStepList.stories.tsx +56 -0
- package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoWorkflowStepList.tsx +121 -0
- package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/index.ts +2 -0
- package/src/components/WfoWorkflowSteps/index.ts +4 -0
- package/src/components/WfoWorkflowSteps/stepListUtils.spec.ts +26 -0
- package/src/components/WfoWorkflowSteps/stepListUtils.ts +56 -0
- package/src/components/WfoWorkflowSteps/styles.ts +121 -0
- package/src/components/confirmationDialog/ConfirmationDialogStyling.ts +12 -0
- package/src/components/confirmationDialog/WfoConfirmationDialog.tsx +112 -0
- package/src/components/confirmationDialog/index.ts +1 -0
- package/src/components/index.ts +19 -11
- package/src/contexts/ApiClientContext.tsx +30 -0
- package/src/contexts/ConfirmationDialogProvider.tsx +99 -0
- package/src/contexts/OrchestratorConfigContext.tsx +8 -3
- package/src/contexts/ToastContext.tsx +136 -0
- package/src/contexts/TreeContext.tsx +53 -32
- package/src/contexts/index.ts +3 -1
- package/src/graphqlQueries/customersQuery.ts +19 -0
- package/src/graphqlQueries/index.ts +6 -1
- package/src/graphqlQueries/processDetailQuery.ts +45 -0
- package/src/graphqlQueries/processListQuery.ts +19 -12
- package/src/graphqlQueries/productBlocksQuery.ts +13 -1
- package/src/graphqlQueries/productsQuery.ts +7 -4
- package/src/graphqlQueries/relatedSubscriptionsQuery.ts +65 -0
- package/src/graphqlQueries/resourceTypesQuery.ts +13 -2
- package/src/graphqlQueries/subscriptionDetailQuery.ts +62 -0
- package/src/graphqlQueries/subscriptionsDropdownOptionsQuery.ts +47 -0
- package/src/graphqlQueries/subscriptionsListQuery.ts +59 -0
- package/src/graphqlQueries/{workflowsQuery.ts → workflows/workflowsQuery.ts} +10 -5
- package/src/graphqlQueries/workflows/workflowsQueryForDropdownList.ts +41 -0
- package/src/hooks/DataFetchHooks.ts +72 -49
- package/src/hooks/ProcessesHooks/useDeleteProcess.ts +37 -0
- package/src/hooks/index.ts +4 -1
- package/src/hooks/surf/useGetSubscriptionDropdownOptions.ts +47 -0
- package/src/hooks/surf/useIsTaggedPort.ts +29 -0
- package/src/hooks/useDataDisplayParams.ts +1 -1
- package/src/hooks/useEngineStatusQuery.ts +20 -10
- package/src/hooks/useOrchestratorConfig.ts +6 -2
- package/src/hooks/useProcessStatusCountsQuery.ts +8 -23
- package/src/hooks/useQueryWithFetch.ts +33 -0
- package/src/hooks/useQueryWithGraphql.ts +18 -13
- package/src/hooks/useSessionWithToken.ts +14 -0
- package/src/hooks/useStoredTableConfig.ts +43 -0
- package/src/hooks/useSubscriptionActions.ts +3 -3
- package/src/hooks/useToastMessage.ts +5 -0
- package/src/hooks/useWithOrchestratorTheme.ts +10 -0
- package/src/icons/WfoArrowNarrowDown.stories.tsx +13 -0
- package/src/icons/{WFOArrowNarrowDown.tsx → WfoArrowNarrowDown.tsx} +4 -2
- package/src/icons/WfoArrowNarrowUp.stories.tsx +13 -0
- package/src/icons/{WFOArrowNarrowUp.tsx → WfoArrowNarrowUp.tsx} +4 -2
- package/src/icons/WfoArrowsExpand.stories.tsx +13 -0
- package/src/icons/WfoArrowsExpand.tsx +33 -0
- package/src/icons/WfoCheckmarkCircleFill.stories.tsx +13 -0
- package/src/icons/{WFOCheckmarkCircleFill.tsx → WfoCheckmarkCircleFill.tsx} +3 -2
- package/src/icons/WfoChevronDown.stories.tsx +13 -0
- package/src/icons/{WFOChevronDown.tsx → WfoChevronDown.tsx} +3 -2
- package/src/icons/WfoChevronUp.stories.tsx +13 -0
- package/src/icons/WfoChevronUp.tsx +33 -0
- package/src/icons/WfoClipboardCopy.stories.tsx +13 -0
- package/src/icons/WfoClipboardCopy.tsx +33 -0
- package/src/icons/WfoCode.stories.tsx +13 -0
- package/src/icons/WfoCode.tsx +35 -0
- package/src/icons/WfoCogFill.stories.tsx +13 -0
- package/src/icons/WfoCogFill.tsx +35 -0
- package/src/icons/WfoEyeFill.stories.tsx +13 -0
- package/src/icons/WfoEyeFill.tsx +35 -0
- package/src/icons/{WFOIconProps.ts → WfoIconProps.ts} +1 -1
- package/src/icons/WfoLogoutIcon.stories.tsx +13 -0
- package/src/icons/{WFOLogoutIcon.tsx → WfoLogoutIcon.tsx} +3 -2
- package/src/icons/WfoMinusCircleFill.stories.tsx +13 -0
- package/src/icons/WfoMinusCircleFill.tsx +33 -0
- package/src/icons/WfoMinusCircleOutline.stories.tsx +13 -0
- package/src/icons/{WFOMinusCircleOutline.tsx → WfoMinusCircleOutline.tsx} +3 -2
- package/src/icons/WfoPencilAlt.stories.tsx +13 -0
- package/src/icons/WfoPencilAlt.tsx +33 -0
- package/src/icons/WfoPlayFill.stories.tsx +13 -0
- package/src/icons/WfoPlayFill.tsx +35 -0
- package/src/icons/WfoPlusCircleFill.stories.tsx +13 -0
- package/src/icons/{WFOPlusCircleFill.tsx → WfoPlusCircleFill.tsx} +3 -2
- package/src/icons/WfoRefresh.stories.tsx +13 -0
- package/src/icons/WfoRefresh.tsx +35 -0
- package/src/icons/WfoSearchStrikethrough.stories.tsx +13 -0
- package/src/icons/WfoSearchStrikethrough.tsx +33 -0
- package/src/icons/WfoSortAsc.stories.tsx +13 -0
- package/src/icons/WfoSortAsc.tsx +33 -0
- package/src/icons/WfoSortDesc.stories.tsx +13 -0
- package/src/icons/WfoSortDesc.tsx +33 -0
- package/src/icons/WfoStatistic.tsx +41 -0
- package/src/icons/WfoStatusDotIcon.stories.tsx +13 -0
- package/src/icons/{WFOStatusDotIcon.tsx → WfoStatusDotIcon.tsx} +3 -2
- package/src/icons/WfoXCircleFill.stories.tsx +13 -0
- package/src/icons/{WFOXCircleFill.tsx → WfoXCircleFill.tsx} +3 -2
- package/src/icons/index.ts +22 -10
- package/src/index.ts +2 -0
- package/src/messages/en-US.json +175 -21
- package/src/messages/getTranslationMessages.spec.ts +1 -1
- package/src/messages/getTranslationMessages.ts +1 -1
- package/src/messages/nl-NL.json +179 -23
- package/src/pages/index.ts +2 -0
- package/src/pages/metadata/{WFOMetadataPageLayout.tsx → WfoMetadataPageLayout.tsx} +5 -3
- package/src/pages/metadata/WfoProductBlocksPage.tsx +239 -0
- package/src/pages/metadata/{WFOProductsPage.tsx → WfoProductsPage.tsx} +96 -52
- package/src/pages/metadata/WfoResourceTypesPage.tsx +185 -0
- package/src/pages/metadata/WfoWorkflowsPage.tsx +194 -0
- package/src/pages/metadata/index.ts +4 -4
- package/src/pages/metadata/workflowListObjectMapper.ts +43 -0
- package/src/pages/processes/WfoProcessDetail.tsx +327 -0
- package/src/pages/processes/WfoProcessDetailPage.tsx +88 -0
- package/src/pages/processes/WfoProcessListPage.tsx +106 -0
- package/src/pages/processes/WfoProcessListSubscriptionsCell.tsx +72 -0
- package/src/pages/processes/getProcessListTabTypeFromString.ts +6 -6
- package/src/pages/processes/index.ts +3 -2
- package/src/pages/processes/tabConfig.ts +28 -10
- package/src/pages/processes/timelineUtils.spec.ts +202 -0
- package/src/pages/processes/timelineUtils.ts +113 -0
- package/src/pages/subscriptions/WfoSubscriptionDetailPage.tsx +19 -0
- package/src/pages/subscriptions/WfoSubscriptionsListPage.tsx +105 -0
- package/src/pages/subscriptions/index.ts +2 -2
- package/src/pages/tasks/WfoTaskListPage.tsx +120 -0
- package/src/pages/tasks/index.ts +1 -0
- package/src/pages/workflow/WfoStartWorkflowPage.tsx +176 -0
- package/src/pages/workflow/index.ts +1 -0
- package/src/stories/Button.jsx +45 -39
- package/src/stories/Configure.mdx +48 -43
- package/src/stories/Header.jsx +59 -45
- package/src/stories/Page.jsx +81 -60
- package/src/stories/Page.stories.js +2 -1
- package/src/stories/button.css +18 -18
- package/src/stories/colors.mdx +12 -0
- package/src/stories/colors.tsx +27 -0
- package/src/stories/header.css +18 -18
- package/src/stories/page.css +40 -40
- package/src/theme/defaultOrchestratorTheme.ts +16 -0
- package/src/types/forms.ts +40 -0
- package/src/types/index.ts +1 -0
- package/src/types/types.ts +457 -0
- package/src/utils/date.spec.ts +157 -5
- package/src/utils/date.ts +66 -5
- package/src/utils/environmentVariables.spec.ts +17 -0
- package/src/utils/environmentVariables.ts +12 -0
- package/src/utils/getDefaultTableConfig.ts +101 -0
- package/src/utils/getProductNamesFromProcess.spec.ts +133 -0
- package/src/utils/getProductNamesFromProcess.ts +16 -0
- package/src/utils/getTokenName.ts +2 -1
- package/src/utils/index.ts +2 -0
- package/src/utils/string.spec.ts +24 -1
- package/src/utils/strings.ts +5 -0
- package/tsconfig.build.json +14 -0
- package/tsconfig.json +4 -2
- package/src/components/WFOBadges/WFOBadge/index.ts +0 -1
- package/src/components/WFOBadges/WFOEngineStatusBadge/index.ts +0 -1
- package/src/components/WFOBadges/WFOEnvironmentBadge/index.ts +0 -1
- package/src/components/WFOBadges/WFOFailedTasksBadge/WFOFailedTasksBadge.stories.tsx +0 -12
- package/src/components/WFOBadges/WFOFailedTasksBadge/WFOFailedTasksBadge.tsx +0 -63
- package/src/components/WFOBadges/WFOFailedTasksBadge/index.ts +0 -1
- package/src/components/WFOBadges/WFOHeaderBadge/index.ts +0 -1
- package/src/components/WFOBadges/WFOProcessStatusBadge/index.ts +0 -1
- package/src/components/WFOBadges/WFOProductBlockBadge/WFOProductBlockBadge.stories.tsx +0 -15
- package/src/components/WFOBadges/WFOProductBlockBadge/WFOProductBlockBadge.tsx +0 -22
- package/src/components/WFOBadges/WFOProductBlockBadge/index.ts +0 -1
- package/src/components/WFOBadges/WFOStatusBadge/index.ts +0 -1
- package/src/components/WFOBadges/index.ts +0 -8
- package/src/components/WFOBreadcrumbs/index.ts +0 -1
- package/src/components/WFOFilterTabs/index.ts +0 -1
- package/src/components/WFOLoading/WFOLoading.tsx +0 -2
- package/src/components/WFOLoading/index.ts +0 -1
- package/src/components/WFOPageTemplate/WFOPageHeader/index.ts +0 -1
- package/src/components/WFOPageTemplate/WFOPageTemplate/index.ts +0 -1
- package/src/components/WFOPageTemplate/WFOSidebar/WFOSidebar.tsx +0 -159
- package/src/components/WFOPageTemplate/WFOSidebar/index.ts +0 -1
- package/src/components/WFOPageTemplate/index.ts +0 -3
- package/src/components/WFOSearchBar/index.ts +0 -1
- package/src/components/WFOSettingsModal/index.tsx +0 -1
- package/src/components/WFOSettingsPage/index.ts +0 -1
- package/src/components/WFOStartPage/WFONewProcessPanel.stories.tsx +0 -12
- package/src/components/WFOStartPage/WFOStatCards.stories.tsx +0 -12
- package/src/components/WFOStartPage/index.ts +0 -6
- package/src/components/WFOSubscription/WFOFixedInputBlock.tsx +0 -58
- package/src/components/WFOSubscription/WFOProcessesTimeline.tsx +0 -105
- package/src/components/WFOSubscription/WFOProductBlock.tsx +0 -186
- package/src/components/WFOSubscription/WFOSubscriptionActions.tsx +0 -138
- package/src/components/WFOSubscription/WFOSubscriptionBlock.tsx +0 -108
- package/src/components/WFOSubscription/WFOSubscriptionDetailTree.tsx +0 -184
- package/src/components/WFOSubscription/WFOSubscriptionGeneral.tsx +0 -53
- package/src/components/WFOSubscription/index.ts +0 -7
- package/src/components/WFOSubscription/styles.ts +0 -18
- package/src/components/WFOTable/WFOTable.tsx +0 -85
- package/src/components/WFOTable/WFOTableHeaderCell.tsx +0 -30
- package/src/components/WFOTable/WFOTableSettingsModal/index.ts +0 -1
- package/src/components/WFOTable/WFOTableWithFilter/WFOTableWithFilter.tsx +0 -174
- package/src/components/WFOTable/WFOTableWithFilter/index.ts +0 -1
- package/src/components/WFOTable/index.ts +0 -14
- package/src/components/WFOTree/WFOTree.tsx +0 -16
- package/src/contexts/SubscriptionContext.tsx +0 -72
- package/src/hooks/useSubscriptionProcesses.ts +0 -45
- package/src/icons/WFOCheckmarkCircleFill.stories.tsx +0 -12
- package/src/icons/WFOLogoutIcon.stories.tsx +0 -12
- package/src/icons/WFOMinusCircleOutline.stories.tsx +0 -12
- package/src/icons/WFOPlusCircleFill.stories.tsx +0 -12
- package/src/icons/WFOStatusDotIcon.stories.tsx +0 -12
- package/src/icons/WFOXCircleFill.stories.tsx +0 -12
- package/src/pages/metadata/WFOProductBlocksPage.tsx +0 -164
- package/src/pages/metadata/WFOResourceTypesPage.tsx +0 -120
- package/src/pages/metadata/WFOWorkflowsPage.tsx +0 -251
- package/src/pages/processes/WFOProcessListPage.tsx +0 -209
- package/src/pages/processes/WFOProcessesListSubscriptionsCell.tsx +0 -28
- package/src/pages/processes/tableConfig.ts +0 -22
- package/src/pages/subscriptions/types.ts +0 -13
- package/src/types.ts +0 -250
- package/src/components/{WFOTable → WfoTable}/utils/columns.spec.ts +1 -1
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Criteria,
|
|
4
|
-
EuiButton,
|
|
5
|
-
EuiFlexGroup,
|
|
6
|
-
EuiFlexItem,
|
|
7
|
-
EuiSpacer,
|
|
8
|
-
Pagination,
|
|
9
|
-
} from '@elastic/eui';
|
|
10
|
-
import {
|
|
11
|
-
WFODataSorting,
|
|
12
|
-
TableColumnKeys,
|
|
13
|
-
WFOTableColumns,
|
|
14
|
-
WFOTableColumnsWithControlColumns,
|
|
15
|
-
WFOTableControlColumnConfig,
|
|
16
|
-
WFOTableDataColumnConfig,
|
|
17
|
-
} from '../utils/columns';
|
|
18
|
-
import {
|
|
19
|
-
ColumnConfig,
|
|
20
|
-
TableConfig,
|
|
21
|
-
TableSettingsModal,
|
|
22
|
-
} from '../WFOTableSettingsModal';
|
|
23
|
-
import { WFOSearchField } from '../../WFOSearchBar';
|
|
24
|
-
import { WFOTable } from '../WFOTable';
|
|
25
|
-
import { DEFAULT_PAGE_SIZES } from '../utils/constants';
|
|
26
|
-
import {
|
|
27
|
-
clearTableConfigFromLocalStorage,
|
|
28
|
-
getTableConfigFromLocalStorage,
|
|
29
|
-
setTableConfigToLocalStorage,
|
|
30
|
-
} from '../utils/tableConfigPersistence';
|
|
31
|
-
|
|
32
|
-
export type WFOTableWithFilterProps<T> = {
|
|
33
|
-
data: T[];
|
|
34
|
-
tableColumns: WFOTableColumns<T>;
|
|
35
|
-
leadingControlColumns?: WFOTableControlColumnConfig<T>;
|
|
36
|
-
trailingControlColumns?: WFOTableControlColumnConfig<T>;
|
|
37
|
-
defaultHiddenColumns?: TableColumnKeys<T>;
|
|
38
|
-
dataSorting: WFODataSorting<T>;
|
|
39
|
-
pagination: Pagination;
|
|
40
|
-
esQueryString?: string;
|
|
41
|
-
isLoading: boolean;
|
|
42
|
-
localStorageKey: string;
|
|
43
|
-
onUpdateEsQueryString: (esQueryString: string) => void;
|
|
44
|
-
onUpdatePage: (criterion: Criteria<T>['page']) => void;
|
|
45
|
-
onUpdateDataSort: (newSortColumnId: keyof T) => void;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export const WFOTableWithFilter = <T,>({
|
|
49
|
-
data,
|
|
50
|
-
tableColumns,
|
|
51
|
-
leadingControlColumns,
|
|
52
|
-
trailingControlColumns,
|
|
53
|
-
defaultHiddenColumns = [],
|
|
54
|
-
dataSorting,
|
|
55
|
-
pagination,
|
|
56
|
-
esQueryString,
|
|
57
|
-
isLoading,
|
|
58
|
-
localStorageKey,
|
|
59
|
-
onUpdateEsQueryString,
|
|
60
|
-
onUpdatePage,
|
|
61
|
-
onUpdateDataSort,
|
|
62
|
-
}: WFOTableWithFilterProps<T>) => {
|
|
63
|
-
const defaultPageSize = pagination.pageSize;
|
|
64
|
-
const tableConfigFromLocalStorage =
|
|
65
|
-
getTableConfigFromLocalStorage<T>(localStorageKey);
|
|
66
|
-
|
|
67
|
-
const initialHiddenColumns =
|
|
68
|
-
tableConfigFromLocalStorage?.hiddenColumns ?? defaultHiddenColumns;
|
|
69
|
-
|
|
70
|
-
const [hiddenColumns, setHiddenColumns] =
|
|
71
|
-
useState<TableColumnKeys<T>>(initialHiddenColumns);
|
|
72
|
-
|
|
73
|
-
const [showSettingsModal, setShowSettingsModal] = useState(false);
|
|
74
|
-
|
|
75
|
-
useEffect(() => {
|
|
76
|
-
setHiddenColumns(
|
|
77
|
-
tableConfigFromLocalStorage?.hiddenColumns ?? defaultHiddenColumns,
|
|
78
|
-
);
|
|
79
|
-
}, [localStorageKey]);
|
|
80
|
-
|
|
81
|
-
const tableColumnsWithControlColumns: WFOTableColumnsWithControlColumns<T> =
|
|
82
|
-
{
|
|
83
|
-
...leadingControlColumns,
|
|
84
|
-
...tableColumns,
|
|
85
|
-
...trailingControlColumns,
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
const tableSettingsColumns: ColumnConfig<T>[] = Object.entries<
|
|
89
|
-
WFOTableDataColumnConfig<T, keyof T>
|
|
90
|
-
>(tableColumns).map((keyValuePair) => {
|
|
91
|
-
const { field, name } = keyValuePair[1];
|
|
92
|
-
return {
|
|
93
|
-
field,
|
|
94
|
-
name,
|
|
95
|
-
isVisible: hiddenColumns.indexOf(field) === -1,
|
|
96
|
-
};
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
const handleUpdateTableConfig = (updatedTableConfig: TableConfig<T>) => {
|
|
100
|
-
const updatedHiddenColumns = updatedTableConfig.columns
|
|
101
|
-
.filter((column) => !column.isVisible)
|
|
102
|
-
.map((hiddenColumn) => hiddenColumn.field);
|
|
103
|
-
setHiddenColumns(updatedHiddenColumns);
|
|
104
|
-
setShowSettingsModal(false);
|
|
105
|
-
setTableConfigToLocalStorage(localStorageKey, {
|
|
106
|
-
hiddenColumns: updatedHiddenColumns,
|
|
107
|
-
selectedPageSize: updatedTableConfig.selectedPageSize,
|
|
108
|
-
});
|
|
109
|
-
onUpdatePage({
|
|
110
|
-
index: 0,
|
|
111
|
-
size: updatedTableConfig.selectedPageSize,
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
const handleResetToDefaults = () => {
|
|
116
|
-
setHiddenColumns(defaultHiddenColumns);
|
|
117
|
-
setShowSettingsModal(false);
|
|
118
|
-
clearTableConfigFromLocalStorage(localStorageKey);
|
|
119
|
-
onUpdatePage({
|
|
120
|
-
index: 0,
|
|
121
|
-
size: defaultPageSize,
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
const onCriteriaChange = (criterion: Criteria<T>) => {
|
|
126
|
-
if (criterion.page) {
|
|
127
|
-
onUpdatePage(criterion.page);
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
return (
|
|
132
|
-
<>
|
|
133
|
-
<EuiFlexGroup>
|
|
134
|
-
<EuiFlexItem>
|
|
135
|
-
<WFOSearchField
|
|
136
|
-
esQueryString={esQueryString}
|
|
137
|
-
onUpdateEsQueryString={onUpdateEsQueryString}
|
|
138
|
-
/>
|
|
139
|
-
</EuiFlexItem>
|
|
140
|
-
<EuiButton onClick={() => setShowSettingsModal(true)}>
|
|
141
|
-
Edit columns
|
|
142
|
-
</EuiButton>
|
|
143
|
-
</EuiFlexGroup>
|
|
144
|
-
<EuiSpacer size="m" />
|
|
145
|
-
<WFOTable
|
|
146
|
-
data={data}
|
|
147
|
-
columns={tableColumnsWithControlColumns}
|
|
148
|
-
hiddenColumns={hiddenColumns}
|
|
149
|
-
dataSorting={dataSorting}
|
|
150
|
-
onDataSort={onUpdateDataSort}
|
|
151
|
-
pagination={pagination}
|
|
152
|
-
isLoading={isLoading}
|
|
153
|
-
onCriteriaChange={onCriteriaChange}
|
|
154
|
-
/>
|
|
155
|
-
|
|
156
|
-
{showSettingsModal && (
|
|
157
|
-
<TableSettingsModal
|
|
158
|
-
tableConfig={{
|
|
159
|
-
columns: tableSettingsColumns,
|
|
160
|
-
selectedPageSize:
|
|
161
|
-
tableConfigFromLocalStorage?.selectedPageSize ??
|
|
162
|
-
pagination.pageSize,
|
|
163
|
-
}}
|
|
164
|
-
pageSizeOptions={
|
|
165
|
-
pagination.pageSizeOptions ?? DEFAULT_PAGE_SIZES
|
|
166
|
-
}
|
|
167
|
-
onClose={() => setShowSettingsModal(false)}
|
|
168
|
-
onUpdateTableConfig={handleUpdateTableConfig}
|
|
169
|
-
onResetToDefaults={handleResetToDefaults}
|
|
170
|
-
/>
|
|
171
|
-
)}
|
|
172
|
-
</>
|
|
173
|
-
);
|
|
174
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './WFOTableWithFilter';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from './WFODataGridTable/WFODataGridTable';
|
|
2
|
-
export * from './WFODataGridTable/WFOdataGridColumns';
|
|
3
|
-
|
|
4
|
-
export * from './WFOTableSettingsModal';
|
|
5
|
-
|
|
6
|
-
export * from './utils/columns';
|
|
7
|
-
export * from './utils/constants';
|
|
8
|
-
|
|
9
|
-
export * from './utils/tableConfigPersistence';
|
|
10
|
-
export * from './utils/tableUtils';
|
|
11
|
-
|
|
12
|
-
export * from './WFOTable';
|
|
13
|
-
export * from './WFOTableWithFilter';
|
|
14
|
-
export * from './WFOTableHeaderCell';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
|
|
3
|
-
import { WFOTreeBranch } from './WFOTreeBranch';
|
|
4
|
-
import { TreeBlock } from '../../types';
|
|
5
|
-
|
|
6
|
-
type WFOTreeProps = {
|
|
7
|
-
data: TreeBlock[];
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const WFOTree: FC<WFOTreeProps> = ({ data }) => (
|
|
11
|
-
<div style={{ width: '500px' }}>
|
|
12
|
-
{data.map((item) => (
|
|
13
|
-
<WFOTreeBranch key={item.id} item={item} level={0} />
|
|
14
|
-
))}
|
|
15
|
-
</div>
|
|
16
|
-
);
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import { SubscriptionDetailBase } from '../types';
|
|
4
|
-
|
|
5
|
-
export type SubscriptionContextType = {
|
|
6
|
-
subscriptionData: SubscriptionDetailBase;
|
|
7
|
-
loadingStatus: number;
|
|
8
|
-
setSubscriptionData: (
|
|
9
|
-
data: SubscriptionDetailBase,
|
|
10
|
-
loadingStatus: number,
|
|
11
|
-
) => void;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const subscriptionDetailInit = {
|
|
15
|
-
subscriptionId: '',
|
|
16
|
-
description: '',
|
|
17
|
-
customerId: '',
|
|
18
|
-
insync: true,
|
|
19
|
-
status: '',
|
|
20
|
-
product: {
|
|
21
|
-
name: '',
|
|
22
|
-
description: '',
|
|
23
|
-
status: '',
|
|
24
|
-
tag: '',
|
|
25
|
-
type: '',
|
|
26
|
-
createdAt: '',
|
|
27
|
-
},
|
|
28
|
-
fixedInputs: {},
|
|
29
|
-
productBlocks: [],
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const InitialSubscriptionContext: SubscriptionContextType = {
|
|
33
|
-
subscriptionData: subscriptionDetailInit,
|
|
34
|
-
loadingStatus: 0,
|
|
35
|
-
setSubscriptionData: () => null,
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const SubscriptionContext = React.createContext<SubscriptionContextType>(
|
|
39
|
-
InitialSubscriptionContext,
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
export type SubscriptionProviderProps = {
|
|
43
|
-
children: ReactNode;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export const SubscriptionProvider: React.FC<SubscriptionProviderProps> = ({
|
|
47
|
-
children,
|
|
48
|
-
}) => {
|
|
49
|
-
const [subscriptionData, setInternalSubscriptionData] =
|
|
50
|
-
React.useState<SubscriptionDetailBase>(subscriptionDetailInit);
|
|
51
|
-
const [loadingStatus, setLoadingStatus] = React.useState(0);
|
|
52
|
-
|
|
53
|
-
const setSubscriptionData = (
|
|
54
|
-
data: SubscriptionDetailBase,
|
|
55
|
-
loadingStatus: number,
|
|
56
|
-
) => {
|
|
57
|
-
setInternalSubscriptionData(data);
|
|
58
|
-
setLoadingStatus(loadingStatus);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<SubscriptionContext.Provider
|
|
63
|
-
value={{
|
|
64
|
-
subscriptionData,
|
|
65
|
-
loadingStatus,
|
|
66
|
-
setSubscriptionData,
|
|
67
|
-
}}
|
|
68
|
-
>
|
|
69
|
-
{children}
|
|
70
|
-
</SubscriptionContext.Provider>
|
|
71
|
-
);
|
|
72
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { useQuery } from 'react-query';
|
|
2
|
-
import { useContext } from 'react';
|
|
3
|
-
import { OrchestratorConfigContext } from '../contexts/OrchestratorConfigContext';
|
|
4
|
-
import { Nullable } from '../types';
|
|
5
|
-
import { ProcessStatus } from './useProcessStatusCountsQuery';
|
|
6
|
-
|
|
7
|
-
interface Process {
|
|
8
|
-
workflow: string;
|
|
9
|
-
pid: string;
|
|
10
|
-
is_task: boolean;
|
|
11
|
-
created_by: Nullable<string>;
|
|
12
|
-
failed_reason: Nullable<string>;
|
|
13
|
-
started_at: number;
|
|
14
|
-
last_status: ProcessStatus;
|
|
15
|
-
assignee: 'NOC' | 'SYSTEM' | 'CHANGES' | 'USER';
|
|
16
|
-
last_modified_at: number;
|
|
17
|
-
traceback: Nullable<string>;
|
|
18
|
-
last_step: Nullable<string>;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface SubscriptionProcess {
|
|
22
|
-
workflow_target: null | 'CREATE' | 'MODIFY' | 'TERMINATE' | 'SYSTEM';
|
|
23
|
-
subscription_id: string;
|
|
24
|
-
id: string;
|
|
25
|
-
pid: string;
|
|
26
|
-
created_at: number;
|
|
27
|
-
process: Process;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const useSubscriptionProcesses = (subscriptionId: string) => {
|
|
31
|
-
const { subscriptionProcessesEndpoint } = useContext(
|
|
32
|
-
OrchestratorConfigContext,
|
|
33
|
-
);
|
|
34
|
-
//https://orchestrator.dev.automation.surf.net/api/processes/process-subscriptions-by-subscription-id/d32ecaa5-4e36-448c-a594-0bb6a1b5faf8
|
|
35
|
-
const fetchSubscriptionProcesses = async () => {
|
|
36
|
-
const response = await fetch(
|
|
37
|
-
`${subscriptionProcessesEndpoint}/${subscriptionId}`,
|
|
38
|
-
{
|
|
39
|
-
method: 'GET',
|
|
40
|
-
},
|
|
41
|
-
);
|
|
42
|
-
return (await response.json()) as SubscriptionProcess[];
|
|
43
|
-
};
|
|
44
|
-
return useQuery('subscriptionProcesses', fetchSubscriptionProcesses);
|
|
45
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react';
|
|
2
|
-
import { WFOCheckmarkCircleFill } from './WFOCheckmarkCircleFill';
|
|
3
|
-
|
|
4
|
-
const Story: Meta<typeof WFOCheckmarkCircleFill> = {
|
|
5
|
-
component: WFOCheckmarkCircleFill,
|
|
6
|
-
title: 'Icons/WFOCheckmarkCircleFill',
|
|
7
|
-
};
|
|
8
|
-
export default Story;
|
|
9
|
-
|
|
10
|
-
export const Primary = {
|
|
11
|
-
args: {},
|
|
12
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react';
|
|
2
|
-
import { WFOLogoutIcon } from './WFOLogoutIcon';
|
|
3
|
-
|
|
4
|
-
const Story: Meta<typeof WFOLogoutIcon> = {
|
|
5
|
-
component: WFOLogoutIcon,
|
|
6
|
-
title: 'Icons/WFOLogoutIcon',
|
|
7
|
-
};
|
|
8
|
-
export default Story;
|
|
9
|
-
|
|
10
|
-
export const Primary = {
|
|
11
|
-
args: {},
|
|
12
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react';
|
|
2
|
-
import { WFOMinusCircleOutline } from './WFOMinusCircleOutline';
|
|
3
|
-
|
|
4
|
-
const Story: Meta<typeof WFOMinusCircleOutline> = {
|
|
5
|
-
component: WFOMinusCircleOutline,
|
|
6
|
-
title: 'Icons/WFOMinusCircleOutline',
|
|
7
|
-
};
|
|
8
|
-
export default Story;
|
|
9
|
-
|
|
10
|
-
export const Primary = {
|
|
11
|
-
args: {},
|
|
12
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react';
|
|
2
|
-
import { WFOPlusCircleFill } from './WFOPlusCircleFill';
|
|
3
|
-
|
|
4
|
-
const Story: Meta<typeof WFOPlusCircleFill> = {
|
|
5
|
-
component: WFOPlusCircleFill,
|
|
6
|
-
title: 'Icons/WFOPlusCircleFill',
|
|
7
|
-
};
|
|
8
|
-
export default Story;
|
|
9
|
-
|
|
10
|
-
export const Primary = {
|
|
11
|
-
args: {},
|
|
12
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react';
|
|
2
|
-
import { WFOStatusDotIcon } from './WFOStatusDotIcon';
|
|
3
|
-
|
|
4
|
-
const Story: Meta<typeof WFOStatusDotIcon> = {
|
|
5
|
-
component: WFOStatusDotIcon,
|
|
6
|
-
title: 'Icons/WFOStatusDotIcon',
|
|
7
|
-
};
|
|
8
|
-
export default Story;
|
|
9
|
-
|
|
10
|
-
export const Primary = {
|
|
11
|
-
args: {},
|
|
12
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react';
|
|
2
|
-
import { WFOXCircleFill } from './WFOXCircleFill';
|
|
3
|
-
|
|
4
|
-
const Story: Meta<typeof WFOXCircleFill> = {
|
|
5
|
-
component: WFOXCircleFill,
|
|
6
|
-
title: 'Icons/WFOXCircleFill',
|
|
7
|
-
};
|
|
8
|
-
export default Story;
|
|
9
|
-
|
|
10
|
-
export const Primary = {
|
|
11
|
-
args: {},
|
|
12
|
-
};
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useTranslations } from 'next-intl';
|
|
3
|
-
import type { Pagination } from '@elastic/eui/src/components';
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
DEFAULT_PAGE_SIZE,
|
|
7
|
-
DEFAULT_PAGE_SIZES,
|
|
8
|
-
METADATA_PRODUCTBLOCKS_TABLE_LOCAL_STORAGE_KEY,
|
|
9
|
-
} from '../../components';
|
|
10
|
-
import {
|
|
11
|
-
WFOStatusBadge,
|
|
12
|
-
WFOProductBlockBadge,
|
|
13
|
-
WFOTableWithFilter,
|
|
14
|
-
} from '../../components';
|
|
15
|
-
import {
|
|
16
|
-
getTableConfigFromLocalStorage,
|
|
17
|
-
getDataSortHandler,
|
|
18
|
-
getPageChangeHandler,
|
|
19
|
-
getEsQueryStringHandler,
|
|
20
|
-
} from '../../components';
|
|
21
|
-
import type { WFOTableColumns, WFODataSorting } from '../../components';
|
|
22
|
-
|
|
23
|
-
import { parseDateToLocaleString } from '../../utils';
|
|
24
|
-
import type { ProductBlockDefinition } from '../../types';
|
|
25
|
-
import { SortOrder } from '../../types';
|
|
26
|
-
|
|
27
|
-
import { useDataDisplayParams, useQueryWithGraphql } from '../../hooks';
|
|
28
|
-
|
|
29
|
-
import { GET_PRODUCTS_BLOCKS_GRAPHQL_QUERY } from '../../graphqlQueries';
|
|
30
|
-
|
|
31
|
-
import { WFOMetadataPageLayout } from './WFOMetadataPageLayout';
|
|
32
|
-
|
|
33
|
-
const PRODUCT_BLOCK_FIELD_ID: keyof ProductBlockDefinition = 'productBlockId';
|
|
34
|
-
const PRODUCT_BLOCK_FIELD_NAME: keyof ProductBlockDefinition = 'name';
|
|
35
|
-
|
|
36
|
-
const PRODUCT_BLOCK_FIELD_TAG: keyof ProductBlockDefinition = 'tag';
|
|
37
|
-
const PRODUCT_BLOCK_FIELD_DESCRIPTION: keyof ProductBlockDefinition =
|
|
38
|
-
'description';
|
|
39
|
-
const PRODUCT_BLOCK_FIELD_STATUS: keyof ProductBlockDefinition = 'status';
|
|
40
|
-
const PRODUCT_BLOCK_FIELD_CREATED_AT: keyof ProductBlockDefinition =
|
|
41
|
-
'createdAt';
|
|
42
|
-
const PRODUCT_BLOCK_FIELD_END_DATE: keyof ProductBlockDefinition = 'endDate';
|
|
43
|
-
const PRODUCT_BLOCK_FIELD_RESOURCE_TYPES: keyof ProductBlockDefinition =
|
|
44
|
-
'resourceTypes';
|
|
45
|
-
|
|
46
|
-
export const WFOProductBlocksPage = () => {
|
|
47
|
-
const t = useTranslations('metadata.productBlocks');
|
|
48
|
-
|
|
49
|
-
const initialPageSize =
|
|
50
|
-
getTableConfigFromLocalStorage(
|
|
51
|
-
METADATA_PRODUCTBLOCKS_TABLE_LOCAL_STORAGE_KEY,
|
|
52
|
-
)?.selectedPageSize ?? DEFAULT_PAGE_SIZE;
|
|
53
|
-
|
|
54
|
-
const { dataDisplayParams, setDataDisplayParam } =
|
|
55
|
-
useDataDisplayParams<ProductBlockDefinition>({
|
|
56
|
-
pageSize: initialPageSize,
|
|
57
|
-
sortBy: {
|
|
58
|
-
field: PRODUCT_BLOCK_FIELD_NAME,
|
|
59
|
-
order: SortOrder.ASC,
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
const tableColumns: WFOTableColumns<ProductBlockDefinition> = {
|
|
64
|
-
productBlockId: {
|
|
65
|
-
field: PRODUCT_BLOCK_FIELD_ID,
|
|
66
|
-
name: t('id'),
|
|
67
|
-
width: '110',
|
|
68
|
-
},
|
|
69
|
-
name: {
|
|
70
|
-
field: PRODUCT_BLOCK_FIELD_NAME,
|
|
71
|
-
name: t('name'),
|
|
72
|
-
width: '110',
|
|
73
|
-
},
|
|
74
|
-
description: {
|
|
75
|
-
field: PRODUCT_BLOCK_FIELD_DESCRIPTION,
|
|
76
|
-
name: t('description'),
|
|
77
|
-
width: '400',
|
|
78
|
-
},
|
|
79
|
-
tag: {
|
|
80
|
-
field: PRODUCT_BLOCK_FIELD_TAG,
|
|
81
|
-
name: t('tag'),
|
|
82
|
-
},
|
|
83
|
-
status: {
|
|
84
|
-
field: PRODUCT_BLOCK_FIELD_STATUS,
|
|
85
|
-
name: t('status'),
|
|
86
|
-
width: '90',
|
|
87
|
-
render: (value) => (
|
|
88
|
-
<WFOStatusBadge status={value.toLocaleLowerCase()} />
|
|
89
|
-
),
|
|
90
|
-
},
|
|
91
|
-
resourceTypes: {
|
|
92
|
-
field: PRODUCT_BLOCK_FIELD_RESOURCE_TYPES,
|
|
93
|
-
name: t('resourceTypes'),
|
|
94
|
-
render: (resourceTypes) => (
|
|
95
|
-
<>
|
|
96
|
-
{resourceTypes.map((resourceType, index) => (
|
|
97
|
-
<WFOProductBlockBadge key={index}>
|
|
98
|
-
{resourceType.resourceType}
|
|
99
|
-
</WFOProductBlockBadge>
|
|
100
|
-
))}
|
|
101
|
-
</>
|
|
102
|
-
),
|
|
103
|
-
},
|
|
104
|
-
createdAt: {
|
|
105
|
-
field: PRODUCT_BLOCK_FIELD_CREATED_AT,
|
|
106
|
-
name: t('createdAt'),
|
|
107
|
-
render: parseDateToLocaleString,
|
|
108
|
-
},
|
|
109
|
-
endDate: {
|
|
110
|
-
field: PRODUCT_BLOCK_FIELD_END_DATE,
|
|
111
|
-
name: t('endDate'),
|
|
112
|
-
render: parseDateToLocaleString,
|
|
113
|
-
},
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
const { data, isFetching } = useQueryWithGraphql(
|
|
117
|
-
GET_PRODUCTS_BLOCKS_GRAPHQL_QUERY,
|
|
118
|
-
{
|
|
119
|
-
first: dataDisplayParams.pageSize,
|
|
120
|
-
after: dataDisplayParams.pageIndex * dataDisplayParams.pageSize,
|
|
121
|
-
sortBy: dataDisplayParams.sortBy,
|
|
122
|
-
},
|
|
123
|
-
'productBlocks',
|
|
124
|
-
true,
|
|
125
|
-
);
|
|
126
|
-
|
|
127
|
-
const dataSorting: WFODataSorting<ProductBlockDefinition> = {
|
|
128
|
-
field: dataDisplayParams.sortBy?.field ?? PRODUCT_BLOCK_FIELD_NAME,
|
|
129
|
-
sortOrder: dataDisplayParams.sortBy?.order ?? SortOrder.ASC,
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
const totalItems = data?.productBlocks.pageInfo.totalItems;
|
|
133
|
-
|
|
134
|
-
const pagination: Pagination = {
|
|
135
|
-
pageSize: dataDisplayParams.pageSize,
|
|
136
|
-
pageIndex: dataDisplayParams.pageIndex,
|
|
137
|
-
pageSizeOptions: DEFAULT_PAGE_SIZES,
|
|
138
|
-
totalItemCount: totalItems ? totalItems : 0,
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
return (
|
|
142
|
-
<WFOMetadataPageLayout>
|
|
143
|
-
<WFOTableWithFilter<ProductBlockDefinition>
|
|
144
|
-
data={data ? data.productBlocks.page : []}
|
|
145
|
-
tableColumns={tableColumns}
|
|
146
|
-
dataSorting={dataSorting}
|
|
147
|
-
onUpdateDataSort={getDataSortHandler<ProductBlockDefinition>(
|
|
148
|
-
dataDisplayParams,
|
|
149
|
-
setDataDisplayParam,
|
|
150
|
-
)}
|
|
151
|
-
onUpdatePage={getPageChangeHandler<ProductBlockDefinition>(
|
|
152
|
-
setDataDisplayParam,
|
|
153
|
-
)}
|
|
154
|
-
onUpdateEsQueryString={getEsQueryStringHandler<ProductBlockDefinition>(
|
|
155
|
-
setDataDisplayParam,
|
|
156
|
-
)}
|
|
157
|
-
pagination={pagination}
|
|
158
|
-
isLoading={isFetching}
|
|
159
|
-
esQueryString={dataDisplayParams.esQueryString}
|
|
160
|
-
localStorageKey={METADATA_PRODUCTBLOCKS_TABLE_LOCAL_STORAGE_KEY}
|
|
161
|
-
/>
|
|
162
|
-
</WFOMetadataPageLayout>
|
|
163
|
-
);
|
|
164
|
-
};
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useTranslations } from 'next-intl';
|
|
3
|
-
import type { Pagination } from '@elastic/eui/src/components';
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
DEFAULT_PAGE_SIZE,
|
|
7
|
-
DEFAULT_PAGE_SIZES,
|
|
8
|
-
METADATA_RESOURCE_TYPES_TABLE_LOCAL_STORAGE_KEY,
|
|
9
|
-
} from '../../components';
|
|
10
|
-
import { WFOTableWithFilter } from '../../components';
|
|
11
|
-
import {
|
|
12
|
-
getTableConfigFromLocalStorage,
|
|
13
|
-
getDataSortHandler,
|
|
14
|
-
getPageChangeHandler,
|
|
15
|
-
getEsQueryStringHandler,
|
|
16
|
-
} from '../../components';
|
|
17
|
-
import type { WFOTableColumns, WFODataSorting } from '../../components';
|
|
18
|
-
|
|
19
|
-
import type { ResourceTypeDefinition } from '../../types';
|
|
20
|
-
import { SortOrder } from '../../types';
|
|
21
|
-
|
|
22
|
-
import { useDataDisplayParams, useQueryWithGraphql } from '../../hooks';
|
|
23
|
-
|
|
24
|
-
import { GET_RESOURCE_TYPES_GRAPHQL_QUERY } from '../../graphqlQueries';
|
|
25
|
-
|
|
26
|
-
import { WFOMetadataPageLayout } from './WFOMetadataPageLayout';
|
|
27
|
-
|
|
28
|
-
export const RESOURCE_TYPE_FIELD_ID: keyof ResourceTypeDefinition =
|
|
29
|
-
'resourceTypeId';
|
|
30
|
-
export const RESOURCE_TYPE_FIELD_TYPE: keyof ResourceTypeDefinition =
|
|
31
|
-
'resourceType';
|
|
32
|
-
export const RESOURCE_TYPE_FIELD_DESCRIPTION: keyof ResourceTypeDefinition =
|
|
33
|
-
'description';
|
|
34
|
-
|
|
35
|
-
export const WFOResourceTypesPage = () => {
|
|
36
|
-
const t = useTranslations('metadata.resourceTypes');
|
|
37
|
-
|
|
38
|
-
const initialPageSize =
|
|
39
|
-
getTableConfigFromLocalStorage(
|
|
40
|
-
METADATA_RESOURCE_TYPES_TABLE_LOCAL_STORAGE_KEY,
|
|
41
|
-
)?.selectedPageSize ?? DEFAULT_PAGE_SIZE;
|
|
42
|
-
|
|
43
|
-
const { dataDisplayParams, setDataDisplayParam } =
|
|
44
|
-
useDataDisplayParams<ResourceTypeDefinition>({
|
|
45
|
-
pageSize: initialPageSize,
|
|
46
|
-
sortBy: {
|
|
47
|
-
field: RESOURCE_TYPE_FIELD_TYPE,
|
|
48
|
-
order: SortOrder.ASC,
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
const tableColumns: WFOTableColumns<ResourceTypeDefinition> = {
|
|
53
|
-
resourceType: {
|
|
54
|
-
field: RESOURCE_TYPE_FIELD_TYPE,
|
|
55
|
-
name: t('type'),
|
|
56
|
-
width: '110',
|
|
57
|
-
},
|
|
58
|
-
description: {
|
|
59
|
-
field: RESOURCE_TYPE_FIELD_DESCRIPTION,
|
|
60
|
-
name: t('description'),
|
|
61
|
-
width: '400',
|
|
62
|
-
},
|
|
63
|
-
resourceTypeId: {
|
|
64
|
-
field: RESOURCE_TYPE_FIELD_ID,
|
|
65
|
-
name: t('resourceId'),
|
|
66
|
-
width: '110',
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
const { data, isFetching } = useQueryWithGraphql(
|
|
71
|
-
GET_RESOURCE_TYPES_GRAPHQL_QUERY,
|
|
72
|
-
{
|
|
73
|
-
first: dataDisplayParams.pageSize,
|
|
74
|
-
after: dataDisplayParams.pageIndex * dataDisplayParams.pageSize,
|
|
75
|
-
sortBy: dataDisplayParams.sortBy,
|
|
76
|
-
},
|
|
77
|
-
'resourceTypes',
|
|
78
|
-
true,
|
|
79
|
-
);
|
|
80
|
-
|
|
81
|
-
const dataSorting: WFODataSorting<ResourceTypeDefinition> = {
|
|
82
|
-
field: dataDisplayParams.sortBy?.field ?? RESOURCE_TYPE_FIELD_TYPE,
|
|
83
|
-
sortOrder: dataDisplayParams.sortBy?.order ?? SortOrder.ASC,
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
const totalItems = data?.resourceTypes.pageInfo.totalItems;
|
|
87
|
-
|
|
88
|
-
const pagination: Pagination = {
|
|
89
|
-
pageSize: dataDisplayParams.pageSize,
|
|
90
|
-
pageIndex: dataDisplayParams.pageIndex,
|
|
91
|
-
pageSizeOptions: DEFAULT_PAGE_SIZES,
|
|
92
|
-
totalItemCount: totalItems ? totalItems : 0,
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
return (
|
|
96
|
-
<WFOMetadataPageLayout>
|
|
97
|
-
<WFOTableWithFilter<ResourceTypeDefinition>
|
|
98
|
-
data={data ? data.resourceTypes.page : []}
|
|
99
|
-
tableColumns={tableColumns}
|
|
100
|
-
dataSorting={dataSorting}
|
|
101
|
-
onUpdateDataSort={getDataSortHandler<ResourceTypeDefinition>(
|
|
102
|
-
dataDisplayParams,
|
|
103
|
-
setDataDisplayParam,
|
|
104
|
-
)}
|
|
105
|
-
onUpdatePage={getPageChangeHandler<ResourceTypeDefinition>(
|
|
106
|
-
setDataDisplayParam,
|
|
107
|
-
)}
|
|
108
|
-
onUpdateEsQueryString={getEsQueryStringHandler<ResourceTypeDefinition>(
|
|
109
|
-
setDataDisplayParam,
|
|
110
|
-
)}
|
|
111
|
-
pagination={pagination}
|
|
112
|
-
isLoading={isFetching}
|
|
113
|
-
esQueryString={dataDisplayParams.esQueryString}
|
|
114
|
-
localStorageKey={
|
|
115
|
-
METADATA_RESOURCE_TYPES_TABLE_LOCAL_STORAGE_KEY
|
|
116
|
-
}
|
|
117
|
-
/>
|
|
118
|
-
</WFOMetadataPageLayout>
|
|
119
|
-
);
|
|
120
|
-
};
|