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

Implement job cancellation in UI #349

Merged
merged 4 commits into from
Oct 15, 2022
Merged

Conversation

Dandandan
Copy link
Contributor

@Dandandan Dandandan commented Oct 15, 2022

Which issue does this PR close?

Closes #350

Rationale for this change

Implementing job cancellation in UI and some small cleanup / fixing:

image

What changes are included in this PR?

Are there any user-facing changes?

@@ -51,7 +51,7 @@ export enum QueryStatus {
export interface Query {
job_id: string;
job_name: string;
status: QueryStatus;
job_status: string;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix - current API doesn't return status field.

@@ -94,13 +94,20 @@ export const ActionsCell: (props: any) => React.ReactNode = (props: any) => {
};
return (
<Flex>
<FaStop color={"red"} title={"Stop this job"} />
<FaStop color={"red"} title={"Stop this job"} onClick={() => {
fetch("api/job/" + props.value.job_id, {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This works succesfully - but has the "infinite loop" problem
#341

@@ -53,15 +53,6 @@ export const Header: React.FunctionComponent<HeaderProps> = ({
<NavBarContainer>
<Flex flexDirection={"row"} alignItems={"center"}>
<img alt={"Ballista Logo"} src={Logo} />
<Text
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems a bit redundant, I think we can remove it here

@@ -64,7 +64,7 @@ export const Summary: React.FunctionComponent<SummaryProps> = ({
fontWeight={"normal"}
>
<Text fontWeight={"light"} mb={2}>
General Cluster Info
Cluster Details
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if text is necessary, but "Cluster Details" seems a bit more appropriate.

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

Thanks @Dandandan. I tested this locally and I could cancel a job from the UI.

I did notice a glitch though where the job shows up twice on the UI. I filed #355 to track this

@andygrove andygrove merged commit 8be005e into apache:master Oct 15, 2022
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.

Add job cancel in the UI
2 participants