Skip to content

Commit 1123ad4

Browse files
authored
Merge pull request #1283 from cdapio/error-classification-ui
Ux enhancements for error classification
2 parents b6a119b + e42c17f commit 1123ad4

File tree

30 files changed

+925
-379
lines changed

30 files changed

+925
-379
lines changed

app/cdap/api/preview.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const basepath = '/namespaces/:namespace/previews';
2222

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

2627
// logs
2728
nextLogs: apiCreator(dataSrc, 'GET', 'REQUEST', `${basepath}/:previewId/logs/next`),

app/cdap/components/LogViewer/TopPanel.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ interface ITopPanelProps extends WithStyles<typeof styles> {
145145
getLatestLogs: () => void;
146146
setSystemLogs: (includeSystemLogs: boolean) => void;
147147
onClose?: () => void;
148+
showStats?: boolean;
148149
}
149150

150151
const TopPanelView: React.FC<ITopPanelProps> = ({
@@ -155,6 +156,7 @@ const TopPanelView: React.FC<ITopPanelProps> = ({
155156
setSystemLogs,
156157
onClose,
157158
loading,
159+
showStats,
158160
}) => {
159161
const [includeSystemLogs, setLocalIncludeSystemLogs] = React.useState(
160162
dataFetcher.getIncludeSystemLogs()
@@ -183,9 +185,13 @@ const TopPanelView: React.FC<ITopPanelProps> = ({
183185
return (
184186
<div className={classes.root} data-cy="log-viewer-top-panel" data-testid="log-viewer-top-panel">
185187
<div className={classes.leftContainer}>
186-
<Provider store={PipelineDetailStore}>
187-
<RunLogsStatsChips />
188-
</Provider>
188+
{showStats ? (
189+
<Provider store={PipelineDetailStore}>
190+
<RunLogsStatsChips />
191+
</Provider>
192+
) : (
193+
<div />
194+
)}
189195
</div>
190196
<div className={classes.rightContainer}>
191197
<Button

app/cdap/components/LogViewer/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ interface ILogViewerProps extends WithStyles<typeof styles> {
8484
dataFetcher: DataFetcher;
8585
stopPoll?: boolean;
8686
onClose?: () => void;
87+
showStats?: boolean;
8788
}
8889

8990
interface ILogViewerState {
@@ -448,6 +449,7 @@ class LogViewerView extends React.PureComponent<ILogViewerProps, ILogViewerState
448449
setSystemLogs={this.setIncludeSystemLogs}
449450
onClose={this.props.onClose}
450451
loading={this.state.isFetching}
452+
showStats={this.props.showStats}
451453
/>
452454
<div className={classes.logsTableHeader}>
453455
<div className={classes.cell}>Time</div>

0 commit comments

Comments
 (0)