quidproquo-web-admin 0.1.1 → 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.
- package/lib/commonjs/Auth/Auth.js +1 -1
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/AuthChallengeMfaSetup.js +1 -1
- package/lib/commonjs/Auth/AuthChallengeNewPasswordRequired/AuthChallengeNewPasswordRequired.js +2 -2
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/AuthChallengeSoftwareTokenMfa.js +2 -2
- package/lib/commonjs/Auth/Login.js +2 -2
- package/lib/commonjs/Config/Config.js +3 -3
- package/lib/commonjs/LogViewer/ActionHistoryItem.js +1 -1
- package/lib/commonjs/LogViewer/ActionRender/ActionRender.js +3 -3
- package/lib/commonjs/LogViewer/AdminLogs/AdminLogGrid/AdminLogGrid.js +3 -3
- package/lib/commonjs/LogViewer/AdminLogs/AdminLogSearchBar/AdminLogSearchBar.js +4 -4
- package/lib/commonjs/LogViewer/AdminLogs/AdminLogs.js +1 -1
- package/lib/commonjs/LogViewer/Dashboard.js +8 -4
- package/lib/commonjs/LogViewer/EventTimeline.js +4 -4
- package/lib/commonjs/LogViewer/HelpChat/HelpChat.js +8 -7
- package/lib/commonjs/LogViewer/LogCorrelationTree.js +27 -24
- package/lib/commonjs/LogViewer/LogCorrelations.js +1 -1
- package/lib/commonjs/LogViewer/LogDetails.js +1 -1
- package/lib/commonjs/LogViewer/LogDialog/LogDialog.js +4 -4
- package/lib/commonjs/LogViewer/LogDialog/MovedToColdStorage/MovedToColdStorage.js +1 -1
- package/lib/commonjs/LogViewer/LogDialog/tabs/LogDetailsTab/LogDetailsTab.js +1 -1
- package/lib/commonjs/LogViewer/LogDialog/tabs/TimelineTab/TimelineTab.js +1 -1
- package/lib/commonjs/LogViewer/LogDialog/tabs/TreeTab/TreeTab.js +1 -1
- package/lib/commonjs/LogViewer/LogMetadataGrid.js +3 -3
- package/lib/commonjs/LogViewer/LogRawJson.js +1 -1
- package/lib/commonjs/LogViewer/LogSearch.js +1 -1
- package/lib/commonjs/LogViewer/LogSummary.js +2 -2
- package/lib/commonjs/LogViewer/LogSummaryDetails.js +4 -2
- package/lib/commonjs/LogViewer/LogSummaryReturn.js +1 -1
- package/lib/commonjs/LogViewer/TopSection.js +7 -7
- package/lib/commonjs/LogViewer/actionComponents/custom/CoreContextListCustomAction.js +1 -1
- package/lib/commonjs/LogViewer/actionComponents/custom/CoreLogCreateCustomAction.js +1 -1
- package/lib/commonjs/LogViewer/actionComponents/custom/CoreLogDisableEventHistoryCustomAction.js +1 -1
- package/lib/commonjs/LogViewer/actionComponents/custom/CoreLogTemplateLiteralCustomAction.js +1 -1
- package/lib/commonjs/LogViewer/actionComponents/custom/CoreNetworkRequestCustomAction.js +2 -2
- package/lib/commonjs/LogViewer/actionComponents/genericActionRenderer/ActionResultDisplay.js +1 -1
- package/lib/commonjs/LogViewer/actionComponents/genericActionRenderer/AnyVariableView/AnyVariableView.js +15 -15
- package/lib/commonjs/LogViewer/actionComponents/genericActionRenderer/getGenericActionRenderer.js +7 -4
- package/lib/commonjs/LogViewer/charts/CostPerService.js +1 -1
- package/lib/commonjs/LogViewer/charts/ErrorsByType.js +1 -1
- package/lib/commonjs/LogViewer/charts/ErrorsOverTime.js +1 -1
- package/lib/commonjs/LogViewer/charts/RequestsByService.js +2 -2
- package/lib/commonjs/LogViewer/hooks/useLogManagement.js +1 -1
- package/lib/commonjs/LogViewer/hooks/useLogTreeData.js +14 -11
- package/lib/commonjs/LogViewer/hooks/useServiceNames.js +6 -5
- package/lib/commonjs/components/AdminDialog.js +2 -2
- package/lib/commonjs/components/AsyncButton.js +1 -1
- package/lib/commonjs/components/AutocompleteInput.js +2 -2
- package/lib/commonjs/components/DataGrid.js +1 -1
- package/lib/commonjs/components/DataGridPagination/DataGridPagination.js +1 -1
- package/lib/commonjs/components/DateCell/DateCell.js +1 -1
- package/lib/commonjs/components/DateRangePicker.js +2 -2
- package/lib/commonjs/components/MainLayout/MainLayout.js +2 -2
- package/lib/commonjs/components/TextInput.js +2 -2
- package/lib/commonjs/tmp/RandomView.js +1 -1
- package/lib/commonjs/useFederatedAddon.js +7 -6
- package/lib/esm/Auth/Auth.js +1 -1
- package/lib/esm/Auth/AuthChallengeMfaSetup/AuthChallengeMfaSetup.js +1 -1
- package/lib/esm/Auth/AuthChallengeMfaSetup/logic/authActionCreator.js +1 -1
- package/lib/esm/Auth/AuthChallengeNewPasswordRequired/AuthChallengeNewPasswordRequired.js +1 -1
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/AuthChallengeSoftwareTokenMfa.js +1 -1
- package/lib/esm/Auth/Login.js +2 -2
- package/lib/esm/Config/Config.js +3 -3
- package/lib/esm/LogViewer/ActionHistoryItem.js +1 -1
- package/lib/esm/LogViewer/ActionRender/ActionRender.js +3 -3
- package/lib/esm/LogViewer/AdminLogs/AdminLogGrid/AdminLogGrid.js +3 -3
- package/lib/esm/LogViewer/AdminLogs/AdminLogSearchBar/AdminLogSearchBar.js +4 -4
- package/lib/esm/LogViewer/AdminLogs/AdminLogs.js +1 -1
- package/lib/esm/LogViewer/Dashboard.js +9 -5
- package/lib/esm/LogViewer/EventTimeline.js +4 -4
- package/lib/esm/LogViewer/HelpChat/HelpChat.js +9 -8
- package/lib/esm/LogViewer/LogCorrelationTree.js +27 -24
- package/lib/esm/LogViewer/LogCorrelations.js +1 -1
- package/lib/esm/LogViewer/LogDetails.js +1 -1
- package/lib/esm/LogViewer/LogDialog/LogDialog.js +4 -4
- package/lib/esm/LogViewer/LogDialog/MovedToColdStorage/MovedToColdStorage.js +1 -1
- package/lib/esm/LogViewer/LogDialog/tabs/LogDetailsTab/LogDetailsTab.js +1 -1
- package/lib/esm/LogViewer/LogDialog/tabs/TimelineTab/TimelineTab.js +1 -1
- package/lib/esm/LogViewer/LogDialog/tabs/TreeTab/TreeTab.js +1 -1
- package/lib/esm/LogViewer/LogMetadataGrid.js +3 -3
- package/lib/esm/LogViewer/LogRawJson.js +1 -1
- package/lib/esm/LogViewer/LogSearch.js +1 -1
- package/lib/esm/LogViewer/LogSummary.js +2 -2
- package/lib/esm/LogViewer/LogSummaryDetails.js +4 -2
- package/lib/esm/LogViewer/LogSummaryReturn.js +1 -1
- package/lib/esm/LogViewer/TopSection.js +7 -7
- package/lib/esm/LogViewer/actionComponents/custom/CoreContextListCustomAction.js +1 -1
- package/lib/esm/LogViewer/actionComponents/custom/CoreLogCreateCustomAction.js +1 -1
- package/lib/esm/LogViewer/actionComponents/custom/CoreLogDisableEventHistoryCustomAction.js +1 -1
- package/lib/esm/LogViewer/actionComponents/custom/CoreLogTemplateLiteralCustomAction.js +1 -1
- package/lib/esm/LogViewer/actionComponents/custom/CoreNetworkRequestCustomAction.js +2 -2
- package/lib/esm/LogViewer/actionComponents/genericActionRenderer/ActionResultDisplay.js +1 -1
- package/lib/esm/LogViewer/actionComponents/genericActionRenderer/AnyVariableView/AnyVariableView.js +15 -15
- package/lib/esm/LogViewer/actionComponents/genericActionRenderer/getGenericActionRenderer.js +7 -4
- package/lib/esm/LogViewer/charts/CostPerService.js +1 -1
- package/lib/esm/LogViewer/charts/ErrorsByType.js +1 -1
- package/lib/esm/LogViewer/charts/ErrorsOverTime.js +1 -1
- package/lib/esm/LogViewer/charts/RequestsByService.js +2 -2
- package/lib/esm/LogViewer/hooks/useLogManagement.js +1 -1
- package/lib/esm/LogViewer/hooks/useLogTreeData.js +15 -12
- package/lib/esm/LogViewer/hooks/useServiceNames.js +7 -6
- package/lib/esm/components/AdminDialog.js +2 -2
- package/lib/esm/components/AsyncButton.js +1 -1
- package/lib/esm/components/AutocompleteInput.js +2 -2
- package/lib/esm/components/DataGrid.js +1 -1
- package/lib/esm/components/DataGridPagination/DataGridPagination.js +1 -1
- package/lib/esm/components/DateCell/DateCell.js +1 -1
- package/lib/esm/components/DateRangePicker.js +2 -2
- package/lib/esm/components/MainLayout/MainLayout.js +2 -2
- package/lib/esm/components/TextInput.js +2 -2
- package/lib/esm/tmp/RandomView.js +1 -1
- package/lib/esm/useFederatedAddon.js +8 -7
- package/package.json +6 -6
package/lib/esm/Auth/Auth.js
CHANGED
|
@@ -20,7 +20,7 @@ export function Auth({ children }) {
|
|
|
20
20
|
if (state.authenticateUserResponse?.challenge === AuthenticateUserChallenge.MFA_SETUP) {
|
|
21
21
|
return (_jsx(QpqRuntimeEffectCatcher, { runtime: authRuntime, children: _jsx(AuthChallengeMfaSetup, { authState: state }) }));
|
|
22
22
|
}
|
|
23
|
-
return (_jsxs(QpqRuntimeEffectCatcher, { runtime: authRuntime, children: [!isAuthenticated && (_jsx(Login, {
|
|
23
|
+
return (_jsxs(QpqRuntimeEffectCatcher, { runtime: authRuntime, children: [!isAuthenticated && (_jsx(Login, { onLogin: api.authLogin, password: state.password, setPassword: api.authUISetPassword, setUsername: api.authUISetUsername, username: state.username })), isAuthenticated && (_jsx(authContext.Provider, { value: {
|
|
24
24
|
challenge: state.authenticateUserResponse?.challenge,
|
|
25
25
|
session: state.authenticateUserResponse?.session,
|
|
26
26
|
username: state.username,
|
|
@@ -39,5 +39,5 @@ export function AuthChallengeMfaSetup({ authState }) {
|
|
|
39
39
|
flexDirection: 'column',
|
|
40
40
|
justifyContent: 'center',
|
|
41
41
|
alignItems: 'center',
|
|
42
|
-
}, children: _jsx(Box, { component: "form", sx: { width: '100%', maxWidth: 360 }, children: _jsxs(Grid, { container: true, spacing: 2, children: [_jsx(Grid, { item: true, xs: 12, children: _jsxs(Typography, {
|
|
42
|
+
}, children: _jsx(Box, { component: "form", sx: { width: '100%', maxWidth: 360 }, children: _jsxs(Grid, { container: true, spacing: 2, children: [_jsx(Grid, { item: true, xs: 12, children: _jsxs(Typography, { gutterBottom: true, sx: { display: 'flex', alignItems: 'center' }, variant: "h5", children: [_jsx(LockIcon, { sx: { marginRight: 1 } }), "Set Up Authenticator"] }) }), _jsx(Grid, { item: true, xs: 12, children: _jsx(Typography, { color: "text.secondary", variant: "body2", children: "Add this account to your authenticator app, then enter the 6-digit code it generates." }) }), _jsxs(Grid, { item: true, xs: 12, children: [_jsx(Typography, { color: "text.secondary", variant: "caption", children: "Secret key" }), _jsx(Typography, { sx: { fontFamily: 'monospace', wordBreak: 'break-all' }, variant: "body1", children: state.secretCode || 'Loading…' })] }), state.secretCode && (_jsx(Grid, { item: true, xs: 12, children: _jsx(Typography, { color: "text.secondary", sx: { wordBreak: 'break-all' }, variant: "caption", children: buildOtpAuthUri(authState.username, state.secretCode) }) })), _jsx(Grid, { item: true, xs: 12, children: _jsx(TextField, { autoFocus: true, fullWidth: true, id: "mfaCode", inputProps: { inputMode: 'numeric', pattern: '[0-9]*', maxLength: 6 }, label: "Authentication Code", onChange: (event) => api.authChallengeSetMfaSetupCode(event.target.value.replace(/\D/g, '')), required: true, value: state.mfaCode }) }), _jsx(Grid, { item: true, xs: 12, children: _jsx(AsyncButton, { disabled: !isCodeValid || !state.secretCode, onClick: () => api.authChallengeSendMfaSetupCode(challenge, authState.username), children: "Verify" }) })] }) }) }));
|
|
43
43
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { askStateDispatchEffect } from 'quidproquo-core';
|
|
2
|
-
import { AuthChallengeMfaSetupEffect
|
|
2
|
+
import { AuthChallengeMfaSetupEffect } from './authChallengeTypes';
|
|
3
3
|
export function* askAuthChallengeSetMfaSetupCode(mfaCode) {
|
|
4
4
|
yield* askStateDispatchEffect(AuthChallengeMfaSetupEffect.SetMfaCode, mfaCode);
|
|
5
5
|
}
|
|
@@ -23,5 +23,5 @@ export function AuthChallengeNewPasswordRequired({ authState }) {
|
|
|
23
23
|
flexDirection: 'column',
|
|
24
24
|
justifyContent: 'center',
|
|
25
25
|
alignItems: 'center',
|
|
26
|
-
}, children: _jsx(Box, { component: "form", sx: { width: '100%', maxWidth: 360 }, children: _jsxs(Grid, { container: true, spacing: 2, children: [_jsx(Grid, { item: true, xs: 12, children: _jsxs(Typography, {
|
|
26
|
+
}, children: _jsx(Box, { component: "form", sx: { width: '100%', maxWidth: 360 }, children: _jsxs(Grid, { container: true, spacing: 2, children: [_jsx(Grid, { item: true, xs: 12, children: _jsxs(Typography, { gutterBottom: true, sx: { display: 'flex', alignItems: 'center' }, variant: "h5", children: [_jsx(LockIcon, { sx: { marginRight: 1 } }), "Password Change Required"] }) }), _jsx(Grid, { item: true, xs: 12, children: _jsx(TextField, { autoFocus: true, fullWidth: true, id: "newPassword", label: "New Password", onChange: (event) => api.authChallengeSetPasswordA(event.target.value), required: true, type: "password", value: state.passwordA }) }), _jsx(Grid, { item: true, xs: 12, children: _jsx(TextField, { fullWidth: true, id: "confirmPassword", label: "Confirm Password", onChange: (event) => api.authChallengeSetPasswordB(event.target.value), required: true, type: "password", value: state.passwordB }) }), _jsx(Grid, { item: true, xs: 12, children: _jsx(AsyncButton, { disabled: !arePasswordsMatching, onClick: () => api.authChallengeSendPasswords(authState.authenticateUserResponse?.challenge, authState.authenticateUserResponse?.session, authState.username), children: "Update Password" }) })] }) }) }));
|
|
27
27
|
}
|
|
@@ -23,5 +23,5 @@ export function AuthChallengeSoftwareTokenMfa({ authState }) {
|
|
|
23
23
|
flexDirection: 'column',
|
|
24
24
|
justifyContent: 'center',
|
|
25
25
|
alignItems: 'center',
|
|
26
|
-
}, children: _jsx(Box, { component: "form", sx: { width: '100%', maxWidth: 360 }, children: _jsxs(Grid, { container: true, spacing: 2, children: [_jsx(Grid, { item: true, xs: 12, children: _jsxs(Typography, {
|
|
26
|
+
}, children: _jsx(Box, { component: "form", sx: { width: '100%', maxWidth: 360 }, children: _jsxs(Grid, { container: true, spacing: 2, children: [_jsx(Grid, { item: true, xs: 12, children: _jsxs(Typography, { gutterBottom: true, sx: { display: 'flex', alignItems: 'center' }, variant: "h5", children: [_jsx(LockIcon, { sx: { marginRight: 1 } }), "Verification Code"] }) }), _jsx(Grid, { item: true, xs: 12, children: _jsx(Typography, { color: "text.secondary", variant: "body2", children: "Enter the 6-digit code from your authenticator app." }) }), _jsx(Grid, { item: true, xs: 12, children: _jsx(TextField, { autoFocus: true, fullWidth: true, id: "mfaCode", inputProps: { inputMode: 'numeric', pattern: '[0-9]*', maxLength: 6 }, label: "Authentication Code", onChange: (event) => api.authChallengeSetMfaCode(event.target.value.replace(/\D/g, '')), required: true, value: state.mfaCode }) }), _jsx(Grid, { item: true, xs: 12, children: _jsx(AsyncButton, { disabled: !isCodeValid, onClick: () => api.authChallengeSendMfaCode(authState.authenticateUserResponse?.challenge, authState.authenticateUserResponse?.session, authState.username), children: "Verify" }) })] }) }) }));
|
|
27
27
|
}
|
package/lib/esm/Auth/Login.js
CHANGED
|
@@ -14,8 +14,8 @@ export function Login({ username, password, setUsername, setPassword, onLogin })
|
|
|
14
14
|
flexDirection: 'column',
|
|
15
15
|
justifyContent: 'center',
|
|
16
16
|
alignItems: 'center',
|
|
17
|
-
}, children: _jsx(Box, {
|
|
17
|
+
}, children: _jsx(Box, { action: "#", autoComplete: "on", component: "form", method: "post", sx: { width: '100%', maxWidth: 360 }, children: _jsxs(Grid, { container: true, spacing: 2, children: [_jsx(Grid, { item: true, xs: 12, children: _jsxs(Typography, { gutterBottom: true, sx: { display: 'flex', alignItems: 'center' }, variant: "h5", children: [_jsx(LockIcon, { sx: { marginRight: 1 } }), "QPQ Admin"] }) }), _jsx(Grid, { item: true, xs: 12, children: _jsx(TextField, { autoComplete: "username", autoFocus: true, fullWidth: true, id: "username", label: "Username", onChange: (event) => setUsername(event.target.value), required: true, type: "username", value: username }) }), _jsx(Grid, { item: true, xs: 12, children: _jsx(TextField, { autoComplete: "current-password", fullWidth: true, id: "password", label: "Password", onChange: (event) => setPassword(event.target.value), required: true, type: "password", value: password }) }), _jsx(Grid, { item: true, xs: 12, children: _jsx(AsyncButton, { onClick: async (event) => {
|
|
18
18
|
event.preventDefault();
|
|
19
19
|
await onLogin();
|
|
20
|
-
}, children: "Login" }) })] }) }) }));
|
|
20
|
+
}, type: "submit", children: "Login" }) })] }) }) }));
|
|
21
21
|
}
|
package/lib/esm/Config/Config.js
CHANGED
|
@@ -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, {
|
|
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,
|
|
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, {
|
|
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, {
|
|
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,
|
|
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,
|
|
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, {
|
|
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"
|
|
107
|
-
},
|
|
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, {
|
|
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",
|
|
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",
|
|
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",
|
|
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, {
|
|
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
|
-
|
|
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,
|
|
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, {
|
|
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
|
-
},
|
|
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,
|
|
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,
|
|
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
|
-
|
|
17
|
-
|
|
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 },
|
|
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,
|
|
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) =>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
?
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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,
|
|
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, {
|
|
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, {
|
|
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, {
|
|
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, {
|
|
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
|
-
},
|
|
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, {
|
|
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,
|
|
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,
|
|
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,
|
|
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"
|
|
55
|
-
},
|
|
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",
|
|
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, {
|
|
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",
|
|
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
|
};
|
|
@@ -9,6 +9,8 @@ const runtimeTypeToCamelCase = (runtimeType) => runtimeType.toLowerCase().replac
|
|
|
9
9
|
export const LogSummaryDetails = ({ log }) => {
|
|
10
10
|
const [expanded, setExpanded] = useState(false);
|
|
11
11
|
const totalRuntime = new Date(log.finishedAt).getTime() - new Date(log.startedAt).getTime();
|
|
12
|
-
const functionKey = log.qpqFunctionRuntimeInfo
|
|
13
|
-
|
|
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' })] }) })] }));
|
|
14
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, {
|
|
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
|
};
|