Skip to content

Commit

Permalink
addressing PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cauemarcondes committed Apr 19, 2021
1 parent f6efc42 commit d2eb3e2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ export function ServiceOverviewErrorsTable({ serviceName }: Props) {
).slice(pageIndex * PAGE_SIZE, (pageIndex + 1) * PAGE_SIZE);

return {
// Everytime the primary statistics is refetched, updates the requestId making the comparison API to be refetched.
requestId: uuid(),
items: currentPageErrorGroups,
totalItems: response.error_groups.length,
};
});
},
// comparisonType is listed as dependency even thought it is not used. This is needed to trigger the comparison api when it is changed.
// eslint-disable-next-line react-hooks/exhaustive-deps
[
environment,
Expand All @@ -132,7 +132,9 @@ export function ServiceOverviewErrorsTable({ serviceName }: Props) {
pageIndex,
direction,
field,
// not used, but needed to trigger an update when comparisonType is changed either manually by user or when time range is changed
comparisonType,
// not used, but needed to trigger an update when comparison feature is disabled/enabled by user
comparisonEnabled,
]
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ export function ServiceOverviewInstancesChartAndTable({
).slice(pageIndex * PAGE_SIZE, (pageIndex + 1) * PAGE_SIZE);

return {
// Everytime the primary statistics is refetched, updates the requestId making the comparison API to be refetched.
primaryStatsRequestId: uuid(),
primaryStatsItems,
primaryStatsItemCount: response.serviceInstances.length,
};
});
},
// comparisonType is listed as dependency even thought it is not used. This is needed to trigger the comparison api when it is changed.
// eslint-disable-next-line react-hooks/exhaustive-deps
[
environment,
Expand All @@ -154,7 +154,9 @@ export function ServiceOverviewInstancesChartAndTable({
pageIndex,
field,
direction,
// not used, but needed to trigger an update when comparisonType is changed either manually by user or when time range is changed
comparisonType,
// not used, but needed to trigger an update when comparison feature is disabled/enabled by user
comparisonEnabled,
]
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ export function ServiceOverviewTransactionsTable({ serviceName }: Props) {
};
});
},
// comparisonType is listed as dependency even thought it is not used. This is needed to trigger the comparison api when it is changed.
// eslint-disable-next-line react-hooks/exhaustive-deps
[
environment,
Expand All @@ -128,7 +127,9 @@ export function ServiceOverviewTransactionsTable({ serviceName }: Props) {
pageIndex,
direction,
field,
// not used, but needed to trigger an update when comparisonType is changed either manually by user or when time range is changed
comparisonType,
// not used, but needed to trigger an update when comparison feature is disabled/enabled by user
comparisonEnabled,
]
);
Expand Down

0 comments on commit d2eb3e2

Please sign in to comment.