quidproquo-web-admin 0.0.234 → 0.0.235

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 (87) hide show
  1. package/lib/commonjs/LogViewer/LogDialog/LogDialog.d.ts +9 -0
  2. package/lib/commonjs/LogViewer/LogDialog/LogDialog.js +64 -0
  3. package/lib/commonjs/LogViewer/LogDialog/MovedToColdStorage/MovedToColdStorage.d.ts +6 -0
  4. package/lib/commonjs/LogViewer/LogDialog/MovedToColdStorage/MovedToColdStorage.js +9 -0
  5. package/lib/commonjs/LogViewer/LogDialog/MovedToColdStorage/index.d.ts +1 -0
  6. package/lib/commonjs/LogViewer/LogDialog/MovedToColdStorage/index.js +17 -0
  7. package/lib/commonjs/LogViewer/LogDialog/hooks/index.d.ts +2 -0
  8. package/lib/commonjs/LogViewer/LogDialog/hooks/index.js +18 -0
  9. package/lib/commonjs/LogViewer/LogDialog/hooks/useLoadedStoryResult.d.ts +17 -0
  10. package/lib/commonjs/LogViewer/LogDialog/hooks/useLoadedStoryResult.js +32 -0
  11. package/lib/commonjs/LogViewer/LogDialog/hooks/useLogDialogStateManagement.d.ts +11 -0
  12. package/lib/commonjs/LogViewer/LogDialog/hooks/useLogDialogStateManagement.js +22 -0
  13. package/lib/commonjs/LogViewer/LogDialog/index.d.ts +1 -0
  14. package/lib/commonjs/LogViewer/LogDialog/index.js +17 -0
  15. package/lib/commonjs/LogViewer/LogDialog/tabs/HelpTab/HelpTab.d.ts +7 -0
  16. package/lib/commonjs/LogViewer/LogDialog/tabs/HelpTab/HelpTab.js +9 -0
  17. package/lib/commonjs/LogViewer/LogDialog/tabs/HelpTab/index.d.ts +1 -0
  18. package/lib/commonjs/LogViewer/LogDialog/tabs/HelpTab/index.js +17 -0
  19. package/lib/commonjs/LogViewer/LogDialog/tabs/LogDetailsTab/LogDetailsTab.d.ts +9 -0
  20. package/lib/commonjs/LogViewer/LogDialog/tabs/LogDetailsTab/LogDetailsTab.js +20 -0
  21. package/lib/commonjs/LogViewer/LogDialog/tabs/LogDetailsTab/index.d.ts +1 -0
  22. package/lib/commonjs/LogViewer/LogDialog/tabs/LogDetailsTab/index.js +17 -0
  23. package/lib/commonjs/LogViewer/LogDialog/tabs/NotesTab/NotesTab.d.ts +7 -0
  24. package/lib/commonjs/LogViewer/LogDialog/tabs/NotesTab/NotesTab.js +16 -0
  25. package/lib/commonjs/LogViewer/LogDialog/tabs/NotesTab/index.d.ts +1 -0
  26. package/lib/commonjs/LogViewer/LogDialog/tabs/NotesTab/index.js +17 -0
  27. package/lib/commonjs/LogViewer/LogDialog/tabs/RawTab/RawTab.d.ts +7 -0
  28. package/lib/commonjs/LogViewer/LogDialog/tabs/RawTab/RawTab.js +16 -0
  29. package/lib/commonjs/LogViewer/LogDialog/tabs/RawTab/index.d.ts +1 -0
  30. package/lib/commonjs/LogViewer/LogDialog/tabs/RawTab/index.js +17 -0
  31. package/lib/commonjs/LogViewer/LogDialog/tabs/TimelineTab/TimelineTab.d.ts +11 -0
  32. package/lib/commonjs/LogViewer/LogDialog/tabs/TimelineTab/TimelineTab.js +12 -0
  33. package/lib/commonjs/LogViewer/LogDialog/tabs/TimelineTab/index.d.ts +1 -0
  34. package/lib/commonjs/LogViewer/LogDialog/tabs/TimelineTab/index.js +17 -0
  35. package/lib/commonjs/LogViewer/LogDialog/tabs/TreeTab/TreeTab.d.ts +11 -0
  36. package/lib/commonjs/LogViewer/LogDialog/tabs/TreeTab/TreeTab.js +12 -0
  37. package/lib/commonjs/LogViewer/LogDialog/tabs/TreeTab/index.d.ts +1 -0
  38. package/lib/commonjs/LogViewer/LogDialog/tabs/TreeTab/index.js +17 -0
  39. package/lib/commonjs/LogViewer/LogDialog/tabs/index.d.ts +6 -0
  40. package/lib/commonjs/LogViewer/LogDialog/tabs/index.js +22 -0
  41. package/lib/commonjs/LogViewer/LogMetadataGrid.js +2 -2
  42. package/lib/esm/LogViewer/LogDialog/LogDialog.d.ts +9 -0
  43. package/lib/esm/LogViewer/LogDialog/LogDialog.js +51 -0
  44. package/lib/esm/LogViewer/LogDialog/MovedToColdStorage/MovedToColdStorage.d.ts +6 -0
  45. package/lib/esm/LogViewer/LogDialog/MovedToColdStorage/MovedToColdStorage.js +5 -0
  46. package/lib/esm/LogViewer/LogDialog/MovedToColdStorage/index.d.ts +1 -0
  47. package/lib/esm/LogViewer/LogDialog/MovedToColdStorage/index.js +1 -0
  48. package/lib/esm/LogViewer/LogDialog/hooks/index.d.ts +2 -0
  49. package/lib/esm/LogViewer/LogDialog/hooks/index.js +2 -0
  50. package/lib/esm/LogViewer/LogDialog/hooks/useLoadedStoryResult.d.ts +17 -0
  51. package/lib/esm/LogViewer/LogDialog/hooks/useLoadedStoryResult.js +28 -0
  52. package/lib/esm/LogViewer/LogDialog/hooks/useLogDialogStateManagement.d.ts +11 -0
  53. package/lib/esm/LogViewer/LogDialog/hooks/useLogDialogStateManagement.js +18 -0
  54. package/lib/esm/LogViewer/LogDialog/index.d.ts +1 -0
  55. package/lib/esm/LogViewer/LogDialog/index.js +1 -0
  56. package/lib/esm/LogViewer/LogDialog/tabs/HelpTab/HelpTab.d.ts +7 -0
  57. package/lib/esm/LogViewer/LogDialog/tabs/HelpTab/HelpTab.js +5 -0
  58. package/lib/esm/LogViewer/LogDialog/tabs/HelpTab/index.d.ts +1 -0
  59. package/lib/esm/LogViewer/LogDialog/tabs/HelpTab/index.js +1 -0
  60. package/lib/esm/LogViewer/LogDialog/tabs/LogDetailsTab/LogDetailsTab.d.ts +9 -0
  61. package/lib/esm/LogViewer/LogDialog/tabs/LogDetailsTab/LogDetailsTab.js +16 -0
  62. package/lib/esm/LogViewer/LogDialog/tabs/LogDetailsTab/index.d.ts +1 -0
  63. package/lib/esm/LogViewer/LogDialog/tabs/LogDetailsTab/index.js +1 -0
  64. package/lib/esm/LogViewer/LogDialog/tabs/NotesTab/NotesTab.d.ts +7 -0
  65. package/lib/esm/LogViewer/LogDialog/tabs/NotesTab/NotesTab.js +12 -0
  66. package/lib/esm/LogViewer/LogDialog/tabs/NotesTab/index.d.ts +1 -0
  67. package/lib/esm/LogViewer/LogDialog/tabs/NotesTab/index.js +1 -0
  68. package/lib/esm/LogViewer/LogDialog/tabs/RawTab/RawTab.d.ts +7 -0
  69. package/lib/esm/LogViewer/LogDialog/tabs/RawTab/RawTab.js +12 -0
  70. package/lib/esm/LogViewer/LogDialog/tabs/RawTab/index.d.ts +1 -0
  71. package/lib/esm/LogViewer/LogDialog/tabs/RawTab/index.js +1 -0
  72. package/lib/esm/LogViewer/LogDialog/tabs/TimelineTab/TimelineTab.d.ts +11 -0
  73. package/lib/esm/LogViewer/LogDialog/tabs/TimelineTab/TimelineTab.js +8 -0
  74. package/lib/esm/LogViewer/LogDialog/tabs/TimelineTab/index.d.ts +1 -0
  75. package/lib/esm/LogViewer/LogDialog/tabs/TimelineTab/index.js +1 -0
  76. package/lib/esm/LogViewer/LogDialog/tabs/TreeTab/TreeTab.d.ts +11 -0
  77. package/lib/esm/LogViewer/LogDialog/tabs/TreeTab/TreeTab.js +8 -0
  78. package/lib/esm/LogViewer/LogDialog/tabs/TreeTab/index.d.ts +1 -0
  79. package/lib/esm/LogViewer/LogDialog/tabs/TreeTab/index.js +1 -0
  80. package/lib/esm/LogViewer/LogDialog/tabs/index.d.ts +6 -0
  81. package/lib/esm/LogViewer/LogDialog/tabs/index.js +6 -0
  82. package/lib/esm/LogViewer/LogMetadataGrid.js +1 -1
  83. package/package.json +6 -6
  84. package/lib/commonjs/LogViewer/LogDialog.d.ts +0 -9
  85. package/lib/commonjs/LogViewer/LogDialog.js +0 -77
  86. package/lib/esm/LogViewer/LogDialog.d.ts +0 -9
  87. package/lib/esm/LogViewer/LogDialog.js +0 -66
@@ -0,0 +1,9 @@
1
+ interface LogDialogProps {
2
+ open: boolean;
3
+ logCorrelation: string;
4
+ handleClose: () => void;
5
+ storyResultMetadatas: any[];
6
+ setSelectedLogCorrelation: (logCorrelation: string) => void;
7
+ }
8
+ export declare const LogDialog: ({ logCorrelation, open, handleClose, setSelectedLogCorrelation }: LogDialogProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.LogDialog = void 0;
13
+ const jsx_runtime_1 = require("react/jsx-runtime");
14
+ const quidproquo_web_react_1 = require("quidproquo-web-react");
15
+ const material_1 = require("@mui/material");
16
+ const logic_1 = require("../../logic");
17
+ const hooks_1 = require("../hooks");
18
+ const hooks_2 = require("./hooks");
19
+ const tabs_1 = require("./tabs");
20
+ function downloadJson(json, filename) {
21
+ const blob = new Blob([json], { type: 'application/json' });
22
+ const url = URL.createObjectURL(blob);
23
+ const link = document.createElement('a');
24
+ link.href = url;
25
+ link.download = filename;
26
+ link.click();
27
+ // The URL.revokeObjectURL() method releases an existing object URL
28
+ URL.revokeObjectURL(url);
29
+ }
30
+ const getTabStyle = (tabIndex, selectedTab) => ({
31
+ display: selectedTab === tabIndex ? 'block' : 'none',
32
+ height: '100%',
33
+ });
34
+ const LogDialog = ({ logCorrelation, open, handleClose, setSelectedLogCorrelation }) => {
35
+ const [logDialogState, logDialogStateApi] = (0, hooks_2.useLogDialogStateManagement)();
36
+ const asyncLog = (0, hooks_2.useLoadedStoryResult)(logCorrelation);
37
+ const urlResolvers = (0, quidproquo_web_react_1.useBaseUrlResolvers)();
38
+ const handleExecute = () => __awaiter(void 0, void 0, void 0, function* () {
39
+ if (asyncLog.log) {
40
+ yield (0, logic_1.apiRequestPost)('http://localhost:8080/admin/service/log/execute', asyncLog.log, urlResolvers.getApiUrl());
41
+ }
42
+ });
43
+ const handleTabChange = (event, newValue) => {
44
+ logDialogStateApi.setSelectedTab(newValue);
45
+ };
46
+ const treeApi = (0, hooks_1.useLogTreeData)(logCorrelation, false);
47
+ return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, Object.assign({ open: open, scroll: 'paper', "aria-labelledby": "scroll-dialog-title", "aria-describedby": "scroll-dialog-description", onClose: handleClose, maxWidth: false, fullWidth: true, PaperProps: {
48
+ style: {
49
+ width: '90%',
50
+ height: '90%',
51
+ maxHeight: '90%',
52
+ maxWidth: '90%',
53
+ },
54
+ } }, { children: [(0, jsx_runtime_1.jsxs)(material_1.DialogTitle, Object.assign({ id: "scroll-dialog-title" }, { children: ["Log Details - ", logCorrelation] })), (0, jsx_runtime_1.jsx)(material_1.AppBar, Object.assign({ position: "sticky", color: "primary" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Tabs, Object.assign({ value: logDialogState.selectedTab, onChange: handleTabChange, textColor: "inherit", indicatorColor: "secondary" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Tab, { label: "Log Details" }), (0, jsx_runtime_1.jsx)(material_1.Tab, { label: "Tree" }), (0, jsx_runtime_1.jsx)(material_1.Tab, { label: "Timeline" }), (0, jsx_runtime_1.jsx)(material_1.Tab, { label: "Notes" }), (0, jsx_runtime_1.jsx)(material_1.Tab, { label: "Raw JSON" }), (0, jsx_runtime_1.jsx)(material_1.Tab, { label: "Help" })] })) })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ dividers: true, sx: {
55
+ minHeight: '150px',
56
+ overflowY: 'scroll',
57
+ } }, { children: [asyncLog.isLoading && (0, jsx_runtime_1.jsx)(material_1.LinearProgress, {}), (0, jsx_runtime_1.jsx)("div", Object.assign({ style: getTabStyle(logDialogState.selectedTab, 0) }, { children: (0, jsx_runtime_1.jsx)(tabs_1.LogDetailsTab, { log: asyncLog, logDialogState: logDialogState, logDialogStateApi: logDialogStateApi }) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ style: getTabStyle(logDialogState.selectedTab, 1) }, { children: (0, jsx_runtime_1.jsx)(tabs_1.TreeTab, { log: asyncLog, isVisible: logDialogState.selectedTab === 1, treeApi: treeApi, setSelectedLogCorrelation: setSelectedLogCorrelation }) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ style: getTabStyle(logDialogState.selectedTab, 2) }, { children: (0, jsx_runtime_1.jsx)(tabs_1.TimelineTab, { log: asyncLog, setSelectedLogCorrelation: setSelectedLogCorrelation, isVisible: logDialogState.selectedTab === 2, treeApi: treeApi }) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ style: getTabStyle(logDialogState.selectedTab, 3) }, { children: (0, jsx_runtime_1.jsx)(tabs_1.NotesTab, { log: asyncLog }) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ style: getTabStyle(logDialogState.selectedTab, 4) }, { children: (0, jsx_runtime_1.jsx)(tabs_1.RawTab, { log: asyncLog }) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ style: getTabStyle(logDialogState.selectedTab, 5) }, { children: (0, jsx_runtime_1.jsx)(tabs_1.HelpTab, { log: asyncLog }) }))] })), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ style: getTabStyle(logDialogState.selectedTab, 1), onClick: (event) => treeApi.refreshTreeData(), disabled: asyncLog.isLoading }, { children: "Refresh Tree" })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ style: getTabStyle(logDialogState.selectedTab, 2), onClick: (event) => treeApi.refreshTreeData(), disabled: asyncLog.isLoading }, { children: "Refresh Timeline" })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ onClick: (event) => {
58
+ if (asyncLog.log) {
59
+ downloadJson(JSON.stringify(asyncLog.log, null, 2), `${asyncLog.log.correlation}.json`);
60
+ }
61
+ event.stopPropagation();
62
+ }, disabled: asyncLog.isLoading }, { children: "Download" })), asyncLog.log && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ onClick: handleExecute, disabled: asyncLog.isLoading }, { children: "Execute" }))), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ onClick: handleClose }, { children: "Close" }))] })] })));
63
+ };
64
+ exports.LogDialog = LogDialog;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface MovedToColdStorageProps {
3
+ guid: string;
4
+ }
5
+ export declare const MovedToColdStorage: React.FC<MovedToColdStorageProps>;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MovedToColdStorage = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const material_1 = require("@mui/material");
6
+ const MovedToColdStorage = ({ guid }) => {
7
+ return ((0, jsx_runtime_1.jsxs)(material_1.Paper, Object.assign({ elevation: 3, sx: { padding: 2, borderRadius: 2 } }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: "body1", color: "textSecondary" }, { children: ["The log you are requesting has been moved to ", (0, jsx_runtime_1.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."] })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ mt: 1 }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "subtitle1", color: "primary", fontWeight: "bold" }, { children: guid })) }))] })));
8
+ };
9
+ exports.MovedToColdStorage = MovedToColdStorage;
@@ -0,0 +1 @@
1
+ export * from './MovedToColdStorage';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./MovedToColdStorage"), exports);
@@ -0,0 +1,2 @@
1
+ export * from './useLoadedStoryResult';
2
+ export * from './useLogDialogStateManagement';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./useLoadedStoryResult"), exports);
18
+ __exportStar(require("./useLogDialogStateManagement"), exports);
@@ -0,0 +1,17 @@
1
+ import { StoryResult } from 'quidproquo-core';
2
+ export type AsyncStoryState = {
3
+ logCorrelation: string;
4
+ } & ({
5
+ isLoading: true;
6
+ isLogInColdStorage: boolean;
7
+ log?: null;
8
+ } | {
9
+ isLoading: false;
10
+ isLogInColdStorage: true;
11
+ log?: null;
12
+ } | {
13
+ isLoading: false;
14
+ isLogInColdStorage: false;
15
+ log: StoryResult<any>;
16
+ });
17
+ export declare const useLoadedStoryResult: (logCorrelation: string) => AsyncStoryState;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useLoadedStoryResult = void 0;
4
+ const hooks_1 = require("../../../components/LoadingBox/hooks");
5
+ const view_1 = require("../../../view");
6
+ const logic_1 = require("../../logic");
7
+ const useLoadedStoryResult = (logCorrelation) => {
8
+ const signedRequest = (0, hooks_1.usePlatformDataFromPath)((0, logic_1.getLogUrl)(logCorrelation));
9
+ const log = (0, hooks_1.useExternalData)(!(signedRequest === null || signedRequest === void 0 ? void 0 : signedRequest.isColdStorage) ? signedRequest === null || signedRequest === void 0 ? void 0 : signedRequest.url : '');
10
+ const isLoading = (0, view_1.useIsLoading)();
11
+ const isLogInColdStorage = !!(signedRequest === null || signedRequest === void 0 ? void 0 : signedRequest.isColdStorage);
12
+ // Determine the correct return type based on the loading and storage status
13
+ if (isLoading) {
14
+ return { isLoading: true, isLogInColdStorage, logCorrelation };
15
+ }
16
+ else if (isLogInColdStorage) {
17
+ return { isLoading: false, isLogInColdStorage: true, logCorrelation };
18
+ }
19
+ else {
20
+ // Fix this, it should be a throw error
21
+ if (!log) {
22
+ return { isLoading: true, isLogInColdStorage, logCorrelation };
23
+ }
24
+ return {
25
+ isLoading: false,
26
+ isLogInColdStorage: false,
27
+ log: log,
28
+ logCorrelation,
29
+ };
30
+ }
31
+ };
32
+ exports.useLoadedStoryResult = useLoadedStoryResult;
@@ -0,0 +1,11 @@
1
+ export type LogDialogState = {
2
+ selectedTab: number;
3
+ hideFastActions: boolean;
4
+ orderByDuration: boolean;
5
+ };
6
+ export type LogDialogStateApi = {
7
+ setSelectedTab: (tabIndex: number) => void;
8
+ setHideFastActions: (hideFastActions: boolean) => void;
9
+ setOrderByDuration: (orderByDuration: boolean) => void;
10
+ };
11
+ export declare const useLogDialogStateManagement: () => [LogDialogState, LogDialogStateApi];
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useLogDialogStateManagement = void 0;
4
+ const quidproquo_web_react_1 = require("quidproquo-web-react");
5
+ const react_1 = require("react");
6
+ const useLogDialogStateManagement = () => {
7
+ const [logDialogState, setLogDialogState] = (0, react_1.useState)({
8
+ selectedTab: 0,
9
+ hideFastActions: false,
10
+ orderByDuration: false,
11
+ });
12
+ const updateLogDialogState = (0, quidproquo_web_react_1.useStateUpdater)(setLogDialogState);
13
+ return [
14
+ logDialogState,
15
+ {
16
+ setSelectedTab: updateLogDialogState('selectedTab'),
17
+ setHideFastActions: updateLogDialogState('hideFastActions'),
18
+ setOrderByDuration: updateLogDialogState('orderByDuration'),
19
+ },
20
+ ];
21
+ };
22
+ exports.useLogDialogStateManagement = useLogDialogStateManagement;
@@ -0,0 +1 @@
1
+ export * from './LogDialog';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./LogDialog"), exports);
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { AsyncStoryState } from '../../hooks';
3
+ interface HelpTabProps {
4
+ log: AsyncStoryState;
5
+ }
6
+ export declare const HelpTab: React.FC<HelpTabProps>;
7
+ export {};
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HelpTab = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const HelpChat_1 = require("../../../HelpChat");
6
+ const HelpTab = ({ log }) => {
7
+ return (0, jsx_runtime_1.jsx)(HelpChat_1.HelpChat, { logCorrelation: log.logCorrelation });
8
+ };
9
+ exports.HelpTab = HelpTab;
@@ -0,0 +1 @@
1
+ export * from './HelpTab';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./HelpTab"), exports);
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { AsyncStoryState, LogDialogState, LogDialogStateApi } from '../../hooks';
3
+ interface LogDetailsTabProps {
4
+ log: AsyncStoryState;
5
+ logDialogState: LogDialogState;
6
+ logDialogStateApi: LogDialogStateApi;
7
+ }
8
+ export declare const LogDetailsTab: React.FC<LogDetailsTabProps>;
9
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LogDetailsTab = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const material_1 = require("@mui/material");
6
+ const LogDetails_1 = require("../../../LogDetails");
7
+ const MovedToColdStorage_1 = require("../../MovedToColdStorage");
8
+ const LogDetailsTab = ({ log, logDialogState: { hideFastActions, orderByDuration }, logDialogStateApi: { setHideFastActions, setOrderByDuration }, }) => {
9
+ if (log.isLoading) {
10
+ return (0, jsx_runtime_1.jsx)("div", { children: "Loading..." });
11
+ }
12
+ if (log.isLogInColdStorage) {
13
+ return (0, jsx_runtime_1.jsx)(MovedToColdStorage_1.MovedToColdStorage, { guid: log.logCorrelation });
14
+ }
15
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ style: {
16
+ display: 'flex',
17
+ flexDirection: 'row-reverse',
18
+ } }, { children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: hideFastActions, onChange: (event) => setHideFastActions(event.target.checked) }), label: "Hide Fast Actions" }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: orderByDuration, onChange: (event) => setOrderByDuration(event.target.checked) }), label: "Order by Duration" })] }), (0, jsx_runtime_1.jsx)(LogDetails_1.LogDetails, { log: log.log, hideFastActions: hideFastActions, orderByDuration: orderByDuration })] })));
19
+ };
20
+ exports.LogDetailsTab = LogDetailsTab;
@@ -0,0 +1 @@
1
+ export * from './LogDetailsTab';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./LogDetailsTab"), exports);
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { AsyncStoryState } from '../../hooks';
3
+ interface NotesTabProps {
4
+ log: AsyncStoryState;
5
+ }
6
+ export declare const NotesTab: React.FC<NotesTabProps>;
7
+ export {};
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotesTab = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const LogSummary_1 = require("../../../LogSummary");
6
+ const MovedToColdStorage_1 = require("../../MovedToColdStorage");
7
+ const NotesTab = ({ log }) => {
8
+ if (log.isLoading) {
9
+ return (0, jsx_runtime_1.jsx)("div", { children: "Loading..." });
10
+ }
11
+ if (log.isLogInColdStorage) {
12
+ return (0, jsx_runtime_1.jsx)(MovedToColdStorage_1.MovedToColdStorage, { guid: log.logCorrelation });
13
+ }
14
+ return (0, jsx_runtime_1.jsx)(LogSummary_1.LogSummary, { log: log.log });
15
+ };
16
+ exports.NotesTab = NotesTab;
@@ -0,0 +1 @@
1
+ export * from './NotesTab';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./NotesTab"), exports);
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { AsyncStoryState } from '../../hooks';
3
+ interface RawTabProps {
4
+ log: AsyncStoryState;
5
+ }
6
+ export declare const RawTab: React.FC<RawTabProps>;
7
+ export {};
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RawTab = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const LogRawJson_1 = require("../../../LogRawJson");
6
+ const MovedToColdStorage_1 = require("../../MovedToColdStorage");
7
+ const RawTab = ({ log }) => {
8
+ if (log.isLoading) {
9
+ return (0, jsx_runtime_1.jsx)("div", { children: "Loading..." });
10
+ }
11
+ if (log.isLogInColdStorage) {
12
+ return (0, jsx_runtime_1.jsx)(MovedToColdStorage_1.MovedToColdStorage, { guid: log.logCorrelation });
13
+ }
14
+ return (0, jsx_runtime_1.jsx)(LogRawJson_1.LogRawJson, { log: log.log });
15
+ };
16
+ exports.RawTab = RawTab;
@@ -0,0 +1 @@
1
+ export * from './RawTab';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./RawTab"), exports);
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { TreeApi } from '../../../hooks';
3
+ import { AsyncStoryState } from '../../hooks';
4
+ interface TimelineTabProps {
5
+ log: AsyncStoryState;
6
+ isVisible: boolean;
7
+ setSelectedLogCorrelation: (correlation: string) => void;
8
+ treeApi: TreeApi;
9
+ }
10
+ export declare const TimelineTab: React.FC<TimelineTabProps>;
11
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TimelineTab = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const EventTimeline_1 = require("../../../EventTimeline");
6
+ const TimelineTab = ({ log, isVisible, setSelectedLogCorrelation, treeApi, }) => {
7
+ if (log.isLoading) {
8
+ return (0, jsx_runtime_1.jsx)("div", { children: "Loading..." });
9
+ }
10
+ return ((0, jsx_runtime_1.jsx)(EventTimeline_1.EventTimeline, { logCorrelation: log.logCorrelation, setSelectedLogCorrelation: setSelectedLogCorrelation, isVisible: isVisible, treeApi: treeApi }));
11
+ };
12
+ exports.TimelineTab = TimelineTab;
@@ -0,0 +1 @@
1
+ export * from './TimelineTab';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./TimelineTab"), exports);
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { TreeApi } from '../../../hooks';
3
+ import { AsyncStoryState } from '../../hooks';
4
+ interface TreeTabProps {
5
+ log: AsyncStoryState;
6
+ isVisible: boolean;
7
+ setSelectedLogCorrelation: (correlation: string) => void;
8
+ treeApi: TreeApi;
9
+ }
10
+ export declare const TreeTab: React.FC<TreeTabProps>;
11
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TreeTab = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const LogCorrelations_1 = require("../../../LogCorrelations");
6
+ const TreeTab = ({ log, isVisible, setSelectedLogCorrelation, treeApi, }) => {
7
+ if (log.isLoading) {
8
+ return (0, jsx_runtime_1.jsx)("div", { children: "Loading..." });
9
+ }
10
+ return ((0, jsx_runtime_1.jsx)(LogCorrelations_1.LogCorrelations, { logCorrelation: log.logCorrelation, setSelectedLogCorrelation: setSelectedLogCorrelation, isVisible: isVisible, treeApi: treeApi }));
11
+ };
12
+ exports.TreeTab = TreeTab;
@@ -0,0 +1 @@
1
+ export * from './TreeTab';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./TreeTab"), exports);
@@ -0,0 +1,6 @@
1
+ export * from './HelpTab';
2
+ export * from './LogDetailsTab';
3
+ export * from './NotesTab';
4
+ export * from './RawTab';
5
+ export * from './TimelineTab';
6
+ export * from './TreeTab';
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./HelpTab"), exports);
18
+ __exportStar(require("./LogDetailsTab"), exports);
19
+ __exportStar(require("./NotesTab"), exports);
20
+ __exportStar(require("./RawTab"), exports);
21
+ __exportStar(require("./TimelineTab"), exports);
22
+ __exportStar(require("./TreeTab"), exports);
@@ -9,7 +9,7 @@ const LinearProgress_1 = __importDefault(require("@mui/material/LinearProgress")
9
9
  const x_data_grid_1 = require("@mui/x-data-grid");
10
10
  const components_1 = require("../components");
11
11
  const hooks_1 = require("./hooks");
12
- const LogDialog_1 = __importDefault(require("./LogDialog"));
12
+ const LogDialog_1 = require("./LogDialog");
13
13
  const formatTime = (ms) => {
14
14
  if (ms < 1000)
15
15
  return `${ms}ms`;
@@ -57,6 +57,6 @@ const LogMetadataGrid = ({ logs, isLoading }) => {
57
57
  ` }), (0, jsx_runtime_1.jsx)(x_data_grid_1.DataGrid, { components: {
58
58
  Pagination: components_1.DataGridPagination,
59
59
  LoadingOverlay: () => (0, jsx_runtime_1.jsx)(LinearProgress_1.default, { variant: "determinate", value: searchProgress }),
60
- }, columns: columns, rows: logs.map((log) => (Object.assign(Object.assign({}, log), { id: log.correlation }))), autoPageSize: true, loading: isLoading, onRowClick: onRowClick, getRowClassName: getRowClassName }), (0, jsx_runtime_1.jsx)(LogDialog_1.default, { open: !!selectedLogCorrelation, handleClose: clearSelectedLogCorrelation, logCorrelation: selectedLogCorrelation, storyResultMetadatas: logs, setSelectedLogCorrelation: setSelectedLogCorrelation })] }));
60
+ }, columns: columns, rows: logs.map((log) => (Object.assign(Object.assign({}, log), { id: log.correlation }))), autoPageSize: true, loading: isLoading, onRowClick: onRowClick, getRowClassName: getRowClassName }), (0, jsx_runtime_1.jsx)(LogDialog_1.LogDialog, { open: !!selectedLogCorrelation, handleClose: clearSelectedLogCorrelation, logCorrelation: selectedLogCorrelation, storyResultMetadatas: logs, setSelectedLogCorrelation: setSelectedLogCorrelation })] }));
61
61
  };
62
62
  exports.LogMetadataGrid = LogMetadataGrid;
@@ -0,0 +1,9 @@
1
+ interface LogDialogProps {
2
+ open: boolean;
3
+ logCorrelation: string;
4
+ handleClose: () => void;
5
+ storyResultMetadatas: any[];
6
+ setSelectedLogCorrelation: (logCorrelation: string) => void;
7
+ }
8
+ export declare const LogDialog: ({ logCorrelation, open, handleClose, setSelectedLogCorrelation }: LogDialogProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};