Refactor AppUpdateProgress to conditionally display progress for the restart stage. Remove unnecessary detail display for the restart status, enhancing clarity in update management.
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
This commit is contained in:
parent
991c10d48a
commit
8568a8a8ce
@ -112,7 +112,7 @@ const UpdateStage = ({ stage, status, percent, detail }) => {
|
|||||||
const resolvedStatus =
|
const resolvedStatus =
|
||||||
status !== 'error' && resolvedPercent === 100 ? 'complete' : status
|
status !== 'error' && resolvedPercent === 100 ? 'complete' : status
|
||||||
const color = getStageColor(resolvedStatus, token)
|
const color = getStageColor(resolvedStatus, token)
|
||||||
const showProgress = resolvedStatus === 'active'
|
const showProgress = resolvedStatus === 'active' && stage !== 'restart'
|
||||||
|
|
||||||
const StatusIcon =
|
const StatusIcon =
|
||||||
resolvedStatus === 'complete'
|
resolvedStatus === 'complete'
|
||||||
@ -179,8 +179,6 @@ const AppUpdateProgress = ({ progress, update, onClose }) => {
|
|||||||
|
|
||||||
const installDetail = installStatus === 'active' ? message : null
|
const installDetail = installStatus === 'active' ? message : null
|
||||||
|
|
||||||
const restartDetail = restartStatus === 'active' ? message : null
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex vertical gap='middle'>
|
<Flex vertical gap='middle'>
|
||||||
<Text>
|
<Text>
|
||||||
@ -203,11 +201,7 @@ const AppUpdateProgress = ({ progress, update, onClose }) => {
|
|||||||
percent={installPercent}
|
percent={installPercent}
|
||||||
detail={installDetail}
|
detail={installDetail}
|
||||||
/>
|
/>
|
||||||
<UpdateStage
|
<UpdateStage stage='restart' status={restartStatus} />
|
||||||
stage='restart'
|
|
||||||
status={restartStatus}
|
|
||||||
detail={restartDetail}
|
|
||||||
/>
|
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user