quidproquo-web-admin 0.1.0 → 0.1.2

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 (200) hide show
  1. package/lib/commonjs/Auth/Auth.js +5 -6
  2. package/lib/commonjs/Auth/AuthChallengeMfaSetup/AuthChallengeMfaSetup.js +1 -1
  3. package/lib/commonjs/Auth/AuthChallengeNewPasswordRequired/AuthChallengeNewPasswordRequired.js +2 -2
  4. package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/AuthChallengeSoftwareTokenMfa.js +2 -2
  5. package/lib/commonjs/Auth/Login.js +2 -2
  6. package/lib/commonjs/Auth/logic/authRuntime.d.ts +7 -0
  7. package/lib/commonjs/Auth/logic/authRuntime.js +7 -0
  8. package/lib/commonjs/Auth/logic/index.d.ts +1 -0
  9. package/lib/commonjs/Auth/logic/index.js +1 -0
  10. package/lib/commonjs/Auth/logic/runtime/askAuthLogout.d.ts +2 -0
  11. package/lib/commonjs/Auth/logic/runtime/askAuthLogout.js +15 -0
  12. package/lib/commonjs/Auth/logic/runtime/authLogic.d.ts +2 -0
  13. package/lib/commonjs/Auth/logic/runtime/authLogic.js +2 -0
  14. package/lib/commonjs/Config/Config.js +3 -3
  15. package/lib/commonjs/LogViewer/ActionHistoryItem.js +1 -1
  16. package/lib/commonjs/LogViewer/ActionRender/ActionRender.js +3 -3
  17. package/lib/commonjs/LogViewer/AdminLogs/AdminLogGrid/AdminLogGrid.js +3 -3
  18. package/lib/commonjs/LogViewer/AdminLogs/AdminLogSearchBar/AdminLogSearchBar.js +4 -4
  19. package/lib/commonjs/LogViewer/AdminLogs/AdminLogs.js +1 -1
  20. package/lib/commonjs/LogViewer/Dashboard.js +8 -4
  21. package/lib/commonjs/LogViewer/EventTimeline.js +4 -4
  22. package/lib/commonjs/LogViewer/HelpChat/HelpChat.js +8 -7
  23. package/lib/commonjs/LogViewer/LogCorrelationTree.js +27 -24
  24. package/lib/commonjs/LogViewer/LogCorrelations.js +1 -1
  25. package/lib/commonjs/LogViewer/LogDetails.js +1 -1
  26. package/lib/commonjs/LogViewer/LogDialog/LogDialog.js +4 -4
  27. package/lib/commonjs/LogViewer/LogDialog/MovedToColdStorage/MovedToColdStorage.js +1 -1
  28. package/lib/commonjs/LogViewer/LogDialog/tabs/LogDetailsTab/LogDetailsTab.js +1 -1
  29. package/lib/commonjs/LogViewer/LogDialog/tabs/TimelineTab/TimelineTab.js +1 -1
  30. package/lib/commonjs/LogViewer/LogDialog/tabs/TreeTab/TreeTab.js +1 -1
  31. package/lib/commonjs/LogViewer/LogMetadataGrid.js +3 -3
  32. package/lib/commonjs/LogViewer/LogRawJson.js +1 -1
  33. package/lib/commonjs/LogViewer/LogSearch.js +1 -1
  34. package/lib/commonjs/LogViewer/LogSummary.js +2 -2
  35. package/lib/commonjs/LogViewer/LogSummaryDetails.js +5 -2
  36. package/lib/commonjs/LogViewer/LogSummaryReturn.js +1 -1
  37. package/lib/commonjs/LogViewer/TopSection.js +7 -7
  38. package/lib/commonjs/LogViewer/actionComponents/custom/CoreContextListCustomAction.js +1 -1
  39. package/lib/commonjs/LogViewer/actionComponents/custom/CoreLogCreateCustomAction.js +1 -1
  40. package/lib/commonjs/LogViewer/actionComponents/custom/CoreLogDisableEventHistoryCustomAction.js +1 -1
  41. package/lib/commonjs/LogViewer/actionComponents/custom/CoreLogTemplateLiteralCustomAction.js +1 -1
  42. package/lib/commonjs/LogViewer/actionComponents/custom/CoreNetworkRequestCustomAction.js +2 -2
  43. package/lib/commonjs/LogViewer/actionComponents/genericActionRenderer/ActionResultDisplay.js +1 -1
  44. package/lib/commonjs/LogViewer/actionComponents/genericActionRenderer/AnyVariableView/AnyVariableView.js +15 -15
  45. package/lib/commonjs/LogViewer/actionComponents/genericActionRenderer/getGenericActionRenderer.js +7 -4
  46. package/lib/commonjs/LogViewer/charts/CostPerService.js +1 -1
  47. package/lib/commonjs/LogViewer/charts/ErrorsByType.js +1 -1
  48. package/lib/commonjs/LogViewer/charts/ErrorsOverTime.js +1 -1
  49. package/lib/commonjs/LogViewer/charts/RequestsByService.js +2 -2
  50. package/lib/commonjs/LogViewer/hooks/useLogManagement.js +1 -1
  51. package/lib/commonjs/LogViewer/hooks/useLogTreeData.js +14 -11
  52. package/lib/commonjs/LogViewer/hooks/useServiceNames.js +6 -5
  53. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreAiActionComponentMap.d.ts +2 -0
  54. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreAiActionComponentMap.js +8 -0
  55. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreClaudeAiActionComponentMap.d.ts +2 -0
  56. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreClaudeAiActionComponentMap.js +7 -0
  57. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreConfigActionComponentMap.js +1 -0
  58. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreEventActionComponentMap.js +4 -0
  59. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreEventBusActionComponentMap.js +1 -1
  60. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreFileActionComponentMap.js +5 -0
  61. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreGraphDatabaseActionComponentMap.d.ts +2 -0
  62. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreGraphDatabaseActionComponentMap.js +14 -0
  63. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreInlineFunctionActionComponentMap.d.ts +2 -0
  64. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreInlineFunctionActionComponentMap.js +7 -0
  65. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreKeyValueStoreActionComponentMap.js +5 -0
  66. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreStateActionComponentMap.d.ts +2 -0
  67. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreStateActionComponentMap.js +8 -0
  68. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreStreamActionComponentMap.d.ts +2 -0
  69. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreStreamActionComponentMap.js +8 -0
  70. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreSystemActionComponentMap.js +1 -0
  71. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreUserDirectoryActionComponentMap.js +12 -2
  72. package/lib/commonjs/LogViewer/logic/actionComponentMap/core/index.js +7 -1
  73. package/lib/commonjs/LogViewer/logic/actionComponentMap/webserver/index.js +8 -1
  74. package/lib/commonjs/LogViewer/logic/actionComponentMap/webserver/webserverAdminActionComponentMap.d.ts +2 -0
  75. package/lib/commonjs/LogViewer/logic/actionComponentMap/webserver/webserverAdminActionComponentMap.js +10 -0
  76. package/lib/commonjs/LogViewer/logic/actionComponentMap/webserver/webserverApiKeyValidationActionComponentMap.d.ts +2 -0
  77. package/lib/commonjs/LogViewer/logic/actionComponentMap/webserver/webserverApiKeyValidationActionComponentMap.js +7 -0
  78. package/lib/commonjs/LogViewer/logic/actionComponentMap/webserver/webserverDnsActionComponentMap.d.ts +2 -0
  79. package/lib/commonjs/LogViewer/logic/actionComponentMap/webserver/webserverDnsActionComponentMap.js +7 -0
  80. package/lib/commonjs/LogViewer/logic/actionComponentMap/webserver/webserverGenericDataResourceActionComponentMap.d.ts +2 -0
  81. package/lib/commonjs/LogViewer/logic/actionComponentMap/webserver/webserverGenericDataResourceActionComponentMap.js +8 -0
  82. package/lib/commonjs/LogViewer/logic/actionComponentMap/webserver/webserverOpenApiSpecActionComponentMap.d.ts +2 -0
  83. package/lib/commonjs/LogViewer/logic/actionComponentMap/webserver/webserverOpenApiSpecActionComponentMap.js +7 -0
  84. package/lib/commonjs/LogViewer/logic/actionComponentMap/webserver/webserverRouteAuthValidationActionComponentMap.d.ts +2 -0
  85. package/lib/commonjs/LogViewer/logic/actionComponentMap/webserver/webserverRouteAuthValidationActionComponentMap.js +7 -0
  86. package/lib/commonjs/LogViewer/logic/actionComponentMap/webserver/webserverServiceActionComponentMap.d.ts +2 -0
  87. package/lib/commonjs/LogViewer/logic/actionComponentMap/webserver/webserverServiceActionComponentMap.js +7 -0
  88. package/lib/commonjs/LogViewer/logic/actionComponentMap/webserver/webserverWebEntryActionComponentMap.js +1 -1
  89. package/lib/commonjs/components/AdminDialog.js +2 -2
  90. package/lib/commonjs/components/AsyncButton.js +1 -1
  91. package/lib/commonjs/components/AutocompleteInput.js +2 -2
  92. package/lib/commonjs/components/DataGrid.js +1 -1
  93. package/lib/commonjs/components/DataGridPagination/DataGridPagination.js +1 -1
  94. package/lib/commonjs/components/DateCell/DateCell.js +1 -1
  95. package/lib/commonjs/components/DateRangePicker.js +2 -2
  96. package/lib/commonjs/components/MainLayout/MainLayout.js +11 -2
  97. package/lib/commonjs/components/TextInput.js +2 -2
  98. package/lib/commonjs/tmp/RandomView.js +1 -1
  99. package/lib/commonjs/useFederatedAddon.js +7 -6
  100. package/lib/esm/Auth/Auth.js +3 -4
  101. package/lib/esm/Auth/AuthChallengeMfaSetup/AuthChallengeMfaSetup.js +1 -1
  102. package/lib/esm/Auth/AuthChallengeMfaSetup/logic/authActionCreator.js +1 -1
  103. package/lib/esm/Auth/AuthChallengeNewPasswordRequired/AuthChallengeNewPasswordRequired.js +1 -1
  104. package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/AuthChallengeSoftwareTokenMfa.js +1 -1
  105. package/lib/esm/Auth/Login.js +2 -2
  106. package/lib/esm/Auth/logic/authRuntime.d.ts +7 -0
  107. package/lib/esm/Auth/logic/authRuntime.js +4 -0
  108. package/lib/esm/Auth/logic/index.d.ts +1 -0
  109. package/lib/esm/Auth/logic/index.js +1 -0
  110. package/lib/esm/Auth/logic/runtime/askAuthLogout.d.ts +2 -0
  111. package/lib/esm/Auth/logic/runtime/askAuthLogout.js +12 -0
  112. package/lib/esm/Auth/logic/runtime/authLogic.d.ts +2 -0
  113. package/lib/esm/Auth/logic/runtime/authLogic.js +2 -0
  114. package/lib/esm/Config/Config.js +3 -3
  115. package/lib/esm/LogViewer/ActionHistoryItem.js +1 -1
  116. package/lib/esm/LogViewer/ActionRender/ActionRender.js +3 -3
  117. package/lib/esm/LogViewer/AdminLogs/AdminLogGrid/AdminLogGrid.js +3 -3
  118. package/lib/esm/LogViewer/AdminLogs/AdminLogSearchBar/AdminLogSearchBar.js +4 -4
  119. package/lib/esm/LogViewer/AdminLogs/AdminLogs.js +1 -1
  120. package/lib/esm/LogViewer/Dashboard.js +9 -5
  121. package/lib/esm/LogViewer/EventTimeline.js +4 -4
  122. package/lib/esm/LogViewer/HelpChat/HelpChat.js +9 -8
  123. package/lib/esm/LogViewer/LogCorrelationTree.js +27 -24
  124. package/lib/esm/LogViewer/LogCorrelations.js +1 -1
  125. package/lib/esm/LogViewer/LogDetails.js +1 -1
  126. package/lib/esm/LogViewer/LogDialog/LogDialog.js +4 -4
  127. package/lib/esm/LogViewer/LogDialog/MovedToColdStorage/MovedToColdStorage.js +1 -1
  128. package/lib/esm/LogViewer/LogDialog/tabs/LogDetailsTab/LogDetailsTab.js +1 -1
  129. package/lib/esm/LogViewer/LogDialog/tabs/TimelineTab/TimelineTab.js +1 -1
  130. package/lib/esm/LogViewer/LogDialog/tabs/TreeTab/TreeTab.js +1 -1
  131. package/lib/esm/LogViewer/LogMetadataGrid.js +3 -3
  132. package/lib/esm/LogViewer/LogRawJson.js +1 -1
  133. package/lib/esm/LogViewer/LogSearch.js +1 -1
  134. package/lib/esm/LogViewer/LogSummary.js +2 -2
  135. package/lib/esm/LogViewer/LogSummaryDetails.js +5 -2
  136. package/lib/esm/LogViewer/LogSummaryReturn.js +1 -1
  137. package/lib/esm/LogViewer/TopSection.js +7 -7
  138. package/lib/esm/LogViewer/actionComponents/custom/CoreContextListCustomAction.js +1 -1
  139. package/lib/esm/LogViewer/actionComponents/custom/CoreLogCreateCustomAction.js +1 -1
  140. package/lib/esm/LogViewer/actionComponents/custom/CoreLogDisableEventHistoryCustomAction.js +1 -1
  141. package/lib/esm/LogViewer/actionComponents/custom/CoreLogTemplateLiteralCustomAction.js +1 -1
  142. package/lib/esm/LogViewer/actionComponents/custom/CoreNetworkRequestCustomAction.js +2 -2
  143. package/lib/esm/LogViewer/actionComponents/genericActionRenderer/ActionResultDisplay.js +1 -1
  144. package/lib/esm/LogViewer/actionComponents/genericActionRenderer/AnyVariableView/AnyVariableView.js +15 -15
  145. package/lib/esm/LogViewer/actionComponents/genericActionRenderer/getGenericActionRenderer.js +7 -4
  146. package/lib/esm/LogViewer/charts/CostPerService.js +1 -1
  147. package/lib/esm/LogViewer/charts/ErrorsByType.js +1 -1
  148. package/lib/esm/LogViewer/charts/ErrorsOverTime.js +1 -1
  149. package/lib/esm/LogViewer/charts/RequestsByService.js +2 -2
  150. package/lib/esm/LogViewer/hooks/useLogManagement.js +1 -1
  151. package/lib/esm/LogViewer/hooks/useLogTreeData.js +15 -12
  152. package/lib/esm/LogViewer/hooks/useServiceNames.js +7 -6
  153. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreAiActionComponentMap.d.ts +2 -0
  154. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreAiActionComponentMap.js +6 -0
  155. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreClaudeAiActionComponentMap.d.ts +2 -0
  156. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreClaudeAiActionComponentMap.js +5 -0
  157. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreConfigActionComponentMap.js +1 -0
  158. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreEventActionComponentMap.js +4 -0
  159. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreEventBusActionComponentMap.js +1 -1
  160. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreFileActionComponentMap.js +5 -0
  161. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreGraphDatabaseActionComponentMap.d.ts +2 -0
  162. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreGraphDatabaseActionComponentMap.js +12 -0
  163. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreInlineFunctionActionComponentMap.d.ts +2 -0
  164. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreInlineFunctionActionComponentMap.js +5 -0
  165. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreKeyValueStoreActionComponentMap.js +5 -0
  166. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreStateActionComponentMap.d.ts +2 -0
  167. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreStateActionComponentMap.js +6 -0
  168. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreStreamActionComponentMap.d.ts +2 -0
  169. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreStreamActionComponentMap.js +6 -0
  170. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreSystemActionComponentMap.js +1 -0
  171. package/lib/esm/LogViewer/logic/actionComponentMap/core/coreUserDirectoryActionComponentMap.js +12 -2
  172. package/lib/esm/LogViewer/logic/actionComponentMap/core/index.js +12 -0
  173. package/lib/esm/LogViewer/logic/actionComponentMap/webserver/index.js +14 -0
  174. package/lib/esm/LogViewer/logic/actionComponentMap/webserver/webserverAdminActionComponentMap.d.ts +2 -0
  175. package/lib/esm/LogViewer/logic/actionComponentMap/webserver/webserverAdminActionComponentMap.js +8 -0
  176. package/lib/esm/LogViewer/logic/actionComponentMap/webserver/webserverApiKeyValidationActionComponentMap.d.ts +2 -0
  177. package/lib/esm/LogViewer/logic/actionComponentMap/webserver/webserverApiKeyValidationActionComponentMap.js +5 -0
  178. package/lib/esm/LogViewer/logic/actionComponentMap/webserver/webserverDnsActionComponentMap.d.ts +2 -0
  179. package/lib/esm/LogViewer/logic/actionComponentMap/webserver/webserverDnsActionComponentMap.js +5 -0
  180. package/lib/esm/LogViewer/logic/actionComponentMap/webserver/webserverGenericDataResourceActionComponentMap.d.ts +2 -0
  181. package/lib/esm/LogViewer/logic/actionComponentMap/webserver/webserverGenericDataResourceActionComponentMap.js +6 -0
  182. package/lib/esm/LogViewer/logic/actionComponentMap/webserver/webserverOpenApiSpecActionComponentMap.d.ts +2 -0
  183. package/lib/esm/LogViewer/logic/actionComponentMap/webserver/webserverOpenApiSpecActionComponentMap.js +5 -0
  184. package/lib/esm/LogViewer/logic/actionComponentMap/webserver/webserverRouteAuthValidationActionComponentMap.d.ts +2 -0
  185. package/lib/esm/LogViewer/logic/actionComponentMap/webserver/webserverRouteAuthValidationActionComponentMap.js +5 -0
  186. package/lib/esm/LogViewer/logic/actionComponentMap/webserver/webserverServiceActionComponentMap.d.ts +2 -0
  187. package/lib/esm/LogViewer/logic/actionComponentMap/webserver/webserverServiceActionComponentMap.js +5 -0
  188. package/lib/esm/LogViewer/logic/actionComponentMap/webserver/webserverWebEntryActionComponentMap.js +1 -1
  189. package/lib/esm/components/AdminDialog.js +2 -2
  190. package/lib/esm/components/AsyncButton.js +1 -1
  191. package/lib/esm/components/AutocompleteInput.js +2 -2
  192. package/lib/esm/components/DataGrid.js +1 -1
  193. package/lib/esm/components/DataGridPagination/DataGridPagination.js +1 -1
  194. package/lib/esm/components/DateCell/DateCell.js +1 -1
  195. package/lib/esm/components/DateRangePicker.js +2 -2
  196. package/lib/esm/components/MainLayout/MainLayout.js +11 -2
  197. package/lib/esm/components/TextInput.js +2 -2
  198. package/lib/esm/tmp/RandomView.js +1 -1
  199. package/lib/esm/useFederatedAddon.js +8 -7
  200. package/package.json +7 -7
