From feca6976e3d714b34ffb69eb07b75b06bfcc7168 Mon Sep 17 00:00:00 2001 From: gtr Date: Thu, 15 Jun 2023 12:05:21 -0400 Subject: [PATCH] ui: fix job details refresh when executing job Fixes: #103206 Previously, when a job was still executing, the job details page for that job would keep refreshing and the loading animation would interrupt the page, causing flickers. This commit fixes this bug to only show the loading animation when the `jobRequest` does not have data to show. Release note (ui change): fix bug where the job details page would flicker between the job details and a loading animation when a job is still executing. --- .../cluster-ui/src/jobs/jobDetailsPage/jobDetails.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/ui/workspaces/cluster-ui/src/jobs/jobDetailsPage/jobDetails.tsx b/pkg/ui/workspaces/cluster-ui/src/jobs/jobDetailsPage/jobDetails.tsx index 264343cfbd2c..97819e474fdd 100644 --- a/pkg/ui/workspaces/cluster-ui/src/jobs/jobDetailsPage/jobDetails.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/jobs/jobDetailsPage/jobDetails.tsx @@ -194,7 +194,8 @@ export class JobDetails extends React.Component { }; render(): React.ReactElement { - const isLoading = this.props.jobRequest.inFlight; + const isLoading = + this.props.jobRequest.inFlight && !this.props.jobRequest.data; const error = this.props.jobRequest.error; const job = this.props.jobRequest.data; const nextRun = TimestampToMoment(job?.next_run);