Skip to content

Commit

Permalink
Fix degraded api call when aggregation not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
achyutjhunjhunwala committed Sep 17, 2024
1 parent 55d1cff commit 959a273
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,15 @@ export const createDatasetQualityDetailsControllerStateMachine = ({
loadDegradedFields: (context) => {
const { startDate: start, endDate: end } = getDateISORange(context.timeRange);

return dataStreamDetailsClient.getDataStreamDegradedFields({
dataStream: context.dataStream,
start,
end,
});
if (!context.isNonAggregatable) {
return dataStreamDetailsClient.getDataStreamDegradedFields({
dataStream: context.dataStream,
start,
end,
});
}

return Promise.resolve();
},

loadDegradedFieldValues: (context) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export interface WithDefaultControllerState {
isIndexNotFoundError?: boolean;
integration?: Integration;
expandedDegradedField?: string;
isNonAggregatable?: boolean;
}

export interface WithDataStreamDetails {
Expand Down

0 comments on commit 959a273

Please sign in to comment.