@@ -1,8 +1,10 @@
1
1
  import { askAuthUISetPassword, askAuthUISetUsername } from '../authActionCreator';
2
2
  import { askAuthLogin } from './askAuthLogin';
3
+ import { askAuthLogout } from './askAuthLogout';
3
4
  import { askAuthMain } from './askAuthMain';
4
5
  export declare const authLogic: {
5
6
  askAuthLogin: typeof askAuthLogin;
7
+ askAuthLogout: typeof askAuthLogout;
6
8
  askAuthMain: typeof askAuthMain;
7
9
  askAuthUISetUsername: typeof askAuthUISetUsername;
8
10
  askAuthUISetPassword: typeof askAuthUISetPassword;
@@ -1,8 +1,10 @@
1
1
  import { askAuthUISetPassword, askAuthUISetUsername } from '../authActionCreator';
2
2
  import { askAuthLogin } from './askAuthLogin';
3
+ import { askAuthLogout } from './askAuthLogout';
3
4
  import { askAuthMain } from './askAuthMain';
4
5
  export const authLogic = {
5
6
  askAuthLogin,
7
+ askAuthLogout,
6
8
  askAuthMain,
7
9
  askAuthUISetUsername,
8
10
  askAuthUISetPassword,
@@ -29,15 +29,15 @@ export function Config() {
29
29
  };
30
30
  const filteredServices = services.filter((s) => s.label.toLowerCase().includes(search.toLowerCase()));
31
31
  const selectedService = selectedServiceOverride || services[0]?.label;
32
- return (_jsxs(Box, { sx: { display: 'flex' }, children: [_jsx(CssBaseline, {}), _jsxs(Drawer, { variant: "permanent", sx: {
32
+ return (_jsxs(Box, { sx: { display: 'flex' }, children: [_jsx(CssBaseline, {}), _jsxs(Drawer, { sx: {
33
33
  width: drawerWidth,
34
34
  flexShrink: 0,
35
35
  [`& .MuiDrawer-paper`]: { width: drawerWidth, boxSizing: 'border-box' },
36
- }, children: [_jsx(Toolbar, { children: _jsx(TextField, { fullWidth: true, size: "small", variant: "outlined", placeholder: "Search services", value: search, onChange: (e) => setSearch(e.target.value), onKeyDown: (e) => {
36
+ }, variant: "permanent", children: [_jsx(Toolbar, { children: _jsx(TextField, { fullWidth: true, onChange: (e) => setSearch(e.target.value), onKeyDown: (e) => {
37
37
  if (e.key === 'Enter') {
38
38
  setSearch(filteredServices[0]?.label);
39
39
  handleServiceClick(filteredServices[0]?.label);
40
40
  }
41
- }, sx: { mt: 2 } }) }), _jsx(Box, { sx: { overflow: 'auto', p: 2 }, children: _jsx(List, { children: filteredServices.map((service) => (_jsx(ListItem, { disablePadding: true, children: _jsx(ListItemButton, { selected: service.label === selectedService, onClick: () => handleServiceClick(service.label), children: _jsx(ListItemText, { primary: service.label }) }) }, service.value))) }) })] }), _jsxs(Box, { component: "main", sx: { flexGrow: 1, p: 3 }, children: [_jsxs(Typography, { variant: "h5", gutterBottom: true, children: [selectedService, " Service"] }), _jsx(Tabs, { value: tabIndex, onChange: handleTabChange, sx: { borderBottom: 1, borderColor: 'divider' }, children: sections.map((section, index) => (_jsx(Tab, { label: section }, index))) }), _jsxs(Box, { sx: { mt: 2 }, children: [sections[tabIndex] === 'General' && _jsxs(Typography, { children: ["General settings for ", selectedService] }), sections[tabIndex] === 'Settings' && _jsx(Typography, { children: "Custom configuration options" }), sections[tabIndex] === 'Advanced' && _jsx(Typography, { children: "Advanced tuning and overrides" })] })] })] }));
41
+ }, placeholder: "Search services", size: "small", sx: { mt: 2 }, value: search, variant: "outlined" }) }), _jsx(Box, { sx: { overflow: 'auto', p: 2 }, children: _jsx(List, { children: filteredServices.map((service) => (_jsx(ListItem, { disablePadding: true, children: _jsx(ListItemButton, { onClick: () => handleServiceClick(service.label), selected: service.label === selectedService, children: _jsx(ListItemText, { primary: service.label }) }) }, service.value))) }) })] }), _jsxs(Box, { component: "main", sx: { flexGrow: 1, p: 3 }, children: [_jsxs(Typography, { gutterBottom: true, variant: "h5", children: [selectedService, " Service"] }), _jsx(Tabs, { onChange: handleTabChange, sx: { borderBottom: 1, borderColor: 'divider' }, value: tabIndex, children: sections.map((section, index) => (_jsx(Tab, { label: section }, index))) }), _jsxs(Box, { sx: { mt: 2 }, children: [sections[tabIndex] === 'General' && _jsxs(Typography, { children: ["General settings for ", selectedService] }), sections[tabIndex] === 'Settings' && _jsx(Typography, { children: "Custom configuration options" }), sections[tabIndex] === 'Advanced' && _jsx(Typography, { children: "Advanced tuning and overrides" })] })] })] }));
42
42
  }
43
43
  export default Config;
@@ -3,5 +3,5 @@ import TruncatedText from './TruncatedText';
3
3
  export const ActionHistoryItem = ({ action, result, expanded }) => {
4
4
  const inputText = JSON.stringify(action.payload, null, 2);
5
5
  const outputText = JSON.stringify(result, null, 2);
6
- return (_jsxs(_Fragment, { children: [_jsx("pre", { style: { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }, children: _jsx(TruncatedText, { title: "Input", text: inputText, expanded: expanded }) }), _jsx("pre", { style: { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }, children: _jsx(TruncatedText, { title: "Output", text: outputText, expanded: expanded }) })] }));
6
+ return (_jsxs(_Fragment, { children: [_jsx("pre", { style: { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }, children: _jsx(TruncatedText, { expanded: expanded, text: inputText, title: "Input" }) }), _jsx("pre", { style: { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }, children: _jsx(TruncatedText, { expanded: expanded, text: outputText, title: "Output" }) })] }));
7
7
  };
@@ -24,7 +24,7 @@ export const AnyCustomAction = ({ action, result, expanded }) => {
24
24
  export const ActionRender = ({ action, result, isLegacy, expanded }) => {
25
25
  const actionComponentConfig = actionComponentMap[action.type];
26
26
  if (!isLegacy && action.type === SystemActionType.Batch) {
27
- return _jsx(CoreBatchCustomAction, { action: action, result: result, expanded: expanded });
27
+ return _jsx(CoreBatchCustomAction, { action: action, expanded: expanded, result: result });
28
28
  }
29
29
  const ActionComponent = isLegacy
30
30
  ? ActionHistoryItem
@@ -33,7 +33,7 @@ export const ActionRender = ({ action, result, isLegacy, expanded }) => {
33
33
  : actionComponentConfig
34
34
  ? getGenericActionRenderer(actionComponentConfig[0], actionComponentConfig.slice(1))
35
35
  : AnyCustomAction;
36
- return (_jsx(_Fragment, { children: _jsx(ActionComponent, { action: action, result: result, expanded: expanded }) }));
36
+ return (_jsx(_Fragment, { children: _jsx(ActionComponent, { action: action, expanded: expanded, result: result }) }));
37
37
  };
38
38
  export const AnyActionHistoryItem = ({ action, result }) => {
39
39
  const [expanded, setExpanded] = useState(false);
@@ -44,5 +44,5 @@ export const AnyActionHistoryItem = ({ action, result }) => {
44
44
  const toggleLegacy = () => {
45
45
  setLegacy(!legacy);
46
46
  };
47
- return (_jsxs(_Fragment, { children: [_jsxs(Box, { display: "flex", alignItems: "center", children: [_jsx(Typography, { variant: "h6", component: "span", children: action.type.split('/').slice(-2).join('::') }), _jsx(Tooltip, { title: expanded ? 'Collapse' : 'Expand', children: _jsx(IconButton, { size: "small", onClick: toggleExpanded, children: expanded ? _jsx(ExpandLessIcon, {}) : _jsx(ExpandMoreIcon, {}) }) }), _jsx(Tooltip, { title: "Legacy View", children: _jsx(IconButton, { size: "small", onClick: toggleLegacy, children: _jsx(HistoryIcon, { color: legacy ? 'primary' : 'inherit' }) }) })] }), _jsx(ActionRender, { action: action, result: result, isLegacy: legacy, expanded: expanded })] }));
47
+ return (_jsxs(_Fragment, { children: [_jsxs(Box, { alignItems: "center", display: "flex", children: [_jsx(Typography, { component: "span", variant: "h6", children: action.type.split('/').slice(-2).join('::') }), _jsx(Tooltip, { title: expanded ? 'Collapse' : 'Expand', children: _jsx(IconButton, { onClick: toggleExpanded, size: "small", children: expanded ? _jsx(ExpandLessIcon, {}) : _jsx(ExpandMoreIcon, {}) }) }), _jsx(Tooltip, { title: "Legacy View", children: _jsx(IconButton, { onClick: toggleLegacy, size: "small", children: _jsx(HistoryIcon, { color: legacy ? 'primary' : 'inherit' }) }) })] }), _jsx(ActionRender, { action: action, expanded: expanded, isLegacy: legacy, result: result })] }));
48
48
  };
@@ -101,8 +101,8 @@ export const AdminLogGrid = ({ logs, isLoading, searchProgress }) => {
101
101
  background-color: #E3E3E3 !important;
102
102
  color: #000;
103
103
  }
104
- ` }), _jsx(DataGrid, { components: {
104
+ ` }), _jsx(DataGrid, { autoPageSize: true, columns: columns, components: {
105
105
  Pagination: DataGridPagination,
106
- LoadingOverlay: () => _jsx(LinearProgress, { variant: "determinate", value: searchProgress }),
107
- }, columns: columns, rows: logs.map((log, i) => ({ ...log, id: `${i}` })), autoPageSize: true, loading: isLoading, onRowClick: onRowClick, getRowClassName: getRowClassName }), _jsx(LogDialog, { open: !!selectedLogCorrelation, handleClose: clearSelectedLogCorrelation, logCorrelation: selectedLogCorrelation, storyResultMetadatas: logs, setSelectedLogCorrelation: setSelectedLogCorrelation })] }));
106
+ LoadingOverlay: () => _jsx(LinearProgress, { value: searchProgress, variant: "determinate" }),
107
+ }, getRowClassName: getRowClassName, loading: isLoading, onRowClick: onRowClick, rows: logs.map((log, i) => ({ ...log, id: `${i}` })) }), _jsx(LogDialog, { handleClose: clearSelectedLogCorrelation, logCorrelation: selectedLogCorrelation, open: !!selectedLogCorrelation, setSelectedLogCorrelation: setSelectedLogCorrelation, storyResultMetadatas: logs })] }));
108
108
  };
