Skip to content

Commit

Permalink
Merge pull request #1283 from cdapio/error-classification-ui
Browse files Browse the repository at this point in the history
Ux enhancements for error classification
  • Loading branch information
GnsP authored Jan 28, 2025
2 parents b6a119b + e42c17f commit 1123ad4
Show file tree
Hide file tree
Showing 30 changed files with 925 additions and 379 deletions.
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

0 comments on commit 1123ad4

Please sign in to comment.