From b4df42b027ee3457bfc56081be91b50066731ee3 Mon Sep 17 00:00:00 2001 From: Max Fitton Date: Thu, 29 Oct 2020 23:12:43 -0700 Subject: [PATCH] [Dashboard] Make Infeasible Actor UX Less Scary (#11654) * Update infeasible actor UI so that it only shows infeasible for an ActorClassGroup if at least one actor in the class is infeasible * lint --- dashboard/client/src/common/LabeledDatum.tsx | 2 +- .../logical-view/ActorClassGroup.tsx | 104 ++++++++++-------- .../logical-view/ActorDetailsPane.tsx | 2 +- 3 files changed, 58 insertions(+), 50 deletions(-) diff --git a/dashboard/client/src/common/LabeledDatum.tsx b/dashboard/client/src/common/LabeledDatum.tsx index 0f6313074..3fcf15716 100644 --- a/dashboard/client/src/common/LabeledDatum.tsx +++ b/dashboard/client/src/common/LabeledDatum.tsx @@ -24,7 +24,7 @@ const LabeledDatum: React.FC = ({ }) => { const classes = useLabeledDatumStyles(); const innerHtml = ( - + {label} diff --git a/dashboard/client/src/pages/dashboard/logical-view/ActorClassGroup.tsx b/dashboard/client/src/pages/dashboard/logical-view/ActorClassGroup.tsx index a37fa5945..ccf91644c 100644 --- a/dashboard/client/src/pages/dashboard/logical-view/ActorClassGroup.tsx +++ b/dashboard/client/src/pages/dashboard/logical-view/ActorClassGroup.tsx @@ -63,56 +63,64 @@ const ActorClassGroup: React.FC = ({ {title} - - - } - datum={ - Alive in summary.stateToCount ? summary.stateToCount[Alive] : 0 - } - /> - + + {Infeasible in summary.stateToCount && ( + + } + datum={summary.stateToCount[Infeasible]} /> - } - datum={ - Infeasible in summary.stateToCount - ? summary.stateToCount[Infeasible] - : 0 - } - /> - - } - datum={ - PendingResources in summary.stateToCount - ? summary.stateToCount[PendingResources] - : 0 - } - /> - - - + )} + + } + datum={ + Alive in summary.stateToCount ? summary.stateToCount[Alive] : 0 + } + /> + + + } + datum={ + PendingResources in summary.stateToCount + ? summary.stateToCount[PendingResources] + : 0 + } + /> + + + + + + + {expanded ? ( {entries} diff --git a/dashboard/client/src/pages/dashboard/logical-view/ActorDetailsPane.tsx b/dashboard/client/src/pages/dashboard/logical-view/ActorDetailsPane.tsx index 83f30d1ff..ea970fd58 100644 --- a/dashboard/client/src/pages/dashboard/logical-view/ActorDetailsPane.tsx +++ b/dashboard/client/src/pages/dashboard/logical-view/ActorDetailsPane.tsx @@ -126,7 +126,7 @@ const ActorDetailsPane: React.FC = ({ actor }) => { {isFullActorInfo(actor) && ( - + CPU Usage