@@ -29,14 +29,14 @@ export function AdminLogSearchBar({ onSearch }) {
29
29
  updateStartAndEndTimeSpan(minutes);
30
30
  handleQuickTimeClose();
31
31
  };
32
- return (_jsxs(LocalizationProvider, { dateAdapter: AdapterDateFns, children: [_jsxs(Grid, { container: true, columns: 12, spacing: 2, children: [_jsx(Grid, { item: true, xs: 3, children: _jsxs(FormControl, { fullWidth: true, children: [_jsx(InputLabel, { id: "runtime-select-label", children: "Log Level" }), _jsx(Select, { labelId: "runtime-select-label", id: "demo-simple-select", value: logLevel, label: "Log Level", onChange: handleLogLevelOnChange, children: logLevelEnumLookups.map((key) => (_jsx(MenuItem, { value: key, children: key }, key))) })] }) }), _jsx(Grid, { item: true, xs: 3, children: _jsx(FormControl, { fullWidth: true, children: _jsx(Autocomplete, { getOptionLabel: (option) => option.label, options: serviceOptions, value: serviceOptions.find((o) => o.value === service) || null, onChange: handleServiceOnChange, renderInput: (params) => (_jsx(TextField, { ...params, label: "Service Name", InputLabelProps: {
32
+ return (_jsxs(LocalizationProvider, { dateAdapter: AdapterDateFns, children: [_jsxs(Grid, { columns: 12, container: true, spacing: 2, children: [_jsx(Grid, { item: true, xs: 3, children: _jsxs(FormControl, { fullWidth: true, children: [_jsx(InputLabel, { id: "runtime-select-label", children: "Log Level" }), _jsx(Select, { id: "demo-simple-select", label: "Log Level", labelId: "runtime-select-label", onChange: handleLogLevelOnChange, value: logLevel, children: logLevelEnumLookups.map((key) => (_jsx(MenuItem, { value: key, children: key }, key))) })] }) }), _jsx(Grid, { item: true, xs: 3, children: _jsx(FormControl, { fullWidth: true, children: _jsx(Autocomplete, { getOptionLabel: (option) => option.label, onChange: handleServiceOnChange, options: serviceOptions, renderInput: (params) => (_jsx(TextField, { ...params, InputLabelProps: {
33
33
  shrink: true,
34
- } })) }) }) }), _jsx(Grid, { item: true, xs: 3, children: _jsxs(Box, { position: "relative", children: [_jsx(FormControl, { fullWidth: true, children: _jsx(DateTimePicker, { label: "Start DateTime", value: startDate, onChange: handleStartDateChange }) }), _jsx(IconButton, { "aria-label": "quick time select", "aria-controls": "quick-time-menu", "aria-haspopup": "true", onClick: handleQuickTimeClick, sx: {
34
+ }, label: "Service Name" })), value: serviceOptions.find((o) => o.value === service) || null }) }) }), _jsx(Grid, { item: true, xs: 3, children: _jsxs(Box, { position: "relative", children: [_jsx(FormControl, { fullWidth: true, children: _jsx(DateTimePicker, { label: "Start DateTime", onChange: handleStartDateChange, value: startDate }) }), _jsx(IconButton, { "aria-controls": "quick-time-menu", "aria-haspopup": "true", "aria-label": "quick time select", onClick: handleQuickTimeClick, sx: {
35
35
  position: 'absolute',
36
36
  right: '-28px',
37
37
  top: '50%',
38
38
  transform: 'translateY(-50%)',
39
- }, children: _jsx(ExpandMoreIcon, {}) })] }) }), _jsx(Grid, { item: true, xs: 3, children: _jsx(FormControl, { fullWidth: true, children: _jsx(DateTimePicker, { label: "End DateTime", value: endDate, onChange: handleEndDateChange }) }) }), _jsx(Grid, { item: true, xs: 10, children: _jsx(FormControl, { fullWidth: true, children: _jsx(TextField, { label: "Message", value: msg, onChange: handleMsgOnChange, InputLabelProps: {
39
+ }, children: _jsx(ExpandMoreIcon, {}) })] }) }), _jsx(Grid, { item: true, xs: 3, children: _jsx(FormControl, { fullWidth: true, children: _jsx(DateTimePicker, { label: "End DateTime", onChange: handleEndDateChange, value: endDate }) }) }), _jsx(Grid, { item: true, xs: 10, children: _jsx(FormControl, { fullWidth: true, children: _jsx(TextField, { InputLabelProps: {
40
40
  shrink: true,
41
- } }) }) }), _jsx(Grid, { item: true, xs: 2, children: _jsx(AsyncButton, { onClick: () => onSearch(), children: "Search" }) })] }), _jsxs(Menu, { id: "quick-time-menu", anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleQuickTimeClose, children: [_jsx(MenuItem, { onClick: () => handleQuickTimeSelect(5), children: "Last 5 minutes" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(30), children: "Last 30 minutes" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(1 * 60), children: "Last hour" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(3 * 60), children: "Last 3 hours" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(8 * 60), children: "Last 8 hours" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(16 * 60), children: "Last 16 hours" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(24 * 60), children: "Last 24 hours" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(7 * 24 * 60), children: "Last 7 days" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(30 * 24 * 60), children: "Last month" })] })] }));
41
+ }, label: "Message", onChange: handleMsgOnChange, value: msg }) }) }), _jsx(Grid, { item: true, xs: 2, children: _jsx(AsyncButton, { onClick: () => onSearch(), children: "Search" }) })] }), _jsxs(Menu, { anchorEl: anchorEl, id: "quick-time-menu", keepMounted: true, onClose: handleQuickTimeClose, open: Boolean(anchorEl), children: [_jsx(MenuItem, { onClick: () => handleQuickTimeSelect(5), children: "Last 5 minutes" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(30), children: "Last 30 minutes" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(1 * 60), children: "Last hour" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(3 * 60), children: "Last 3 hours" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(8 * 60), children: "Last 8 hours" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(16 * 60), children: "Last 16 hours" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(24 * 60), children: "Last 24 hours" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(7 * 24 * 60), children: "Last 7 days" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(30 * 24 * 60), children: "Last month" })] })] }));
42
42
  }
