Skip to content
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

Merged
merged 1 commit into from
May 15, 2024

Conversation

lotas
Copy link
Contributor

@lotas lotas commented May 15, 2024

When only worker-manager data is available, page no longer shows error and gives 404, but displays available info

image

@lotas lotas requested a review from a team as a code owner May 15, 2024 13:27
@lotas lotas requested review from petemoore and matt-boris and removed request for a team May 15, 2024 13:27
When only worker-manager data is available, page no longer shows error
and gives 404, but displays available info
Copy link
Contributor

@matt-boris matt-boris left a 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 👍🏻

Comment on lines +430 to +443
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 &quot;Quarantine Until&quot; 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()}
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Thanks :)

@matt-boris matt-boris merged commit a85c8b9 into main May 15, 2024
73 checks passed
@matt-boris matt-boris deleted the feat/w-m-ui branch May 15, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants