Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ux enhancements for error classification #1283

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/cdap/api/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const basepath = '/namespaces/:namespace/previews';

export const MyPreviewApi = {
getStageData: apiCreator(dataSrc, 'POST', 'REQUEST', `${basepath}/:previewId/tracers`),
getErrorDetails: apiCreator(dataSrc, 'POST', 'REQUEST', `${basepath}/:previewId/classify`),

// logs
nextLogs: apiCreator(dataSrc, 'GET', 'REQUEST', `${basepath}/:previewId/logs/next`),
Expand Down
12 changes: 9 additions & 3 deletions app/cdap/components/LogViewer/TopPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ interface ITopPanelProps extends WithStyles<typeof styles> {
getLatestLogs: () => void;
setSystemLogs: (includeSystemLogs: boolean) => void;
onClose?: () => void;
showStats?: boolean;
}

const TopPanelView: React.FC<ITopPanelProps> = ({
Expand All @@ -155,6 +156,7 @@ const TopPanelView: React.FC<ITopPanelProps> = ({
setSystemLogs,
onClose,
loading,
showStats,
}) => {
const [includeSystemLogs, setLocalIncludeSystemLogs] = React.useState(
dataFetcher.getIncludeSystemLogs()
Expand Down Expand Up @@ -183,9 +185,13 @@ const TopPanelView: React.FC<ITopPanelProps> = ({
return (
<div className={classes.root} data-cy="log-viewer-top-panel" data-testid="log-viewer-top-panel">
<div className={classes.leftContainer}>
<Provider store={PipelineDetailStore}>
<RunLogsStatsChips />
</Provider>
{showStats ? (
<Provider store={PipelineDetailStore}>
<RunLogsStatsChips />
</Provider>
) : (
<div />
)}
</div>
<div className={classes.rightContainer}>
<Button
Expand Down
2 changes: 2 additions & 0 deletions app/cdap/components/LogViewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ interface ILogViewerProps extends WithStyles<typeof styles> {
dataFetcher: DataFetcher;
stopPoll?: boolean;
onClose?: () => void;
showStats?: boolean;
}

interface ILogViewerState {
Expand Down Expand Up @@ -448,6 +449,7 @@ class LogViewerView extends React.PureComponent<ILogViewerProps, ILogViewerState
setSystemLogs={this.setIncludeSystemLogs}
onClose={this.props.onClose}
loading={this.state.isFetching}
showStats={this.props.showStats}
/>
<div className={classes.logsTableHeader}>
<div className={classes.cell}>Time</div>
Expand Down
Loading
Loading