@@ -7,5 +7,5 @@ import { useLogLogSearch } from './hooks';
7
7
  export const AdminLogs = () => {
8
8
  const { logLogs, searchProgress, onSearch } = useLogLogSearch();
9
9
  const isLoading = useIsLoading();
10
- return (_jsx(TabViewBox, { header: () => _jsx(AdminLogSearchBar, { onSearch: onSearch }), body: () => _jsx(AdminLogGrid, { logs: logLogs, isLoading: isLoading, searchProgress: searchProgress }) }));
10
+ return (_jsx(TabViewBox, { body: () => _jsx(AdminLogGrid, { isLoading: isLoading, logs: logLogs, searchProgress: searchProgress }), header: () => _jsx(AdminLogSearchBar, { onSearch: onSearch }) }));
11
11
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { uniqueBy } from 'quidproquo-web';
3
- import { useRunEvery, useThrottledMemo } from 'quidproquo-web-react';
3
+ import { useEffectCallback, useRunEvery, useThrottledMemo } from 'quidproquo-web-react';
4
4
  import { useSubscribeToWebSocketEvent } from 'quidproquo-web-react';
5
5
  import { WebSocketQueueQpqAdminServerMessageEventType } from 'quidproquo-webserver';
6
6
  import React, { useEffect, useMemo } from 'react';
@@ -24,7 +24,8 @@ export const Dashboard = () => {
24
24
  const [realtimeLogs, setRealtimeLogs] = React.useState([]);
25
25
  const { onSearch, logs: weeklyLogs } = useLogSearch();
26
26
  const isLoading = useIsLoading();
27
- useEffect(() => {
27
+ // Stable identity so the mount-only effect below can list it as a dependency.
28
+ const runInitialSearch = useEffectCallback(() => {
28
29
  const currentDate = new Date();
29
30
  const sevenDaysAgo = new Date(currentDate.getTime() - 7 * 24 * 60 * 60 * 1000);
30
31
  const isoDateSevenDaysAgo = sevenDaysAgo.toISOString();
@@ -42,7 +43,10 @@ export const Dashboard = () => {
42
43
  onlyErrors: true,
43
44
  };
44
45
  onSearch(searchParams);
45
- }, []);
46
+ });
47
+ useEffect(() => {
48
+ runInitialSearch();
49
+ }, [runInitialSearch]);
46
50
  useSubscribeToWebSocketEvent(WebSocketQueueQpqAdminServerMessageEventType.LogMetadata, (webSocketService, message) => {
47
51
  // Add the log to the list if its an error
48
52
  if (message.payload.log.error) {
@@ -54,7 +58,7 @@ export const Dashboard = () => {
54
58
  const uniqueLogs = uniqueBy([...realtimeLogs, ...weeklyLogs], (log) => log.correlation);
55
59
  return uniqueLogs.sort((a, b) => new Date(b.startedAt).getTime() - new Date(a.startedAt).getTime());
56
60
  }, [realtimeLogs, weeklyLogs]);
57
- const dailyErrorCount = useMemo(() => getLogCountForSinceXDaysAgo(allLogs, hoursPassedToday / 24), [allLogs, getHoursSinceStartOfDay]);
61
+ const dailyErrorCount = useMemo(() => getLogCountForSinceXDaysAgo(allLogs, hoursPassedToday / 24), [allLogs, hoursPassedToday]);
58
62
  const weeklyErrorCount = useMemo(() => getLogCountForSinceXDaysAgo(allLogs, 7), [allLogs]);
59
- return (_jsxs(TabViewBox, { children: [_jsxs(Grid, { container: true, spacing: 2, sx: { mb: 2 }, children: [_jsx(Grid, { item: true, xs: 6, children: _jsxs(Paper, { sx: { p: 2, textAlign: 'center' }, children: [_jsx(Typography, { children: "Daily Errors" }), _jsx(Typography, { variant: "h4", children: dailyErrorCount })] }) }), _jsx(Grid, { item: true, xs: 6, children: _jsxs(Paper, { sx: { p: 2, textAlign: 'center' }, children: [_jsx(Typography, { children: "Weekly Errors" }), _jsx(Typography, { variant: "h4", children: weeklyErrorCount })] }) })] }), _jsx(Box, { sx: { flex: 1, overflow: 'auto' }, children: _jsx(LogMetadataGrid, { logs: allLogs, isLoading: isLoading }) })] }));
63
+ return (_jsxs(TabViewBox, { children: [_jsxs(Grid, { container: true, spacing: 2, sx: { mb: 2 }, children: [_jsx(Grid, { item: true, xs: 6, children: _jsxs(Paper, { sx: { p: 2, textAlign: 'center' }, children: [_jsx(Typography, { children: "Daily Errors" }), _jsx(Typography, { variant: "h4", children: dailyErrorCount })] }) }), _jsx(Grid, { item: true, xs: 6, children: _jsxs(Paper, { sx: { p: 2, textAlign: 'center' }, children: [_jsx(Typography, { children: "Weekly Errors" }), _jsx(Typography, { variant: "h4", children: weeklyErrorCount })] }) })] }), _jsx(Box, { sx: { flex: 1, overflow: 'auto' }, children: _jsx(LogMetadataGrid, { isLoading: isLoading, logs: allLogs }) })] }));
60
64
  };
@@ -13,7 +13,7 @@ const TimelineEvent = ({ event, level, setSelectedLogCorrelation, scale, parrent
13
13
  height: EVENT_HEIGHT,
14
14
  textAlign: 'right',
15
15
  display: totalTimeOffset ? 'inline-block' : 'none',
16
- } }), _jsxs("div", { style: {
16
+ } }), _jsxs("div", { onClick: () => setSelectedLogCorrelation(event.correlation), style: {
17
17
  whiteSpace: 'nowrap',
18
18
  width: `${eventWidth}px`,
19
19
  height: EVENT_HEIGHT,
@@ -22,12 +22,12 @@ const TimelineEvent = ({ event, level, setSelectedLogCorrelation, scale, parrent
22
22
  padding: 3,
23
23
  borderRadius: 4,
24
24
  display: 'inline-block',
25
- }, onClick: () => setSelectedLogCorrelation(event.correlation), children: [event.moduleName, "::", event.generic.split('::').pop(), " - @", parrentTimeOffsetMs, "ms - ", event.executionTimeMs, "ms"] }), event.children.map((child) => {
25
+ }, children: [event.moduleName, "::", event.generic.split('::').pop(), " - @", parrentTimeOffsetMs, "ms - ", event.executionTimeMs, "ms"] }), event.children.map((child) => {
26
26
  const childDate = new Date(child.startedAt);
27
27
  const eventDate = new Date(event.startedAt);
28
28
  const offsetMs = childDate.getTime() - eventDate.getTime();
29
29
  const totalOffset = totalParrentTimeOffsetMs + offsetMs;
30
- return (_jsx(TimelineEvent, { event: child, setSelectedLogCorrelation: setSelectedLogCorrelation, level: level + 1, scale: scale, parrentTimeOffsetMs: offsetMs, totalParrentTimeOffsetMs: totalOffset }, child.correlation));
30
+ return (_jsx(TimelineEvent, { event: child, level: level + 1, parrentTimeOffsetMs: offsetMs, scale: scale, setSelectedLogCorrelation: setSelectedLogCorrelation, totalParrentTimeOffsetMs: totalOffset }, child.correlation));
31
31
  })] }));
32
32
  };
