-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ui): Worker Manager shows worker page properly when queue data is missing #7015
Conversation
When only worker-manager data is available, page no longer shows error and gives 404, but displays available info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff Yarik! Thanks 👍🏻
tooltipTitle="Terminate Worker" | ||
onClick={() => | ||
this.handleTerminateDialogActionOpen( | ||
worker.workerId, | ||
worker.workerGroup, | ||
worker.workerPoolId | ||
) | ||
} | ||
FabProps={{ | ||
disabled: terminateDisabled( | ||
worker.state, | ||
worker.providerId | ||
), | ||
}} | ||
/> | ||
)} | ||
{worker.actions.map(action => ( | ||
<SpeedDialAction | ||
requiresAuth | ||
tooltipOpen | ||
key={action.title} | ||
icon={<HammerIcon />} | ||
onClick={() => this.handleActionDialogOpen(action)} | ||
FabProps={{ | ||
disabled: actionLoading, | ||
}} | ||
tooltipTitle={action.title} | ||
/> | ||
))} | ||
</SpeedDial> | ||
{dialogOpen && | ||
(selectedAction ? ( | ||
<DialogAction | ||
error={dialogError} | ||
open={dialogOpen} | ||
title={`${selectedAction.title}?`} | ||
body={selectedAction.description} | ||
confirmText={selectedAction.title} | ||
onSubmit={this.handleWorkerContextActionSubmit} | ||
onError={this.handleActionError} | ||
onClose={this.handleDialogClose} | ||
/> | ||
) : ( | ||
<DialogAction | ||
error={dialogError} | ||
open={dialogOpen} | ||
title="Quarantine?" | ||
body={ | ||
<Fragment> | ||
<Fragment> | ||
Quarantining a worker allows the machine to remain | ||
alive but not accept jobs. Note that a quarantine can | ||
be lifted by setting "Quarantine Until" to | ||
the present time or somewhere in the past. | ||
</Fragment> | ||
<br /> | ||
<br /> | ||
<TextField | ||
id="date" | ||
label="Quarantine Until" | ||
type="date" | ||
value={format(quarantineUntilInput, 'yyyy-MM-dd')} | ||
onChange={this.handleQuarantineChange} | ||
/> | ||
<br /> | ||
<TextField | ||
id="info" | ||
label="Quarantine comment" | ||
type="text" | ||
fullWidth | ||
value={quarantineInfo} | ||
onChange={this.handleQuarantineInfoChange} | ||
/> | ||
</Fragment> | ||
} | ||
confirmText={ | ||
worker.quarantineUntil ? 'Update' : 'Quarantine' | ||
} | ||
onSubmit={this.handleQuarantineDialogSubmit} | ||
onError={this.handleActionError} | ||
onComplete={this.handleDialogClose} | ||
onClose={this.handleDialogClose} | ||
/> | ||
))} | ||
{terminateDialogOpen && ( | ||
<DialogAction | ||
error={terminateDialogError} | ||
open={terminateDialogOpen} | ||
title={terminateDialogTitle} | ||
body={terminateDialogBody} | ||
confirmText={terminateDialogConfirmText} | ||
onSubmit={this.handleTerminateDeleteClick} | ||
onError={this.handleTerminateDialogActionError} | ||
onClose={this.handleTerminateDialogActionClose} | ||
/> | ||
)} | ||
</Fragment> | ||
)} | ||
{worker && this.renderQueueWorker()} | ||
{!worker && WorkerManagerWorker && this.renderWorkerManagerWorker()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really slick! Nice! 🎉
@@ -169,7 +169,8 @@ export default class WMViewWorkers extends Component { | |||
|
|||
return ( | |||
<Dashboard | |||
title={`Workers for ${decodeURIComponent(params.workerPoolId)}`}> | |||
disableTitleFormatting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Thanks :)
When only worker-manager data is available, page no longer shows error and gives 404, but displays available info