@orchestrator-ui/orchestrator-ui-components 0.2.4 → 0.2.6

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 (444) hide show
  1. package/.storybook/main.js +1 -1
  2. package/.turbo/turbo-build.log +9 -7
  3. package/.turbo/turbo-lint.log +3 -6
  4. package/.turbo/turbo-test.log +17 -9
  5. package/CHANGELOG.md +12 -0
  6. package/dist/index.d.ts +1092 -358
  7. package/dist/index.js +22934 -6399
  8. package/jest.config.cjs +0 -1
  9. package/package.json +24 -8
  10. package/src/api/axios.ts +34 -0
  11. package/src/api/index.ts +170 -0
  12. package/src/components/WfoAuth/WfoAuth.tsx +22 -0
  13. package/src/components/WfoAuth/index.ts +1 -0
  14. package/src/components/{WFOBadges/WFOBadge/WFOBadge.stories.tsx → WfoBadges/WfoBadge/WfoBadge.stories.tsx} +5 -4
  15. package/src/components/{WFOBadges/WFOBadge/WFOBadge.tsx → WfoBadges/WfoBadge/WfoBadge.tsx} +4 -3
  16. package/src/components/WfoBadges/WfoBadge/index.ts +1 -0
  17. package/src/components/{WFOBadges/WFOEngineStatusBadge/WFOEngineStatusBadge.stories.tsx → WfoBadges/WfoEngineStatusBadge/WfoEngineStatusBadge.stories.tsx} +6 -4
  18. package/src/components/{WFOBadges/WFOEngineStatusBadge/WFOEngineStatusBadge.tsx → WfoBadges/WfoEngineStatusBadge/WfoEngineStatusBadge.tsx} +13 -7
  19. package/src/components/WfoBadges/WfoEngineStatusBadge/index.ts +1 -0
  20. package/src/components/{WFOBadges/WFOEnvironmentBadge/WFOEnvironmentBadge.stories.tsx → WfoBadges/WfoEnvironmentBadge/WfoEnvironmentBadge.stories.tsx} +6 -4
  21. package/src/components/{WFOBadges/WFOEnvironmentBadge/WFOEnvironmentBadge.tsx → WfoBadges/WfoEnvironmentBadge/WfoEnvironmentBadge.tsx} +8 -7
  22. package/src/components/WfoBadges/WfoEnvironmentBadge/index.ts +1 -0
  23. package/src/components/WfoBadges/WfoFailedTasksBadge/WfoFailedTasksBadge.stories.tsx +13 -0
  24. package/src/components/WfoBadges/WfoFailedTasksBadge/WfoFailedTasksBadge.tsx +95 -0
  25. package/src/components/WfoBadges/WfoFailedTasksBadge/index.ts +1 -0
  26. package/src/components/{WFOBadges/WFOHeaderBadge/WFOHeaderBadge.stories.tsx → WfoBadges/WfoHeaderBadge/WfoHeaderBadge.stories.tsx} +6 -4
  27. package/src/components/{WFOBadges/WFOHeaderBadge/WFOHeaderBadge.tsx → WfoBadges/WfoHeaderBadge/WfoHeaderBadge.tsx} +6 -4
  28. package/src/components/WfoBadges/WfoHeaderBadge/index.ts +1 -0
  29. package/src/components/{WFOBadges/WFOProcessStatusBadge/WFOProcessStatusBadge.tsx → WfoBadges/WfoProcessStatusBadge/WfoProcessStatusBadge.tsx} +8 -6
  30. package/src/components/WfoBadges/WfoProcessStatusBadge/index.ts +1 -0
  31. package/src/components/WfoBadges/WfoProductBlockBadge/WfoProductBlockBadge.stories.tsx +16 -0
  32. package/src/components/WfoBadges/WfoProductBlockBadge/WfoProductBlockBadge.tsx +70 -0
  33. package/src/components/WfoBadges/WfoProductBlockBadge/index.ts +1 -0
  34. package/src/components/WfoBadges/WfoProductStatusBadge/WfoProductStatusBadge.stories.tsx +22 -0
  35. package/src/components/WfoBadges/WfoProductStatusBadge/WfoProductStatusBadge.tsx +53 -0
  36. package/src/components/WfoBadges/WfoProductStatusBadge/index.ts +1 -0
  37. package/src/components/{WFOBadges/WFOSubscriptionStatusBadge/WFOSubscriptionStatusBadge.stories.tsx → WfoBadges/WfoSubscriptionStatusBadge/WfoSubscriptionStatusBadge.stories.tsx} +5 -4
  38. package/src/components/{WFOBadges/WFOSubscriptionStatusBadge/WFOSubscriptionStatusBadge.tsx → WfoBadges/WfoSubscriptionStatusBadge/WfoSubscriptionStatusBadge.tsx} +12 -10
  39. package/src/components/WfoBadges/WfoSubscriptionStatusBadge/index.ts +1 -0
  40. package/src/components/WfoBadges/WfoWorkflowTargetBadge/WfoWorkflowTargetBadge.tsx +65 -0
  41. package/src/components/WfoBadges/WfoWorkflowTargetBadge/index.ts +1 -0
  42. package/src/components/WfoBadges/index.ts +9 -0
  43. package/src/components/WfoButtonComboBox/WfoButtonComboBox.tsx +76 -0
  44. package/src/components/WfoButtonComboBox/styles.ts +13 -0
  45. package/src/components/WfoDateTime/WfoDateTime.tsx +28 -0
  46. package/src/components/WfoDateTime/index.ts +1 -0
  47. package/src/components/WfoDropdownButton/WfoDropdownButton.tsx +67 -0
  48. package/src/components/WfoDropdownButton/index.ts +1 -0
  49. package/src/components/{WFOFilterTabs/WFOFilterTabs.tsx → WfoFilterTabs/WfoFilterTabs.tsx} +8 -6
  50. package/src/components/WfoFilterTabs/index.ts +1 -0
  51. package/src/components/WfoForms/AutoFieldLoader.tsx +110 -0
  52. package/src/components/WfoForms/AutoFields.tsx +49 -0
  53. package/src/components/WfoForms/CreateForm.tsx +71 -0
  54. package/src/components/WfoForms/UserInputForm.tsx +607 -0
  55. package/src/components/WfoForms/UserInputFormStyling.ts +80 -0
  56. package/src/components/WfoForms/UserInputFormWizard.tsx +120 -0
  57. package/src/components/WfoForms/formFields/AcceptField.tsx +239 -0
  58. package/src/components/WfoForms/formFields/AcceptFieldStyling.ts +29 -0
  59. package/src/components/WfoForms/formFields/BoolField.tsx +71 -0
  60. package/src/components/WfoForms/formFields/BoolFieldStyling.ts +68 -0
  61. package/src/components/WfoForms/formFields/ContactPersonAutocomplete.tsx +97 -0
  62. package/src/components/WfoForms/formFields/ContactPersonAutocompleteStyles.ts +40 -0
  63. package/src/components/WfoForms/formFields/ContactPersonNameField.tsx +253 -0
  64. package/src/components/WfoForms/formFields/DateField.tsx +72 -0
  65. package/src/components/WfoForms/formFields/DividerField.tsx +29 -0
  66. package/src/components/WfoForms/formFields/ErrorField.tsx +40 -0
  67. package/src/components/WfoForms/formFields/ErrorsField.tsx +34 -0
  68. package/src/components/WfoForms/formFields/ImsNodeIdField.tsx +110 -0
  69. package/src/components/WfoForms/formFields/IpNetworkField.tsx +128 -0
  70. package/src/components/WfoForms/formFields/IpPrefixTableField.tsx +454 -0
  71. package/src/components/WfoForms/formFields/IpPrefixTableFieldStyling.ts +117 -0
  72. package/src/components/WfoForms/formFields/LabelField.tsx +39 -0
  73. package/src/components/WfoForms/formFields/ListAddField.tsx +98 -0
  74. package/src/components/WfoForms/formFields/ListDelField.tsx +95 -0
  75. package/src/components/WfoForms/formFields/ListField.tsx +113 -0
  76. package/src/components/WfoForms/formFields/ListItemField.tsx +40 -0
  77. package/src/components/WfoForms/formFields/ListSelectField.tsx +92 -0
  78. package/src/components/WfoForms/formFields/LocationCodeField.tsx +66 -0
  79. package/src/components/WfoForms/formFields/LongTextField.tsx +68 -0
  80. package/src/components/WfoForms/formFields/NestField.tsx +107 -0
  81. package/src/components/WfoForms/formFields/NumField.tsx +75 -0
  82. package/src/components/WfoForms/formFields/OptGroupField.tsx +74 -0
  83. package/src/components/WfoForms/formFields/OrganisationField.tsx +57 -0
  84. package/src/components/WfoForms/formFields/ProductField.tsx +78 -0
  85. package/src/components/WfoForms/formFields/RadioField.tsx +87 -0
  86. package/src/components/WfoForms/formFields/SelectField.tsx +152 -0
  87. package/src/components/WfoForms/formFields/SplitPrefix.tsx +163 -0
  88. package/src/components/WfoForms/formFields/SplitPrefixStyling.ts +11 -0
  89. package/src/components/WfoForms/formFields/SubmitField.tsx +50 -0
  90. package/src/components/WfoForms/formFields/SubscriptionField.tsx +351 -0
  91. package/src/components/WfoForms/formFields/SubscriptionFieldStyling.ts +33 -0
  92. package/src/components/WfoForms/formFields/SubscriptionSummaryField.tsx +75 -0
  93. package/src/components/WfoForms/formFields/TextField.tsx +71 -0
  94. package/src/components/WfoForms/formFields/TimestampField.tsx +103 -0
  95. package/src/components/WfoForms/formFields/VlanField.tsx +297 -0
  96. package/src/components/WfoForms/formFields/index.ts +29 -0
  97. package/src/components/WfoForms/formFields/listFieldStyling.ts +86 -0
  98. package/src/components/WfoForms/formFields/reactSelectStyles.ts +45 -0
  99. package/src/components/WfoForms/formFields/surf/types.ts +53 -0
  100. package/src/components/WfoForms/formFields/surf/utils.ts +1 -0
  101. package/src/components/WfoForms/formFields/types.ts +50 -0
  102. package/src/components/WfoForms/formFields/utils.spec.ts +196 -0
  103. package/src/components/WfoForms/formFields/utils.ts +65 -0
  104. package/src/components/WfoForms/index.ts +5 -0
  105. package/src/components/WfoForms/useAxiosApiClient.ts +8 -0
  106. package/src/components/WfoInsyncIcon/WfoInsyncIcon.stories.tsx +21 -0
  107. package/src/components/WfoInsyncIcon/WfoInsyncIcon.tsx +26 -0
  108. package/src/components/WfoInsyncIcon/index.ts +1 -0
  109. package/src/components/WfoJsonCodeBlock/WfoJsonCodeBlock.tsx +27 -0
  110. package/src/components/WfoJsonCodeBlock/styles.ts +13 -0
  111. package/src/components/WfoKeyValueTable/WfoKeyCell.tsx +25 -0
  112. package/src/components/WfoKeyValueTable/WfoKeyValueTable.tsx +41 -0
  113. package/src/components/WfoKeyValueTable/WfoValueCell.tsx +53 -0
  114. package/src/components/WfoKeyValueTable/index.ts +3 -0
  115. package/src/components/WfoKeyValueTable/styles.ts +77 -0
  116. package/src/components/WfoLoading/WfoLoading.tsx +3 -0
  117. package/src/components/WfoLoading/index.ts +1 -0
  118. package/src/components/WfoNoResults/WfoNoResults.stories.tsx +19 -0
  119. package/src/components/WfoNoResults/WfoNoResults.tsx +22 -0
  120. package/src/components/WfoNoResults/index.ts +1 -0
  121. package/src/components/WfoNoResults/styles.ts +22 -0
  122. package/src/components/WfoPageHeader/WfoPageHeader.tsx +25 -0
  123. package/src/components/{WFOPageTemplate/WFOBreadcrumbs/WFOBreadcrumbs.tsx → WfoPageTemplate/WfoBreadcrumbs/WfoBreadcrumbs.tsx} +5 -2
  124. package/src/components/WfoPageTemplate/WfoBreadcrumbs/index.ts +1 -0
  125. package/src/components/{WFOPageTemplate/WFOPageHeader/WFOPageHeader.stories.tsx → WfoPageTemplate/WfoPageHeader/WfoPageHeader.stories.tsx} +7 -5
  126. package/src/components/{WFOPageTemplate/WFOPageHeader/WFOPageHeader.tsx → WfoPageTemplate/WfoPageHeader/WfoPageHeader.tsx} +26 -11
  127. package/src/components/WfoPageTemplate/WfoPageHeader/index.ts +1 -0
  128. package/src/components/{WFOPageTemplate/WFOPageTemplate/WFOPageTemplate.stories.tsx → WfoPageTemplate/WfoPageTemplate/WfoPageTemplate.stories.tsx} +8 -6
  129. package/src/components/{WFOPageTemplate/WFOPageTemplate/WFOPageTemplate.tsx → WfoPageTemplate/WfoPageTemplate/WfoPageTemplate.tsx} +20 -10
  130. package/src/components/WfoPageTemplate/WfoPageTemplate/index.ts +1 -0
  131. package/src/components/{WFOPageTemplate/WFOSidebar/WFOSidebar.stories.tsx → WfoPageTemplate/WfoSidebar/WfoSidebar.stories.tsx} +6 -4
  132. package/src/components/WfoPageTemplate/WfoSidebar/WfoSidebar.tsx +161 -0
  133. package/src/components/WfoPageTemplate/WfoSidebar/WfoStartCreateWorkflowButtonComboBox.tsx +58 -0
  134. package/src/components/WfoPageTemplate/WfoSidebar/index.ts +1 -0
  135. package/src/components/WfoPageTemplate/index.ts +4 -0
  136. package/src/components/{WFOPageTemplate → WfoPageTemplate}/paths.ts +1 -1
  137. package/src/components/WfoProcessesList/WfoProcessList.tsx +227 -0
  138. package/src/components/WfoProcessesList/processListObjectMappers.ts +79 -0
  139. package/src/components/{WFOSearchBar/WFOSearchField.tsx → WfoSearchBar/WfoSearchField.tsx} +4 -3
  140. package/src/components/WfoSearchBar/index.ts +1 -0
  141. package/src/components/WfoSettingsModal/WfoInformationModal.tsx +41 -0
  142. package/src/components/{WFOSettingsModal/WFOSettingsModal.tsx → WfoSettingsModal/WfoSettingsModal.tsx} +3 -2
  143. package/src/components/WfoSettingsModal/index.tsx +2 -0
  144. package/src/components/{WFOSettingsPage/WFOEngineStatusButton.tsx → WfoSettingsPage/WfoEngineStatusButton.tsx} +5 -3
  145. package/src/components/{WFOSettingsPage/WFOFlushSettings.tsx → WfoSettingsPage/WfoFlushSettings.tsx} +19 -30
  146. package/src/components/{WFOSettingsPage/WFOModifySettings.tsx → WfoSettingsPage/WfoModifySettings.tsx} +7 -5
  147. package/src/components/{WFOSettingsPage/WFOSettings.tsx → WfoSettingsPage/WfoSettings.tsx} +12 -8
  148. package/src/components/{WFOSettingsPage/WFOStatus.tsx → WfoSettingsPage/WfoStatus.tsx} +8 -6
  149. package/src/components/WfoSettingsPage/index.ts +1 -0
  150. package/src/components/{WFOStartPage/WFOFrequentlyUsed.stories.tsx → WfoStartPage/WfoFrequentlyUsed.stories.tsx} +5 -4
  151. package/src/components/{WFOStartPage/WFOFrequentlyUsed.tsx → WfoStartPage/WfoFrequentlyUsed.tsx} +4 -3
  152. package/src/components/{WFOStartPage/WFOListItemStartPage.stories.tsx → WfoStartPage/WfoListItemStartPage.stories.tsx} +6 -4
  153. package/src/components/{WFOStartPage/WFOListItemStartPage.tsx → WfoStartPage/WfoListItemStartPage.tsx} +9 -6
  154. package/src/components/{WFOStartPage/WFOListStartPage.stories.tsx → WfoStartPage/WfoListStartPage.stories.tsx} +6 -4
  155. package/src/components/{WFOStartPage/WFOListStartPage.tsx → WfoStartPage/WfoListStartPage.tsx} +9 -6
  156. package/src/components/{WFOStartPage/WFOMultiListSection.stories.tsx → WfoStartPage/WfoMultiListSection.stories.tsx} +5 -4
  157. package/src/components/{WFOStartPage/WFOMultiListSection.tsx → WfoStartPage/WfoMultiListSection.tsx} +9 -6
  158. package/src/components/WfoStartPage/WfoNewProcessPanel.stories.tsx +13 -0
  159. package/src/components/{WFOStartPage/WFONewProcessPanel.tsx → WfoStartPage/WfoNewProcessPanel.tsx} +5 -3
  160. package/src/components/WfoStartPage/WfoStatCards.stories.tsx +13 -0
  161. package/src/components/{WFOStartPage/WFOStatCards.tsx → WfoStartPage/WfoStatCards.tsx} +6 -4
  162. package/src/components/WfoStartPage/index.ts +6 -0
  163. package/src/components/WfoStartTaskButtonComboBox/WfoStartTaskButtonComboBox.tsx +51 -0
  164. package/src/components/WfoStartTaskButtonComboBox/index.ts +1 -0
  165. package/src/components/WfoSubscription/SubscriptionKeyValueBlock.tsx +46 -0
  166. package/src/components/WfoSubscription/WfoProcessesTimeline.tsx +158 -0
  167. package/src/components/WfoSubscription/WfoRelatedSubscriptions.tsx +192 -0
  168. package/src/components/WfoSubscription/WfoSubscription.tsx +145 -0
  169. package/src/components/WfoSubscription/WfoSubscriptionActions.tsx +236 -0
  170. package/src/components/WfoSubscription/WfoSubscriptionDetailTree.tsx +161 -0
  171. package/src/components/WfoSubscription/WfoSubscriptionGeneral.tsx +147 -0
  172. package/src/components/WfoSubscription/WfoSubscriptionProductBlock.tsx +207 -0
  173. package/src/components/WfoSubscription/index.ts +8 -0
  174. package/src/components/WfoSubscription/styles.ts +104 -0
  175. package/src/components/WfoSubscription/utils/index.ts +1 -0
  176. package/src/components/WfoSubscription/utils/utils.spec.ts +168 -0
  177. package/src/components/WfoSubscription/utils/utils.ts +76 -0
  178. package/src/components/{WFOSubscriptionsList/WFOSubscriptionsList.tsx → WfoSubscriptionsList/WfoSubscriptionsList.tsx} +63 -57
  179. package/src/components/{WFOSubscriptionsList → WfoSubscriptionsList}/index.ts +1 -2
  180. package/src/components/{WFOSubscriptionsList → WfoSubscriptionsList}/mapGrapghQlSubscriptionsResultToSubscriptionListItems.ts +16 -7
  181. package/src/components/{WFOSubscriptionsList → WfoSubscriptionsList}/subscriptionListTabs.ts +18 -18
  182. package/src/components/WfoTable/WfoBasicTable/WfoBasicTable.tsx +178 -0
  183. package/src/components/{WFOTable/WFOSortDirectionIcon.tsx → WfoTable/WfoBasicTable/WfoSortDirectionIcon.tsx} +8 -8
  184. package/src/components/WfoTable/WfoBasicTable/WfoStatusColorField.tsx +21 -0
  185. package/src/components/WfoTable/WfoBasicTable/WfoTableHeaderCell.tsx +120 -0
  186. package/src/components/WfoTable/WfoBasicTable/index.ts +4 -0
  187. package/src/components/WfoTable/WfoBasicTable/styles.ts +73 -0
  188. package/src/components/{WFOTable/WFODataGridTable/WFODataGridTable.stories.tsx → WfoTable/WfoDataGridTable/WfoDataGridTable.stories.tsx} +9 -7
  189. package/src/components/{WFOTable/WFODataGridTable/WFODataGridTable.tsx → WfoTable/WfoDataGridTable/WfoDataGridTable.tsx} +23 -21
  190. package/src/components/{WFOTable/WFODataGridTable/WFOdataGridColumns.spec.ts → WfoTable/WfoDataGridTable/WfodataGridColumns.spec.ts} +7 -7
  191. package/src/components/{WFOTable/WFODataGridTable/WFOdataGridColumns.ts → WfoTable/WfoDataGridTable/WfodataGridColumns.ts} +8 -7
  192. package/src/components/WfoTable/WfoFirstPartUUID/WfoFirstPartUUID.tsx +11 -0
  193. package/src/components/WfoTable/WfoFirstPartUUID/index.ts +1 -0
  194. package/src/components/WfoTable/WfoSortButtons/WfoSortButton.tsx +31 -0
  195. package/src/components/WfoTable/WfoSortButtons/WfoSortButtons.tsx +33 -0
  196. package/src/components/WfoTable/WfoSortButtons/index.ts +2 -0
  197. package/src/components/WfoTable/WfoSortButtons/styles.ts +20 -0
  198. package/src/components/{WFOTable/WFOTableSettingsModal/WFOTableSettingsModal.tsx → WfoTable/WfoTableSettingsModal/WfoTableSettingsModal.tsx} +5 -3
  199. package/src/components/WfoTable/WfoTableSettingsModal/index.ts +1 -0
  200. package/src/components/WfoTable/WfoTableWithFilter/WfoTableWithFilter.tsx +253 -0
  201. package/src/components/WfoTable/WfoTableWithFilter/index.ts +1 -0
  202. package/src/components/WfoTable/index.ts +15 -0
  203. package/src/components/{WFOTable → WfoTable}/utils/columns.ts +27 -16
  204. package/src/components/{WFOTable → WfoTable}/utils/constants.ts +3 -1
  205. package/src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.spec.ts +52 -0
  206. package/src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.ts +21 -0
  207. package/src/components/{WFOTable → WfoTable}/utils/tableConfigPersistence.spec.ts +4 -4
  208. package/src/components/{WFOTable → WfoTable}/utils/tableConfigPersistence.ts +12 -16
  209. package/src/components/{WFOTable → WfoTable}/utils/tableUtils.spec.ts +1 -1
  210. package/src/components/{WFOTable → WfoTable}/utils/tableUtils.ts +6 -25
  211. package/src/components/WfoTimeline/WfoTimeline.tsx +69 -0
  212. package/src/components/WfoTimeline/WfoTimelineStep.tsx +57 -0
  213. package/src/components/WfoTimeline/index.ts +1 -0
  214. package/src/components/WfoTimeline/mapProcessStepStatusToEuiStepStatus.ts +23 -0
  215. package/src/components/WfoTimeline/styles.ts +165 -0
  216. package/src/components/WfoTimeline/timelineUtils.ts +14 -0
  217. package/src/components/WfoToastsList/WfoToastsList.tsx +22 -0
  218. package/src/components/WfoToastsList/index.ts +1 -0
  219. package/src/components/WfoTree/WfoTree.tsx +27 -0
  220. package/src/components/{WFOTree/WFOTreeBranch.tsx → WfoTree/WfoTreeBranch.tsx} +7 -6
  221. package/src/components/{WFOTree/WFOTreeNode.tsx → WfoTree/WfoTreeNode.tsx} +28 -13
  222. package/src/components/WfoTree/index.ts +4 -0
  223. package/src/components/WfoTree/styles.ts +18 -0
  224. package/src/components/WfoTree/treeUtils.spec.ts +100 -0
  225. package/src/components/WfoTree/treeUtils.ts +21 -0
  226. package/src/components/WfoWorkflowSteps/WfoStep/WfoStep.stories.tsx +13 -0
  227. package/src/components/WfoWorkflowSteps/WfoStep/WfoStep.tsx +167 -0
  228. package/src/components/WfoWorkflowSteps/WfoStep/index.ts +1 -0
  229. package/src/components/WfoWorkflowSteps/WfoStepList/WfoStepList.tsx +107 -0
  230. package/src/components/WfoWorkflowSteps/WfoStepList/index.ts +1 -0
  231. package/src/components/WfoWorkflowSteps/WfoStepStatusIcon/WfoStepStatusIcon.stories.tsx +16 -0
  232. package/src/components/WfoWorkflowSteps/WfoStepStatusIcon/WfoStepStatusIcon.tsx +114 -0
  233. package/src/components/WfoWorkflowSteps/WfoStepStatusIcon/index.ts +1 -0
  234. package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoStepListHeader.tsx +139 -0
  235. package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoWorkflowStepList.stories.tsx +56 -0
  236. package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoWorkflowStepList.tsx +121 -0
  237. package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/index.ts +2 -0
  238. package/src/components/WfoWorkflowSteps/index.ts +4 -0
  239. package/src/components/WfoWorkflowSteps/stepListUtils.spec.ts +26 -0
  240. package/src/components/WfoWorkflowSteps/stepListUtils.ts +56 -0
  241. package/src/components/WfoWorkflowSteps/styles.ts +121 -0
  242. package/src/components/confirmationDialog/ConfirmationDialogStyling.ts +12 -0
  243. package/src/components/confirmationDialog/WfoConfirmationDialog.tsx +112 -0
  244. package/src/components/confirmationDialog/index.ts +1 -0
  245. package/src/components/index.ts +19 -11
  246. package/src/contexts/ApiClientContext.tsx +30 -0
  247. package/src/contexts/ConfirmationDialogProvider.tsx +99 -0
  248. package/src/contexts/OrchestratorConfigContext.tsx +8 -3
  249. package/src/contexts/ToastContext.tsx +136 -0
  250. package/src/contexts/TreeContext.tsx +53 -32
  251. package/src/contexts/index.ts +3 -1
  252. package/src/graphqlQueries/customersQuery.ts +19 -0
  253. package/src/graphqlQueries/index.ts +4 -0
  254. package/src/graphqlQueries/processDetailQuery.ts +45 -0
  255. package/src/graphqlQueries/processListQuery.ts +17 -7
  256. package/src/graphqlQueries/productBlocksQuery.ts +13 -1
  257. package/src/graphqlQueries/productsQuery.ts +5 -1
  258. package/src/graphqlQueries/relatedSubscriptionsQuery.ts +65 -0
  259. package/src/graphqlQueries/resourceTypesQuery.ts +13 -2
  260. package/src/graphqlQueries/subscriptionDetailQuery.ts +62 -0
  261. package/src/graphqlQueries/subscriptionsDropdownOptionsQuery.ts +47 -0
  262. package/src/graphqlQueries/subscriptionsListQuery.ts +4 -0
  263. package/src/graphqlQueries/{workflowsQuery.ts → workflows/workflowsQuery.ts} +9 -3
  264. package/src/graphqlQueries/workflows/workflowsQueryForDropdownList.ts +41 -0
  265. package/src/hooks/DataFetchHooks.ts +72 -49
  266. package/src/hooks/ProcessesHooks/useDeleteProcess.ts +37 -0
  267. package/src/hooks/index.ts +4 -1
  268. package/src/hooks/surf/useGetSubscriptionDropdownOptions.ts +47 -0
  269. package/src/hooks/surf/useIsTaggedPort.ts +29 -0
  270. package/src/hooks/useDataDisplayParams.ts +1 -1
  271. package/src/hooks/useEngineStatusQuery.ts +20 -10
  272. package/src/hooks/useOrchestratorConfig.ts +6 -2
  273. package/src/hooks/useProcessStatusCountsQuery.ts +8 -23
  274. package/src/hooks/useQueryWithFetch.ts +33 -0
  275. package/src/hooks/useQueryWithGraphql.ts +18 -13
  276. package/src/hooks/useSessionWithToken.ts +14 -0
  277. package/src/hooks/useStoredTableConfig.ts +43 -0
  278. package/src/hooks/useSubscriptionActions.ts +3 -3
  279. package/src/hooks/useToastMessage.ts +5 -0
  280. package/src/hooks/useWithOrchestratorTheme.ts +10 -0
  281. package/src/icons/WfoArrowNarrowDown.stories.tsx +13 -0
  282. package/src/icons/{WFOArrowNarrowDown.tsx → WfoArrowNarrowDown.tsx} +4 -2
  283. package/src/icons/WfoArrowNarrowUp.stories.tsx +13 -0
  284. package/src/icons/{WFOArrowNarrowUp.tsx → WfoArrowNarrowUp.tsx} +4 -2
  285. package/src/icons/WfoArrowsExpand.stories.tsx +13 -0
  286. package/src/icons/WfoArrowsExpand.tsx +33 -0
  287. package/src/icons/WfoCheckmarkCircleFill.stories.tsx +13 -0
  288. package/src/icons/{WFOCheckmarkCircleFill.tsx → WfoCheckmarkCircleFill.tsx} +3 -2
  289. package/src/icons/WfoChevronDown.stories.tsx +13 -0
  290. package/src/icons/{WFOChevronDown.tsx → WfoChevronDown.tsx} +3 -2
  291. package/src/icons/WfoChevronUp.stories.tsx +13 -0
  292. package/src/icons/WfoChevronUp.tsx +33 -0
  293. package/src/icons/WfoClipboardCopy.stories.tsx +13 -0
  294. package/src/icons/WfoClipboardCopy.tsx +33 -0
  295. package/src/icons/WfoCode.stories.tsx +13 -0
  296. package/src/icons/WfoCode.tsx +35 -0
  297. package/src/icons/WfoCogFill.stories.tsx +13 -0
  298. package/src/icons/WfoCogFill.tsx +35 -0
  299. package/src/icons/WfoEyeFill.stories.tsx +13 -0
  300. package/src/icons/WfoEyeFill.tsx +35 -0
  301. package/src/icons/{WFOIconProps.ts → WfoIconProps.ts} +1 -1
  302. package/src/icons/WfoLogoutIcon.stories.tsx +13 -0
  303. package/src/icons/{WFOLogoutIcon.tsx → WfoLogoutIcon.tsx} +3 -2
  304. package/src/icons/WfoMinusCircleFill.stories.tsx +13 -0
  305. package/src/icons/WfoMinusCircleFill.tsx +33 -0
  306. package/src/icons/WfoMinusCircleOutline.stories.tsx +13 -0
  307. package/src/icons/{WFOMinusCircleOutline.tsx → WfoMinusCircleOutline.tsx} +3 -2
  308. package/src/icons/WfoPencilAlt.stories.tsx +13 -0
  309. package/src/icons/WfoPencilAlt.tsx +33 -0
  310. package/src/icons/WfoPlayFill.stories.tsx +13 -0
  311. package/src/icons/WfoPlayFill.tsx +35 -0
  312. package/src/icons/WfoPlusCircleFill.stories.tsx +13 -0
  313. package/src/icons/{WFOPlusCircleFill.tsx → WfoPlusCircleFill.tsx} +3 -2
  314. package/src/icons/WfoRefresh.stories.tsx +13 -0
  315. package/src/icons/WfoRefresh.tsx +35 -0
  316. package/src/icons/WfoSearchStrikethrough.stories.tsx +13 -0
  317. package/src/icons/WfoSearchStrikethrough.tsx +33 -0
  318. package/src/icons/WfoSortAsc.stories.tsx +13 -0
  319. package/src/icons/WfoSortAsc.tsx +33 -0
  320. package/src/icons/WfoSortDesc.stories.tsx +13 -0
  321. package/src/icons/WfoSortDesc.tsx +33 -0
  322. package/src/icons/WfoStatistic.tsx +41 -0
  323. package/src/icons/WfoStatusDotIcon.stories.tsx +13 -0
  324. package/src/icons/{WFOStatusDotIcon.tsx → WfoStatusDotIcon.tsx} +3 -2
  325. package/src/icons/WfoXCircleFill.stories.tsx +13 -0
  326. package/src/icons/{WFOXCircleFill.tsx → WfoXCircleFill.tsx} +3 -2
  327. package/src/icons/index.ts +22 -10
  328. package/src/index.ts +1 -0
  329. package/src/messages/en-US.json +173 -20
  330. package/src/messages/getTranslationMessages.spec.ts +1 -1
  331. package/src/messages/getTranslationMessages.ts +1 -1
  332. package/src/messages/nl-NL.json +177 -22
  333. package/src/pages/index.ts +2 -0
  334. package/src/pages/metadata/{WFOMetadataPageLayout.tsx → WfoMetadataPageLayout.tsx} +5 -3
  335. package/src/pages/metadata/WfoProductBlocksPage.tsx +239 -0
  336. package/src/pages/metadata/{WFOProductsPage.tsx → WfoProductsPage.tsx} +96 -54
  337. package/src/pages/metadata/WfoResourceTypesPage.tsx +185 -0
  338. package/src/pages/metadata/WfoWorkflowsPage.tsx +194 -0
  339. package/src/pages/metadata/index.ts +4 -4
  340. package/src/pages/metadata/workflowListObjectMapper.ts +43 -0
  341. package/src/pages/processes/WfoProcessDetail.tsx +327 -0
  342. package/src/pages/processes/WfoProcessDetailPage.tsx +88 -0
  343. package/src/pages/processes/WfoProcessListPage.tsx +106 -0
  344. package/src/pages/processes/WfoProcessListSubscriptionsCell.tsx +72 -0
  345. package/src/pages/processes/getProcessListTabTypeFromString.ts +6 -6
  346. package/src/pages/processes/index.ts +3 -2
  347. package/src/pages/processes/tabConfig.ts +28 -10
  348. package/src/pages/processes/timelineUtils.spec.ts +202 -0
  349. package/src/pages/processes/timelineUtils.ts +113 -0
  350. package/src/pages/subscriptions/WfoSubscriptionDetailPage.tsx +19 -0
  351. package/src/pages/subscriptions/{WFOSubscriptionsListPage.tsx → WfoSubscriptionsListPage.tsx} +40 -20
  352. package/src/pages/subscriptions/index.ts +2 -1
  353. package/src/pages/tasks/WfoTaskListPage.tsx +120 -0
  354. package/src/pages/tasks/index.ts +1 -0
  355. package/src/pages/workflow/WfoStartWorkflowPage.tsx +176 -0
  356. package/src/pages/workflow/index.ts +1 -0
  357. package/src/stories/Button.jsx +45 -39
  358. package/src/stories/Configure.mdx +48 -43
  359. package/src/stories/Header.jsx +59 -45
  360. package/src/stories/Page.jsx +81 -60
  361. package/src/stories/Page.stories.js +2 -1
  362. package/src/stories/button.css +18 -18
  363. package/src/stories/colors.mdx +12 -0
  364. package/src/stories/colors.tsx +27 -0
  365. package/src/stories/header.css +18 -18
  366. package/src/stories/page.css +40 -40
  367. package/src/theme/defaultOrchestratorTheme.ts +16 -0
  368. package/src/types/forms.ts +40 -0
  369. package/src/types/index.ts +0 -1
  370. package/src/types/types.ts +283 -73
  371. package/src/utils/date.spec.ts +157 -5
  372. package/src/utils/date.ts +66 -5
  373. package/src/utils/environmentVariables.spec.ts +17 -0
  374. package/src/utils/environmentVariables.ts +12 -0
  375. package/src/utils/getDefaultTableConfig.ts +101 -0
  376. package/src/utils/getProductNamesFromProcess.spec.ts +133 -0
  377. package/src/utils/getProductNamesFromProcess.ts +16 -0
  378. package/src/utils/getTokenName.ts +2 -1
  379. package/src/utils/index.ts +2 -0
  380. package/src/utils/string.spec.ts +24 -1
  381. package/src/utils/strings.ts +5 -0
  382. package/tsconfig.build.json +18 -0
  383. package/tsconfig.json +8 -2
  384. package/src/components/WFOBadges/WFOBadge/index.ts +0 -1
  385. package/src/components/WFOBadges/WFOEngineStatusBadge/index.ts +0 -1
  386. package/src/components/WFOBadges/WFOEnvironmentBadge/index.ts +0 -1
  387. package/src/components/WFOBadges/WFOFailedTasksBadge/WFOFailedTasksBadge.stories.tsx +0 -12
  388. package/src/components/WFOBadges/WFOFailedTasksBadge/WFOFailedTasksBadge.tsx +0 -63
  389. package/src/components/WFOBadges/WFOFailedTasksBadge/index.ts +0 -1
  390. package/src/components/WFOBadges/WFOHeaderBadge/index.ts +0 -1
  391. package/src/components/WFOBadges/WFOProcessStatusBadge/index.ts +0 -1
  392. package/src/components/WFOBadges/WFOProductBlockBadge/WFOProductBlockBadge.stories.tsx +0 -15
  393. package/src/components/WFOBadges/WFOProductBlockBadge/WFOProductBlockBadge.tsx +0 -22
  394. package/src/components/WFOBadges/WFOProductBlockBadge/index.ts +0 -1
  395. package/src/components/WFOBadges/WFOSubscriptionStatusBadge/index.ts +0 -1
  396. package/src/components/WFOBadges/index.ts +0 -8
  397. package/src/components/WFOFilterTabs/index.ts +0 -1
  398. package/src/components/WFOLoading/WFOLoading.tsx +0 -2
  399. package/src/components/WFOLoading/index.ts +0 -1
  400. package/src/components/WFOPageTemplate/WFOBreadcrumbs/index.ts +0 -1
  401. package/src/components/WFOPageTemplate/WFOPageHeader/index.ts +0 -1
  402. package/src/components/WFOPageTemplate/WFOPageTemplate/index.ts +0 -1
  403. package/src/components/WFOPageTemplate/WFOSidebar/WFOSidebar.tsx +0 -161
  404. package/src/components/WFOPageTemplate/WFOSidebar/index.ts +0 -1
  405. package/src/components/WFOPageTemplate/index.ts +0 -4
  406. package/src/components/WFOSearchBar/index.ts +0 -1
  407. package/src/components/WFOSettingsModal/index.tsx +0 -1
  408. package/src/components/WFOSettingsPage/index.ts +0 -1
  409. package/src/components/WFOStartPage/WFONewProcessPanel.stories.tsx +0 -12
  410. package/src/components/WFOStartPage/WFOStatCards.stories.tsx +0 -12
  411. package/src/components/WFOStartPage/index.ts +0 -6
  412. package/src/components/WFOSubscription/WFOFixedInputBlock.tsx +0 -58
  413. package/src/components/WFOSubscription/WFOProcessesTimeline.tsx +0 -105
  414. package/src/components/WFOSubscription/WFOProductBlock.tsx +0 -186
  415. package/src/components/WFOSubscription/WFOSubscriptionActions.tsx +0 -138
  416. package/src/components/WFOSubscription/WFOSubscriptionBlock.tsx +0 -109
  417. package/src/components/WFOSubscription/WFOSubscriptionDetailTree.tsx +0 -184
  418. package/src/components/WFOSubscription/WFOSubscriptionGeneral.tsx +0 -53
  419. package/src/components/WFOSubscription/index.ts +0 -7
  420. package/src/components/WFOSubscription/styles.ts +0 -18
  421. package/src/components/WFOSubscriptionsList/types.ts +0 -11
  422. package/src/components/WFOTable/WFOTable.tsx +0 -85
  423. package/src/components/WFOTable/WFOTableHeaderCell.tsx +0 -30
  424. package/src/components/WFOTable/WFOTableSettingsModal/index.ts +0 -1
  425. package/src/components/WFOTable/WFOTableWithFilter/WFOTableWithFilter.tsx +0 -174
  426. package/src/components/WFOTable/WFOTableWithFilter/index.ts +0 -1
  427. package/src/components/WFOTable/index.ts +0 -14
  428. package/src/components/WFOTree/WFOTree.tsx +0 -16
  429. package/src/contexts/SubscriptionContext.tsx +0 -72
  430. package/src/hooks/useSubscriptionProcesses.ts +0 -45
  431. package/src/icons/WFOCheckmarkCircleFill.stories.tsx +0 -12
  432. package/src/icons/WFOLogoutIcon.stories.tsx +0 -12
  433. package/src/icons/WFOMinusCircleOutline.stories.tsx +0 -12
  434. package/src/icons/WFOPlusCircleFill.stories.tsx +0 -12
  435. package/src/icons/WFOStatusDotIcon.stories.tsx +0 -12
  436. package/src/icons/WFOXCircleFill.stories.tsx +0 -12
  437. package/src/pages/metadata/WFOProductBlocksPage.tsx +0 -166
  438. package/src/pages/metadata/WFOResourceTypesPage.tsx +0 -120
  439. package/src/pages/metadata/WFOWorkflowsPage.tsx +0 -251
  440. package/src/pages/processes/WFOProcessListPage.tsx +0 -213
  441. package/src/pages/processes/WFOProcessesListSubscriptionsCell.tsx +0 -28
  442. package/src/pages/processes/tableConfig.ts +0 -22
  443. package/src/types/subscription.ts +0 -21
  444. package/src/components/{WFOTable → WfoTable}/utils/columns.spec.ts +1 -1