33
33
  export const EventTimeline = ({ logCorrelation, setSelectedLogCorrelation, isVisible, treeApi }) => {
@@ -70,5 +70,5 @@ export const EventTimeline = ({ logCorrelation, setSelectedLogCorrelation, isVis
70
70
  const endDate = new Date(latestFinishedAt);
71
71
  const offsetMs = endDate.getTime() - startDate.getTime();
72
72
  const scale = 1100 / offsetMs + scaleOffset;
73
- return (_jsxs("div", { style: { position: 'relative', width: '100%', height: '100%' }, children: [_jsxs("div", { style: { height: 24 }, children: [_jsx("b", { children: formatDuration(totalExecutionTime) }), _jsx("i", { children: " of compute over " }), _jsx("b", { children: formatDuration(offsetMs) })] }), _jsx("div", { ref: setTimelineRef, onWheel: handleOnWheel, style: { width: '100%', height: 'calc(100% - 24px)' }, children: treeApi.treeDataWithNoQpqActions[0] && (_jsx(TimelineEvent, { event: treeApi.treeDataWithNoQpqActions[0], level: 0, setSelectedLogCorrelation: setSelectedLogCorrelation, scale: scale, parrentTimeOffsetMs: 0, totalParrentTimeOffsetMs: 0 })) })] }));
73
+ return (_jsxs("div", { style: { position: 'relative', width: '100%', height: '100%' }, children: [_jsxs("div", { style: { height: 24 }, children: [_jsx("b", { children: formatDuration(totalExecutionTime) }), _jsx("i", { children: " of compute over " }), _jsx("b", { children: formatDuration(offsetMs) })] }), _jsx("div", { ref: setTimelineRef, onWheel: handleOnWheel, style: { width: '100%', height: 'calc(100% - 24px)' }, children: treeApi.treeDataWithNoQpqActions[0] && (_jsx(TimelineEvent, { event: treeApi.treeDataWithNoQpqActions[0], level: 0, parrentTimeOffsetMs: 0, scale: scale, setSelectedLogCorrelation: setSelectedLogCorrelation, totalParrentTimeOffsetMs: 0 })) })] }));
74
74
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useAuthAccessToken, useBaseUrlResolvers } from 'quidproquo-web-react';
2
+ import { useAuthAccessToken, useBaseUrlResolvers, useEffectCallback } from 'quidproquo-web-react';
3
3
  import { useEffect, useRef, useState } from 'react';
4
4
  import Markdown from 'react-markdown';
5
5
  import { Android as AndroidIcon, Person as PersonIcon } from '@mui/icons-material';
@@ -13,10 +13,8 @@ export const HelpChat = ({ logCorrelation }) => {
13
13
  const chatContainerRef = useRef(null);
14
14
  const accessToken = useAuthAccessToken();
15
15
  const baseUrlResolvers = useBaseUrlResolvers();
16
- useEffect(() => {
17
- fetchChatMessages();
18
- }, []);
19
- const fetchChatMessages = async () => {
16
+ // Stable identity so the mount-only effect below can list it as a dependency.
17
+ const fetchChatMessages = useEffectCallback(async () => {
20
18
  const listLogChatMessages = {
21
19
  correlationId: logCorrelation,
22
20
  nextPageKey: nextPageKey,
@@ -29,7 +27,10 @@ export const HelpChat = ({ logCorrelation }) => {
29
27
  finally {
30
28
  // Do nothing
31
29
  }
32
- };
30
+ });
31
+ useEffect(() => {
32
+ fetchChatMessages();
33
+ }, [fetchChatMessages]);
33
34
  const handleSendMessage = async () => {
34
35
  if (inputMessage.trim() !== '') {
35
36
  const newMessage = {
@@ -64,7 +65,7 @@ export const HelpChat = ({ logCorrelation }) => {
64
65
  chatContainerRef.current.scrollTop = chatContainerRef.current.scrollHeight;
65
66
  }
66
67
  }, [chatMessages]);
67
- return (_jsxs(Box, { sx: { display: 'flex', flexDirection: 'column', height: '100%' }, children: [_jsxs(Box, { sx: { flexGrow: 1, overflowY: 'auto', p: 2 }, ref: chatContainerRef, children: [chatMessages.map((message, index) => (_jsx(Box, { sx: {
68
+ return (_jsxs(Box, { sx: { display: 'flex', flexDirection: 'column', height: '100%' }, children: [_jsxs(Box, { ref: chatContainerRef, sx: { flexGrow: 1, overflowY: 'auto', p: 2 }, children: [chatMessages.map((message, index) => (_jsx(Box, { sx: {
68
69
  display: 'flex',
69
70
  alignItems: 'flex-start',
70
71
  mb: 2,
@@ -89,5 +90,5 @@ export const HelpChat = ({ logCorrelation }) => {
89
90
  backgroundColor: 'grey.300',
90
91
  color: 'black',
91
92
  maxWidth: '70%',
92
- }, children: [_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', mb: 1 }, children: [_jsx(Avatar, { sx: { mr: 1, bgcolor: 'grey.500' }, children: _jsx(AndroidIcon, {}) }), _jsx(Typography, { variant: "subtitle2", children: "AI Assistant" })] }), _jsxs(Box, { sx: { display: 'flex', alignItems: 'center' }, children: [_jsx(CircularProgress, { size: 20, sx: { mr: 1 } }), _jsx(Typography, { variant: "body1", children: "Thinking..." })] })] }) }))] }), _jsx(Box, { sx: { p: 2, borderTop: '1px solid #ccc' }, children: _jsxs(Box, { sx: { display: 'flex' }, children: [_jsx(TextField, { fullWidth: true, variant: "outlined", placeholder: "Type your message...", value: inputMessage, onChange: (e) => setInputMessage(e.target.value), onKeyDown: handleKeyPress, sx: { mr: 2 } }), _jsx(Button, { variant: "contained", onClick: handleSendMessage, children: "Send" })] }) })] }));
93
+ }, children: [_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', mb: 1 }, children: [_jsx(Avatar, { sx: { mr: 1, bgcolor: 'grey.500' }, children: _jsx(AndroidIcon, {}) }), _jsx(Typography, { variant: "subtitle2", children: "AI Assistant" })] }), _jsxs(Box, { sx: { display: 'flex', alignItems: 'center' }, children: [_jsx(CircularProgress, { size: 20, sx: { mr: 1 } }), _jsx(Typography, { variant: "body1", children: "Thinking..." })] })] }) }))] }), _jsx(Box, { sx: { p: 2, borderTop: '1px solid #ccc' }, children: _jsxs(Box, { sx: { display: 'flex' }, children: [_jsx(TextField, { fullWidth: true, onChange: (e) => setInputMessage(e.target.value), onKeyDown: handleKeyPress, placeholder: "Type your message...", sx: { mr: 2 }, value: inputMessage, variant: "outlined" }), _jsx(Button, { onClick: handleSendMessage, variant: "contained", children: "Send" })] }) })] }));
93
94
  };
@@ -6,30 +6,33 @@ import { Box, CircularProgress } from '@mui/material';
6
6
  const BACKGROUND_COLOR = '#c1c1c1';
7
7
  // Here we're using `renderCustomNodeElement` to represent each node
8
8
  // as an SVG `rect` instead of the default `circle`.
9
- const renderRectSvgNode = (setSelectedLogCorrelation, highlightCorrelationId) => ({ nodeDatum }) => {
10
- // TODO: Workout the nodeDateum type
11
- const color = nodeDatum.correlation === highlightCorrelationId
12
- ? nodeDatum.error
13
- ? '#8B0000'
14
- : '#00008B' // Very dark red for selected errors, dark blue for selected non-errors
15
- : nodeDatum.error
16
- ? 'red'
17
- : 'white'; // Bright red for non-selected errors, white for non-selected non-errors
18
- // For story runtime types, collapse the runtimeType line away so the generic
19
- // info takes its place other runtime types keep their full label stack.
20
- const isStoryRuntimeType = nodeDatum.runtimeType === QpqRuntimeType.EXECUTE_STORY || nodeDatum.runtimeType === QpqRuntimeType.EXECUTE_IMPLEMENTATION_STORY;
21
- const displayText = (nodeDatum.generic || '').split('::').pop();
22
- const textLines = isStoryRuntimeType
23
- ? [nodeDatum.moduleName, displayText, nodeDatum.error || '']
24
- : [nodeDatum.moduleName, nodeDatum.runtimeType, displayText, nodeDatum.error || ''];
25
- return (_jsxs("g", { children: [_jsx("circle", { r: 10, fill: color, x: "10", y: "10", onClick: () => setSelectedLogCorrelation(nodeDatum.correlation) }), textLines
26
- .filter((t) => !!t)
27
- .map((text, i) => {
28
- const x = 0;
29
- const y = i === 0 ? -20 : 10 + i * 20;
30
- const fontSize = i === 0 ? 30 : 15;
31
- return (_jsxs(Fragment, { children: [_jsx("rect", { x: x - 50, y: y - fontSize / 2 - 8, width: "100", height: fontSize, fill: BACKGROUND_COLOR, strokeWidth: "0" }), _jsx("text", { textAnchor: "middle", fontSize: fontSize, fill: nodeDatum.error ? 'red' : 'black', strokeWidth: 0, y: y, children: text })] }, `${i}`));
32
- })] }));
9
+ const renderRectSvgNode = (setSelectedLogCorrelation, highlightCorrelationId) => {
10
+ const RectSvgNode = ({ nodeDatum }) => {
11
+ // TODO: Workout the nodeDateum type
12
+ const color = nodeDatum.correlation === highlightCorrelationId
13
+ ? nodeDatum.error
14
+ ? '#8B0000'
15
+ : '#00008B' // Very dark red for selected errors, dark blue for selected non-errors
16
+ : nodeDatum.error
17
+ ? 'red'
18
+ : 'white'; // Bright red for non-selected errors, white for non-selected non-errors
19
+ // For story runtime types, collapse the runtimeType line away so the generic
20
+ // info takes its place other runtime types keep their full label stack.
21
+ const isStoryRuntimeType = nodeDatum.runtimeType === QpqRuntimeType.EXECUTE_STORY || nodeDatum.runtimeType === QpqRuntimeType.EXECUTE_IMPLEMENTATION_STORY;
22
+ const displayText = (nodeDatum.generic || '').split('::').pop();
23
+ const textLines = isStoryRuntimeType
24
+ ? [nodeDatum.moduleName, displayText, nodeDatum.error || '']
25
+ : [nodeDatum.moduleName, nodeDatum.runtimeType, displayText, nodeDatum.error || ''];
26
+ return (_jsxs("g", { children: [_jsx("circle", { fill: color, onClick: () => setSelectedLogCorrelation(nodeDatum.correlation), r: 10, x: "10", y: "10" }), textLines
27
+ .filter((t) => !!t)
28
+ .map((text, i) => {
29
+ const x = 0;
30
+ const y = i === 0 ? -20 : 10 + i * 20;
31
+ const fontSize = i === 0 ? 30 : 15;
32
+ return (_jsxs(Fragment, { children: [_jsx("rect", { fill: BACKGROUND_COLOR, height: fontSize, strokeWidth: "0", width: "100", x: x - 50, y: y - fontSize / 2 - 8 }), _jsx("text", { fill: nodeDatum.error ? 'red' : 'black', fontSize: fontSize, strokeWidth: 0, textAnchor: "middle", y: y, children: text })] }, `${i}`));
33
+ })] }));
34
+ };
35
+ return RectSvgNode;
33
36
  };
34
37
  const LogCorrelationTreeComponent = ({ correlationId, highlightCorrelationId, setSelectedLogCorrelation, isVisible, treeApi, }) => {
35
38
  const treeContainer = useRef(null);
@@ -9,5 +9,5 @@ export const LogCorrelations = ({ logCorrelation, setSelectedLogCorrelation, isV
9
9
  alignItems: 'center',
10
10
  justifyContent: 'center',
11
11
  height: '100%',
12
- }, children: _jsx(LogCorrelationTree, { correlationId: logCorrelation, highlightCorrelationId: logCorrelation, setSelectedLogCorrelation: setSelectedLogCorrelation, isVisible: isVisible, treeApi: treeApi }) }));
12
+ }, children: _jsx(LogCorrelationTree, { correlationId: logCorrelation, highlightCorrelationId: logCorrelation, isVisible: isVisible, setSelectedLogCorrelation: setSelectedLogCorrelation, treeApi: treeApi }) }));
13
13
  };
@@ -34,5 +34,5 @@ export const LogDetails = ({ log, hideFastActions, orderByDuration, }) => {
34
34
  return durationB - durationA;
35
35
  });
36
36
  }
37
- return (_jsx(Box, { sx: { width: 1 }, children: _jsx(Table, { sx: { tableLayout: 'fixed' }, children: _jsxs(TableBody, { children: [_jsxs(TableRow, { children: [_jsx(TableCell, { sx: leftTableCell, children: _jsx(ActionHistoryItemTimeStamp, { startedAt: log.startedAt, finishedAt: log.startedAt }) }), _jsx(TableCell, { sx: rightTableCell, children: _jsx(LogSummaryDetails, { log: log }) })] }), history.map((historyItem, index) => (_jsxs(TableRow, { children: [_jsx(TableCell, { sx: leftTableCell, children: _jsx(ActionHistoryItemTimeStamp, { startedAt: historyItem.startedAt, finishedAt: historyItem.finishedAt }) }), _jsxs(TableCell, { sx: rightTableCell, children: [historyItem.act && _jsx(AnyActionHistoryItem, { action: historyItem.act, result: historyItem.res }), !historyItem.act && _jsx("div", { children: "No Action" })] })] }, `${index}`))), _jsxs(TableRow, { children: [_jsx(TableCell, { sx: leftTableCell, children: _jsx(ActionHistoryItemTimeStamp, { startedAt: log.finishedAt, finishedAt: log.finishedAt }) }), _jsx(TableCell, { sx: rightTableCell, children: _jsx(LogSummaryReturn, { log: log }) })] }), log?.logs && (_jsx(TableRow, { children: _jsxs(TableCell, { colSpan: 2, style: { width: '100%' }, children: [_jsx("div", { style: { paddingBottom: '10px' }, children: _jsx(Typography, { variant: "h6", component: "span", children: "Caught console.log events" }) }), _jsx(ConsoleLogViewer, { logs: log?.logs })] }) }))] }) }) }));
37
+ return (_jsx(Box, { sx: { width: 1 }, children: _jsx(Table, { sx: { tableLayout: 'fixed' }, children: _jsxs(TableBody, { children: [_jsxs(TableRow, { children: [_jsx(TableCell, { sx: leftTableCell, children: _jsx(ActionHistoryItemTimeStamp, { finishedAt: log.startedAt, startedAt: log.startedAt }) }), _jsx(TableCell, { sx: rightTableCell, children: _jsx(LogSummaryDetails, { log: log }) })] }), history.map((historyItem, index) => (_jsxs(TableRow, { children: [_jsx(TableCell, { sx: leftTableCell, children: _jsx(ActionHistoryItemTimeStamp, { finishedAt: historyItem.finishedAt, startedAt: historyItem.startedAt }) }), _jsxs(TableCell, { sx: rightTableCell, children: [historyItem.act && _jsx(AnyActionHistoryItem, { action: historyItem.act, result: historyItem.res }), !historyItem.act && _jsx("div", { children: "No Action" })] })] }, `${index}`))), _jsxs(TableRow, { children: [_jsx(TableCell, { sx: leftTableCell, children: _jsx(ActionHistoryItemTimeStamp, { finishedAt: log.finishedAt, startedAt: log.finishedAt }) }), _jsx(TableCell, { sx: rightTableCell, children: _jsx(LogSummaryReturn, { log: log }) })] }), log?.logs && (_jsx(TableRow, { children: _jsxs(TableCell, { colSpan: 2, style: { width: '100%' }, children: [_jsx("div", { style: { paddingBottom: '10px' }, children: _jsx(Typography, { component: "span", variant: "h6", children: "Caught console.log events" }) }), _jsx(ConsoleLogViewer, { logs: log?.logs })] }) }))] }) }) }));
38
38
  };
@@ -32,20 +32,20 @@ export const LogDialog = ({ logCorrelation, open, handleClose, setSelectedLogCor
32
32
  logDialogStateApi.setSelectedTab(newValue);
33
33
  };
34
34
  const treeApi = useLogTreeData(logCorrelation, false);
35
- return (_jsxs(Dialog, { open: open, scroll: 'paper', "aria-labelledby": "scroll-dialog-title", "aria-describedby": "scroll-dialog-description", onClose: handleClose, maxWidth: false, fullWidth: true, PaperProps: {
35
+ return (_jsxs(Dialog, { "aria-describedby": "scroll-dialog-description", "aria-labelledby": "scroll-dialog-title", fullWidth: true, maxWidth: false, onClose: handleClose, open: open, PaperProps: {
36
36
  style: {
37
37
  width: '90%',
38
38
  height: '90%',
39
39
  maxHeight: '90%',
40
40
  maxWidth: '90%',
41
41
  },
42
- }, children: [_jsxs(DialogTitle, { id: "scroll-dialog-title", children: ["Log Details - ", logCorrelation] }), _jsx(AppBar, { position: "sticky", color: "primary", children: _jsxs(Tabs, { value: logDialogState.selectedTab, onChange: handleTabChange, textColor: "inherit", indicatorColor: "secondary", children: [_jsx(Tab, { label: "Log Details" }), _jsx(Tab, { label: "Tree" }), _jsx(Tab, { label: "Timeline" }), _jsx(Tab, { label: "Notes" }), _jsx(Tab, { label: "Raw JSON" }), _jsx(Tab, { label: "Help" })] }) }), _jsxs(DialogContent, { dividers: true, sx: {
42
+ }, scroll: 'paper', children: [_jsxs(DialogTitle, { id: "scroll-dialog-title", children: ["Log Details - ", logCorrelation] }), _jsx(AppBar, { color: "primary", position: "sticky", children: _jsxs(Tabs, { indicatorColor: "secondary", onChange: handleTabChange, textColor: "inherit", value: logDialogState.selectedTab, children: [_jsx(Tab, { label: "Log Details" }), _jsx(Tab, { label: "Tree" }), _jsx(Tab, { label: "Timeline" }), _jsx(Tab, { label: "Notes" }), _jsx(Tab, { label: "Raw JSON" }), _jsx(Tab, { label: "Help" })] }) }), _jsxs(DialogContent, { dividers: true, sx: {
43
43
  minHeight: '150px',
44
44
  overflowY: 'scroll',
45
- }, children: [asyncLog.isLoading && _jsx(LinearProgress, {}), _jsx("div", { style: getTabStyle(logDialogState.selectedTab, 0), children: _jsx(LogDetailsTab, { log: asyncLog, logDialogState: logDialogState, logDialogStateApi: logDialogStateApi }) }), _jsx("div", { style: getTabStyle(logDialogState.selectedTab, 1), children: _jsx(TreeTab, { log: asyncLog, isVisible: logDialogState.selectedTab === 1, treeApi: treeApi, setSelectedLogCorrelation: setSelectedLogCorrelation }) }), _jsx("div", { style: getTabStyle(logDialogState.selectedTab, 2), children: _jsx(TimelineTab, { log: asyncLog, setSelectedLogCorrelation: setSelectedLogCorrelation, isVisible: logDialogState.selectedTab === 2, treeApi: treeApi }) }), _jsx("div", { style: getTabStyle(logDialogState.selectedTab, 3), children: _jsx(NotesTab, { log: asyncLog }) }), _jsx("div", { style: getTabStyle(logDialogState.selectedTab, 4), children: _jsx(RawTab, { log: asyncLog }) }), _jsx("div", { style: getTabStyle(logDialogState.selectedTab, 5), children: _jsx(HelpTab, { log: asyncLog }) })] }), _jsxs(DialogActions, { children: [_jsx(Button, { style: getTabStyle(logDialogState.selectedTab, 1), onClick: (event) => treeApi.refreshTreeData(), disabled: asyncLog.isLoading, children: "Refresh Tree" }), _jsx(Button, { style: getTabStyle(logDialogState.selectedTab, 2), onClick: (event) => treeApi.refreshTreeData(), disabled: asyncLog.isLoading, children: "Refresh Timeline" }), _jsx(Button, { onClick: (event) => {
45
+ }, children: [asyncLog.isLoading && _jsx(LinearProgress, {}), _jsx("div", { style: getTabStyle(logDialogState.selectedTab, 0), children: _jsx(LogDetailsTab, { log: asyncLog, logDialogState: logDialogState, logDialogStateApi: logDialogStateApi }) }), _jsx("div", { style: getTabStyle(logDialogState.selectedTab, 1), children: _jsx(TreeTab, { isVisible: logDialogState.selectedTab === 1, log: asyncLog, setSelectedLogCorrelation: setSelectedLogCorrelation, treeApi: treeApi }) }), _jsx("div", { style: getTabStyle(logDialogState.selectedTab, 2), children: _jsx(TimelineTab, { isVisible: logDialogState.selectedTab === 2, log: asyncLog, setSelectedLogCorrelation: setSelectedLogCorrelation, treeApi: treeApi }) }), _jsx("div", { style: getTabStyle(logDialogState.selectedTab, 3), children: _jsx(NotesTab, { log: asyncLog }) }), _jsx("div", { style: getTabStyle(logDialogState.selectedTab, 4), children: _jsx(RawTab, { log: asyncLog }) }), _jsx("div", { style: getTabStyle(logDialogState.selectedTab, 5), children: _jsx(HelpTab, { log: asyncLog }) })] }), _jsxs(DialogActions, { children: [_jsx(Button, { disabled: asyncLog.isLoading, onClick: (event) => treeApi.refreshTreeData(), style: getTabStyle(logDialogState.selectedTab, 1), children: "Refresh Tree" }), _jsx(Button, { disabled: asyncLog.isLoading, onClick: (event) => treeApi.refreshTreeData(), style: getTabStyle(logDialogState.selectedTab, 2), children: "Refresh Timeline" }), _jsx(Button, { disabled: asyncLog.isLoading, onClick: (event) => {
46
46
  if (asyncLog.log) {
47
47
  downloadJson(JSON.stringify(asyncLog.log, null, 2), `${asyncLog.log.correlation}.json`);
48
48
  }
49
49
  event.stopPropagation();
50
- }, disabled: asyncLog.isLoading, children: "Download" }), asyncLog.log && (_jsx(Button, { onClick: handleExecute, disabled: asyncLog.isLoading, children: "Execute" })), _jsx(Button, { onClick: handleClose, children: "Close" })] })] }));
50
+ }, children: "Download" }), asyncLog.log && (_jsx(Button, { disabled: asyncLog.isLoading, onClick: handleExecute, children: "Execute" })), _jsx(Button, { onClick: handleClose, children: "Close" })] })] }));
51
51
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Paper, Typography } from '@mui/material';
3
3
  export const MovedToColdStorage = ({ guid }) => {
4
- return (_jsxs(Paper, { elevation: 3, sx: { padding: 2, borderRadius: 2 }, children: [_jsxs(Typography, { variant: "body1", color: "textSecondary", children: ["The log you are requesting has been moved to ", _jsx("b", { children: "cold storage" }), ". Please provide the following Correlation to an administrator if you would like it to be moved back to standard storage."] }), _jsx(Box, { mt: 1, children: _jsx(Typography, { variant: "subtitle1", color: "primary", fontWeight: "bold", children: guid }) })] }));
4
+ return (_jsxs(Paper, { elevation: 3, sx: { padding: 2, borderRadius: 2 }, children: [_jsxs(Typography, { color: "textSecondary", variant: "body1", children: ["The log you are requesting has been moved to ", _jsx("b", { children: "cold storage" }), ". Please provide the following Correlation to an administrator if you would like it to be moved back to standard storage."] }), _jsx(Box, { mt: 1, children: _jsx(Typography, { color: "primary", fontWeight: "bold", variant: "subtitle1", children: guid }) })] }));
5
5
  };
@@ -12,5 +12,5 @@ export const LogDetailsTab = ({ log, logDialogState: { hideFastActions, orderByD
12
12
  return (_jsxs("div", { style: {
13
13
  display: 'flex',
14
14
  flexDirection: 'row-reverse',
15
- }, children: [_jsxs("div", { children: [_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: hideFastActions, onChange: (event) => setHideFastActions(event.target.checked) }), label: "Hide Fast Actions" }), _jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: orderByDuration, onChange: (event) => setOrderByDuration(event.target.checked) }), label: "Order by Duration" })] }), _jsx(LogDetails, { log: log.log, hideFastActions: hideFastActions, orderByDuration: orderByDuration })] }));
15
+ }, children: [_jsxs("div", { children: [_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: hideFastActions, onChange: (event) => setHideFastActions(event.target.checked) }), label: "Hide Fast Actions" }), _jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: orderByDuration, onChange: (event) => setOrderByDuration(event.target.checked) }), label: "Order by Duration" })] }), _jsx(LogDetails, { hideFastActions: hideFastActions, log: log.log, orderByDuration: orderByDuration })] }));
16
16
  };
@@ -4,5 +4,5 @@ export const TimelineTab = ({ log, isVisible, setSelectedLogCorrelation, treeApi
4
4
  if (log.isLoading) {
5
5
  return _jsx("div", { children: "Loading..." });
6
6
  }
7
- return (_jsx(EventTimeline, { logCorrelation: log.logCorrelation, setSelectedLogCorrelation: setSelectedLogCorrelation, isVisible: isVisible, treeApi: treeApi }));
7
+ return (_jsx(EventTimeline, { isVisible: isVisible, logCorrelation: log.logCorrelation, setSelectedLogCorrelation: setSelectedLogCorrelation, treeApi: treeApi }));
8
8
  };
@@ -4,5 +4,5 @@ export const TreeTab = ({ log, isVisible, setSelectedLogCorrelation, treeApi, })
4
4
  if (log.isLoading) {
5
5
  return _jsx("div", { children: "Loading..." });
6
6
  }
7
- return (_jsx(LogCorrelations, { logCorrelation: log.logCorrelation, setSelectedLogCorrelation: setSelectedLogCorrelation, isVisible: isVisible, treeApi: treeApi }));
7
+ return (_jsx(LogCorrelations, { isVisible: isVisible, logCorrelation: log.logCorrelation, setSelectedLogCorrelation: setSelectedLogCorrelation, treeApi: treeApi }));
8
8
  };
@@ -49,8 +49,8 @@ export const LogMetadataGrid = ({ logs, isLoading }) => {
49
49
  .greenRow {
50
50
  background-color: #eaffea;
51
51
  }
52
- ` }), _jsx(DataGrid, { components: {
52
+ ` }), _jsx(DataGrid, { autoPageSize: true, columns: columns, components: {
53
53
  Pagination: DataGridPagination,
54
- LoadingOverlay: () => _jsx(LinearProgress, { variant: "determinate", value: searchProgress }),
55
- }, columns: columns, rows: logs.map((log) => ({ ...log, id: log.correlation })), autoPageSize: true, loading: isLoading, onRowClick: onRowClick, getRowClassName: getRowClassName }), _jsx(LogDialog, { open: !!selectedLogCorrelation, handleClose: clearSelectedLogCorrelation, logCorrelation: selectedLogCorrelation, storyResultMetadatas: logs, setSelectedLogCorrelation: setSelectedLogCorrelation })] }));
54
+ LoadingOverlay: () => _jsx(LinearProgress, { value: searchProgress, variant: "determinate" }),
55
+ }, getRowClassName: getRowClassName, loading: isLoading, onRowClick: onRowClick, rows: logs.map((log) => ({ ...log, id: log.correlation })) }), _jsx(LogDialog, { handleClose: clearSelectedLogCorrelation, logCorrelation: selectedLogCorrelation, open: !!selectedLogCorrelation, setSelectedLogCorrelation: setSelectedLogCorrelation, storyResultMetadatas: logs })] }));
56
56
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Typography } from '@mui/material';
3
3
  export const LogRawJson = ({ log }) => {
4
- return (_jsxs(Box, { sx: { width: 1, p: 2 }, children: [_jsx(Typography, { variant: "h6", gutterBottom: true, children: "Raw JSON" }), _jsx("pre", { style: { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }, children: JSON.stringify(log, null, 2) })] }));
4
+ return (_jsxs(Box, { sx: { width: 1, p: 2 }, children: [_jsx(Typography, { gutterBottom: true, variant: "h6", children: "Raw JSON" }), _jsx("pre", { style: { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }, children: JSON.stringify(log, null, 2) })] }));
5
5
  };
