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

BITMAKER-5691: Enhance Job Filtering in Spider Job View #248

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 16 additions & 18 deletions estela-web/src/pages/ProjectJobListPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,10 @@ export class ProjectJobListPage extends Component<RouteComponentProps<RouteParam
await this.getJobs(page);
};

onChangeStatus = (index: number, count: number) => {
if (count === 0) {
const tableStatus = this.state.tableStatus;
tableStatus[index] = !tableStatus[index];
this.setState({ tableStatus: tableStatus });
}
onChangeStatus = (index: number) => {
const tableStatus = this.state.tableStatus;
tableStatus[index] = !tableStatus[index];
this.setState({ tableStatus: tableStatus });
};

render(): JSX.Element {
Expand Down Expand Up @@ -620,8 +618,8 @@ export class ProjectJobListPage extends Component<RouteComponentProps<RouteParam
<Text className="text-estela-black-medium font-medium text-xs">STATUS</Text>
<Content className="my-2">
<Checkbox
checked={waitingJobs.length == 0 ? tableStatus[waiting] : true}
onChange={() => this.onChangeStatus(waiting, waitingJobs.length)}
checked={tableStatus[waiting]}
onChange={() => this.onChangeStatus(waiting)}
>
<Space direction="horizontal">
<Text className="text-estela-black-medium font-medium text-sm">
Expand All @@ -634,8 +632,8 @@ export class ProjectJobListPage extends Component<RouteComponentProps<RouteParam
</Checkbox>
<br />
<Checkbox
checked={queueJobs.length == 0 ? tableStatus[queued] : true}
onChange={() => this.onChangeStatus(queued, queueJobs.length)}
checked={tableStatus[queued]}
onChange={() => this.onChangeStatus(queued)}
>
<Space direction="horizontal">
<Text className="text-estela-black-medium font-medium text-sm">
Expand All @@ -648,8 +646,8 @@ export class ProjectJobListPage extends Component<RouteComponentProps<RouteParam
</Checkbox>
<br />
<Checkbox
checked={runningJobs.length == 0 ? tableStatus[running] : true}
onChange={() => this.onChangeStatus(running, runningJobs.length)}
checked={tableStatus[running]}
onChange={() => this.onChangeStatus(running)}
>
<Space direction="horizontal">
<Text className="text-estela-black-medium font-medium text-sm">
Expand All @@ -662,8 +660,8 @@ export class ProjectJobListPage extends Component<RouteComponentProps<RouteParam
</Checkbox>
<br />
<Checkbox
checked={completedJobs.length == 0 ? tableStatus[completed] : true}
onChange={() => this.onChangeStatus(completed, completedJobs.length)}
checked={tableStatus[completed]}
onChange={() => this.onChangeStatus(completed)}
>
<Space direction="horizontal">
<Text className="text-estela-black-medium font-medium text-sm">
Expand All @@ -676,8 +674,8 @@ export class ProjectJobListPage extends Component<RouteComponentProps<RouteParam
</Checkbox>
<br />
<Checkbox
checked={stoppedJobs.length == 0 ? tableStatus[stopped] : true}
onChange={() => this.onChangeStatus(stopped, stoppedJobs.length)}
checked={tableStatus[stopped]}
onChange={() => this.onChangeStatus(stopped)}
>
<Space direction="horizontal">
<Text className="text-estela-black-medium font-medium text-sm">
Expand All @@ -690,8 +688,8 @@ export class ProjectJobListPage extends Component<RouteComponentProps<RouteParam
</Checkbox>
<br />
<Checkbox
checked={errorJobs.length == 0 ? tableStatus[withError] : true}
onChange={() => this.onChangeStatus(withError, errorJobs.length)}
checked={tableStatus[withError]}
onChange={() => this.onChangeStatus(withError)}
>
<Space direction="horizontal">
<Text className="text-estela-black-medium font-medium text-sm">
Expand Down
Loading