@@ -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
- };
@@ -1,251 +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_WORKFLOWS_TABLE_LOCAL_STORAGE_KEY,
9
- WFOProductBlockBadge,
10
- } from '../../components';
11
- import { WFOTableWithFilter } from '../../components';
12
- import {
13
- getTableConfigFromLocalStorage,
14
- getDataSortHandler,
15
- getPageChangeHandler,
16
- getEsQueryStringHandler,
17
- } from '../../components';
18
- import type { WFOTableColumns, WFODataSorting } from '../../components';
19
-
20
- import type { WorkflowDefinition } from '../../types';
21
- import { SortOrder } from '../../types';
22
-
23
- import { useDataDisplayParams } from '../../hooks';
24
- import { WFOMetadataPageLayout } from './WFOMetadataPageLayout';
25
-
26
- const WORKFLOW_FIELD_NAME: keyof WorkflowDefinition = 'name';
27
- const WORKFLOW_FIELD_DESCRIPTION: keyof WorkflowDefinition = 'description';
28
- const WORKFLOW_FIELD_TARGET: keyof WorkflowDefinition = 'target';
29
- const WORKFLOW_FIELD_PRODUCT_TAGS: keyof WorkflowDefinition = 'productTags';
30
- const WORKFLOW_FIELD_CREATED_AT: keyof WorkflowDefinition = 'createdAt';
31
-
32
- export const WFOWorkflowsPage = () => {
33
- //TODO: Delete when backend is implemented - see issue #219
34
-
35
- const isFetching = false;
36
- const data = {
37
- workflows: {
38
- page: [
39
- {
40
- name: 'modify_note',
41
- target: 'MODIFY',
42
- description: 'Modify Note',
43
- createdAt: '2022-11-30T15:35:36.057665+00:00',
44
- productTags: [
45
- 'Wireless',
46
- 'SPNL',
47
- 'Node',
48
- 'IPP',
49
- 'L2VPN',
50
- 'SP',
51
- 'LP',
52
- 'L3VPN',
53
- 'LR',
54
- 'MSCNL',
55
- 'MSC',
56
- 'IPBGP',
57
- 'IRBSP',
58
- 'IPS',
59
- 'AGGSP',
60
- 'IPPG',
61
- 'Corelink',
62
- 'NSILP',
63
- 'NSISTPNL',
64
- 'DCC',
65
- 'FW',
66
- 'NSISTP',
67
- 'IP_PREFIX',
68
- 'AGGSPNL',
69
- 'IPPP',
70
- ],
71
- },
72
- {
73
- name: 'task_clean_up_tasks',
74
- target: 'SYSTEM',
75
- description: 'Clean up old tasks',
76
- createdAt: '2022-11-30T15:35:36.057665+00:00',
77
- productTags: [],
78
- },
79
- {
80
- name: 'task_resume_workflows',
81
- target: 'SYSTEM',
82
- description:
83
- "Resume all workflows that are stuck on tasks with the status 'waiting'",
84
- createdAt: '2022-11-30T15:35:36.057665+00:00',
85
- productTags: [],
86
- },
87
- {
88
- name: 'task_validate_products',
89
- target: 'SYSTEM',
90
- description: 'Validate products',
91
- createdAt: '2022-11-30T15:35:36.057665+00:00',
92
- productTags: [],
93
- },
94
- {
95
- name: 'create_core_link',
96
- target: 'CREATE',
97
- description: 'Create Core Link',
98
- createdAt: '2022-11-30T15:35:36.057665+00:00',
99
- productTags: ['Corelink'],
100
- },
101
- {
102
- name: 'create_node',
103
- target: 'CREATE',
104
- description: 'Create Node',
105
- createdAt: '2022-11-30T15:35:36.057665+00:00',
106
- productTags: ['Node'],
107
- },
108
- {
109
- name: 'create_ip_prefix',
110
- target: 'CREATE',
111
- description: 'Create IP Prefix',
112
- createdAt: '2022-11-30T15:35:36.057665+00:00',
113
- productTags: ['IP_PREFIX'],
114
- },
115
- {
116
- name: 'create_sn8_service_port',
117
- target: 'CREATE',
118
- description: 'Create SN8 Service Port',
119
- createdAt: '2022-11-30T15:35:36.057665+00:00',
120
- productTags: ['SP', 'SPNL'],
121
- },
122
- {
123
- name: 'modify_sn8_ip_bgp',
124
- target: 'MODIFY',
125
- description: 'Change a SN8 IP BGP subscription',
126
- createdAt: '2022-11-30T15:35:36.057665+00:00',
127
- productTags: ['IPBGP'],
128
- },
129
- {
130
- name: 'create_sn8_ip_bgp',
131
- target: 'CREATE',
132
- description: 'Create SN8 IP BGP',
133
- createdAt: '2022-11-30T15:35:36.057665+00:00',
134
- productTags: ['IPBGP'],
135
- },
136
- ],
137
- pageInfo: {
138
- endCursor: 9,
139
- hasNextPage: true,
140
- hasPreviousPage: false,
141
- startCursor: 0,
142
- totalItems: 10,
143
- },
144
- },
145
- };
146
-
147
- const t = useTranslations('metadata.workflows');
148
-
149
- const initialPageSize =
150
- getTableConfigFromLocalStorage(
151
- METADATA_WORKFLOWS_TABLE_LOCAL_STORAGE_KEY,
152
- )?.selectedPageSize ?? DEFAULT_PAGE_SIZE;
153
-
154
- const { dataDisplayParams, setDataDisplayParam } =
155
- useDataDisplayParams<WorkflowDefinition>({
156
- pageSize: initialPageSize,
157
- sortBy: {
158
- field: WORKFLOW_FIELD_NAME,
159
- order: SortOrder.ASC,
160
- },
161
- });
162
-
163
- const tableColumns: WFOTableColumns<WorkflowDefinition> = {
164
- name: {
165
- field: WORKFLOW_FIELD_NAME,
166
- name: t('name'),
167
- width: '110',
168
- },
169
- description: {
170
- field: WORKFLOW_FIELD_DESCRIPTION,
171
- name: t('description'),
172
- width: '220',
173
- },
174
- target: {
175
- field: WORKFLOW_FIELD_TARGET,
176
- name: t('target'),
177
- width: '50',
178
- },
179
- productTags: {
180
- field: WORKFLOW_FIELD_PRODUCT_TAGS,
181
- name: t('productTags'),
182
- width: '200',
183
- render: (productTags) => (
184
- <>
185
- {productTags &&
186
- productTags.map((productTag, index) => (
187
- <WFOProductBlockBadge key={index}>
188
- {productTag}
189
- </WFOProductBlockBadge>
190
- ))}
191
- </>
192
- ),
193
- },
194
- createdAt: {
195
- field: WORKFLOW_FIELD_CREATED_AT,
196
- name: t('createdAt'),
197
- width: '110',
198
- },
199
- };
200
-
201
- //TODO: uncomment when backend is done
202
-
203
- // const { data, isFetching } = useQueryWithGraphql(
204
- // GET_WORKFLOWS_GRAPHQL_QUERY,
205
- // {
206
- // first: dataDisplayParams.pageSize,
207
- // after: dataDisplayParams.pageIndex * dataDisplayParams.pageSize,
208
- // sortBy: dataDisplayParams.sortBy,
209
- // },
210
- // 'workflows',
211
- // true,
212
- // );
213
-
214
- const dataSorting: WFODataSorting<WorkflowDefinition> = {
215
- field: dataDisplayParams.sortBy?.field ?? WORKFLOW_FIELD_NAME,
216
- sortOrder: dataDisplayParams.sortBy?.order ?? SortOrder.ASC,
217
- };
218
-
219
- const totalItems = data?.workflows.pageInfo.totalItems;
220
-
221
- const pagination: Pagination = {
222
- pageSize: dataDisplayParams.pageSize,
223
- pageIndex: dataDisplayParams.pageIndex,
224
- pageSizeOptions: DEFAULT_PAGE_SIZES,
225
- totalItemCount: totalItems ? totalItems : 0,
226
- };
227
-
228
- return (
229
- <WFOMetadataPageLayout>
230
- <WFOTableWithFilter<WorkflowDefinition>
231
- data={data ? data.workflows.page : []}
232
- tableColumns={tableColumns}
233
- dataSorting={dataSorting}
234
- onUpdateDataSort={getDataSortHandler<WorkflowDefinition>(
235
- dataDisplayParams,
236
- setDataDisplayParam,
237
- )}
238
- onUpdatePage={getPageChangeHandler<WorkflowDefinition>(
239
- setDataDisplayParam,
240
- )}
241
- onUpdateEsQueryString={getEsQueryStringHandler<WorkflowDefinition>(
242
- setDataDisplayParam,
243
- )}
244
- pagination={pagination}
245
- isLoading={isFetching}
246
- esQueryString={dataDisplayParams.esQueryString}
247
- localStorageKey={METADATA_WORKFLOWS_TABLE_LOCAL_STORAGE_KEY}
248
- />
249
- </WFOMetadataPageLayout>
250
- );
251
- };
@@ -1,213 +0,0 @@
1
- import React from 'react';
2
- import {
3
- ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY,
4
- WFODataSorting,
5
- DEFAULT_PAGE_SIZE,
6
- DEFAULT_PAGE_SIZES,
7
- getDataSortHandler,
8
- getEsQueryStringHandler,
9
- getPageChangeHandler,
10
- getTableConfigFromLocalStorage,
11
- WFOLoading,
12
- WFOTableColumns,
13
- WFOTableWithFilter,
14
- WFOFilterTabs,
15
- COMPLETED_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY,
16
- WFOProcessStatusBadge,
17
- } from '../../components';
18
- import { Process, SortOrder } from '../../types';
19
- import { useDataDisplayParams, useQueryWithGraphql } from '../../hooks';
20
- import { GET_PROCESS_LIST_GRAPHQL_QUERY } from '../../graphqlQueries/processListQuery';
21
- import { Pagination } from '@elastic/eui/src/components';
22
- import { WFOProcessesListSubscriptionsCell } from './WFOProcessesListSubscriptionsCell';
23
- import { StringParam, useQueryParam, withDefault } from 'use-query-params';
24
- import { useRouter } from 'next/router';
25
- import { EuiPageHeader, EuiSpacer } from '@elastic/eui';
26
- import { defaultProcessListTabs, WFOProcessListTabType } from './tabConfig';
27
- import { getProcessListTabTypeFromString } from './getProcessListTabTypeFromString';
28
- import {
29
- defaultHiddenColumnsActiveProcesses,
30
- defaultHiddenColumnsCompletedProcesses,
31
- } from './tableConfig';
32
- import { useTranslations } from 'next-intl';
33
-
34
- export const WFOProcessListPage = () => {
35
- const router = useRouter();
36
- const t = useTranslations('processes.index'); // todo
37
-
38
- const [activeTab, setActiveTab] = useQueryParam(
39
- 'activeTab',
40
- withDefault(StringParam, WFOProcessListTabType.ACTIVE),
41
- );
42
-
43
- const initialPageSize =
44
- getTableConfigFromLocalStorage(
45
- ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY,
46
- )?.selectedPageSize ?? DEFAULT_PAGE_SIZE;
47
-
48
- const { dataDisplayParams, setDataDisplayParam } =
49
- useDataDisplayParams<Process>({
50
- pageSize: initialPageSize,
51
- sortBy: {
52
- // Todo: waiting for fix in backend -- currently the sortBy field id's are not matching with the returned data
53
- // https://github.com/workfloworchestrator/orchestrator-ui/issues/91
54
- // @ts-ignore
55
- field: 'modified',
56
- // field: 'lastModified',
57
- order: SortOrder.DESC,
58
- },
59
- });
60
-
61
- const selectedProcessListTab = getProcessListTabTypeFromString(activeTab);
62
-
63
- const handleChangeProcessListTab = (
64
- updatedProcessListTab: WFOProcessListTabType,
65
- ) => {
66
- setActiveTab(updatedProcessListTab);
67
- setDataDisplayParam('pageIndex', 0);
68
- };
69
-
70
- const alwaysOnFilters = defaultProcessListTabs.find(
71
- ({ id }) => id === selectedProcessListTab,
72
- )?.alwaysOnFilters;
73
-
74
- const tableColumns: WFOTableColumns<Process> = {
75
- workflowName: {
76
- field: 'workflowName',
77
- name: t('workflowName'),
78
- },
79
- step: {
80
- field: 'step',
81
- name: t('step'),
82
- },
83
- status: {
84
- field: 'status',
85
- name: t('status'),
86
- render: (cellValue) => (
87
- <WFOProcessStatusBadge processStatus={cellValue} />
88
- ),
89
- },
90
- workflowTarget: {
91
- field: 'workflowTarget',
92
- name: t('workflowTarget'),
93
- },
94
- product: {
95
- field: 'product',
96
- name: t('product'),
97
- },
98
- customer: {
99
- field: 'customer',
100
- name: t('customer'),
101
- },
102
- subscriptions: {
103
- field: 'subscriptions',
104
- name: t('subscriptions'),
105
- width: '400',
106
- render: ({ page }) => (
107
- <WFOProcessesListSubscriptionsCell subscriptions={page} />
108
- ),
109
- },
110
- createdBy: {
111
- field: 'createdBy',
112
- name: t('createdBy'),
113
- },
114
- assignee: {
115
- field: 'assignee',
116
- name: t('assignee'),
117
- },
118
- processId: {
119
- field: 'processId',
120
- name: t('processId'),
121
- },
122
- started: {
123
- field: 'started',
124
- name: t('started'),
125
- },
126
- lastModified: {
127
- field: 'lastModified',
128
- name: t('lastModified'),
129
- },
130
- };
131
-
132
- const { data, isFetching } = useQueryWithGraphql(
133
- GET_PROCESS_LIST_GRAPHQL_QUERY,
134
- {
135
- first: dataDisplayParams.pageSize,
136
- after: dataDisplayParams.pageIndex * dataDisplayParams.pageSize,
137
- sortBy: dataDisplayParams.sortBy,
138
- filterBy: alwaysOnFilters,
139
- },
140
- 'processList',
141
- true,
142
- );
143
-
144
- if (!data) {
145
- return <WFOLoading />;
146
- }
147
-
148
- if (!selectedProcessListTab) {
149
- router.replace('/processes');
150
- return null;
151
- }
152
-
153
- const dataSorting: WFODataSorting<Process> = {
154
- field: dataDisplayParams.sortBy?.field ?? 'lastModified',
155
- sortOrder: dataDisplayParams.sortBy?.order ?? SortOrder.ASC,
156
- };
157
-
158
- const { totalItems } = data.processes.pageInfo;
159
-
160
- const pagination: Pagination = {
161
- pageSize: dataDisplayParams.pageSize,
162
- pageIndex: dataDisplayParams.pageIndex,
163
- pageSizeOptions: DEFAULT_PAGE_SIZES,
164
- totalItemCount: totalItems ? totalItems : 0,
165
- };
166
-
167
- const defaultHiddenColumns =
168
- selectedProcessListTab === WFOProcessListTabType.ACTIVE
169
- ? defaultHiddenColumnsActiveProcesses
170
- : defaultHiddenColumnsCompletedProcesses;
171
-
172
- const localStorageKey =
173
- selectedProcessListTab === WFOProcessListTabType.ACTIVE
174
- ? ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY
175
- : COMPLETED_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY;
176
-
177
- return (
178
- <>
179
- <EuiSpacer />
180
-
181
- <EuiPageHeader pageTitle="Processes" />
182
- <EuiSpacer size="m" />
183
-
184
- <WFOFilterTabs
185
- tabs={defaultProcessListTabs}
186
- translationNamespace="processes.tabs"
187
- selectedTab={selectedProcessListTab}
188
- onChangeTab={handleChangeProcessListTab}
189
- />
190
- <EuiSpacer size="xxl" />
191
-
192
- <WFOTableWithFilter
193
- data={data.processes.page}
194
- tableColumns={tableColumns}
195
- dataSorting={dataSorting}
196
- pagination={pagination}
197
- isLoading={isFetching}
198
- defaultHiddenColumns={defaultHiddenColumns}
199
- localStorageKey={localStorageKey}
200
- onUpdateEsQueryString={getEsQueryStringHandler<Process>(
201
- setDataDisplayParam,
202
- )}
203
- onUpdatePage={getPageChangeHandler<Process>(
204
- setDataDisplayParam,
205
- )}
206
- onUpdateDataSort={getDataSortHandler<Process>(
207
- dataDisplayParams,
208
- setDataDisplayParam,
209
- )}
210
- />
211
- </>
212
- );
213
- };
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
- import { Subscription } from '../../types';
3
- import Link from 'next/link';
4
- import { FC } from 'react';
5
-
6
- export type WFOProcessesListSubscriptionsCellProps = {
7
- subscriptions: Pick<Subscription, 'subscriptionId' | 'description'>[];
8
- };
9
-
10
- export const WFOProcessesListSubscriptionsCell: FC<
11
- WFOProcessesListSubscriptionsCellProps
12
- > = ({ subscriptions }) => {
13
- const { length } = subscriptions;
14
-
15
- if (length === 0) {
16
- return null;
17
- }
18
-
19
- const firstSubscription = subscriptions[0];
20
- return (
21
- <>
22
- <Link href={`/subscriptions/${firstSubscription.subscriptionId}`}>
23
- {firstSubscription.description}
24
- </Link>
25
- {length > 1 && <span>{` (+${length - 1})`}</span>}
26
- </>
27
- );
28
- };
@@ -1,22 +0,0 @@
1
- import { TableColumnKeys } from '../../components';
2
- import { Process } from '../../types';
3
-
4
- export const defaultHiddenColumnsActiveProcesses: TableColumnKeys<Process> = [
5
- 'product',
6
- 'customer',
7
- 'createdBy',
8
- 'assignee',
9
- 'processId',
10
- ];
11
-
12
- export const defaultHiddenColumnsCompletedProcesses: TableColumnKeys<Process> =
13
- [
14
- 'step',
15
- 'status',
16
- 'product',
17
- 'customer',
18
- 'createdBy',
19
- 'assignee',
20
- 'processId',
21
- 'started',
22
- ];
@@ -1,21 +0,0 @@
1
- import { ProductDefinition } from './types';
2
-
3
- export enum SubscriptionStatus {
4
- INITIAL = 'INITIAL',
5
- ACTIVE = 'ACTIVE',
6
- MIGRATING = 'MIGRATING',
7
- DISABLED = 'DISABLED',
8
- TERMINATED = 'TERMINATED',
9
- PROVISIONING = 'PROVISIONING',
10
- }
11
-
12
- export type Subscription = {
13
- subscriptionId: string;
14
- description: string;
15
- note: string;
16
- startDate: string;
17
- endDate: string;
18
- insync: boolean;
19
- status: SubscriptionStatus;
20
- product: Pick<ProductDefinition, 'name' | 'tag' | 'productType'>;
21
- };
@@ -1,5 +1,5 @@
1
- import { getSortDirectionFromString } from './columns';
2
1
  import { SortOrder } from '../../../types';
2
+ import { getSortDirectionFromString } from './columns';
3
3
 
4
4
  describe('columns', () => {
5
5
  describe('getSortOrderFromString', () => {