@@ -7,5 +7,5 @@ import { TopSection } from './TopSection';
7
7
  export const LogSearch = () => {
8
8
  const { onSearch, logs } = useLogSearch();
9
9
  const isLoading = useIsLoading();
10
- return _jsx(TabViewBox, { header: () => _jsx(TopSection, { onSearch: onSearch }), body: () => _jsx(LogMetadataGrid, { logs: logs, isLoading: isLoading }) });
10
+ return _jsx(TabViewBox, { body: () => _jsx(LogMetadataGrid, { isLoading: isLoading, logs: logs }), header: () => _jsx(TopSection, { onSearch: onSearch }) });
11
11
  };
@@ -33,6 +33,6 @@ export const LogSummary = ({ log }) => {
33
33
  },
34
34
  };
35
35
  sendMessage(refreshEvent);
36
- }, [log.correlation]);
37
- return (_jsxs(Box, { sx: { width: 1, p: 2 }, children: [_jsx(Typography, { variant: "h6", gutterBottom: true, children: "Log Summary" }), _jsxs(Typography, { children: ["Correlation ID: ", log.correlation] }), _jsx(FormControlLabel, { control: checkedLoading ? _jsx(CircularProgress, { size: 24 }) : _jsx(Checkbox, { checked: !!logMetadata?.checked, onChange: handleCheckboxChange }), label: "Mark as done" })] }));
36
+ }, [log.correlation, sendMessage]);
37
+ return (_jsxs(Box, { sx: { width: 1, p: 2 }, children: [_jsx(Typography, { gutterBottom: true, variant: "h6", children: "Log Summary" }), _jsxs(Typography, { children: ["Correlation ID: ", log.correlation] }), _jsx(FormControlLabel, { control: checkedLoading ? _jsx(CircularProgress, { size: 24 }) : _jsx(Checkbox, { checked: !!logMetadata?.checked, onChange: handleCheckboxChange }), label: "Mark as done" })] }));
38
38
  };
