Просмотр исходного кода

fix(ui): Do not unselect healthy series if there are no other (#24700)

Matej Minar 4 лет назад
Родитель
Сommit
2f7cd63982

+ 10 - 1
src/sentry/static/sentry/app/views/releases/detail/overview/chart/healthChart.tsx

@@ -76,7 +76,16 @@ class HealthChart extends React.Component<Props> {
     const {timeseriesData, location, shouldRecalculateVisibleSeries} = this.props;
 
     const otherAreasThanHealthyArePositive = timeseriesData
-      .filter(s => s.seriesName !== sessionTerm.healthy)
+      .filter(
+        s =>
+          ![
+            sessionTerm.healthy,
+            sessionTerm.otherHealthy,
+            sessionTerm.otherErrored,
+            sessionTerm.otherCrashed,
+            sessionTerm.otherAbnormal,
+          ].includes(s.seriesName)
+      )
       .some(s => s.data.some(d => d.value > 0));
     const alreadySomethingUnselected = !!decodeScalar(location.query.unselectedSeries);