mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Remove tab counts and update page-level data on each tab click (#33367)
## For #33225 (blank host name a known and tracked bug) https://github.com/user-attachments/assets/5698b8a0-693c-4aae-bc91-9925d856c400 - [x] QA'd all new/changed functionality manually --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
This commit is contained in:
parent
d467968c03
commit
df5d69d2ec
1 changed files with 14 additions and 15 deletions
|
|
@ -106,7 +106,12 @@ const ScriptBatchDetailsPage = ({
|
|||
|
||||
const { renderFlash } = useContext(NotificationContext);
|
||||
|
||||
const { data: batchDetails, isLoading, isError } = useQuery<
|
||||
const {
|
||||
data: batchDetails,
|
||||
isLoading,
|
||||
isError,
|
||||
refetch: refetchBatchDetails,
|
||||
} = useQuery<
|
||||
IScriptBatchSummaryV2,
|
||||
AxiosError,
|
||||
IScriptBatchSummaryV2,
|
||||
|
|
@ -155,8 +160,10 @@ const ScriptBatchDetailsPage = ({
|
|||
.CONTROLS_SCRIPTS_BATCH_DETAILS(batchExecutionId)
|
||||
.concat(newQuery ? `?${newQuery}` : "")
|
||||
);
|
||||
// update page's summary data (e.g. pct hosts responded) whenever changing tabs
|
||||
refetchBatchDetails();
|
||||
},
|
||||
[batchExecutionId, location?.search, router]
|
||||
[batchExecutionId, location?.search, refetchBatchDetails, router]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -279,27 +286,19 @@ const ScriptBatchDetailsPage = ({
|
|||
>
|
||||
<TabList>
|
||||
<Tab>
|
||||
<TabText count={ran}>Ran</TabText>
|
||||
<TabText>Ran</TabText>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<TabText count={errored} countVariant="alert">
|
||||
Errored
|
||||
</TabText>
|
||||
<TabText>Errored</TabText>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<TabText count={pending} countVariant="pending">
|
||||
Pending
|
||||
</TabText>
|
||||
<TabText>Pending</TabText>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<TabText count={incompatible} countVariant="pending">
|
||||
Incompatible
|
||||
</TabText>
|
||||
<TabText>Incompatible</TabText>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<TabText count={canceled} countVariant="pending">
|
||||
Canceled
|
||||
</TabText>
|
||||
<TabText>Canceled</TabText>
|
||||
</Tab>
|
||||
</TabList>
|
||||
<TabPanel>
|
||||
|
|
|
|||
Loading…
Reference in a new issue