@@ -5,9 +5,12 @@ import ExpandLessIcon from '@mui/icons-material/ExpandLess';
5
5
  import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
6
6
  import { Box, IconButton, Tooltip, Typography } from '@mui/material';
7
7
  import { GenericFunctionRenderer, genericFunctionRendererStyles } from './actionComponents/genericActionRenderer/AnyVariableView';
8
+ const runtimeTypeToCamelCase = (runtimeType) => runtimeType.toLowerCase().replace(/_(\w)/g, (_, char) => char.toUpperCase());
8
9
  export const LogSummaryDetails = ({ log }) => {
9
10
  const [expanded, setExpanded] = useState(false);
10
11
  const totalRuntime = new Date(log.finishedAt).getTime() - new Date(log.startedAt).getTime();
11
- const functionKey = log.qpqFunctionRuntimeInfo ? getUniqueKeyFromQpqFunctionRuntime(log.qpqFunctionRuntimeInfo) : 'unknownMahLord';
12
- return (_jsxs(_Fragment, { children: [_jsxs(Box, { display: "flex", alignItems: "center", children: [_jsxs(Typography, { variant: "h5", gutterBottom: true, children: [log.runtimeType, " - ", log.moduleName] }), _jsx(Tooltip, { title: expanded ? 'Collapse' : 'Expand', children: _jsx(IconButton, { size: "small", onClick: () => setExpanded(!expanded), children: expanded ? _jsx(ExpandLessIcon, {}) : _jsx(ExpandMoreIcon, {}) }) })] }), _jsx("div", { children: _jsxs("pre", { style: genericFunctionRendererStyles.pre, children: [_jsxs("div", { style: genericFunctionRendererStyles.commentBlock, children: [_jsx("div", { children: "// //////////////////////////////////////////////////////" }), _jsxs("div", { children: ["// src: ", functionKey] }), log.fromCorrelation && _jsxs("div", { children: ["// Caller: ", log.fromCorrelation] }), _jsxs("div", { children: ["// Total Runtime: ", _jsxs("span", { style: genericFunctionRendererStyles.highlightComment, children: [totalRuntime, " ms"] })] }), _jsx("div", { children: "// //////////////////////////////////////////////////////" })] }), _jsx(GenericFunctionRenderer, { functionName: functionKey.split('::').pop() || 'unknown', args: log.input, expanded: expanded })] }) })] }));
12
+ const functionKey = log.qpqFunctionRuntimeInfo
13
+ ? getUniqueKeyFromQpqFunctionRuntime(log.qpqFunctionRuntimeInfo)
14
+ : runtimeTypeToCamelCase(log.runtimeType);
15
+ return (_jsxs(_Fragment, { children: [_jsxs(Box, { alignItems: "center", display: "flex", children: [_jsxs(Typography, { gutterBottom: true, variant: "h5", children: [log.runtimeType, " - ", log.moduleName] }), _jsx(Tooltip, { title: expanded ? 'Collapse' : 'Expand', children: _jsx(IconButton, { onClick: () => setExpanded(!expanded), size: "small", children: expanded ? _jsx(ExpandLessIcon, {}) : _jsx(ExpandMoreIcon, {}) }) })] }), _jsx("div", { children: _jsxs("pre", { style: genericFunctionRendererStyles.pre, children: [_jsxs("div", { style: genericFunctionRendererStyles.commentBlock, children: [_jsx("div", { children: '// //////////////////////////////////////////////////////' }), _jsxs("div", { children: ['// src: ', functionKey] }), log.fromCorrelation && (_jsxs("div", { children: ['// Caller: ', log.fromCorrelation] })), _jsxs("div", { children: ['// Total Runtime: ', _jsxs("span", { style: genericFunctionRendererStyles.highlightComment, children: [totalRuntime, " ms"] })] }), _jsx("div", { children: '// //////////////////////////////////////////////////////' })] }), _jsx(GenericFunctionRenderer, { args: log.input, expanded: expanded, functionName: functionKey.split('::').pop() || 'unknown' })] }) })] }));
13
16
  };
@@ -6,5 +6,5 @@ import { Box, IconButton, Tooltip, Typography } from '@mui/material';
6
6
  import { AnyVariableView, genericFunctionRendererStyles } from './actionComponents';
7
7
  export const LogSummaryReturn = ({ log }) => {
8
8
  const [expanded, setExpanded] = useState(false);
9
- return (_jsxs("div", { children: [_jsxs(Box, { display: "flex", alignItems: "center", children: [_jsx(Typography, { variant: "h6", gutterBottom: true, children: log.error ? 'Thrown Error' : 'Returned' }), _jsx(Tooltip, { title: expanded ? 'Collapse' : 'Expand', children: _jsx(IconButton, { size: "small", onClick: () => setExpanded(!expanded), children: expanded ? _jsx(ExpandLessIcon, {}) : _jsx(ExpandMoreIcon, {}) }) })] }), _jsx("pre", { style: { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }, children: _jsx("pre", { style: genericFunctionRendererStyles.pre, children: log.error ? _jsx(AnyVariableView, { value: log.error, expanded: expanded }) : _jsx(AnyVariableView, { value: log.result, expanded: expanded }) }) })] }));
9
+ return (_jsxs("div", { children: [_jsxs(Box, { alignItems: "center", display: "flex", children: [_jsx(Typography, { gutterBottom: true, variant: "h6", children: log.error ? 'Thrown Error' : 'Returned' }), _jsx(Tooltip, { title: expanded ? 'Collapse' : 'Expand', children: _jsx(IconButton, { onClick: () => setExpanded(!expanded), size: "small", children: expanded ? _jsx(ExpandLessIcon, {}) : _jsx(ExpandMoreIcon, {}) }) })] }), _jsx("pre", { style: { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }, children: _jsx("pre", { style: genericFunctionRendererStyles.pre, children: log.error ? _jsx(AnyVariableView, { expanded: expanded, value: log.error }) : _jsx(AnyVariableView, { expanded: expanded, value: log.result }) }) })] }));
10
10
  };
@@ -29,20 +29,20 @@ export function TopSection({ onSearch }) {
29
29
  updateStartAndEndTimeSpan(minutes);
30
30
  handleQuickTimeClose();
31
31
  };
32
- return (_jsxs(LocalizationProvider, { dateAdapter: AdapterDateFns, children: [_jsxs(Grid, { container: true, columns: 12, spacing: 2, children: [_jsx(Grid, { item: true, xs: 2, children: _jsxs(FormControl, { fullWidth: true, children: [_jsx(InputLabel, { id: "runtime-select-label", children: "Runtime Type" }), _jsx(Select, { labelId: "runtime-select-label", id: "demo-simple-select", value: runtimeType, label: "Runtime Type", onChange: handleRuntimeTypeOnChange, children: RuntimeTypes.map((key) => (_jsx(MenuItem, { value: key, children: key }, key))) })] }) }), _jsx(Grid, { item: true, xs: 2, children: _jsx(FormControl, { fullWidth: true, children: _jsx(Autocomplete, { getOptionLabel: (option) => option.label, options: serviceOptions, value: serviceOptions.find((o) => o.value === service) || null, onChange: handleServiceOnChange, renderInput: (params) => (_jsx(TextField, { ...params, label: "Service Name", InputLabelProps: {
32
+ return (_jsxs(LocalizationProvider, { dateAdapter: AdapterDateFns, children: [_jsxs(Grid, { columns: 12, container: true, spacing: 2, children: [_jsx(Grid, { item: true, xs: 2, children: _jsxs(FormControl, { fullWidth: true, children: [_jsx(InputLabel, { id: "runtime-select-label", children: "Runtime Type" }), _jsx(Select, { id: "demo-simple-select", label: "Runtime Type", labelId: "runtime-select-label", onChange: handleRuntimeTypeOnChange, value: runtimeType, children: RuntimeTypes.map((key) => (_jsx(MenuItem, { value: key, children: key }, key))) })] }) }), _jsx(Grid, { item: true, xs: 2, children: _jsx(FormControl, { fullWidth: true, children: _jsx(Autocomplete, { getOptionLabel: (option) => option.label, onChange: handleServiceOnChange, options: serviceOptions, renderInput: (params) => (_jsx(TextField, { ...params, InputLabelProps: {
33
33
  shrink: true,
34
- } })) }) }) }), _jsx(Grid, { item: true, xs: 2, children: _jsxs(Box, { position: "relative", children: [_jsx(FormControl, { fullWidth: true, children: _jsx(DateTimePicker, { label: "Start DateTime", value: startDate, onChange: handleStartDateChange }) }), _jsx(IconButton, { "aria-label": "quick time select", "aria-controls": "quick-time-menu", "aria-haspopup": "true", onClick: handleQuickTimeClick, sx: {
34
+ }, label: "Service Name" })), value: serviceOptions.find((o) => o.value === service) || null }) }) }), _jsx(Grid, { item: true, xs: 2, children: _jsxs(Box, { position: "relative", children: [_jsx(FormControl, { fullWidth: true, children: _jsx(DateTimePicker, { label: "Start DateTime", onChange: handleStartDateChange, value: startDate }) }), _jsx(IconButton, { "aria-controls": "quick-time-menu", "aria-haspopup": "true", "aria-label": "quick time select", onClick: handleQuickTimeClick, sx: {
35
35
  position: 'absolute',
36
36
  right: '-28px',
37
37
  top: '50%',
38
38
  transform: 'translateY(-50%)',
39
- }, children: _jsx(ExpandMoreIcon, {}) })] }) }), _jsx(Grid, { item: true, xs: 2, children: _jsx(FormControl, { fullWidth: true, children: _jsx(DateTimePicker, { label: "End DateTime", value: endDate, onChange: handleEndDateChange }) }) }), _jsx(Grid, { item: true, xs: 4, children: _jsx(FormControl, { fullWidth: true, children: _jsx(TextField, { label: "User", value: user, onChange: handleUserOnChange, InputLabelProps: {
39
+ }, children: _jsx(ExpandMoreIcon, {}) })] }) }), _jsx(Grid, { item: true, xs: 2, children: _jsx(FormControl, { fullWidth: true, children: _jsx(DateTimePicker, { label: "End DateTime", onChange: handleEndDateChange, value: endDate }) }) }), _jsx(Grid, { item: true, xs: 4, children: _jsx(FormControl, { fullWidth: true, children: _jsx(TextField, { InputLabelProps: {
40
40
  shrink: true,
41
- } }) }) }), _jsx(Grid, { item: true, xs: 6, children: _jsx(FormControl, { fullWidth: true, children: _jsx(TextField, { label: "Info", value: info, onChange: handleInfoOnChange, InputLabelProps: {
41
+ }, label: "User", onChange: handleUserOnChange, value: user }) }) }), _jsx(Grid, { item: true, xs: 6, children: _jsx(FormControl, { fullWidth: true, children: _jsx(TextField, { InputLabelProps: {
42
42
  shrink: true,
43
- } }) }) }), _jsx(Grid, { item: true, xs: 6, children: _jsx(FormControl, { fullWidth: true, children: _jsx(TextField, { label: "Error Filter", value: error, onChange: handleErrorOnChange, InputLabelProps: {
43
+ }, label: "Info", onChange: handleInfoOnChange, value: info }) }) }), _jsx(Grid, { item: true, xs: 6, children: _jsx(FormControl, { fullWidth: true, children: _jsx(TextField, { InputLabelProps: {
44
44
  shrink: true,
45
- } }) }) }), _jsx(Grid, { item: true, xs: 10, children: _jsx(FormControl, { fullWidth: true, children: _jsx(TextField, { label: "Deep Search", value: deep, onChange: handleDeepOnChange, placeholder: "Use with caution, reduce results with above fields first, this is a contains search on the log JSON, so it will be slow.", InputLabelProps: {
45
+ }, label: "Error Filter", onChange: handleErrorOnChange, value: error }) }) }), _jsx(Grid, { item: true, xs: 10, children: _jsx(FormControl, { fullWidth: true, children: _jsx(TextField, { InputLabelProps: {
46
46
  shrink: true,
47
- } }) }) }), _jsx(Grid, { item: true, xs: 2, children: _jsx(AsyncButton, { onClick: () => onSearch(), children: "Search" }) })] }), _jsxs(Menu, { id: "quick-time-menu", anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleQuickTimeClose, children: [_jsx(MenuItem, { onClick: () => handleQuickTimeSelect(5), children: "Last 5 minutes" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(30), children: "Last 30 minutes" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(1 * 60), children: "Last hour" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(3 * 60), children: "Last 3 hours" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(8 * 60), children: "Last 8 hours" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(16 * 60), children: "Last 16 hours" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(24 * 60), children: "Last 24 hours" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(7 * 24 * 60), children: "Last 7 days" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(30 * 24 * 60), children: "Last month" })] })] }));
47
+ }, label: "Deep Search", onChange: handleDeepOnChange, placeholder: "Use with caution, reduce results with above fields first, this is a contains search on the log JSON, so it will be slow.", value: deep }) }) }), _jsx(Grid, { item: true, xs: 2, children: _jsx(AsyncButton, { onClick: () => onSearch(), children: "Search" }) })] }), _jsxs(Menu, { anchorEl: anchorEl, id: "quick-time-menu", keepMounted: true, onClose: handleQuickTimeClose, open: Boolean(anchorEl), children: [_jsx(MenuItem, { onClick: () => handleQuickTimeSelect(5), children: "Last 5 minutes" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(30), children: "Last 30 minutes" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(1 * 60), children: "Last hour" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(3 * 60), children: "Last 3 hours" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(8 * 60), children: "Last 8 hours" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(16 * 60), children: "Last 16 hours" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(24 * 60), children: "Last 24 hours" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(7 * 24 * 60), children: "Last 7 days" }), _jsx(MenuItem, { onClick: () => handleQuickTimeSelect(30 * 24 * 60), children: "Last month" })] })] }));
48
48
  }
@@ -2,5 +2,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Box } from '@mui/material';
3
3
  import { AnyVariableView, genericFunctionRendererStyles } from '../genericActionRenderer';
4
4
  export const CoreContextListCustomAction = ({ result, expanded, }) => {
5
- return (_jsx(Box, { sx: { width: '100%', my: 1 }, children: _jsx("pre", { style: genericFunctionRendererStyles.pre, children: _jsx(AnyVariableView, { value: result, expanded: expanded }) }) }));
5
+ return (_jsx(Box, { sx: { width: '100%', my: 1 }, children: _jsx("pre", { style: genericFunctionRendererStyles.pre, children: _jsx(AnyVariableView, { expanded: expanded, value: result }) }) }));
6
6
  };
@@ -24,5 +24,5 @@ export const CoreLogCreateCustomAction = ({ action, expanded }) => {
24
24
  return null;
25
25
  }
26
26
  const { logLevel, msg, data } = action.payload;
27
- return (_jsx(Box, { sx: { width: '100%', my: 1 }, children: _jsxs(Alert, { severity: getSeverity(logLevel), children: [_jsx(Typography, { variant: "body1", fontWeight: "bold", children: resolveLookupText(logLevel, LogLevelEnum) }), _jsx(Typography, { variant: "body1", children: msg }), data && (_jsx(Typography, { variant: "body2", sx: { mt: 1, whiteSpace: 'pre-wrap' }, children: _jsx("pre", { style: genericFunctionRendererStyles.pre, children: _jsx(AnyVariableView, { value: data, expanded: expanded }) }) }))] }) }));
27
+ return (_jsx(Box, { sx: { width: '100%', my: 1 }, children: _jsxs(Alert, { severity: getSeverity(logLevel), children: [_jsx(Typography, { fontWeight: "bold", variant: "body1", children: resolveLookupText(logLevel, LogLevelEnum) }), _jsx(Typography, { variant: "body1", children: msg }), data && (_jsx(Typography, { sx: { mt: 1, whiteSpace: 'pre-wrap' }, variant: "body2", children: _jsx("pre", { style: genericFunctionRendererStyles.pre, children: _jsx(AnyVariableView, { expanded: expanded, value: data }) }) }))] }) }));
28
28
  };
@@ -6,5 +6,5 @@ export const CoreLogDisableEventHistoryCustomAction = ({ action }) => {
6
6
  return null;
7
7
  }
8
8
  const { reason } = action.payload;
9
- return (_jsx(Box, { sx: { width: '100%', my: 1 }, children: _jsx(Alert, { severity: 'warning', children: _jsx(Typography, { variant: "body1", fontWeight: "bold", children: reason }) }) }));
9
+ return (_jsx(Box, { sx: { width: '100%', my: 1 }, children: _jsx(Alert, { severity: 'warning', children: _jsx(Typography, { fontWeight: "bold", variant: "body1", children: reason }) }) }));
10
10
  };